[wxpython-users] dynamic vs. static event binding in a custom
popup menu class
Robin Dunn
robin at alldunn.com
Mon Apr 7 10:14:21 PDT 2008
Olga Marchevska wrote:
> Hello,
>
> Please help me with a couple of related questions:
>
> - Aren't event handlers unbound automatically when a window is destroyed?
Yes.
>
> - If yes, is there a difference for handlers bound to the event source
> window:
> window.Bind(event, func)
> and handlers bound to some parent window or frame:
> ParentWindow.Bind(event, func, window)?
Yes. If window is destroyed before ParentWindow is destroyed, then in
the later case ParentWindow will still have event bindings for events
coming from window. (Which won't ever happen unless some other child
window is created with the same ID.)
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list