I'm a newbie to ASOC.
I'm tearing my hair out over this. I've got a script that fetches the color from a color well. Problem is, if the return is in CMYK format, the script crashes.
I've tried all sorts of things to convert the CMYK to RGB but still get the same error..
the code
on colorWellSet_(sender)
try
set ThetempColor to theMainColorWell's |color|
--set ThetempColor to |color| of ThetempColor's colorUsingColorSpaceName_calibratedRGBColorSpace
log 1
log
set ThetempColor to theMainColorWell's colorUsingColorSpaceName_NSCalibratedRGBColorSpace
log 2
log
set ThetempColor to |color| of theMainColorWell's colorUsingColorSpaceName_NSCalibratedRGBColorSpace
log 3
log
set ThetempColor to ThetempColor's colorUsingColorSpaceName_NSCalibratedRGBColorSpace
--set ThetempColor to theMainColorWell's colorSpaceCreateWith_colorSpaceGenericRGB
set temp1 to ThetempColor's redComponent()
set temp2 to ThetempColor's greenComponent()
set temp3 to ThetempColor's blueComponent()
set TheColor to {(temp1 * 65535), (temp2 * 65535), (temp3 * 65535)}
on error errmsg
display dialog errmsg
end try
end colorWellSet_
returns logs in every case of....
17/11/09 10:45:29 AM Mail Manager Reporter[966] <Mail_Manager_ReporterAppDelegate @0x2007d6040: OSAID(4)>
17/11/09 10:45:29 AM Mail Manager Reporter[966] [<NSColorWell 0x2007ae6a0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key colorUsingColorSpaceName_NSCalibratedRGBColorSpace.
What am I doing wrong please, I'm getting worn out here!
Regards
Santa