Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ez.SetButtonEvent(sButtonHandler) document concurrency issues when drawing to the screen in the handler #78

Open
JacobChrist opened this issue Apr 20, 2023 · 0 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation Lua

Comments

@JacobChrist
Copy link
Member

Describe the issue

In working on some example code, I have run across several display anomalies when drawing to the screen. I have decided that this is probably due to code running in the button handler that is affecting the internal X,Y global variables (Column, Row). When these variable are changed it causes confusions in the thread that is handling the main Lua loop. This issue doesn't necessarily need to be fixed in code (as it is easy to set a flag to do the updates in the main loop) but a warning should be put in the manual to inform users that they should not write to the screen in the button event. The one exception that I don't fully understand at this time is the ez.Button(id, event) call that is given in the example code in section 14.4. The comment with this code indicates that is may redraw a button, this too may cause this concurrency issue to rear its head.

Location of Issue

  • Which Document: ezLCD-5x Lua API Manual 082922.pdf
  • Pages(s) containing issue: Section 14 Button Functions
@JacobChrist JacobChrist added bug Something isn't working documentation Improvements or additions to documentation Lua labels Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation Lua
Projects
None yet
Development

No branches or pull requests

2 participants