OK, here we are :
- I've got an
NSTextView
- I'm getting it's
NSMutableAttributedString
content - I'm unable to read/write it to plist
By using Rob's code ( Saving custom attributes in NSAttributedString ), I've made some progress (I'm managing to write the data to disk), but I cannot recover it (= NSKeyedUnarchiver
returns nil
).
Encoding :
// where MAS --> NSMutableAttributedString
NSData* stringData = [NSKeyedArchiver archivedDataWithRootObject:MAS];
Decoding :
NSMutableAttributedString* mas = (NSMutableAttributedString*)[NSKeyedUnarchiver unarchiveObjectWithData:dat];
Any ideas? Any possible workaround (even if not with NSCoder
, which I doubt it works with RTFs...) would be welcome!