On 2009 Oct 02, at 18:22, Rick Mann wrote:

I'd like to populate the contents of a sub menu on an item of a menu in my menu bar, using bindings. But I don't see an obvious way to do this. Even if I could, I don't know how to invoke an action in my code and know which object in the submenu was selected.

Is this even possible?

It may be possible to do this with bindings, but you'll pull out much less hair if you implement menuNeedsUpdate: instead. I don't even try to bind simple things like targets and titles any more. When it comes to menus, my advice is to forget bindings and do it the old-fashioned way because it is much easier.

Remember to make whatever object is implementing menuNeedsUpdate: the delegate of your menus.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to