Re: Saving preferences tutorial
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.