The Omni Group Forums

The Omni Group Forums (
-   OmniGraffle General (
-   -   Scripting Bridge & NSColor (

pixel 2009-12-07 11:19 AM

Scripting Bridge & NSColor
So, I'm still fiddling with Scripting Bridge, and have managed to create objects (woohoo!), but I can't get the colors set for some reason. I've tried setting the color with (these are all in the NSDictionary I pass to the object for properties:

[CODE][NSColor blackColor][/CODE]
That fails with the error:
[B]-getRed:green:blue:alpha: not defined for the NSColor NSCalibratedWhiteColorSpace 0 1; need to first convert colorspace.[/B] so I tried:

[CODE][[NSColor greenColor] colorUsingColorSpaceName:NSDeviceRGBColorSpace], @"strokeColor"


[CODE][NSColor colorWithDeviceRed:0 green:1 blue:0 alpha:0], @"strokeColor"[/CODE]

[CODE][NSColor colorWithCalibratedRed:0 green:1 blue:0 alpha:0], @"strokeColor"[/CODE]

all of which result in a black stroke color -- no matter what I try, it's always black. I've been unable to alter the fill and gradient colors as well. All of the other properties I set (size, origin, etc) are working.


All times are GMT -8. The time now is 02:38 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.