use of NSUnarchiver
use of NSUnarchiver
- Subject: use of NSUnarchiver
- From: Darin Duphorne <email@hidden>
- Date: Tue, 29 Jan 2002 20:02:29 -0600
I have NSAttributedString content in a NSTextView that I want to move to a
different NSTextView. I am trying to use an NSArchiver and NSUnarchiver to
achieve this move via an NSData. It doesn't work. Here's what I'm trying
to do:
NSData *htmlData=[NSArchiver archivedDataWithRootObject:displayView];
htmlData=[NSUnarchiver unarchiveObjectWith
Data:htmlData];
htmlString=[[NSString alloc] initWith
Data:htmlData encoding:NSASCIIStringEncoding]
;
[htmlView setString:htmlString];