Re: Saving NSColor
Re: Saving NSColor
- Subject: Re: Saving NSColor
- From: Christopher Holland <email@hidden>
- Date: Thu, 9 May 2002 11:51:47 -0500
Yes, you will need to convert your color objects over to another format.
You should probably use an NSData object, although an argument CAN be
made for/against seperating the rgb values and writing them out
seperately. This allows an advanced user the ability to edit the values
directly in the prefs file using a text editor or with a shell, Perl, or
other kind of script. It would be just a little harder if they were
NSData entries (though certainly not impossible).
We do this when saving preferences for our Fluid screensaver...here's a
sample (key is the color's key in an NSColorList, BTW):
<key>0.000000</key>
<array>
<real>1.000000e+00</real>
<real>4.630654e-01</real>
<real>0.000000e+00</real>
<real>0.000000e+00</real>
</array>
Just food-for-thought.
If you want sample code, just let me know.
Christopher
_______________________________________________
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.