in reply to Is Tk::Text-widget PopUp-menu onscreen?

Hi, interesting question. What I did was run the following code, for the first 5 seconds with no menu, then a menu for the second 5 seconds. Then compare the output. It seems that when the menu is visible, Dumper has an Entry for '_XEvent_' , which contains some binary and font information.

I'm not sure what is the best way to detect what '_XEVENT_' is. If you figure it out, please post the code.

#!/usr/bin/perl use warnings; use strict; use Tk; use Data::Dumper; my $mw = MainWindow->new(); my $Text = $mw->Text()->pack; my $TextMenu = $Text->menu(); my $timer = $mw->repeat(5000,\&Loop); MainLoop; sub Loop { #print Dumper[(\$TextMenu)],"\n\n"; #print join ' ',keys %$TextMenu,"\n"; #print $TextMenu{'_XEvent_'},"\n"; my %hash = %$TextMenu; print join ' ',keys %hash,"\n"; print $hash{'_XEvent_'},"\n"; }

I'm not really a human, but I play one on earth. flash japh