in reply to Tk and right-mouse popup menus under OSX

you haven't showed a piece of code that displays menu.

what perl version? what tcl/tk version have this OSX?
'widget' demo that comes with perl/tk - does it have same problem?

  • Comment on Re: Tk and right-mouse popup menus under OSX

Replies are listed 'Best First'.
Re^2: Tk and right-mouse popup menus under OSX
by Anonymous Monk on Feb 14, 2011 at 07:59 UTC
    what tcl/tk version have this OSX?

    Isn't that irrelevant for perl/Tk?

      I'm constrained to Perl 5.8.x by ActiveState (they dropped Tk after that). My users need binaries, not command lines and the AS app builder gives me binaries for all platforms (inc AIX, but I ignore that).

      OS wise, Snow Leopard 10.6 is all I have to test against.

      Demo code wise, as far as I can see replacing the context popup menu using the Tk::Text->menu function is documented, but AFAIK, not demonstrated; neither is binding the right mouse button to a menu popup action.

Re^2: Tk and right-mouse popup menus under OSX
by ron7 (Beadle) on Feb 15, 2011 at 20:46 UTC
    The menu display code is inbuilt to the Tk::Text widget already (you get a default popup with cut, paste...). The ->menu method allows you to replace the popup menu, but the display code remains in-built. I've re-bound the <3> right-button so I can trap where the where the even happens, turn that into a line number, and pass it to the popup command.
      indeed, I was wondering whether right-click menu of Text widget is actually seen,

      glad that you've resolved your problem.