• 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: Getting added object with KVO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting added object with KVO


  • Subject: Re: Getting added object with KVO
  • From: Hannes Petri <email@hidden>
  • Date: Fri, 14 Jul 2006 12:41:27 +0200


Hello Matt.

What caused my confusion, is that the docs DO say that the content- property is observable with KVO. When it wasn't, I thought that I was doing something wrong, and that's why I posted this question.

Your alternative solution with notifications was a good idea, thank you.

Bill: thanks for correcting his typo.


Hannes Petri email@hidden


On 12 jul 2006, at 19:35, Matt Neuburg wrote:

On Wed, 12 Jul 2006 13:00:30 +0200, Hannes Petri <email@hidden> said:
Okay, I think it doesn't work because I bind to
collections.arrangedObjects. But what should I bind to instead, to
get the functionality I want?

Hannes - I have not been following this thread, so maybe this is not the
answer you need, so please forgive me if I'm off the mark. But you seem to
be saying you need to know what the added object is whenever an object is
added in an NSArrayController.


If so, it seems to me that your mistake here is thinking that you have to do
this with bindings. Bindings don't do everything! Remember, we all lived a
very long time and very comfortably without them. What I do in a similar
situation is simply to override add: in the NSArrayController and post an
NSNotification containing a pointer to the newly added object. m.


matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>




_______________________________________________ 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
References: 
 >Re: Getting added object with KVO (From: Matt Neuburg <email@hidden>)

  • Prev by Date: [ANN] ChatKit v0.5 Released
  • Next by Date: Screensaver password override possible?
  • Previous by thread: Re: Getting added object with KVO
  • Next by thread: Re: Getting added object with KVO
  • Index(es):
    • Date
    • Thread