Re: Gtk2::ActionGroup problem



muppet wrote:

That is, you're being bitten by order of execution --- the call to
Gtk2->main happens earlier in the file than the initialization of
@uientries, so when you get into gscript_create_menubar2, @uientries
has never been filled.

Solution:  use a BEGIN block around the initialization, put it in
module, or otherwise rearrange things to make sure it executes first.

Yes, you were absolutely right. I moved the initialization before the
call to Gtk2->main, now it is working as expected. Thanks a lot!

I'll really try to remember that putting my $var somewhere in the middle
of Perl subs is a bad idea ...

Martin




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