Re: Problem with Gnome2::App menus



Le-Borgne Patrice said:
I wrote 2 years ago, an little Gnome app. To create the menus, i used
the code below but it does not work anymore with gnome2. The window
appears but when i activate the menu, nothing happen except the
message :

***unhandled exception in callback :
*** Not a CODE reference at ...

...

here's one of your GnomeUIInfo structures:

['item','Nouveau',undef, [\&nouveau_document,$self],'stock','gtk-new'],

according to the Gnome2::AppHelper manpage, that should be

 [ type, label, hint, moreinfo, pixmap_type, pixmap_info, accelerator_key,
modifiers ]

in other words, it looks like you're passing the user-data where the callback
should be.  the error message agrees with that, as an array reference is not a
subroutine reference.


The GnomeUIInfo handling code in Gnome2 is only partially taken from the old
Gnome-Perl module; some bits simply couldn't be made to work the same way with
Gtk2-Perl as they did with Gtk-Perl.  Torsten would be the one to give a more
complete answer.


-- 
muppet <scott at asofyet dot org>



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