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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to