The issue is the example uses "real" instead of "Real" which causes a compilation error.
The first annoyance is the radius of the circle is set to the width of the widget so it can display a "window" on a circle at times. I made the following change to the paint handler:
Code: Select all
public handler onPaint()
variable tCirclePath as Path
variable tShortest as Real
if my width < my height then
put my width into tShortest
else
put my height into tShortest
end if
put circle path centered at point [my width / 2, my height / 2] with radius ((tShortest - mMargin)/2) into tCirclePath
set the paint of this canvas to solid paint with color [0, 1, 0]
fill tCirclePath on this canvas
end handler
It would be good if the docs could be updated in the next release.