|
From: Spocchio on 31 Mar 2008 18:13 hi, I'm making a glade-based tool: there is a window "father" that have to open more child windows, here my code: sub btnNewMessage_onclick { my $newWin = Gtk2::GladeXML->new('gui/wSMS.glade'); my $newForm = $newWin->get_widget('wSMS'); $newWin->signal_autoconnect_from_package('callbackSMS'); $newForm->show; } package callbackSMS; my $ID; sub init #it's on form.show() { $ID=rand(0,1000); } sub btnOk_clicked { print $ID; } ok, if I open more than 1 windows, when i click btnOk i get the some result from all windows. so when i run the init(), I overwrite the data of the previous window. What could be the correct method to open more of the some window? i don't think the package is the best solution. thanx!
|
Pages: 1 Prev: FAQ 7.28 How do I clear a package? Next: FAQ 7.26 How can I find out my current package? |