-
Notifications
You must be signed in to change notification settings - Fork 6
Description
InForm currently relies on ON TIMER events to trigger routines like __UI_DoEvents and __UI_UpdateDisplay.
Line 225 in 0f4a3eb
| ON TIMER(__UI_RefreshTimer, __UI_FrameRate) __UI_UpdateDisplay |
Line 230 in 0f4a3eb
| ON TIMER(__UI_RefreshTimer, __UI_FrameRate) __UI_UpdateDisplay |
Line 313 in 0f4a3eb
| ON TIMER(__UI_EventsTimer, .016) __UI_DoEvents |
These routines are complex and can be invoked at unpredictable times, making it difficult to reason about InForm’s internal state when timers fire. This appears to be the root cause of several issues, including those noted in issue #7. Because there’s no clear control over what parts of InForm are executing when a TIMER event fires, it introduces instability and hard-to-reproduce bugs. The GIFPlayerSample demo can be used to easily trigger the issue.
Proposed solution
Avoid using ON TIMER entirely. Instead, manage timing manually and invoke update logic explicitly from the main loop.
Line 111 in 0f4a3eb
| 'Main loop |
This would give us full control over when and how UI updates occur, improving reliability and making InForm easy to debug.