GTK2::Button retrieved from Tie::IxHash hash value does not render
- From: Terrence Brannon <schemelab gmail com>
- To: gtk-perl-list gnome org
- Subject: GTK2::Button retrieved from Tie::IxHash hash value does not render
- Date: Thu, 21 Jul 2011 10:59:33 -0400
The simple program below:
# Gtk2->init; works if you didn't use -init on use
my $window = Gtk2::Window->new('toplevel');
my $vbox = Gtk2::VBox->new (FALSE, 0);
#tie my %button, Tie::IxHash;
$button{qbimport} = Gtk2::Button->new('Quickbooks Import');
$button{qbimport}->signal_connect( clicked => \&qbimport );
$button{quit} = Gtk2::Button->new('Quit');
$button{quit}->signal_connect( clicked => sub { Gtk2->main_quit } );
$vbox->add($button{$_}) for (keys %button);
works just fine if you dont tie the %button hash with Tie::IxHash.
However, if you do, then it fails with the error:
Gtk2::Button=HASH(0x29b317c) is not of type Gtk2::Widget at
v2.pl line 19.
Is there a sensible reason why a retrieved value presented to ->add() would do this?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]