What are the default values for the templateGraphic
Jim Hurley
jhurley at infostations.com
Fri Nov 26 11:51:59 EST 2004
I've discovered I don't understand the templateGraphic. In the docs it says:
Use the templateGraphic keyword to set up default properties to be
used for any new graphics you create.....The properties of the
templateGraphic are reset to their defaults when all running handlers
finish executing.
However the following handler give me a circle whose foregroundcolor is white.
local x0,y0
on circle radius
reset templateGraphic
if there is no graphic "myCircle" then create graphic "myCircle"
set the style of graphic "myCircle" to oval
set the rect of graphic "myCircle" to
x0-radius,y0-radius,x0+radius,y0+radius
end circle
This implies that the default value of the foregroundcolor of the
templateGraphic is white. At least for this particular stack. I can,
of course, set the foregroundcolor to black--but only after the
"reset templategraphic." (I did have an earlier problem with this
stack--it did appeared that all the foregroundcolors were set to
white throughout the stack. Maybe the stack is corrupted.)
If I create a new stack, the same handler gives me a black
foregroundcolor for the circle.
Are there default values for the templateGraphic that apply to the
*stack*? How would one get the default values of the templateGraphic?
Thanks,
Jim
More information about the use-livecode
mailing list