RE: [tcltk-perl] Change the way that %-subs are handled.
Brought to you by:
hobbs
From: Konovalov, V. <vko...@sp...> - 2004-04-22 08:24:49
|
> OK, I've manage to make this work, so the above would be > written as: > > my $sub = sub { > print STDERR "CALLBACK (@_)\n"; > }; > $mw->bind('<Motion>', [$sub, Tcl::EV('%X', '%Y'), '<Motion>']); I vote for removing elder version of Ev completely and newer should be named 'Ev' to exactly match with perlTk's one. My opinion people will be less confused it this case. And to deal with it like following: $mw->bind('<Motion>', [$sub, Tcl::Ev(XY'), '<Motion>']); In case you want to catch elder usage and warn users, it is better to warn them when you'll detect elder $int->call(\\"XY", sub{...}) construct. Vadim. |