I am developing a GUI where the user is supposed to connect to a WiFi network.
At one point, the user is shown all the available networks in a "Vertical List" and he can choose one of them to connect. This list is supposed to be refreshed one in a while. I have implemented a timer which will call the function "updateAwailableNetworks()". This function is supposed to save the information about the available networks in 3 arrays, one for the names, one for the signal strengths and one for the fact whether there is a password needed or not. All the information about the networks is meant to be saved in the global variable called "WiFiNetworks", where there is also information about the current network an other things.
Before integrating it to the platform, I have built the dummy functions which update the information about available networks. When there is an update, I set the new properties of the vertical list, such as the NoOfItems, and force a reload by invoking the VerticalList.InvalidateItems().
The problem is that when I scroll the list up and down, some items disappear. Some are replaced by the default "WiFi Name". I do not understand why this happens.
After debugging I think that there is a problem I am having with the global variable, which does not seem to update itself in all the places where I call it. However I do not know howto solve this issue.
Attached you find the project.
Thank you very much for the support.