• 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 12:43:19 -0700

On Sep 4, 2011, at 09:06 , Vik Rubenfeld wrote:

> 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?

Why do you have 4 document types? It looks like you have too much stuff in there.

IIRC, if you have multiple types, you want your default type to be the first one. The document type gets chosen by default when a new document is created. You can choose a different one by using NSDocument/NSDocumentController methods, but it's far simpler to let the default be the correct one.

The document type is what's displayed in Finder Get Info windows, so it usually is more specific than just "XML" and isn't necessarily about the data representation. It's usual to have the application name in there, if it's a app-specific document. For example, my ".pages" documents show up in the Finder as "Pages Publication".

Your UTI ("Identifier") is invalid. There's a specific set of rules for naming UTIs, and for custom UTIs you either need to export or import the definition too. Probably, at this stage, you should just not specify a UTI at all.

I'd suggest you create yourself a new document-based Cocoa application from the Xcode template, and use that as a model for setting up your document types.


_______________________________________________

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>)
 >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>)

  • 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