Extending supported document types at run time in doc-based app
Extending supported document types at run time in doc-based app
- Subject: Extending supported document types at run time in doc-based app
- From: Rick Hoge <email@hidden>
- Date: Thu, 19 Mar 2009 14:46:05 -0400
I would like to implement a plug-in mechanism which will allow a Cocoa
document-based application to load plugins which will implement
subclasses of NSDocument for different file types. This would allow
custom extension of the application to support 3rd party file types,
and could have some other advantages.
Essentially, this would involve programatically updating the document
class information that is usually read from the application's plist
file in the CFBundleDocumentTypes entry.
I gather that what I want can be achieved by subclassing
NSDocumentController and overriding methods like documentClassForType,
documentClassNames, etc., but I'm not sure how to indicate things like
whether the app is an 'editor' or 'viewer' for a specific document type.
If anyone has experience with this kind of approach and can warn of
any gotcha's I would be very grateful.
Thanks in advance,
Rick
(43092.6825)
_______________________________________________
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