Re: Reading RTF files
Re: Reading RTF files
- Subject: Re: Reading RTF files
- From: mmalcolm crawford <email@hidden>
- Date: Sat, 1 May 2004 17:15:45 -0700
On May 1, 2004, at 4:57 PM, Matt Ball wrote:
- (NSData *)dataRepresentationOfType:(NSString *)aType
{
NSAssert([aType isEqualToString:@"rtf"], @"Unknown type");
return [textView RTFFromRange:NSMakeRange(0, [[textView
textStorage] length])];
}
[on load, data becomes fileContents]
The data you're writing out is RTF, therefore
[textView setString:fileContents];
fileContents is not a string...
See NSText for methods such as 'replaceCharactersInRange:withRTF:'.
mmalc
_______________________________________________
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.