-
Notifications
You must be signed in to change notification settings - Fork 0
AvoidTurtleInHandler
Nonki Takahashi edited this page Apr 24, 2017
·
2 revisions
Use
Turtle.Show()
GraphicsWindow.KeyDown = OnKeyDown
While "True"
If keyDown Then
If key = "R" Then
Turtle.TurnRight()
EndIf
keyDown = "False"
Else
Program.Delay(200) ' for reducing server load
EndIf
EndWhile
Sub OnKeyDown
key = GraphicsWindow.LastKey
keyDown = "True"
EndSub
instead of
Turtle.Show()
GraphicsWindow.KeyDown = OnKeyDown
Sub OnKeyDown
If GraphicsWindow.LastKey = "R" Then
Turtle.TurnRight()
EndIf
EndSub
- Small Basic Known Issue: 25669 - Turtle Operations in Event Handlers Cause Browser Hang Up in Remote (TechNet Wiki)
Copyright © 2017-2019 Nonki Takahashi.
This work is licensed under a Creative Commons Attribution 4.0 International License.
