RE: [tcltk-perl] Change the way that %-subs are handled.
Brought to you by:
hobbs
From: Konovalov, V. <vko...@sp...> - 2004-04-21 07:15:22
|
> > 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. Indeed, grabbing all possible '%' is not best idea. Later I'll try to see how things go in Ruby. Now I think, may be perfect solution is not possible at all in this case... Vadim. |