I can replicate the problem (but mind you, I'm no Tk-wiz either). I.e. with the following simple test script
#!/usr/local/bin/perl use strict; use warnings; use Tk; use Tk::Balloon; my $mw = MainWindow->new(); $mw->title('Simple example'); my $status = $mw->Label( -width => 20, -relief => 'groove', )->pack(); my $balloon = $mw->Balloon(-statusbar => $status); my $menu = $mw->Optionmenu( -textvariable => \my $res, -options => [qw(A B C D)], )->pack(); $balloon->attach( $menu, -msg => [qw(a b c d)], #-msg => 'foo', # this works, but you get the same msg for all menu entries, of co +urse ); MainLoop;
it seems that random strings from memory are being displayed as tooltip texts, which would also explain the "Malformed UTF-8 character" messages (because a random sequence of bytes is typically not well-formed UTF-8).
Apparently, the -msg => [...] doesn't work as advertised (a simple scalar "works", but that of course doesn't make much sense for a menu...).
(Perl 5.8.4, $Tk::VERSION: 804.027 — I don't have anything more recent on this box)
In reply to Re^3: Balloon and menus options
by almut
in thread Balloon and menus options
by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |