Issue with the App.Online global variable


Peter Bradstreet
Hi David, I am having trouble figuring out something that should be very simple I am sure. On starting the app and throughout the app I would like to redirect the user to one of two views depending on whether they are online or offline. On the initial landing view I have the following: and have confirmed that this variable is getting set to 'true' I also have the following in the online and offline tabs so that changes to online status are monitored: This is all working well in order to change the colour of the 'online' icons conditionally but If I add the following code on a view show: nothing happens. This seems pretty basic but I am stumped as to what I am doing wrong? Cheers, Pete

DecSoft

Hello Peter,

Please, sorry for the possible inconveniences. You are right, there is some possible enhancement in AB and I am working on it right now. Please, wait for a new post here when a new release are available. I also explain what happen in the next post.



Peter Bradstreet
Okay thanks.

DecSoft

Hello Peter,

Please, upgrade your AB copy, there is a new release with the below changes:

The above changes mean that probably you also need to change the HTML code for the "online/offline" indicator, that now can be look like below:

Note how we surround both "true" and "false" with single quotes, since "App.Online" is now a "true" or "false" string, not a boolean value like before. This changes also means that your desired condition can now be used as you expected:



Peter Bradstreet
Works like a charm now. Many thanks, Pete

DecSoft

Hello Peter,

Works like a charm now. Many thanks, Pete

You're welcome! :-)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.