• 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
Runtime Programmatic Entity Switching in CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Runtime Programmatic Entity Switching in CoreData
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Console error message: failed to load window nib file
  • Next by Date: Re: setMenuBarVisible: with animation
  • Previous by thread: Re: Console error message: failed to load window nib file
  • Next by thread: Re: Runtime Programmatic Entity Switching in CoreData
  • Index(es):
    • Date
    • Thread