Author Topic: Function 'on.paint' only running when the page number is clicked  (Read 1772 times)

0 Members and 1 Guest are viewing this topic.

Offline Girres42

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Function 'on.paint' only running when the page number is clicked
« 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.

Offline chalex

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 15
  • Rating: +1/-0
  • Making the nSMM... and probably not much else.
    • View Profile
Re: Function 'on.paint' only running when the page number is clicked
« Reply #1 on: September 25, 2022, 04:34:09 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.
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: [Select]
timer.start(0.01)
function on.timer()
        platform.window:invalidate() --refreshes screen
end

Be warned about using this method though, switching off the handheld while the timer is running will cause it to freeze.
Wow! I am working on:
that's amazing!

Discord: onlypuppy7#5131