Re: Binding NSMenuItem 1 to 1
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