From: Kevin A. <al...@se...> - 2004-04-29 17:15:58
|
On Apr 29, 2004, at 9:46 AM, Richard Wolff wrote: > >> So, the most obvious thing you'll see is that the Message Watcher >> doesn't display "unused events" because those events aren't ever bound >> and never go through the PythonCard framework dispatch mechanism. In >> order to see all events for a given component as well as event order >> you'll have to run a special sample like testevents that binds all >> events. > > Could you provide a debug option that would instantiate a handler to > catch/display the "unused events"? Once in a rare while, it's helpful > to see > the unused events scrolling by and then realize "ah, that's the one I > should > be catching". > Yeah, I agree that it is useful to see the unused events for debugging purposes, though it doesn't seem like many people ever use the Message Watcher. Anyway, it shouldn't be too hard to hook that up. We might even make the binding and dispatch conditional so that a config flag would change whether all events are hooked up or not, so that way if the Message Watcher is active it would bind all events and otherwise would only bind the used events. Whether we do that is conditional on simply being able to call Skip() for unused events in dispatch and have them do the right thing as far as wxPython is concerned. I'll test that with background events today, but the components are trickier. ka |