• 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: Getting RTFD data into an NSData object.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting RTFD data into an NSData object.


  • Subject: Re: Getting RTFD data into an NSData object.
  • From: Mark Stockwell <email@hidden>
  • Date: Mon, 5 Jul 2004 08:15:13 -0500

Just the ticket. This is the code that did the trick:

NSString *s = @"Detail Text";
NSAttributedString *aStr = [[NSAttributedString alloc]
initWithString:s];
NSRange range = NSMakeRange(0, [s length]);
NSData *data = [aStr RTFDFromRange:range documentAttributes:nil];

Thank you very much...

Mark



On Jul 4, 2004, at 6:59 PM, Louis C. Sacha wrote:

> Hello...
>
> NSAttributedString has an instance method
> RTFDFromRange:documentAttributes: that you could use on a manually
> created attributed string . It is part of the AppKit
> NSAttributedStrings Additions.
>
> http://developer.apple.com/documentation/Cocoa/Reference/
> ApplicationKit/ObjC_classic/Classes/NSAttributedString.html#//
> apple_ref/doc/uid/20000167/BAJEFCGI
>
>
> Hope that helps,
>
> Louis
>
>>
>> I can't seem to find any way to put some RTFD data into an NSData
>> object without reading it in from a file. How do I do it?
>>
>> Thanks,
>>
>> Mark
_______________________________________________
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: 
 >Getting RTFD data into an NSData object. (From: Mark Stockwell <email@hidden>)
 >Re: Getting RTFD data into an NSData object. (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: Checking for external input device
  • Next by Date: nsurlprotocol subclass
  • Previous by thread: Re: Getting RTFD data into an NSData object.
  • Next by thread: Please Help: Objective-C++ / C++ mix and public inheritance
  • Index(es):
    • Date
    • Thread