• 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 NSColor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Saving NSColor (From: Mike Beam <email@hidden>)

  • Prev by Date: Re: Saving NSColor
  • Next by Date: Re: DO and Proxy Indirection
  • Previous by thread: Re: Saving NSColor
  • Next by thread: Re: Saving NSColor
  • Index(es):
    • Date
    • Thread