re: Core data storage of objects whose class is loaded from a bundle
re: Core data storage of objects whose class is loaded from a bundle
- Subject: re: Core data storage of objects whose class is loaded from a bundle
- From: Ben Trumbull <email@hidden>
- Date: Thu, 29 Jan 2009 14:48:28 -0800
I am working on an app in which plugin subclasses are loaded from
bundles at launch time (didFinishLaunching in app delegate). The base
plugin class is specified in a framework against which the main app is
linked.
I can create instances of these dynamically loaded subclasses, and
assign them as 'transformable' attributes belonging to Core Data
entities. During a session the object behaves as expected, and I am
able to save the core data store to disk (the plugin base class and
dynamicaly loaded subclasses conform to the NSCoding protocol).
This is an NSKeyedArchiver issue, not a Core Data issue. All
transformable attributes are doing by default is using keyed
archiving. You'll probably want to more closely examine the
NSKeyedArchiver API and the NSCoding programming guide.
You could also write your own NSValueTransformer instead of using
keyed archiving, or to supplement keyed archiving.
- Ben
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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