file will not open in NSDocument-based app
file will not open in NSDocument-based app
- Subject: file will not open in NSDocument-based app
- From: Aurélien Chanudet <email@hidden>
- Date: Mon, 17 Jun 2002 04:10:01 +0200 (CEST)
Hi,
I'm writing an NSDocument-based application. I would
like it to read and display the contents of data CDs
in a certain way. Therefore, I have added the
following type dictionary :
<dict>
<key>CFBundleTypeName</key>
<string>NSStringPboardType</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>disk</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>NSDocumentClass</key>
<string> name of my NSDocument subclass here </string>
</dict>
My first question is : how come that the data CDs
don't show up in the open panel although I can
drag-n-drop them onto the app's icon ?
I have overloaded the loadDataRepresentation:ofType:
method in my NSDocument subclass. But the method isn't
called when drag-n-dropping data CDs on the app's
icon.
To see what was going wrong, I have set an application
delegate and tried hooking into application:openFile:.
The latter method gets called as it ought to be when
drag-n-dropping data CDs onto the app's icon. However,
it seems that the default NSDocumentController refuses
to open data CDs as they are not regular files but
directories.
So, my second question is : can I change this default
behavior without subclassing NSDocumentController ?
Thanks,
Aurelien
_______________________________________________
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.