Re: [tcltk-perl] Change the way that %-subs are handled.
Brought to you by:
hobbs
From: Jeff H. <je...@Ac...> - 2004-04-21 07:08:23
|
Konovalov, Vadim wrote: > I still hope that "correct" method is doable, namely > > $mw->bind('<Motion>', \&hadler), > sub handler { > # uses %-subs freely, > print Ev('x'); > } > > I thought this is quite doable with Ev to do some preparations first (to > manage which results must be stored), and then return an object that, at a > time when its result is needed, retreives it properly. ... > BTW, probably right now it is the right moment to check how this is > implemented in Ruby or Python. Python creates an object that tries to grab all the relevant %-subs. It is flawed in that it grabs all %-subs, whether they are pertinent to the event type or not. This also is slower than the selective %-subs model. -- Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos |