Re: Display RTF & RTFD file in NSTextView
Re: Display RTF & RTFD file in NSTextView
- Subject: Re: Display RTF & RTFD file in NSTextView
- From: Ryan Britton <email@hidden>
- Date: Tue, 20 Sep 2005 12:33:08 -0700
Try this: (typed in mail)
NSData *data;
NSAttributedString *content;
data = [NSData dataWithContentsOfFile:@"some/path"];
if (!data)
{
return;
}
content = [[[NSAttributedString alloc] initWithRTF:data
documentAttributes:NULL] autorelease];
[[yourTextView textStorage] setAttributedString: content];
On Sep 20, 2005, at 12:08 PM, Giovanni Donelli wrote:
Dear folks,
I am trying to display either a RTF or a RTFD file into a
NSTextView.
Does anybody have a clever way to do that?
Thanks!
Giovanni
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden