From: Philip A. <ph...@vc...> - 2005-01-19 13:30:42
|
On Wednesday, Jan 19, 2005, at 03:17 America/Vancouver, Alastair Davies wrote: > One needs explicitly to enable the "Preferences..." menu item using > the command [1]: > EnableMenuCommand(NULL, kHICommandPreferences); > This call can be made in TkMacOSXInitMenus() for example (in the file > tkMacOSXMenus.c). If the Tcl procedure ::tk::mac::ShowPreferences is > not defined, however, having the menu item enabled is not a good > thing, so this is not a general-purpose patch. Ideally, I suppose, a > Tcl variable could be created to provide script access to enable or > disable the menu item. If the menu item is enabled, you might be able to handle it on a case by case basis by installing a tclAE handler for aevt/pref. The Carbon behavior (in 10.2 and newer I think) is that if the event is not handled, it then falls thru to an AppleEvent handler. The AppleEvent fails gracefully. In TclOSA 1.0.3 <http://homepage.mac.com/philip_aker/osa/osa.html>, this event falls thru to an alert saying that the app has no prefs if there is no script assigned to the menu item. HTH, Philip Aker http://www.aker.ca |