Re: Validating MenuItems before adding them to the menu

2008-09-23 Thread Mudi Dandan
Thanks Erik, that exactly is I was looking for. Regarding your recommendation as I learned context menus should not contain disabled items (check Finder for example) but I'm not really sure if this mentioned in the HIG. Mudi On Sep 23, 2008, at 7:28 PM, Erik Buck wrote: See the - (id)targ

Re: Validating MenuItems before adding them to the menu

2008-09-23 Thread Erik Buck
See the - (id)targetForAction:(SEL)aSelector method.  When adding context menu items, if the target for the menu item's action would be nil, just don't add the menu item.   However, I recommend adding all menu items that are ever available and just disabling the ones that aren't currently availa

Validating MenuItems before adding them to the menu

2008-09-23 Thread Mudi Dandan
Hi, I'm building a context menu for a table view. The context menu will naturally include some of the items from the application menu, but when the related actions are not available, I don't want them to show in the context menu. My question is: is there a method to determine whether an ite