From: <bra...@om...> - 2005-03-20 02:01:22
|
The same as HyperCard, too. I should have guessed! Thanks! pyt...@li... wrote on 03/19/2005 06:41:53 PM: > Here you go - > > def on_keyPress(self, event): > #Get the object that was typed into > eventSourceWidget = event.target > > Just like Javascript DOM : ) > > Regards, > > > Liam Clarke > > On Sat, 19 Mar 2005 18:25:37 -0600, bra...@om... > <bra...@om...> wrote: > > > > I was glad to discover that generic event handlers such as 'on_closefield' > > (without the widget name) appear to be available in PythonCard, but I didn't > > see this in any documentation. I just gave it a try because that was how > > HyperCard worked. > > > > HyperCard had a function called "the target" which returned the name of the > > widget from which the event was originally generated. Is there any such > > equivalent method in PythonCard? > > > > I'd like to subclass model.Background with a class that could intercept and > > process events from all my various backgrounds. This could save me from > > having to define an individual event handler for every single widget, at > > least in cases where these widgets all have features in common. > > > > Thanks! > > > > > > > -- > 'There is only one basic human right, and that is to do as you damn > well please. > And with it comes the only basic human duty, to take the consequences. > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users |