Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to specify document extension programmatically



I am writing a plug-in that shares code with an application. When the plug-in is displayed it actually displays the window associated with an NSDocument. (So it is essentially a document based plug-in).

When I want to save the data configured in the plug-in I send it a saveDocuemnt: message. The save dialog does not append the correct filename extension to the document file because the host application does not know about the file type of the plug-in. I set the file type of the document by calling

[documentRef setFileType:@"My File Type"]

before I display the window, but I cannot find a way to specify the file extension. The file type and the associated extension are specified in my plug-in's info.plist, but this information is not available to the main bundle plist.

I was wondering if there was a way to do any of the following:

- Specify the filename extension that is associated with my NSDocument.
- Add the file types in my plug-ins plist to the file types in the main bundle's plist.
- Display a save dialog that used a specific file extension (while preserving the normal save dialog behaviour vis a vis filename extensions).


- Pat

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.