• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to save styled text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >how to save styled text (From: Sascha Kuehn <email@hidden>)
 >Re: how to save styled text (From: Fritz Anderson <email@hidden>)
 >Re: how to save styled text (From: Sascha Kuehn <email@hidden>)

  • Prev by Date: Re: Slow Cocoa
  • Next by Date: Re: makeKeyAndOrderFront and NSBorderlessWindowMask
  • Previous by thread: Re: how to save styled text
  • Next by thread: Problems with NSFont and (NSFont *)fontWithName:(NSString *)fontName size:(float)fontSize
  • Index(es):
    • Date
    • Thread