Re: Binding a unique-selection checkbox in a table view?
Re: Binding a unique-selection checkbox in a table view?
- Subject: Re: Binding a unique-selection checkbox in a table view?
- From: Lee Ann Rucker <email@hidden>
- Date: Sat, 22 Nov 2014 00:25:44 +0000
- Thread-topic: Binding a unique-selection checkbox in a table view?
On Nov 21, 2014, at 4:20 PM, Rick Mann <email@hidden> wrote:
>
>> On Nov 21, 2014, at 16:19 , Lee Ann Rucker <email@hidden> wrote:
>>
>> I think binding to a method would be simplest;
>
> You mean wiring the column's action up?
Oops, yeah, so many ways to describe things...
>
>> if you bound it to a value on File's Owner or some other object you'd still have to figure out which one of them was clicked. IBAction gives you the sender, then you can do
>>
>> NSInteger row = [tableView rowForView:sender];
>>
>> since that works on NSTableRowView subviews too.
>>
>> On Nov 21, 2014, at 4:09 PM, Rick Mann <email@hidden> wrote:
>>
>>> In an OS X app I have an NSTableView that binds to an array of Job objects. I'd like to have a checkbox column that the user can check that indicates the "active" job. There should be only one of these. Is there a way to bind the value of that column to something other than the Job for that row, to handle this?
>>>
>>> It's currently bound to a bool property on the Job object. Perhaps I could have a method invoked any time one of these changes? What's the recommended approach?
>>>
>>> Thanks!
>>>
>>> --
>>> Rick Mann
>>> email@hidden
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> 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:
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.apple.com_mailman_options_cocoa-2Ddev_lrucker-2540vmware.com&d=AAIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=ie7S-J__EKnfyVOBV7-jV2rZ--p47O6vkyTklpDM3h4&m=0NvYAF-_LeAscgxv5qySqu5CSU8_Xg6MPDxslV2flyw&s=m1g_iRcWVcINh-Oy3LahhHPHy1OxSaKqY97Ikg4zN4o&e=
>>>
>>> This email sent to email@hidden
>>
>
>
> --
> Rick Mann
> email@hidden
>
>
_______________________________________________
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