Re: what is a bindings pattern to check for a non-empty selection?
Re: what is a bindings pattern to check for a non-empty selection?
- Subject: Re: what is a bindings pattern to check for a non-empty selection?
- From: Steven Degutis <email@hidden>
- Date: Tue, 2 Mar 2010 09:16:03 -0500
Just wanted to update everyone on this issue; I've done some experimentation
with this, and I've found that binding to "selection" with NSIsNotNil
transformer does not reliably work, but binding to "selectedObjects.@count"
does work. (And by "work" I mean be disabled when the table has no
selection, and enabled when it has any selection at all.)
-Steven
On Fri, Feb 19, 2010 at 7:04 AM, Joanna Carter <
email@hidden> wrote:
> Le 19 févr. 2010 à 11:02, Jean-Denis Muys a écrit :
>
> > I am looking for a way to enable a button in my window only if some
> selection has been made in the data. Currently the data is shown in a table
> view and is handled through an NSArrayController. I am trying to bind the
> button's "Enabled" property to the ArrayController so that I get whether
> something is selected (multiple selections allowed).
>
> I bind the enabled property to the selection but using the NSIsNotNil value
> transformer.
>
> Joanna
>
> --
> Joanna Carter
> Carter Consulting
>
> _______________________________________________
>
> 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
>
--
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/
_______________________________________________
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