• 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
How to specify document extension programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to specify document extension programmatically
      • From: Patrick Rogers <email@hidden>
  • Prev by Date: Re: When exactly does a fault get fired?
  • Next by Date: Re: Using NSDateFormatter, and sorting issues
  • Previous by thread: Re: Using NSDateFormatter, and sorting issues
  • Next by thread: Re: How to specify document extension programmatically
  • Index(es):
    • Date
    • Thread