Re: how to save styled text
Re: how to save styled text
- Subject: Re: how to save styled text
- From: Clark Cox <email@hidden>
- Date: Mon, 16 Feb 2004 18:10:06 -0500
On Feb 16, 2004, at 16:24, Sascha Kuehn wrote:
>
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??
Check the documentation, or even the NSData.h header file:
[myNSData writeToFile: filePath atomically: YES];
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.