Re: Store value of qc color picker in plist
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