• 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: Writing nested dictionary fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing nested dictionary fails


  • Subject: Re: Writing nested dictionary fails
  • From: Thomas Harrington <email@hidden>
  • Date: Mon, 16 Dec 2002 19:37:48 -0700

On Monday, December 16, 2002, at 06:01 PM, Mike Ferris wrote:

The font attributes are presumably going to include an NSFont object... NSFont is not a plist-able object. NSDictionary's writeToFile:atomically: writes property lists only, it is not a general archiving mechanism. And the attributes used by NSTextStorage are often not plist objects.

D'oh! You are, of course, correct. I misread the description as meaning that "NSFont" was a key name.

One possible solution for you would be to archive the attribute dictionary (the standard Cocoa attribute values all conform to NSCoding). Then you can put the resulting NSData in your dictionary. Sketch actually does this for the whole NSTextStorage objects that it uses in its TextArea object to store the contents if you want an example...

That sounds like the best idea. Thanks a lot.

--
Tom Harrington
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Writing nested dictionary fails (From: Mike Ferris <email@hidden>)

  • Prev by Date: Re: passing NSRect struct as an arg
  • Next by Date: Re: passing NSRect struct as an arg
  • Previous by thread: Re: Writing nested dictionary fails
  • Next by thread: Re: Writing nested dictionary fails
  • Index(es):
    • Date
    • Thread