• 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: Array Controllers and Insertion notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Array Controllers and Insertion notifications


  • Subject: Re: Array Controllers and Insertion notifications
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 13 Sep 2005 20:53:54 -0400


On Sep 13, 2005, at 3:07 PM, Edwin Vane wrote:

Hi,

I'm hoping to draw on the experience here. Was there (and perhaps there
still is) an issue with NSArrayController that it would never provide
NSKeyValueChangeInsertion as the change type inside
observeValueForKeyPath:... when values were actually inserted into the
array that the array controller is bound to?

Yes, my understanding is that the controllers aren't entirely KVO compliant in this respect. So when a change is made you're informed, but you have to determine what changed yourself.


    you can see this in the flow diagrams in the bindings doc.


I find that the array controller will only tell me the array was changed
(ie, via NSKeyValueChangeSetting) when new values are inserted. I notice
a similar problem that mmalc worked around in his Graphics Bindings
example.


Incidentally, when not using an array controller (ie, observing the
model array directly without using NSArrayController), I do get
insertion,removal, and replacement notifications instead of the
generic change notification.

yep.. provided you make the changes in a KVO compliant manner. the controllers just aren't providing you the info you want.



Since I'm stuck in pre-Tiger for now (where this problem may not exist)
is there a fix or must I learn to live with it.

head off campus, get a 6 foot sub, hit HMV, and live with it for now. :-)




_______________________________________________
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: 
 >Array Controllers and Insertion notifications (From: Edwin Vane <email@hidden>)

  • Prev by Date: Drawing a tree with NSBezierPaths
  • Next by Date: Re: How to add toolbar into Mail.App
  • Previous by thread: Array Controllers and Insertion notifications
  • Next by thread: [OT] List speed
  • Index(es):
    • Date
    • Thread