Re: "Live" support for aggregate functions (@min, @max, etc)
Re: "Live" support for aggregate functions (@min, @max, etc)
- Subject: Re: "Live" support for aggregate functions (@min, @max, etc)
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 25 May 2007 11:05:00 -0700
On 5/25/07, Timothy Wood <email@hidden> wrote:
I had occasion to use an @min aggregate function, but it seems to
be only half implemented. In particular, I have an NSArrayController
set up with an input content set and then a binding of
email@hidden to a minimumMyKey on itself (so that I can
do something fun in -setMinimumMyKey:).
This works great as long as all I do is add and remove objects
from the input content set. But, if any of my objects *edit* their
value for "myKey" such that they become or resign minimum status,
nothing happens. It seems that the controller isn't observing myKey
on its arrangedObjects, inexplicably. And, of course my objects are
KVO compliant for the key in question.
Please tell me this works and I'm just configuring it wrong :)
Failing that, I guess I'll have to implement it correctly myself.
I think you are hitting a issue related to my sorting / filter issue
[1]... NSArrayControllers do "the right thing" for add and remove but
not if the objects they are currently "arranging" change.
-Shawn
[1] <http://lists.apple.com/archives/cocoa-dev/2007/May/msg00908.html>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden