• 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
NSArrayController array-observation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArrayController array-observation


  • Subject: NSArrayController array-observation
  • From: Dominik Wagner <email@hidden>
  • Date: Sun, 23 Nov 2003 20:05:44 +0100

Hi List!

here is the setup: I want to have a tableview with a String and a Checkbox. All this is handled by a NSArrayController. Now I want to know when the Checkboxes are clicked on and take an apropriate action. For this action I need to know the string in the same row.
How do I do this?
My first thought was KeyValueObserving on the Model, so to say the NSNumber that represents the bool with something like this:

[self addObserver:self forKeyPath:@"myArray.myBool"
options:(NSKeyValueObservingOptionNew |
NSKeyValueObservingOptionOld)
context:nil];

But a KeyPath like this is not allowed. Is there any Keypath for a tomany relationship that works in this context? The "Array Operators" don't work here. Observing only the array does not help either, because then I do not get informed, when mutable content is changing. Basically it's: How do I observe the contents of an Array?

Thanks,
dom

--
Dominik Wagner Mail: email@hidden
TheCodingMonkeys http://www.codingmonkeys.de/
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSArrayController array-observation
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Save a NSAppleScript to a file
  • Next by Date: Re: Controller Binding
  • Previous by thread: Re: Currency Converter Tutorial
  • Next by thread: Re: NSArrayController array-observation
  • Index(es):
    • Date
    • Thread