Setting color of color well

I’m trying to convert an ancient ASS app to ASobjC

Beside other problems I struggle to get/set color of color wells.
The old

set fColor to color of fColorWell
set color of fColorWell to fColor

won’t work.

Thanks

First of all color is a reserved AppleScript term so you have to put it in pipes.

Second of all a property getter is treated as a handler so you have to add a pair of parentheses

set fColor to |color|() of colorWell
set redColor to current application's NSColor's redColor()
set |color| of colorWell to redColor

And I’d change that last line to:

colorWell's setColor:redColor

Setting Cocoa properties like AppleScript properties doesn’t always work, so I reckon it’s better to use the setter form consistently.