Hi Andreas,
I've got a really strange bug here. The following code does not work with OS 4.1 (the text gets destroyed in the interval):
Code: Select all
EnableLayers()
SetFont("DejaVu Sans.font", 16)
CreateTextObject(1, "This is a test")
InsertLayer(1, #TEXTOBJECT, 1, #CENTER, #CENTER)
Function p_TimeInterval()
SetLayerStyle(1, {Text = GetTime(TRUE)})
EndFunction
SetInterval(10, p_TimeInterval, 1000)
Repeat
WaitEvent
Forever
1) Remove the SetFont() line, and use the default font.
OR
2) Use DisplayTextObject() instead of InsertLayer()