• 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: CoreData, OutlineView, and NSTreeController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData, OutlineView, and NSTreeController


  • Subject: Re: CoreData, OutlineView, and NSTreeController
  • From: Scott Stevenson <email@hidden>
  • Date: Fri, 20 May 2005 08:18:42 -0700


On May 19, 2005, at 9:22 PM, Lee Morgan wrote:

This is similar to a problem, expect mine is CoreData entities being ordered incorrectly in menus. I'm having to "correct" this over and over again in my app. Unlike an array where items are ordered by the order that you add them to the array in, the NSSet that CoreData uses isn't - best guess is NSSet has some performance gain over NSArray? In turn I've been having to implement Sort Descriptors (NSSortDescriptor) all over the place. This is quite annoying, but I haven't found a better way.


I thought it was strange at first too, but I now actually think it makes sense. If you think about it, managed objects have no inherent order in a context. In that sort of model, NSSet makes more sense as the "native" collection class, particularly for things like search fields.

I'm not sure this is the only reason NSSet was used, though. At last year's WWDC, one of the Core Data team members mentioned that one challenge with supporting NSArray is that it can contain more than one instance of the same object.


     - Scott


--

http://treehouseideas.com/

http://theocacao.com/ [blog]



 _______________________________________________
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: 
 >CoreData, OutlineView, and NSTreeController (From: Steve Moore <email@hidden>)
 >Re: CoreData, OutlineView, and NSTreeController (From: Lee Morgan <email@hidden>)

  • Prev by Date: Re: "Selector not recognized" for existing selector : how is this possible??
  • Next by Date: Re: NSOutlineView
  • Previous by thread: Re: CoreData, OutlineView, and NSTreeController
  • Next by thread: control font smoothing in an app
  • Index(es):
    • Date
    • Thread