Subclassing NSDocumentController & Finder
Subclassing NSDocumentController & Finder
- Subject: Subclassing NSDocumentController & Finder
- From: Georg Tuparev <email@hidden>
- Date: Sat, 25 May 2002 17:58:20 +0200
Folks,
The application I am working on is basically an empty shell for
different dynamically loaded plugins. Each plugin has its own
document/file types that it can handle, and corresponding NSDocument and
NSWindowController subclasses. The application itself has no information
about possible file types it could handle and depends completely on the
plugins it loads on launching. This means that the CFBundleDocumentTypes
in Info.plist is empty.
Currently I have written an application's delegate class that knows how
to check the plugins and create dynamically a list of possible file
types. It also implements Open ..., and New... File menu actions by
finding, loading, and instantiating the appropriate NSDocument subclass.
Here my questions:
1. The current application's controller class is in many ways very
similar to NSDocumentController, therefore I wold prefer to subclass
NSDocumentController instead of re-implementing large portions of it on
my own. My problem is that I cannot figure out which methods I need to
override in order to build my own list of document types/extensions. (I
know that I can put "*" as a file extension for a document type, but
this is not what I want to achieve).
2. Because the Document Type list of my application is empty, the Finder
cannot relate any file types/extensions to it. Is it possible somehow to
tell the Finder to associate file extensions to an application using
other mechanism?
TIA
Georg Tuparev
Tuparev Technologies
Klipper 13
1186 VR Amstelveen
The Netherlands
Mobile: +31-6-55798196
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.