igoryonya has asked for the wisdom of the Perl Monks concerning the following question:
But the menu doesn't appear on the window and in console, there is an error message:#!/usr/bin/env perl use Prima qw(Application Buttons MsgBox); my $window = Prima::MainWindow->new( text=>'Hello world!', menuItems=>[ '~File', [ ['~Open', 'Ctrl+O', '^O', sub{message('open!')}], ['~Save as...', sub{message('save as!')}] ] ], size=>[200, 200] ); $window->insert(Button=> text=>'Click me', growMode=>gm::Center, onClick=>sub{message("Hello!")} ); run Prima;
menu build error: submenu is not an array at /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/Prima/Classes.pm line 180.
I've broke my head, trying to figure it out. I don't see any problem with the Array structure, building the menu.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Prima Menu
by bliako (Abbot) on Aug 25, 2021 at 06:01 UTC |