site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Does anyone know how to do this? Or have sample code to do this? Any ideas? Sample code? Thanks, Steve Sheets Midnight Mage Software This email sent to skiadas@math.uchicago.edu Haris _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... Why don't you save two things: The NSString and the NSdictionary of attributes? On Mar 31, 2005, at 3:20 PM, Steve Sheets wrote: I searched the archives for this question, but was unable to find any specific solution, so I thought I would come out and ask it. How can NSAttributedString be saved/converted in the User Defaults (ie. Preferences)? Is there a way to convert NSAttributedString (ie. text containing fonts, font size, colors and other text attributes) into a NSString, and then saved into a NSAttributedString? And then later be able to read it out of the applications user defaults back into a NSAttributedString with the font information restored? Obviously, one of the best way would be some function that converts NSAttributedString directly into a NSString, with embeded tags (ex. HTML?), while having another function that converts that resulting string back into an attributed string. I can not find anything from Apple for this simple operation. I am mostly concerned with font name, font size, font styles, colors and other attributes. Pictures and URLs would not need to be converted or saved. _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/ skiadas%40math.uchicago.edu This email sent to site_archiver@lists.apple.com