Calculator Community > Lua |
Function 'on.paint' only running when the page number is clicked |
(1/1) |
Girres42:
On my Ti-nspire CX II, the on.paint function only runs when I click the page number. It works fine on the student software. |
chalex:
--- Quote from: Girres42 on September 25, 2022, 02:22:22 pm ---On my Ti-nspire CX II, the on.paint function only runs when I click the page number. It works fine on the student software. --- End quote --- I won't pretend I know how this really works, but the way I see it the paint function is called when events are triggered, and also when platform.window:invalidate() is called. You can add this code and it should refresh automatically without input: --- Code: ---timer.start(0.01) function on.timer() platform.window:invalidate() --refreshes screen end --- End code --- Be warned about using this method though, switching off the handheld while the timer is running will cause it to freeze. |
Navigation |
Message Index |