Runtime Programmatic Entity Switching in CoreData
Runtime Programmatic Entity Switching in CoreData
- Subject: Runtime Programmatic Entity Switching in CoreData
- From: AJ <email@hidden>
- Date: Sun, 11 Jun 2006 11:02:04 -0400
I have a straight forward CoreData app that works with multiple
CoreData entities.
I've got a nicely working window built that works to edit the records
of one of the entities, and I'm considering going down the road of
writing code to allow this single window to edit other entities that
have identical structures.
These are essentially "reference tables" that have identical
structures. Things like "PersonType", "CompanyType", etc., that all
fundamentally have an ID, a name, a note, and a few other common fields.
I'd rather not build a dozen identical windows to edit all these, so
I imagine writing code to:
1. make sure all changes to the CoreData entities in the current
window are committed to the persistent store.
2. either create new array controllers programmatically - or
manipulate the ones already instantiated - to reference a different
CoreData entity.
3. tell the array controllers and the window to "rebind" or "refresh"
so that editing can continue for the new entity type.
Does anyone with more Cocoa/CoreData experience think this is a good
or bad idea before I start hacking away?
Cheers all,
AJ
(Betting on CoreData 2 for WWDC)
_______________________________________________
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