|
From: Kevin W. <kw...@co...> - 2009-05-18 04:02:54
|
Hi Daniel,
Since Tk-Cocoa is now public, I'm asking this question on the Tcl-Mac
public list so we can start documenting any adjustments that need to be
made.
I'm starting to port one of my old applications to use Tk-Cocoa (I'm
using the 8.5.7 Tk-Cocoa port from the Github site) and I'm noticing
some unexpected menu behavior. My old "apple" menu code no longer sets
the application menu: the hard-coded Wish menu still controls the app
menu even in a standalone embedded build of Wish. For instance:
menu .mb
. configure -menu .mb
menu .mb.apple -tearoff 0
.mb.apple add command -label "About NameFind" -command
tk::mac::standardAboutPanel
.mb.apple add separator
.mb add cascade -label "Apple" -menu .mb.apple
This code creates a menu item called "Apple" that sits next to the
application menu. Moreoever, the application menu (which takes the name
of the app bundle, "NameFind") has the hard-coded "about Tcl/Tk" label.
On a related note, it appears that the .help menu item hard-codes in an
entry called "NameFind Help," even though I already have my own
"NameFind Help" entry also set up. The result is two separate lines that
say "NameFind Help." My entry runs my command as expected, but the
hard-coded one brings up a dialog that says "help isn't available for
NameFind." This behavior usually exists when the app bundle doesn't have
an Apple Help book included; it's the fallback for Cocoa applications.
Any suggestions on what to do here? The "readme" you referenced in your
first e-mail announcing Tk-Cocoa mentions that these questions are
addressed in the "menu.n" man page, and I did consult those, but I
couldn't find anything specific to address these items.
Thanks,
Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
|