Page 1 of 1

Mostrar mensaje en pantalla mientras se cargan los datos

PostPosted: Sat Oct 01, 2016 8:24 am
by gusgusl
Lo que necesito hacer es mostrar un mensaje en pantalla tipo "Aguarde un momento se están cargando los datos" al presionar un botón y que luego de realizados los cálculos que necesito lleve al usuario a una pagina determinada

Intente hacerlo como en "neobook" enviando a una pagina que contiene ese mensaje mientras realizo los cálculos que necesito y al finalizar envio al usuario a la pagina que necesito pero no funciona.

Cual seria la manera de hacerlo?

Re: Mostrar mensaje en pantalla mientras se cargan los datos

PostPosted: Sun Oct 02, 2016 2:28 pm
by Neosoft Support
Google translation:
I need to do is display a message on screen type "Wait a moment, loading the data" by pressing a button and then made the calculations need to take the user to a specific page

Try to do as in "NeoBook" sending a page containing that message while I need to perform calculations and at the end of sending the user to the page I need but does not work.

What would be the way to go


This worked for me:

Code: Select all
GotoPage "NewPage1"
Loop 1 100 [count]
  .do something
EndLoop
GotoPage "Main"


What have you tried?

Re: Mostrar mensaje en pantalla mientras se cargan los datos

PostPosted: Wed Oct 05, 2016 4:47 pm
by gusgusl
"Neoapp" no sigue la misma lógica que "Neobook" al momento de ejecutar las lineas de codigo?
respeta el orden en el cual fueron puestas las lineas de codigo?
Porque he notado que si a mitad de linea pongo un "Alertbox" recien me lo ejecuta al finalizar todas las lineas

"Neoapp" does not follow the same logic as "Neobook" when executing the lines of code?
respects the order in which they were placed lines of code?
Because I've noticed that if halfway line put a "Alertbox" me recently executed at the end of all lines

Re: Mostrar mensaje en pantalla mientras se cargan los datos

PostPosted: Sat Oct 08, 2016 6:22 pm
by Neosoft Support
You're right, some commands work differently in JavaScript than they do in NeoBook or other programming environments. In NeoAppBuilder there are two alert box commands - jsAlert and AlertBox. jsAlert will pause execution of the script, while AlertBox won't. This is because JavaScript is single-threaded, and the browser won't let us pause execution and wait for the user to do something. The only exceptions are jsAlert, jsConfirm and jsPrompt which are special dialogs handled by the browser. As you may have seen they are ugly and can't be customized. NAB's AlertBox is prettier, but it requires a callback function so you have to split your script into two parts in order to accomplish the same thing.

More info on this "feature" of JavaScript:

http://stackoverflow.com/questions/1950 ... user-event