On Aug 28, 2009, at 12:52 PM, Paul McNett wrote:

> There's some refactoring to do in these two methods, certainly.  
> __onClose() is going
> to be called no matter what, unless the user overrides with their  
> own event handler,
> while close() is something available to the appdev to call. But in  
> normal situations,
> calling form.close() will also result in form.__onClose() being run.

        __onClose() handles the wx-level Close event. This can be raised by a  
click on the window's close box, or via a programmatic call, or a  
system event like an application quitting. The developer has an  
opportunity to return False from beforeClose() to prevent the window  
from closing, unless the original event was passed with the 'force'  
parameter of True. In that case, the window must close, and the  
beforeClose() logic is skipped.

        If you call form.close(), it will call the wx-level Close() method,  
which should raise the Close event, and that will be handled by the  
__onClose() handler.


-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to