Re: How To Save & Restore the NSTextView String.
Re: How To Save & Restore the NSTextView String.
- Subject: Re: How To Save & Restore the NSTextView String.
- From: Jerry Krinock <email@hidden>
- Date: Sun, 18 Dec 2005 07:16:11 -0800
- Thread-topic: How To Save & Restore the NSTextView String.
on 05/12/18 06:42, Janakiram at email@hidden wrote:
>
Hi,
>
I am using NSTextView in my application to receive input from the
>
user.Once the user quits & reopens it again i need to show the same
>
string. If my text view contains simple nsstring i am able save &
>
restore it. but if i allow the user to have different text having
>
different font characheristics then i am getting problems. Please
>
suggest me some way to store this type ( like
>
NSAttributedString ).Thanks in Advance.
>
>
-JanakiRam.
Probably you were storing the unformatted string as an NSString using
NSUserDefaults. A defaultĀ¹s value can be only property list objects:
NSData, NSString, NSNumber, NSDate, NSArray, or NSDictionary. To store a
more complicated object such as NSAttributedString, I would guess that you
must archive or serialize it. Read this in the Cocoa documentation:
ADC Home > Reference Library > Documentation > Cocoa > Data Management >
Archives and Serializations
_______________________________________________
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