[Glade-users] multiple istance of glade whit perl

i'm writing a tool that,when a button is clicked a new glade window is
open, here my code:

sub btnNewMessage_onclick {
 my $newWin = Gtk2::GladeXML->new('gui/wSMS.glade');
 my $newForm = $newWin->get_widget('wSMS');

package callbackSMS;
my $ID;
sub init {         #it's on form.show()

sub btnOk_clicked {
 print $ID;

Ok, everytime i click btnNewMessage, a new window appear. but if i
click btnOk, the value of $ID will be the same for all windows!
it seems that every $newWin share the same package "callbackSMS"
there is some way to separate the packages? or using a class?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]