Re: Getting RTFD data into an NSData object.
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.