From: Steve F. <sf...@ih...> - 2006-07-04 06:57:17
|
Hi, I've got to put together a number of pages with a lot of text fields, the contents of which need to be saved as soon as they're changed, and I'd like to avoid writing a lot of boilerplate on_textFieldName_loseFocus() events. So I'd like to modify the event dispatch so that whenever a text field loses focus, PythonCard will call a single, particular function within the page's object with that event, such as handleAllTextFieldsLosingFocus(self, event). Then at that point I can inspect the field using event.target and do my saving. Is there a better way of doing this then mucking around with the event dispatch system? Otherwise I'd guess subclassing Scriptable is probably the right direction? Any help would be appreciated. Thanks. Steve |