How do I manually convert NSTextStorage --> NSData object?
How do I manually convert NSTextStorage --> NSData object?
- Subject: How do I manually convert NSTextStorage --> NSData object?
- From: "Frederick C. Lee" <email@hidden>
- Date: Wed, 28 Dec 2005 15:53:49 -0800
I want to store a NSTextStorage (data from a NSTextView) object into
a persistent store (as a binary) and hence, need it in NSData format.
Scenario:
'My Memo' (NSTextStorage) --- > 'textData' (NSData) -->
'MyStoredMemo' (binary) within entity.
I understand I need to encode 'NSTextStorage' into a NSData object
but I can't figure out how (beyond writing out to a file).
The NSTextStorage object is an instantiated variable within my
NSPersistentDocument.
Is there some simple in-line encoding method to convert
NSTextStorage into NSData?
Something like ...
NSData *textData = [NSData initWithTextStorage:myTextStorage];
...within a routine?
Ric.
_______________________________________________
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