Re: Do I Need Multiple NSArrayControllers For This?
Re: Do I Need Multiple NSArrayControllers For This?
- Subject: Re: Do I Need Multiple NSArrayControllers For This?
- From: Benjamin Stiglitz <email@hidden>
- Date: Mon, 15 Sep 2008 12:08:24 -0400
> I found this
> information<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindi
> ngs/Tasks/filtering.html#//apple_ref/doc/uid/20002302-128168-CJBCJCAI>about
> overriding -arrangeObjects: Since I need to return several different
> arrays of objects (active, new, and prior) how is this different from
> multiple NSArrayControllers with predicate bindings. Perhaps creating
> methods like -activeObjects: -newObjects: that create the filtered arrays
> and pass those to -arrangeObjects:?
The predicate bindings might be useful if you actually needed to access
all the other subarrays, but since you just want the count, it's
sufficient to just do it in the single controller. If you want to
generalize you can probably add a key for a predicate which determines
what the extra count you're maintaining is.
You're of course welcome to have another array controller, but you'll
end up having to keep it and the unfiltered controller in sync, which is
really not worth the effort.
-Ben
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden