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

Re: NSArrayController array-observation


  • Subject: Re: NSArrayController array-observation
  • From: Dominik Wagner <email@hidden>
  • Date: Tue, 25 Nov 2003 16:00:17 +0100

On 23.11.2003, at 21:30, Scott Anguish wrote:
On Nov 23, 2003, at 2:05 PM, Dominik Wagner wrote:
Hi List!
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?
You can only observe the contents of an array by registering as an observer on each item in the array. Yes, not the best solution for you're situation.

Yes, too much overhead for such a simple task.

You could implement a set method for myBool that posts a notification when the value changes. Not necessarily a good solution in all cases though.

That would require me to do a model class that is also storeable in the UserDefaults, the answer here is too much work too. And somehow I'm thinking that key-value-observing should be the solution for exactly this: notifying me of changes.

Another option might be to make a second accessor with a slightly different naming scheme (myBoolinIB) that then posted whatever the change was.

Hmm doesn't sound quite right either.
But this seems to be an important question: what is the right way to observe non-attribute properties programatically? I mean e.g. everything stored in the user defaults should somehow be observed by everything that is concerned, and that includes non UI stuff.

What is the appropriate action?

The problem was in RendezCon, the services table. The click on the checkbox enables or disables the search for the service in the same row.
What I did now is set the target and action of the NSCell for the column in the table view. But there again I'm only listening to User actions, not programatic changes.

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>
References: 
 >NSArrayController array-observation (From: Dominik Wagner <email@hidden>)
 >Re: NSArrayController array-observation (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: xcodebuild buildstyle bug?
  • Next by Date: Re: force quit
  • Previous by thread: Re: NSArrayController array-observation
  • Next by thread: Re: NSArrayController array-observation
  • Index(es):
    • Date
    • Thread