From: Johan L. <jo...@ba...> - 2002-05-21 07:24:48
|
At 16:34 2002-05-17 -0400, Morbus Iff wrote: >I've recently switched everything over to modules/packages, and >the above code has been given a standard modular header: > > package AmphetaDesk::OS::Windows; [please correct me if I'm wrong here, this is how I understand it to work] Event handlers you create here will be located in this package. Controls will default to calling event handlers in package main unless you -name your controls with the package name as a prefix (e.g. "Amphetadesk::OS::Windows::myWindow"), which makes it difficult to access them[1]. I use modules all the time and I usually place all my event handler subs in package main like this: sub ::myWindow_Terminate { } If you try that, does it work? /J [1] Idea: In a future version of Win32::GUI, the control could keep track of the containing package itself, possibly using caller() to determine which event handler to use. -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "no tv" http://use.perl.org/comments.pl?sid=4416&cid=6621 dmoz (1 of 7): /Computers/Programming/Languages/Perl |