View Issue Details

IDProjectCategoryView StatusLast Update
0003982JEDI VCL00 JVCL Componentspublic2006-11-06 02:17
ReporterEinWillAssigned Toobones 
PrioritynormalSeveritytweakReproducibilityN/A
Status resolvedResolutionfixed 
Product Version3.20 
Target VersionFixed in Version3.30 
Summary0003982: Deleting the component that is assigned to TJvDBSpinEdit.DataSource property produce an exception
DescriptionAssume, 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;
-------------------------------------------------------------
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
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