Re: Saving NSAttributedString to a File
Re: Saving NSAttributedString to a File
- Subject: Re: Saving NSAttributedString to a File
- From: Charles Jenkins <email@hidden>
- Date: Thu, 08 Jan 2015 07:53:43 -0500
Jeffrey,
FWIW, I started with RTF and then decided I'd need to switch over to using XML instead in order to have control of writing out what I needed from my NSAttributedStrings. If you're writing RTF for interoperation with another program, you may be stuck with it; but if you're working on your own app's internal data file format, XML may suit you better. Consider using XML serialization to write the data out and NSXMLParser to read it back in.
The objects are very easy to use (with one exception I just asked about in my message entitled "Am I Reinventing the Wheel? (Part I)"). If you do an Internet search, you can find good tutorials on getting started with NSXMLParser. It took me less than a day to write something that met my needs.
—
Charles
On Wednesday, January 7, 2015 at 18:32, Jens Alfke wrote:
>
> > On Jan 7, 2015, at 1:49 PM, Jeffrey Oleander <email@hidden (mailto:email@hidden)> wrote:
> >
> > So, then the problem becomes, how do you get it to pass on those custom tags as custom attributes, or to your custom attribute processor?
>
> By writing your own RTF codec. Apple's doesn't support this.
>
> —Jens
_______________________________________________
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