• 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: Saving preferences tutorial
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving preferences tutorial


  • Subject: Re: Saving preferences tutorial
  • From: Henry McGilton <email@hidden>
  • Date: Mon, 30 Jun 2003 20:21:03 -0700

On Monday, June 30, 2003, at 06:44 PM, Jeff Harrell wrote:

On Monday, June 30, 2003, at 08:41 PM, Chris Parker wrote:

-setObject:forKey: on NSUserDefaults only works for "plist" types, as Dave Thorup indicated in his message earlier in this thread.

He's right, of course. I stand corrected. I am a dumbass. Mea culpa. But, in my own defense, getting an NSColor into a plist type is a pretty trivial exercise. Myself, I would have converted it to an array of floats, but the archiver trick might be a better way.

The archiver trick likely is a more reliable way, unless you
are completely sure of the nature of the color you are saving.
Colo(u)rs can be in a variety of different color spaces, such
as calibrated RGB, calibrated HSB, device RGB, device CMYK, and
so on. And in fact even a pattern image, for which there are
no components for which to extract floats . . . So, correct
saving of colours without archiving would involve saving the
name of the colour space as well as the appropriate components.

Best Wishes,
........ Henry


===============================+============================
Henry McGilton, Boulevardier | Trilithon Software
Objective-C/Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden | http://www.trilithon.com
|
===============================+============================
_______________________________________________
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: Saving preferences tutorial (From: Jeff Harrell <email@hidden>)

  • Prev by Date: Re: Strong language about Cocoa and Qt.
  • Next by Date: Re: best practice with helper AppleScript - another solution
  • Previous by thread: Re: Saving preferences tutorial
  • Next by thread: Strong language about Cocoa and Qt.
  • Index(es):
    • Date
    • Thread