Kevin Walzer | 18 May 06:02
Favicon

Tk-Cocoa--menu questions

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

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects

Gmane