logo       


Hm. ItemFactory vs. gtk2-perl 0.90 ? :): msg#00235

Subject: Hm. ItemFactory vs. gtk2-perl 0.90 ? :)
Hi there. I posted a topic about ItemFactory things and "attach" a small 
source code. I had some problems with callback. Now i upgraded gtk2-perl to 
0.90 and this script which running :) not run with new 0.90 version.

The error is this : 

root:/works2/uhutv-0.9# ./x.pl
ItemFactory couldn't retrieve widget it just created at 
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Gtk2.pm line 74.

So what is that ? :) I f*cked up something in the source ?? Or it wasn't 
really good ? Or what? :)

Best Regards: Christian Hamar alias kRiX

Ps..: here is the source :

#!/usr/bin/perl -w

use Gtk2;

init Gtk2;

$m{'win'} = new Gtk2::Window;
$m{'win'}->signal_connect('delete-event', sub { Gtk2->main_quit; });
$m{'win'}->set_title("TEST");

$m{'vbox'} = new Gtk2::VBox(0,1);
$m{'win'}->add($m{'vbox'});

@menu_items = (
{
        path            => '/Main',
        type            => '<Branch>'
},
{
        path            => '/Main/_TV',
        accelerator     => '<control>T',
        callback        => \&do_some
},
{
        path            => '/Main/_Print',
        accelerator     => '<control>P',
        callback        => \&do_print
},
{
        path            => '/Main/_Exit',
        accelerator     => '<control>E',
        callback        => sub {Gtk2->main_quit;}
},
{
        path            => '/Perfs',
        type            => '<Branch>'
},
{
        path            => '/Perfs/_Settings',
        accelerator     => '<control>S',
        callback        => \&do_settings
},
{
        path            => 'Help',
        type            => '<Branch>'
},
{
        path            => '/Help/About',
        callback        => \&do_about
}
);

$m{'menubar'} = create_menubar( $m{'win'} );
$m{'vbox'}->pack_start($m{'menubar'}, 0, 1, 0);

sub create_menubar {
        my  ( $window ) = @_;
        my $item_factory;
        my $accel_group;
        $accel_group = new Gtk2::AccelGroup();
        $item_factory = new Gtk2::ItemFactory( 'Gtk2::MenuBar', '<main>', 
$accel_group);
        $item_factory->create_items( @menu_items);
        $window->add_accel_group($accel_group);
        return ($item_factory->get_widget('<main>'));
}

$m{'win'}->show_all;


main Gtk2;


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe