• 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: Binding NSMenuItem 1 to 1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding NSMenuItem 1 to 1


  • Subject: Re: Binding NSMenuItem 1 to 1
  • From: mmalc crawford <email@hidden>
  • Date: Tue, 21 Aug 2007 11:35:59 -0700


On Aug 21, 2007, at 10:20 AM, Jeff Johnson wrote:

I agree that the arbitrary key is fragile. My thought was just to use the array controller's "selection", without any other key. If there's no selection or multiple selections, it will return the appropriate placeholder. Otherwise, just check whether selection is non-nil.

It's not clear what you mean here.
My understanding is that the goal is to conditionally enable a UI element if the count of the selected items is 1, and only 1.
The 'enabled' binding requires an NSNumber object (representing a Boolean value). Neither placeholder is an NSNumber instance. Checking whether the selection is non-nil does not account for the case where the count of selected items is greater than 1.


mmalc


_______________________________________________

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


  • Follow-Ups:
    • Re: Binding NSMenuItem 1 to 1
      • From: Jeff Johnson <email@hidden>
References: 
 >Re: Binding NSMenuItem 1 to 1 (From: Knut Lorenzen <email@hidden>)
 >Re: Binding NSMenuItem 1 to 1 (From: mmalc crawford <email@hidden>)
 >Re: Binding NSMenuItem 1 to 1 (From: Jeff Johnson <email@hidden>)

  • Prev by Date: Re: Binding NSMenuItem 1 to 1
  • Next by Date: Re: Binding NSMenuItem 1 to 1
  • Previous by thread: Re: Binding NSMenuItem 1 to 1
  • Next by thread: Re: Binding NSMenuItem 1 to 1
  • Index(es):
    • Date
    • Thread