Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using name key form with menus



Hello,

I am trying to refer to menus by their name so I can remove/disable them easily, but this seems not to work.

For example:
display alert ((title of (menu "mainMenu")) as string)
Doesn't work. It gives the error: The specified object is a property, not an element. (-10008)

mainMenu is the name given to the main menu which does respond to menu 0 or main menu

I know that in this example I could just use main menu but when trying to navigate hierarchies of menus I would rather use names than numbers.

The documentation for menus states that standard key forms can be used, but I can't use names for some reason. Is there something I'm doing wrong, or is this some sort of bug?

I'm using Xcode 3.0

Thank you for any help.

Fergal
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.