Re: Core Data and Views
Re: Core Data and Views
- Subject: Re: Core Data and Views
- From: mmalc crawford <email@hidden>
- Date: Thu, 5 Apr 2007 03:55:21 -0700
On Apr 4, 2007, at 9:16 PM, Matt Mashyna wrote:
I'm trying to understand how I can use core data for a simple app
but I can't find an example and I can't find it searching the
developer pages. I want to build a simple vector graphics app. I
want to have rectangles, circles and triangles represented by core
data entities. I can see from examples how to create new entities
and put them in a NSTableView using an NSArrayController. What I
can't seem to find is how I would go about using other objects for
views.
If I have an entity with the attributes x,y and shape how can I use
it to draw a view with those attributes ? Can I bind the entity to
an NSView ? If my view can be dragged how would I tell the entity
that it's associated with it that the attributes had changed ? When
I open a document how will it know to create views associated with
the entities ?
Managed objects are objects like any others in Cocoa.
You communicate between a view and managed objects in the same way you
would between a view and any other model (in the MVC sense) objects.
See also <http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/index.html
>.
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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