Conditionally setting a table column cell to be editable, based on another column's value?
Conditionally setting a table column cell to be editable, based on another column's value?
- Subject: Conditionally setting a table column cell to be editable, based on another column's value?
- From: "Jeremy Higgs" <email@hidden>
- Date: Wed, 3 May 2006 01:07:33 +1000
Hi,
In my ongoing saga on learning bindings, I've run into another snag. I
have a table with two related columns (let's call them A and B). If a
row/record's value for B is not set (i.e. nil), I would like the A to
be disabled (for that row only, obviously).
I have set up the "enabled" binding for column A, with the following details:
Bind to: ArrayController (the correct array controller)
ControllerKey: arrangedObjects
Key Path: B
The value transformer is "NSIsNotNil". As I understand this, if the
row's value for B "is not nil", the A cell will be enabled. Otherwise
it's disabled. (Which is what I want.)
However, what I see in practice is different. Even if B's value is
nil, the A value is still enabled. Strangely, when I click on a row
with such values, A becomes disabled (greys out). Changing the
selection returns it to normal.
Am I doing something terribly wrong? Any hints would be greatly appreciated!
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden