glade whit multiple windows

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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/');
 my $newForm = $newWin->get_widget('wSMS');

package callbackSMS;
my $ID;
sub init         #it's on

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.


Site Timeline