Closed SaschaKoch closed 7 months ago
Hi,
Instead of using app.event().step(), you should use app.event().draw() which is what you really want to do. Moreover, it's prevents the workaround of the TextBox. The TextBox, because of it's cursor, triggers an event that causes step() to call draw().
Concerning the issue related to the call to show(), that is not a bug. There is a patch that changes the behavior of the show and hide methods for overlays. Showing or hiding them is now done instantly. So either you take care when the show method is called or you set the window hint to software in order to wait for an event to draw it.
Regards, Ludovic
Hi,
I have recently changed from EGT 1.7 to EGT 1.8 and observed a different behavior during startup of my program. The program consists of several windows and loads of different Widgets and Images on them which makes the loading of the program rather slow (roughly 2-3s). To avoid having a 2-3s black screen on my target device after Linux finished booting and before the program started up properly and reached the app.run() at the very end of my main() function we introduced a "loading" screen: at the beginning of the main() function a TopWindow is created, a text label-Widget is added "..." and then the whole thing is displayed with app.event().step(). (The TextBox Widget is only there to fix a bug which leads to the event().step() sometimes not working and sometimes working. With that TextBox things seem to work fine)
In that way the user sees the loading screen after Linux finished booting (white screen with the "..." in red color in the middle) and is not presented with an awkward black screen for a couple of seconds. The app.event().step() leads to everything being created and displayed up to this point. the app.run() at the end has a similar effect but keeps the whole program indefinitely going (until the user or something ends it).
In EGT 1.7 this worked fine, in EGT1.8 this works as well but I encountered that the snippet
which is placed in the above code somewhere in the //Loads of code section seem to have a similar effect than app.event().step() leading to a display update half way through the first run of my main() where only half the stuff is done yet. Only after some time when the program reaches the final return app.run() is the display updated again and everything is created as it should be. However now the user is again left with an even more awkward half build screen due to my window.show(). I hot fixed it by putting the window.show at the very end just before the return app.run() but it seems like just a hot fix. For example some code parts are not finished executing leading to a change in an image which is actually coded before the window.show()
Is this change in behavior intended or a bug?
Thanks already Sascha