View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003982 | JEDI VCL | 00 JVCL Components | public | 2006-11-05 22:59 | 2006-11-06 02:17 |
Reporter | EinWill | Assigned To | obones | ||
Priority | normal | Severity | tweak | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | 3.20 | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003982: Deleting the component that is assigned to TJvDBSpinEdit.DataSource property produce an exception | ||||
Description | 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; ------------------------------------------------------------- | ||||
Tags | No tags attached. | ||||