Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Tk question about Ev

by Courage (Parson)
on Jun 08, 2002 at 12:57 UTC ( [id://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 Tk.pm 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 little...it 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 Tk.pm 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 comp.lang.perl.tk
        There are some very good Tk people there

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-19 02:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found