using fileWrapperFromRange: for lossy conversion
using fileWrapperFromRange: for lossy conversion
- Subject: using fileWrapperFromRange: for lossy conversion
- From: Philip White <email@hidden>
- Date: Wed, 20 May 2009 11:46:24 -0600
Hello,
I am hoping to use NSAttributedString's
fileWrapperFromRange:documentAttributes:error: to export text from my
program into a variety of formats. However, the routine fails
frequently when the NSDocumentTypeDocumentAttribute is set to
NSPlainTextDocumentType, to be specific, whenever creating a file of
that type would mean that some data would be lost, such as text
attributes.
Can I force that method to convert the document even if it means
loss of attributes? There are certainly other ways to do it, using
NSTextView and such, but it would be nice to have a unified approach
for all file formats supported by NSDocumentTypeDocumentAttribute.
The NSConvertedDocumentAttribute key seems to hint at the
possibility of this with its mention of filters and such, but I
haven't been able to find any info on those.
Thanks all,
Philip
_______________________________________________
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