Re: Enabling dataCells with bindings
Re: Enabling dataCells with bindings
- Subject: Re: Enabling dataCells with bindings
- From: Scott Anguish <email@hidden>
- Date: Fri, 7 May 2004 05:52:41 -0400
On May 7, 2004, at 5:03 AM, John Lombardo wrote:
Okay, I've almost got the hang of this binding business, though the
Key Paths are still messing with me.
I have a table with two columns...
one, with the identifier @"enabled" contains checkboxes.
the other, with the identifier @"operator" contains popup buttons
The idea is that if a checkbox is selected or deselected (this part
works fine) then the popup button should enable or disable
accordingly. I would have thought that something like this would do
the job:
[[[fieldsTable tableColumnWithIdentifier:@"operator"] dataCell]
bind:@"enabled"
toObject: fieldController
withKeyPath:@"arrangedObjects.enabled.@boolValue"
options:nil];
It is my belief that due to my inexperience with defining key paths, I
am in fact just inventing things and making a complete arse of it.
Does this sound about right?
what is @boolValue? it's not an array operator that I'm aware of. You
should be able to drop that completely.
aside from that, the keypath looks OK.
there could be an issue with how the data is being set to for the
checkbox, and where you're pulling the value from (does it set the
enabled key of arranged objects to the value??)
when creating a binding programatically the keypath is basically the
ControllerKey and ModelKey fields joined with a .
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.