• 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: Vik Rubenfeld <email@hidden>
  • Date: Sun, 04 Sep 2011 09:06:58 -0700

That clears up a lot! I believe I now know that I do not need to find a method that assigns a file extension; instead, I just need to fill out the XCode application properties correctly.

Part of my difficulty has been that the docs to which you have provided a link are for, I believe, XCode 3, and do not fully describe XCode 4.  I have set up my XCode 4 app properties as shown in this screen shot:

	http://tinyurl.com/3gu72xp

I created a document type XML; assigned it to my document class; and filled in a file extension for it.

I cleaned my XCode project, recompiled and ran. Still no file extension is appended to the document when I save it.  Are there or more final steps I am leaving out?




On Sep 4, 2011, at 1:33 AM, Quincey Morris wrote:

> 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: Quincey Morris <email@hidden>
    • Re: Best Practices for Associating a File Extension With a File in XCode 4?
      • From: Jens Alfke <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>)
 >Re: Best Practices for Associating a File Extension With a File in XCode 4? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Knowing when font panel is visible
  • Next by Date: Re: Best Practices for Associating a File Extension With a File in XCode 4?
  • 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