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 protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]