• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Menu item with 'title' bound is always enabled. Bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu item with 'title' bound is always enabled. Bug?


  • Subject: Re: Menu item with 'title' bound is always enabled. Bug?
  • From: "Sean McBride" <email@hidden>
  • Date: Thu, 21 May 2009 11:58:55 -0400
  • Organization: Rogue Research Inc.

On 5/20/09 6:21 PM, Jerry Krinock said:

>On a main menu item, I've set a delegate which implements -
>menuNeedsUpdate:.  In this method, I enable/disable some items and
>also modify some item titles based on current conditions.
>
>With some items, however, instead of sending -setTitle: in -
>menuNeedsUpdate:, I had bound their 'title' in Interface Builder.  But
>I just discovered that this 'title' binding was causing setEnabled:NO
>sent to these items during -menuNeedsUpdate: to be ignored.  A menu
>item with a 'title' bound is always enabled.

I've noticed something similar.  I have a few menu items where I bind
their 'enabled' binding.  This seems to make them always enabled/
disabled based on that binding (which I guess makes sense).  However, it
means you loose the nice feature where they are auto-disabled based on
the responder chain.  So, for example, if a modal NSAlert is being
displayed, those menu items are still enabled.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Menu item with 'title' bound is always enabled. Bug? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Privilege elevation of a cocoa app
  • Next by Date: Fwd: Memory management in QuickLook plugin
  • Previous by thread: Re: Menu item with 'title' bound is always enabled. Bug?
  • Next by thread: NSTableView -frame == NSSplitView -frame
  • Index(es):
    • Date
    • Thread