At 2:02 PM -0600 11/12/06, William Squires wrote:
What if you put no code in the Close event (Events | Close)? Will the window still close? i.e. what is the 'real' purpose of the window's Close event? Is it just a notification you can use to clean up (and the window will close itself regardless), or are you (the programmer) responsible for calling "Self.Close" or "Self.Hide" in the Close event?

The Close event is just a notification, the Window will close in any case. It's a good place to do any clean up such as breaking any circular references between any objects on that window. You do not need to call .close nor .hide.

Note that although the Window will 'Close' visually, it will still exist until all references to it are NIL. Thus it's possible to read properties and even call methods on a Closed window. Sometimes this is handy to get return values out of a dialog that's just been closed. But be cautious because many of the controls on the window will already be nil. It's generally best to do as little as possible with a closed window, and just let it die a peaceful death. :-)

Regards,
Joe Huber
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to