Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Tk menu Apple macOS

by chrstphrchvz (Scribe)
on Jan 18, 2019 at 20:53 UTC ( [id://1228736]=note: print w/replies, xml ) Need Help??


in reply to Re: Tk menu Apple macOS
in thread Tk menu Apple macOS

Perl/Tk cannot access the native menu bar on modern macOS (i.e. OS X), the main reason being that it still requires XQuartz, and anything run from XQuartz has no knowledge of nor access to the Mac menu bar. The documentation for Perl/Tk's Tk::Menu is quite old, and was likely adapted from whichever historical version of Tcl/Tk it's based on. So the Apple menu it's referring to is likely the one from classic Mac OS 9 and earlier, i.e. pre-Mac OS X.

To clarify, .menubar.apple refers to the "application menu", the one with the currently-focused program's name. The "Apple menu" (the one with the Apple logo) is off-limits to programs.

Tcl/Tk wrappers for Perl (Tkx, Tcl::Tk, and Tcl::pTk) should be able to use the Mac menu bar and its application menu on OS X, as long as Tk Aqua is used rather than Tk for X11. For this I would refer to the up-to-date Tcl/Tk documentation on "Special Menus in Menubars", as well as TkDocs' entry on Platform Menus which even has Tkx syntax examples.

As the co-maintainer of Tcl::pTk, I wish I could say I knew how to use the Mac application menu, but unfortunately I have not yet had any success…

Replies are listed 'Best First'.
Re^3: Tk menu Apple macOS
by kcott (Archbishop) on Jan 21, 2019 at 06:26 UTC

    ++ Thanks for the detailed information on this. I posted "I'm also personally interested in an answer to this.", so your response is very helpful.

    — Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-29 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found