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

Re^2: Tk menu Apple macOS

by chrstphrchvz (Scribe)
on Jan 18, 2019 at 20:53 UTC ( #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? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2022-09-27 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (118 votes). Check out past polls.

    Notices?