CoreData: Getting the currently selected item

Moderator
Posts: 592
Joined: 2002.12
Post: #1
Part of my Data Model is:

A Workspace entity has one to many Project entities.
A Project has one to many Task entities.

In code, how can I get the current Project that is selected in the UI so I can then add a new Task to it?

I've spent an afternoon going through Apple's docs on CoreData and searching through the internet but not getting anywhere with this.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Do you not have an NSArrayController lying around somewhere you could ask?
Quote this message in a reply
Moderator
Posts: 592
Joined: 2002.12
Post: #3
OneSadCookie Wrote:Do you not have an NSArrayController lying around somewhere you could ask?

Thanks for stating the obvious. I was so busy looking for a Core Data entity bases solution that I never thought of doing the obvious! I've got a whole heap of the things but completely forgot about wiring any of them up to my code.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Leveraging CoreData in Graphics Based Applications icklefrelp 6 3,865 Mar 14, 2008 04:38 PM
Last Post: Cochrane