• 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: How To Save & Restore the NSTextView String.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How To Save & Restore the NSTextView String. (From: Janakiram <email@hidden>)

  • Prev by Date: Re: Using Zip executable in Cocoa Application
  • Next by Date: Re: Using Zip executable in Cocoa Application
  • Previous by thread: How To Save & Restore the NSTextView String.
  • Next by thread: [Bluetooth] connexion a Disto (Leica) ?
  • Index(es):
    • Date
    • Thread