Re: how to save styled text
Re: how to save styled text
- Subject: Re: how to save styled text
- From: Sascha Kuehn <email@hidden>
- Date: Mon, 16 Feb 2004 22:24:43 +0100
On 16. Feb 2004, at 16:43 Uhr, Fritz Anderson wrote:
The content of an NSTextView can be accessed by the method
textContent, which will give you an NSTextStorage.
NSTextStorage, as a subclass of NSAttributedString, can fully archive
and unarchive its contents to NSData by
RTFDFromRange:documentAttributes: and
initWithRTFD:documentAttributes:.
NSData is easily saved in a file.
i'm new to cocoa. how can i save nsdata in a file??
The easiest way to discover this sort of thing, I've found, is to
browse the class-level documentation. The free application AppKiDo is
particularly good for this. Get it at
<http://homepage.mac.com/aglee/downloads> and give it a try.
-- F
On 16 Feb 2004, at 8:25 AM, Sascha Kuehn wrote:
i have a text view with text in different colors, fonts, sizes and
even pictures.
how can i save this styled text in a file without loosing the style
of the text.
and how can i get the saved styled text back into the text view with
all the fonts, colors and pictures?
_______________________________________________
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.