Whoops, apparently only sent this to Quincey. So unfortunately, no
good news for you, Ariel. You need to either bind the controller's
contentArray binding, or manually set its contentObject property. The
insertion and removal methods on NSArray cannot possibly be
KVO-compliant because NSArray in its entirety is not KVO-compliant.

--Kyle Sluder


---------- Forwarded message ----------
From: Kyle Sluder <kyle.slu...@gmail.com>
Date: Tue, Sep 27, 2011 at 10:47 AM
Subject: Re: controller question
To: Quincey Morris <quinceymor...@rivergatesoftware.com>


On Tue, Sep 27, 2011 at 10:29 AM, Quincey Morris
<quinceymor...@rivergatesoftware.com> wrote:
> However, since part of an array controller's API contract is to track 
> KVO-compliant changes to the content array, I'm pretty sure it *does* observe 
> the object, and KVO-observe it too.

You cannot KVO-observe an NSArray. -[NSArray
addObserver:forKeyPath:options:context:] is implemented to throw an
exception.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to