• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Conditionally setting a table column cell to be editable, based on another column's value?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Conditionally setting a table column cell to be editable, based on another column's value?
      • From: "Jeremy Higgs" <email@hidden>
  • Prev by Date: Re: KVO/dealloc problems
  • Next by Date: How to differentiate between sources for a live resize...
  • Previous by thread: Re: KVO/dealloc problems
  • Next by thread: Re: Conditionally setting a table column cell to be editable, based on another column's value?
  • Index(es):
    • Date
    • Thread