Re: Is this logical?
Re: Is this logical?
- Subject: Re: Is this logical?
- From: Nathan Day <email@hidden>
- Date: Sat, 24 May 2003 13:28:46 +0930
The purpose application:openFile: it to let you manage the opening of a
file your self instead of the App Kit. You return NO to so that you
didn't handle it, in which case AppKit will for you.
On Saturday, May 24, 2003, at 09:15 AM, Georg Tuparev wrote:
1. I am working on a document based application. All possible document
viewers/editors are provided by plugins. Therefore, I marked the
document extension to be "*" (Target Settings -> Document types)
2. I am loading all plugins (some of them potentially third party) to
determine the full list of document types the application can handle.
3. If I start the application and drop a file on the App Icon (in the
Dock),
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString
*)filename
gets called. If the file has an extension that is not supported by any
of the plugins, the method returns NO.
4. Nevertheless, the designated NSDocument object' method
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType
or
-readFromFile:ofType:
are called. Only then if I return NO again, there is no document
opened.
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
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.