The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Scripting Bridge & NSColor (http://forums.omnigroup.com/showthread.php?t=14743)

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]

and:

[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.

Help!


All times are GMT -8. The time now is 12:57 AM.

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