Re: Separating Attributes from Text in NSTextStorage
Re: Separating Attributes from Text in NSTextStorage
- Subject: Re: Separating Attributes from Text in NSTextStorage
- From: Jonathan Jackel <email@hidden>
- Date: Sat, 24 Jan 2004 16:54:45 -0500
Check out attributeRuns and setAttributeRuns:. It seems you could
write the attributeRuns array to disk and restore it later after
loading the plaintext.
Jonathan
On Jan 24, 2004, at 3:35 AM, Jonathan Hendry wrote:
I'd like to be able to save the attributes of an NSTextStorage
separately
from the text the attributes are associated with.
The text would come from large, possibly read-only ascii files. I'd
like to read that into the NSTextStorage, allow the user to modify
various attributes, then save the attributes to a different file,
without duplicating the original text in the attributes file.
Next time the user opens the text file, the attribute file would
be read in and the attributes applied to the text.
Is there a simple way to do this? The AttributedStrings aren't
really set up for this, it seems.
Thanks,
JH
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.