From: Kevin A. <al...@se...> - 2001-09-04 00:26:00
|
> From: Andy Todd > > Perusing spec.py I noticed a small typo. The event name 'keyUp' was > incorrectly entered as 'keUp' in the events list for 'widget'. This > would stop any key up event handlers from working in current and > previous releases. This has now been fixed and updated in cvs and should > be included in the next release. > > There, we can all breathe a sigh of relief now ;-) > > Whilst I was looking at the event model I wondered if anyone has felt > the need to write a key down or key up event handler? I can't recall > ever doing so, key press is sufficient for most of my requirements. Just > because we can support key down and up (and indeed mouse down and mouse > up) do we actually need these events in PythonCard? In the spirit of > KISS maybe we could leave them out. Or not, I'm just thinking out loud > here so feel free to join in if you have an opinion. Events that you can ignore don't really make the system more complex. You can typically ignore mouseDown and mouseUp and just use mouseClick, but when you need them, they are really nice (see resourceEditor.py). If you look at class wxPython_TextFieldEventBinding in wxPython_binding, you'll see that the only events bound right now are 'textUpdate' and 'textEnter'. I had written the code to do the other text events but it was before we got cvs going and while Rowland and I were emailing files back and forth the code got dropped. There may also have been some issues with calling Event.Skip() in wxPython, but I can't remember. Anyway, I need to get back into the event binding code, add the missing events, add closeField and/or exitField like I planned to a long time ago (well six weeks seems like a long time) and then verify that everything works as planned. I'll try and do that this week. ka |