How to specify document extension programmatically
How to specify document extension programmatically
- Subject: How to specify document extension programmatically
- From: Patrick Rogers <email@hidden>
- Date: Fri, 17 Feb 2006 19:59:25 -0500
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:
This email sent to email@hidden