popup_menu glade


I am developing a new application using Glade and Perl. I have created a
menu (with glade) to use when a user right clicks. I can get the menu to
show up once, but then when i right click again i get this error.
*** unhandled exception in callback:
***   Can't call method "popup" on an undefined value at file_admin.pm
line 108.***  ignoring at perl2.pl line 3.

this is my sub to get the popup_menu

sub on_treeview2_button_press_event {
        my ($widget, $event ) = _;
        if ( defined( $event->button ) and
                ( $event->button eq '3' ) )
                my $popup_menu =$gladexml->get_widget('menu1');
                $popup_menu->popup( undef, undef,undef, undef, $event->button, $event-

What am i doing wrong, or not doing that is keeping this menu from
appearing again?

Thanks for any help.

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