EventManager and Throbber updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-12-20 20:43:35 +00:00
parent 159d1933fe
commit d9c9481f26
3 changed files with 43 additions and 31 deletions

View File

@@ -28,7 +28,7 @@ There's also a new object-oriented way to register for events. This
invocation is equivalent to the one above, but does not require the
programmer to declare or track control ids or parent containers:
eventManager.register(handleEvents, EVT_BUTTON, myButton)
eventManager.Register(handleEvents, EVT_BUTTON, myButton)
This module is Python 2.1+ compatible.

View File

@@ -124,6 +124,12 @@ class Throbber(wxPanel):
self.event.set() # we start out in the "resting" state
def __del__(self):
# make sure it's stopped, since EVT_WINDOW_DESTROY may not be sent
# on all platforms
self.Stop()
def OnDestroyWindow(self, event):
# this is currently broken due to a bug in wxWindows... hopefully
# it'll be fixed soon. Meanwhile be sure to explicitly call Stop()