• 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
Re: Best Practices for Associating a File Extension With a File in XCode 4?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Practices for Associating a File Extension With a File in XCode 4?


  • Subject: Re: Best Practices for Associating a File Extension With a File in XCode 4?
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 04 Sep 2011 01:33:51 -0700

On Sep 4, 2011, at 01:07 , Vik Rubenfeld wrote:

> So I still haven't discovered how to tell NSSavePanel what file extension my document should be, when calling saveDocumentWithDelegate:didSaveSelector:contextInfo.

See:

	http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Documents/Concepts/DocTypePList.html#//apple_ref/doc/uid/20000024-BHADAGHF

NSDocument abstracts the document "type" away from the file "type", because the file type can be variously represented by extensions, UTIs, MIME types, and other legacy things. The mappings between the various ways of representing types is kept in the plist as described in the above document.

The Save panel uses this same information to determine defaults for documents being saved.

In the very simplest case, the plist will contain a single document type declaration with an associated file extension. In that scenario, the Save panel will return a filename with that extension.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Best Practices for Associating a File Extension With a File in XCode 4?
      • From: Vik Rubenfeld <email@hidden>
References: 
 >Re: Best Practices for Associating a File Extension With a File in XCode 4? (From: Lee Ann Rucker <email@hidden>)
 >Re: Best Practices for Associating a File Extension With a File in XCode 4? (From: Vik Rubenfeld <email@hidden>)
 >Re: Best Practices for Associating a File Extension With a File in XCode 4? (From: Quincey Morris <email@hidden>)
 >Re: Best Practices for Associating a File Extension With a File in XCode 4? (From: Vik Rubenfeld <email@hidden>)
 >Re: Best Practices for Associating a File Extension With a File in XCode 4? (From: Kyle Sluder <email@hidden>)
 >Re: Best Practices for Associating a File Extension With a File in XCode 4? (From: Vik Rubenfeld <email@hidden>)

  • Prev by Date: Re: Best Practices for Associating a File Extension With a File in XCode 4?
  • Next by Date: Re: Knowing when font panel is visible
  • Previous by thread: Re: Best Practices for Associating a File Extension With a File in XCode 4?
  • Next by thread: Re: Best Practices for Associating a File Extension With a File in XCode 4?
  • Index(es):
    • Date
    • Thread