Do you know where your variables are? | |
PerlMonks |
Re: Using Win32::GUI in a packageby jplindstrom (Monsignor) |
on Dec 15, 2002 at 19:02 UTC ( [id://220040]=note: print w/replies, xml ) | Need Help?? |
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
I don't know if that's the right way, or the best way, but it works for me.
In Section
Seekers of Perl Wisdom
|
|