• 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: Do I Need Multiple NSArrayControllers For This?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Do I Need Multiple NSArrayControllers For This? (From: Jamie Phelps <email@hidden>)
 >Re: Do I Need Multiple NSArrayControllers For This? (From: Benjamin Stiglitz <email@hidden>)
 >Re: Do I Need Multiple NSArrayControllers For This? (From: "Jamie Phelps" <email@hidden>)
 >Re: Do I Need Multiple NSArrayControllers For This? (From: Benjamin Stiglitz <email@hidden>)
 >Re: Do I Need Multiple NSArrayControllers For This? (From: Benjamin Stiglitz <email@hidden>)
 >Re: Do I Need Multiple NSArrayControllers For This? (From: "Jamie Phelps" <email@hidden>)

  • Prev by Date: Re: async NSOperation and NSOperationQueue
  • Next by Date: [SOLVED] Re: Newb: Targeting an instance of a class instantiated by a NIB file
  • Previous by thread: Re: Do I Need Multiple NSArrayControllers For This?
  • Next by thread: Custom Array/Set keypath
  • Index(es):
    • Date
    • Thread