Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Global vs. local? (Win32::GUI NEM)

by lodin (Hermit)
on May 28, 2009 at 12:34 UTC ( #766649=note: print w/replies, xml ) Need Help??


in reply to Global vs. local?

This isn't a reply to what you asked for, but the old event model is really tiresome. One ends up generating a bunch of global (named) subroutines just as you do. So now that you have the closure working and found enlightenment, perhaps you should see if you can use the new event model (NEM). It's not that well documented I believe, but basically your subroutines sub NAME_EVENT { ... } can be replaced with -onEVENT => sub { ... } when you create the component called NAME.

I don't know which components support the new event model or which events for those components that have a NEM callback.

lodin

Replies are listed 'Best First'.
Re^2: Global vs. local? (Win32::GUI NEM)
by jpavel (Sexton) on May 28, 2009 at 12:55 UTC
    First I've heard of the NEM. That's definitely more inline with how I'd like to handle this. Thanks all for the quick and enlightening responses!
Re^2: Global vs. local? (Win32::GUI NEM)
by Marshall (Canon) on May 28, 2009 at 16:51 UTC
    I've never used the Win32::GUI module. I tried to install it on ActiveState 5.10 but there is a bug in the doc installation so it is hard for me to read about it.

    Anyway what in the heck is this type glob stuff about? Why? All my GUI's so far with Perl use Tk. I can run my stuff on Windows, MAC, Linux,... so I haven't fiddled with platform specific Windows things like this, but I am curious about this type glob stuff...it just looks weird to me. Very weird. There is obviously something very basic about Win32::GUI that I don't understand. Why can't this thing do what other GUI's for Perl do?

      He used the globs to dynamically generate named subs.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2022-01-17 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (51 votes). Check out past polls.

    Notices?