Re: Saving AttributedString with Attachments to RTFD
Re: Saving AttributedString with Attachments to RTFD
- Subject: Re: Saving AttributedString with Attachments to RTFD
- From: Douglas Davidson <email@hidden>
- Date: Mon, 7 Apr 2008 09:36:04 -0700
As others have noted, RTFD is a packaged file format, consisting of a
directory in the file system containing the underlying RTF and any
attachments. There are therefore two representations of RTFD: first,
the on-disk format, and second, a serialized format used on the
pasteboard. There are therefore two methods for obtaining RTF from an
attributed string, -RTFDFromRange:documentAttributes: (for the
pasteboard representation, expressed as an NSData), and -
RTFDFileWrapperFromRange:documentAttributes: (for the on-disk
representation, expressed as an NSFileWrapper). These two methods are
conveniences, specialized to the case of RTFD, for the more general
methods -dataFromRange:documentAttributes:error: and -
fileWrapperFromRange:documentAttributes:error:.
Douglas Davidson
_______________________________________________
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