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