• 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: Reading RTF files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Reading RTF files (From: Matt Ball <email@hidden>)

  • Prev by Date: Re: Can't make IBOutlet connection in IB
  • Next by Date: Re: Parsing a HTML Page
  • Previous by thread: Reading RTF files
  • Next by thread: Custom NSTextFieldCell
  • Index(es):
    • Date
    • Thread