Can't locate object method "add_actions"...
- From: Dave M <dave nerd gmail com>
- To: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Can't locate object method "add_actions"...
- Date: Sat, 26 May 2012 19:30:57 -0500
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]