Can't locate object method "add_actions"...



Hi all,

Trying to build a menubar using Gtk3.  I'm using the same methods as
Gtk2, which seem like they'd continue to work.

However, I'm getting the following error message:
"Can't locate object method "add_actions" via package
"Gtk3::ActionGroup" at ./foo.pl"

According to the documentation
(http://developer.gnome.org/gtk3/stable/GtkActionGroup.html), it is
(still) a method.

Not sure code matters, but here are snippets.  Any suggestions?

    my @entries = (
       [ 'FileMenu',       undef, gettext('_File') ],
    ...
    );

    my $ui_info = "<ui>
        <menubar name='MenuBar'>
         <menu action='FileMenu'>
         ....
</ui>";

    my $actions = Gtk3::ActionGroup->new('Actions');
    $actions->add_actions( \ entries, undef );

    my $ui = Gtk3::UIManager->new;
    $ui->insert_action_group( $actions, 0 );

    $window->add_accel_group( $ui->get_accel_group );
    $ui->add_ui_from_string($ui_info);
    $box->pack_start( $ui->get_widget('/MenuBar'), FALSE, FALSE, 0 );

Thanks,
Dave M



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