Re: Gtk2::ItemFactory



Hi Gavin,

Gavin Brown wrote:
The attached script produces a line of this:

Use of uninitialized value in subroutine entry at 
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Gtk2.pm line 71.

for each item in the @items array. I'm pretty sure that I've got the
layout of the items correct - it does actually run. I guess this has 
something to do with warnings in Gtk2.pm.

If you change the value of "action" in the list form (the 4th element) from 
"undef" to some defined value (e.g. 0), the warning will disappear. Like below:

        [
                '/Run Galeon',
                undef,
                sub { system('galeon &') },
                undef,
                '<StockItem>',
                'gtk-execute'
        ],

becomes:

        [
                '/Run Galeon',
                undef,
                sub { system('galeon &') },
                0,
                '<StockItem>',
                'gtk-execute'
        ],


$action as "undef" generates the warning in Gtk2.pm, line 71 Your code works
fine though...

Regards,
Tudor





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