• 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: Xcode-like "Groups & Files" view: NSTreeController and/or core data?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode-like "Groups & Files" view: NSTreeController and/or core data?


  • Subject: Re: Xcode-like "Groups & Files" view: NSTreeController and/or core data?
  • From: Rick Hoge <email@hidden>
  • Date: Mon, 12 Jan 2009 17:27:31 -0500


Hi Douglas,

Thanks for the suggestion - I was kind of hoping to hear a vote of confidence for the bindings route.

From my experience, I would suggest that you go the route of using NSTreeController along with NSTreeNode. This made life much easier for my heterogeneous dataset. NSTreeNode has a representedObject attribute which you can use to "normalize" the heterogeneous nature of your data.

So what I'm trying to figure out now is, what is the "recipe" for designing this? Would the correct order be:


1) design the core data model with entities and relationships
2) programatically populate a source array for the NSTreeController with the display nodes I want
3) set the representedObject of each node to be the appropriate entity


I guess steps 2 and 3 are things you wouldn't need if you were just using arrays to display the entities. I think I need to get over the feeling that I can somehow get a nicely populated outline view for "free" with Core data. The AbstractTree tutorial does generate nearly codeless population of an NSOutlineView using bindings from a core data model (but a very simple one). The SourceView tutorial shows a very full-featured example of outline view, although without use of core data.

I'd hate to miss out on some smart way of doing this that would get a lot of the view population done with minimal code.

Thanks again,

Rick
_______________________________________________

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: 
 >Xcode-like "Groups & Files" view: NSTreeController and/or core data? (From: Rick Hoge <email@hidden>)
 >Re: Xcode-like "Groups & Files" view: NSTreeController and/or core data? (From: douglas welton <email@hidden>)

  • Prev by Date: Re: Disabled button looks like enabled
  • Next by Date: Re: NumberFormatter Defaulting all values when input incorrect
  • Previous by thread: Re: Xcode-like "Groups & Files" view: NSTreeController and/or core data?
  • Next by thread: NumberFormatter Defaulting all values when input incorrect
  • Index(es):
    • Date
    • Thread