wasikhetmaar Posted July 21, 2015 Report Share Posted July 21, 2015 Hello, I'm working with a HMI screen with as initial load and a listener. When the sreen is active, the listener is also active. When I enter the screen, the load should only be executed once. To do so I'm working with buttons that set the bit Initial_load_refresh. In the main now the direct contact with bit Initial_load_refresh is active and call function Initial_load is called. At the end of my Initial_load function I reset the bit Initial_load_refresh. The problem is that not every element that should be loaded by the function Initial_load is loaded. When i click three times on the pages everything is loaded. My own solution is to add a timer at the end of the function Initial_load which ends after a second, then resetting the Initial_load_refresh bit. This works, but does anyone know a better solution then putting at every initial_load function a timer? Quote Link to comment Share on other sites More sharing options...
wasikhetmaar Posted July 22, 2015 Author Report Share Posted July 22, 2015 I have found the problem. I was loading pages at the same time. I guess it is very important to start each function with a direct contact and check if everything else is offline except for a listener. Now I load only the initial page and when resetting the refresh at the end of the page it works without a timer. After the refresh the pages is activated and thereby also the listener. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.