UTI in Lion
UTI in Lion
- Subject: UTI in Lion
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Wed, 21 Sep 2011 17:10:08 +0700
I got from reading the documentation that UTIs are the modern way to go.
NSAttributedString.h says "for reading, thNSFileTypeDocumentAttributes is available along with NSDocumentTypeDocumentAttribute, but for writing the two are mutually exclusive"
So I decided to replace NSDocumentTypeDocumentAttribute in my documentAttributes with thNSFileTypeDocumentAttributes which contain a UTI string.
Previously I had:
2011-09-21 17:01:46.497 TextEditor[2950:2403] -[TestDocument fileWrapperOfType:error:] will with documentAttributes {
CharacterEncoding = 4;
DocumentType = NSPlainText;
UTI = "public.plain-text";
}
- worked fine.
But now, with using the UTI stuff I get:
2011-09-21 16:55:25.551 TextEditor[2897:5203] -[TestDocument fileWrapperOfType:error:] will with documentAttributes {
CharacterEncoding = 4;
UTI = "public.utf8-plain-text";
}
2011-09-21 16:55:25.553 TextEditor[2897:5203] -[TestDocument fileWrapperOfType:error:] Error Error Domain=NSCocoaErrorDomain Code=66062 "File could not be saved because the specified format is not supported."
So - should I just ignore all the hype about UTIs, or what?
Kind regards,
Gerriet.
_______________________________________________
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