• 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: Store value of qc color picker in plist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Store value of qc color picker in plist


  • Subject: Re: Store value of qc color picker in plist
  • From: Mike Abdullah <email@hidden>
  • Date: Wed, 21 Jan 2009 11:23:30 +0000

Well, pretty much as the message says, a colour object is unsuitable for inclusion in a property list. I suggest you instead serialise it to an NSData object using NSKeyedArchiver/Unarchive.

Mike.

On 21 Jan 2009, at 09:31, Jonathan Selander wrote:

I use a QCCompositionParameterView to manipulate values of my composition, and i want to store those values in a plist. It works fine for al strings and numbers, but storing a 'color' seems to be a bit more complicated.

This is the code i tried:

[standardUserDefaults setObject:[qcView valueForInputKey:@"keyColor"] forKey:@"keyColor"];

And it logs the following:

2009-01-21 10:30:18.982 Calibrator[36961:10b] *** -[NSUserDefaults setObject:forKey:]: Attempt to insert non-property value 'NSCalibratedRGBColorSpace 1 0 0 1' of class 'NSCachedRGBColor'.

After this also comes the problem of reading the value into the color picker.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Store value of qc color picker in plist (From: Jonathan Selander <email@hidden>)

  • Prev by Date: Switching NSDocument based application to tabbed views interface
  • Next by Date: Format float value to display with commas
  • Previous by thread: Store value of qc color picker in plist
  • Next by thread: Flickering while capturing Live Video...
  • Index(es):
    • Date
    • Thread