Frank Schönheit - Sun Microsystems Germany wrote:
No. The MyTabPage implemented a handler for the GetFocus event of one of
its children. Please examine the original example more carefully ;)
Point taken.
The other case you mention has nothing to do with
derivatives of Window at all; of course you have to be careful that a
member does not access the already partially destroyed parent.
That's the point: VCL does this. When a window is destroyed, it's child
windows (held as members) are destroyed, too. Now if one of those
members has the focus, VCL moves the focus to another suitable control -
either the being-destroyed window itself, or to a sibling of the member
window. In both cases, VCL calls into a partially destroyed instance.
I just tried to say that this has nothing to do with focus handling in
particular. You always have to handle such cases, this can happen as
soon as you implement a virtual method (or a callback for that matter).
Kind regards, pl
--
If you give someone a program, you will frustrate them for a day;
if you teach them how to program, you will frustrate them for a lifetime.
-- Author unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]