[15 Mar 2009] Bug in SetLayerStyle() with an Inserted TextObject
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 15 Mar 2009 11:06:22 -0000
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):
There are two ways of working around this problem.
1) Remove the SetFont() line, and use the default font.
OR
2) Use DisplayTextObject() instead of InsertLayer()
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()