ron7 has asked for the wisdom of the Perl Monks concerning the following question:
gives:my $lab = '8 million ways to die (1986)[HD].TAG'; $menu_item->configure(-label=>$lab, ... );
The actual strings are user supplied file names which are being used in a MRU list so my temporary fix is to change any square braces into brackets for display purposes in the MRU menu list, but if someone can think of a workaround to configure the menu item label with the 'correct' string, I'd appreciate it. BTW, I can create the menu item with the '[]' chars no problem:Tk::Error bad menu entry index "8 million ways to die (1986)[HD]" at / +<path>/i368-linux-thread-multi/Tk.pm line 250 (caused by) Tk::Menu::Item::configure at /<path>/i368-linux-thread-multi/Tk/Menu/I +tem.pm line 63 ...
It's just when I configure an item (using $item->configure(...) duh) that the problem occurs. I'm half inclined to call it a bug?$menu_item = $menu_file->command(-label=>$lab, ...);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Valid chars for Tk Label
by mr_mischief (Monsignor) on Jan 20, 2011 at 09:11 UTC | |
by ron7 (Beadle) on Jan 21, 2011 at 04:16 UTC | |
|
Re: Valid chars for Tk Label
by Anonymous Monk on Jan 20, 2011 at 05:05 UTC | |
by remiah (Hermit) on Jan 20, 2011 at 06:34 UTC | |
by ron7 (Beadle) on Jan 21, 2011 at 00:09 UTC |