Re: Coredata Applications and accessing Managed Objects
Re: Coredata Applications and accessing Managed Objects
- Subject: Re: Coredata Applications and accessing Managed Objects
- From: James Andrews <email@hidden>
- Date: Sat, 9 Jul 2005 00:19:01 -0400
OK, your first sentence made me think that maybe I am assuming
something incorrectly here. I thought that by defining the data
model it created a MOC called Grouping and that I could access it as
an object. I have a feeling from what you said and what you pointed
to me too that this assumption is wrong.
Bare with me while I figure this out. Let's use iPhoto as an
example. On the left we have a list, this list is basically 3-4
things. A list of albums, the most recently imported images and
images by date (and something else I can't remember). Let's consider
each of these a grouping. That can have child groupings. If I want
to say mimic this to a point(and I do). Then what I really need to
do is create another Entity and call it Groupings. With a to-many
relationship with Grouping. Then using the method described on the 2
pages you sent me create an instance of NSManagedObject of Entity
type Groupings. Then I would be able to add new a new MOC called
Grouping for say albums, recently imported, images by date etc...?
Then use each of those to traverse my data model tree?
If that's what I need to do, then ok, I think I understand, if not
what am I not getting?
Thanks,
James
On Jul 8, 2005, at 11:54 PM, mmalcolm crawford wrote:
On Jul 8, 2005, at 8:37 PM, James Andrews wrote:
Let's say I have a text field that I want to use to insert a new
group.
I assume what you mean is that you want to create a new instance of
the Grouping entity, and set its groupingName to the content of the
text field?
This document describes how to create new managed objects:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CoreData/Articles/cdCreateMOs.html>
You would create a new instance as described there, and set the new
object's groupingName by retrieving the text field's stringValue
and modifying the groupingName as described here:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CoreData/Articles/cdUsingMOs.html>
You should probably also read <http://developer.apple.com/
documentation/Cocoa/Conceptual/CoreData/Articles/cdBasics.html>,
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/
Articles/cdLifecycleManagement.html>, and the tutorial at <http://
developer.apple.com/documentation/Cocoa/Conceptual/
NSPersistentDocumentTutorial/index.html>.
mmalc
_______________________________________________
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
_______________________________________________
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