Donovan asked:
> 1. Determine when MyProp is changed so that TMyDescendantComponent
> can take some specialised action
The main way to achieve this is to modify the base component to use a
SetMyProp to stire the new value into the FMyProp, and either have this
SetMyProp procedure virtual so that decendants can override and do their own
stuff, or have a seperate virtual method that is called as a notification
method that the decendant can override.
> 2. Determine when OnMyEvent is fired so that TMyDescendantComponent
> can take some specialised action
The standard delphi trick here is to make new virtual method that makes the
call to the OnMyEvent, and esnure that all you code call this rather than
calling OnMyEvent directly. This allows any decendants to override this
method and add in their own processing as required. Delphi does this
extensively in the VCL so have a look there for some examples.
Cheers, Max.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/