From: Kevin W. <kw...@co...> - 2013-03-06 14:21:19
|
On 3/6/13 4:09 AM, Zbigniew Diaczyszyn wrote: > > > Am 05.03.2013 23:34, schrieb Kevin Walzer: >> On 3/5/13 3:26 PM, Zbigniew Diaczyszyn wrote: >>> >>> Unfortunately it does not work, at least with ActiveState's basekit >>> 8.5.13. >> >> Which part doesn't work--adding it or adding it after the preferences >> menu item? > > menu .mb.apple > .mb.apple add command -label "About " -command tkAboutDialog > .mb.apple add command -label "Check " -command checkUpdate > .mb.apple add separator > .mb add cascade -label "Test" -menu .mb.apple > > Sourcing the code or packing it as an tclkit executable will show a main > menu line with a cascade entry "Test" after "Help" offering the cascade > with "About" and "Check". > > Based on your description, I think you're not doing something right here, but it's hard to tell because we don't have the complete menu code. There should be no additional menu items after "help." It's a tricky practice to get the Apple menu right; it has to be set up early, and then the menubar has to be configured as the main one as the very last command of menu setup. Here's my complete menu code from the app I discussed: menu .mb.apple .mb.apple add command -label "About FileMorph" -command tkAboutDialog .mb.apple add command -label "Check for Updates" -command checkUpdate .mb.apple add separator .mb add cascade -label "FileMorph" -menu .mb.apple menu .mb.search -tearoff -0 .mb.search add command -label "Select Directory" -command setDir .mb.search add command -label "Select File" -command setFile .mb add cascade -label "Directory" -menu .mb.search #window menu windowlist::windowMenu .mb menu .mb.help -tearoff 0 if {[tk windowingsystem] eq "aqua"} { .mb.help add command -label "Contact Code by Kevin" -command [list machelp::usermail $cachedir/stdout.txt $cachedir/stderr.txt] .mb.help add command -label "Web Site" -command [list machelp::appweb $cachedir/stdout.txt $cachedir/stderr.txt] if {$regproc::appstore == 0} { .mb.help add command -label "License" -command regproc::getReg .mb.help add command -label "Check for Updates" -command [list softwareupdate::checkVersion $appname::name $appname::version] } } .mb add cascade -label "Help" -menu .mb.help . configure -menu .mb Hope this helps, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |