• 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
Is this logical?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is this logical?


  • Subject: Is this logical?
  • From: Georg Tuparev <email@hidden>
  • Date: Sat, 24 May 2003 01:45:35 +0200

Folks,

Here is what I am doing:

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.

Is this logical? Although not specifically stated in the docs, I was always under the impression that if application: openFile: returns NO, there will be no further attempt to open the document in questions. Did I misunderstood something?

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.

  • Follow-Ups:
    • Re: Is this logical?
      • From: Nathan Day <email@hidden>
  • Prev by Date: Re: Using DO from daemon
  • Next by Date: Re: Bring an application to the front
  • Previous by thread: Re: Bring an application to the front
  • Next by thread: Re: Is this logical?
  • Index(es):
    • Date
    • Thread