On Aug 11, 2012, at 7:26 AM, Ken Thomases <k...@codeweavers.com> wrote:

> On Aug 11, 2012, at 6:10 AM, Koen van der Drift wrote:
> 
>> I'd … like to be able to change all values in the same NSTableColumn based 
>> on a check box.
>> 
>> Say my entity has two properties valueA and valueB; if the checkbox is 
>> checked, then the column should show valueA, otherwise it should show valueB.
> 
>> But the column is bound to valueA in IB, so it will always show valueA.
> 
> So, how about changing the column's bindings programmatically when the 
> checkbox state changes?


I thought about that too after I posted the question.  Another possibility 
could be to have the entity return either valueA or valueB (as 'value') based 
on the checkbox.  This way I can just bind to 'value' and make my predicate 
with 'value'.  Although that would incorporate some controller tasks into the 
model.

I'll try both and see what works in my case.

- Koen.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to