Click here to get back home

glade whit multiple windows

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
glade whit multiple windows Spocchio 03-31-2008
Posted by Spocchio on March 31, 2008, 6:13 pm
Please log in for more thread options
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!

Similar ThreadsPosted
gtk2 / glade problem. September 28, 2004, 12:56 am
how to append values to the combo box in gtk2 which was created with glade. April 10, 2006, 3:17 am
assigning multiple hash values to multiple variables May 2, 2006, 7:55 pm
multiple changes on multiple lines April 2, 2005, 9:42 am
windows program return values vs perl return values from a call to system() -- windows post only October 29, 2005, 6:22 pm
Windows CE, Windows Mobile November 27, 2006, 4:08 pm
Multiple s/xx/yy/ October 31, 2004, 3:17 pm
Multiple FTP session August 31, 2005, 7:33 am
Multiple Attachments December 7, 2005, 12:32 pm
multiple languages November 3, 2006, 11:36 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap