On Apr 12, 2007, at 9:08 PM, [EMAIL PROTECTED] wrote: > On Apr 13, 2007, at 00:15 UTC, William Squires wrote: > >> Will it's Open() and Close() events get fired just >> like those of 'real' controls? I know the constructor/destructor will >> get called, but what about the events? > > No. There's nothing magical about Open and Close events, except that > they're defined by the Control class; the window looks for all of its > instances that are Controls and calls Open and Close on them (well, > indirectly). > > It might be a sensible feature request to extract the stuff related to > opening and closing into an Interface which Control implements, but > which your own classes could implement too, and have Window use that. > > But alternatively, of course, you could just choose to subclass > Control. > Is there any other hidden costs associated with subclassing Control? (other than the stuff it inherits)? i.e. any 'gotcha's?
>> Maybe I could use that as an >> explicit way to free all the Eggs in the EggCarton class (by moving >> the destructor code into the Close() event.)? > > If you only intend to use EggCartons as controls on a window, then > sure... but is that really your intent? > > Best, > - Joe > > -- > Joe Strout -- [EMAIL PROTECTED] > Verified Express, LLC "Making the Internet a Better Place" > http://www.verex.com/ > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
