Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
3982 00 JVCL Components tweak N/A 2006-11-05 22:59 2006-11-06 02:17
EinWill  
obones  
normal  
resolved 3.20  
fixed  
none    
none 3.30  
0003982: Deleting the component that is assigned to TJvDBSpinEdit.DataSource property produce an exception
Assume, that we have TJvDBSpinEdit.DataSource equals to MyDataSource1. Now we delete MyDataSource1. JvDBSpinEdit still contains a link to this component and it produce an exception.

Reason: TJvDBSpinEdit.SetDataSource calls DataSource.FreeNotification,
        but Notification method is never handled.

Solution: We should override protected method Notification like this:
-------------------------------------------------------------
procedure TJvDBSpinEdit.Notification(AComponent: TComponent;
  Operation: TOperation);
begin
  inherited Notification(aComponent, Operation);
  if (Operation = opRemove) and (FDataLink <> nil) and
     (aComponent = DataSource) then DataSource := nil;
end;
-------------------------------------------------------------
Issue History
2006-11-05 22:59 EinWill New Issue
2006-11-06 02:17 obones Status new => resolved
2006-11-06 02:17 obones Fixed in Version => Daily / SVN
2006-11-06 02:17 obones Resolution open => fixed
2006-11-06 02:17 obones Assigned To => obones

There are no notes attached to this issue.