Re: Saving NSAttributedString to a File

2015-01-08 Thread Charles Jenkins
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

Re: Saving NSAttributedString to a File

2015-01-07 Thread Jens Alfke
On Jan 7, 2015, at 1:49 PM, Jeffrey Oleander jgo...@yahoo.com 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

Re: Saving NSAttributedString to a File

2015-01-07 Thread Jeffrey Oleander
On 2014 Dec 19, at 17:00, Jens Alfke wrote: On Dec 19, 2014, at 1:39 PM, Charles Jenkins cejw...@gmail.com wrote: But when it comes time to save to a file format selected from AppKit additions (e.g. RTFFromRange:documentAttributes:), any unusual, application-specific attributes will be lost.

Saving NSAttributedString to a File

2014-12-19 Thread Charles Jenkins
You can use attributes to hide pretty much whatever information you want in the attributes dictionaries associated with individual characters in an NSMutableAttributedString. For example, if you use named paragraph styles, each character in memory can know which style has been applied to it.

Re: Saving NSAttributedString to a File

2014-12-19 Thread Jens Alfke
On Dec 19, 2014, at 1:39 PM, Charles Jenkins cejw...@gmail.com wrote: But when it comes time to save to a file format selected from AppKit additions (e.g. RTFFromRange:documentAttributes:), any unusual, application-specific attributes will be lost. There is no built-in file format you

Re: Saving NSAttributedString to a File

2014-12-19 Thread Quincey Morris
On Dec 19, 2014, at 13:39 , Charles Jenkins cejw...@gmail.com wrote: But when it comes time to save to a file format selected from AppKit additions (e.g. RTFFromRange:documentAttributes:), any unusual, application-specific attributes will be lost. There is no built-in file format you can