Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Tk::Balloon and unclunky menus.

by aplonis (Pilgrim)
on Feb 01, 2012 at 16:41 UTC ( #951265=note: print w/ replies, xml ) Need Help??


in reply to Re: Tk::Balloon and unclunky menus.
in thread Tk::Balloon and unclunky menus.

That seems not to quite work. After several tries I reduced my usage to a simpler experimental case, thus...

my $whatever; use subs qw/bar/; map { my $menu = $menubar->cascade( -label => '~' . $_->[0], -menuitems => $_->[1]); $balloon->attach( $menu, -state => 'balloon', -msg => 'foo'); } [ 'Foo', bar ]; sub bar { [ ['command', 'This', -command => sub { $whatever = 'Does this.'}], ['command', 'That', -command => sub { $whatever = 'Does that'}], ] }

But I get the error...

Can't locate object method "OnDestroy" via package "Tk::Menu::Cascade" at C:/Strawbery/perl/site/lib/Tk/Balloon.pm line 139.

The difference is that I'm not even mapping the argument for -msg => as $_->[2] or $_->[-1] but just giving unmapped 'foo'. Any thoughts?


Comment on Re^2: Tk::Balloon and unclunky menus.
Select or Download Code
Re^3: Tk::Balloon and unclunky menus.
by aplonis (Pilgrim) on Feb 01, 2012 at 22:21 UTC

    Alas and alack, I read that we just can't do Balloons for Menus on Windows. Per the post here PerlMonks Friar lamprecht says, "Windows is special in that events over Menu windows are not passed to Tk so Balloon will not work here."

      Yeah, I believe Tk::Balloon is broken on win32, but not the bit about windows being special

        Tk::Balloon works on Win32 from XP through Win7 for most regular widgets (button, textentry, etc) just not for menus, aparently. I've used Tk::Balloon many a time on NetBSD and Ubunto on the *NIX side, also for Win2K, WinXP, Vista and now Win7 on the dark side, just never until now tried to put balloons on menus on Win32.

        Guess if I'm going to stick with Perl (however infrequently I may now actually use it for work) I'll have to give up on Tk instead tooling up for WxWidgets, at least if I want to keep on making things for ordinary folks to use.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://951265]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-07-23 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (154 votes), past polls