Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Tk question about Ev

by Courage (Parson)
on Jun 08, 2002 at 12:57 UTC ( #172770=perlquestion: print w/replies, xml ) Need Help??

Courage has asked for the wisdom of the Perl Monks concerning the following question:

Dear all,

two small questions:
1. Is there exists something to read about 'Ev' which is used in Tk?
2. Inside there exists a subroutine 'Ev' which ends with return bless $obj,'Tk::Ev'; However I can not find Tk::Ev module anywhere. Where is it?

Thanks in advance,
Courage, the Cowardly Dog.
PS. Something fishy is going on there, or my name is Vadim Konovalov. And it's not.

Replies are listed 'Best First'.
Re: Tk question about Ev
by ariels (Curate) on Jun 08, 2002 at 13:22 UTC
    See the docs for Tk::bind (part of the Tk distribution), which uses it.
Re: Tk question about Ev
by smackdab (Pilgrim) on Jun 09, 2002 at 03:49 UTC
    Also, Mastering Perl/Tk has a chapter (15) on MainLoop and it is talked about a is a good book

    Wouldn't you know, that is the chapter that O'Reilly gives for free ;-)

    I think this worked out for you ;-)
      Thank you a lot!
      As additional note I want to share my small improvement into module that makes it ~30% faster.
      (Ev is usually used in GUI event callbacks, and it's crucial to write code there which executes as fast as possible)
      sub Ev { if (@_ == 1) { my $arg = $_[0]; return bless (((ref $arg) ? $arg : \$arg), 'Tk::Ev'); } else { return bless [@_],'Tk::Ev'; } }
      I wrote small becnchmark program and can share it and its result as well.

      Courage, the Cowardly Dog.

        You should consider posting it to
        There are some very good Tk people there

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://172770]
Approved by virtualsue
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2020-06-01 05:47 GMT
Find Nodes?
    Voting Booth?

    No recent polls found