Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Using Win32::GUI in a package

by jplindstrom (Monsignor)
on Dec 15, 2002 at 19:02 UTC ( [id://220040]=note: print w/replies, xml ) Need Help??


in reply to Using Win32::GUI in a package

When you uncomment the line, you move your event handler subs from package main to package gui_test. But Win32::GUI doesn't know that.

To get Win32::GUI to call the event handler for the btnCancel_Click in the new package, I think you need to set the -name of the button to "gui_test::btnCancel".

That seems very impractical, so I never do that in my programs. I use modules and stuff though, but I always place my event handlers in package main, like this

sub ::btnCancel_Click {

I don't know if that's the right way, or the best way, but it works for me.


/J

Replies are listed 'Best First'.
Re: Re: Using Win32::GUI in a package
by Nitrox (Chaplain) on Dec 15, 2002 at 19:13 UTC
    I don't know if that's the right way, or the best way, but it works for me

    And it works for me too, thanks much for a solution jplindstrom!

    -Nitrox

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found