
Quote from smartmedia on March 7, 2023, 9:10 pmHi..
Local storage
When i try to read from Local Storage at first page (index) i get undefined as result.
After page has loaded if you press the button NeoGet, you get the result.I have tried to put Delay or Wait but the problem remains.
Thanks
Hi..
Local storage
When i try to read from Local Storage at first page (index) i get undefined as result.
After page has loaded if you press the button NeoGet, you get the result.
I have tried to put Delay or Wait but the problem remains.
Thanks
Uploaded files:Quote from Gaev on March 8, 2023, 1:01 am@smartmedia
When i try to read from Local Storage at first page (index) i get undefined as result.
Actually, the problem is with the AlertBox command that follows; I added a Container to your page with the content as ...
Status is [Status]
... while the AlertBox says undefined, the content of the Container shows the correct value (of 1)
I am guessing that the neoGetItem command is still waiting for the data (to arrive from Local Storage) while the AlertBox command is being serviced.
Inserting a ...
Wait 900... before the AlertBox worked for me ... the mileage on your computer may/will be different
When i try to read from Local Storage at first page (index) i get undefined as result.
Actually, the problem is with the AlertBox command that follows; I added a Container to your page with the content as ...
Status is [Status]
... while the AlertBox says undefined, the content of the Container shows the correct value (of 1)
I am guessing that the neoGetItem command is still waiting for the data (to arrive from Local Storage) while the AlertBox command is being serviced.
Inserting a ...
Wait 900
... before the AlertBox worked for me ... the mileage on your computer may/will be different

Quote from smartmedia on March 8, 2023, 7:43 amHi @Gaev,
I put the Alertbox to show that returns underfined. I have also used Wait and Delay up to 3 seconds with no result. That happens only to first page (index), on other pages i receive the results normally. I don't know if it has something to do with NeoGet that it runs from a subroutine in my script. My drive is SSD and has good RW speeds.
Hi @Gaev,
I put the Alertbox to show that returns underfined. I have also used Wait and Delay up to 3 seconds with no result. That happens only to first page (index), on other pages i receive the results normally. I don't know if it has something to do with NeoGet that it runs from a subroutine in my script. My drive is SSD and has good RW speeds.

Quote from smartmedia on March 8, 2023, 1:05 pmUpdate, i finally solved by using intermediate steps prior to read from local storage. Also notice that putting Wait command in a button in custom dialog window doesn't run the code at all.
Update, i finally solved by using intermediate steps prior to read from local storage. Also notice that putting Wait command in a button in custom dialog window doesn't run the code at all.
Quote from Gaev on March 8, 2023, 4:16 pm@smartmedia
I put the Alertbox to show that returns underfined. I have also used Wait and Delay up to 3 seconds with no result.
I placed the Wait command in the Page Enter section ... after the neoGetItem and before the AlertBox.
Before, the AlertBox would show undefined but the Container would show 1 ... with the Wait, both showed 1
Difficult to see the sequence of AlertBox vs. Container update.
That happens only to first page (index), on other pages i receive the results normally.
That adds to the theory that AlertBox is serviced before the Local Sotrage data is retrieved ... once retrieved, subsequent requests are probably serviced from memory/cache.
I don't know if it has something to do with NeoGet that it runs from a subroutine in my script.
I was using the neoapp you shared on this forum ... I did try to deploy it in the onDocumentReady subroutine ... but that did not help.
My drive is SSD and has good RW speeds.
Still, SSD access speeds are no match for Memory/Cache access speeds.
I put the Alertbox to show that returns underfined. I have also used Wait and Delay up to 3 seconds with no result.
I placed the Wait command in the Page Enter section ... after the neoGetItem and before the AlertBox.
Before, the AlertBox would show undefined but the Container would show 1 ... with the Wait, both showed 1
Difficult to see the sequence of AlertBox vs. Container update.
That happens only to first page (index), on other pages i receive the results normally.
That adds to the theory that AlertBox is serviced before the Local Sotrage data is retrieved ... once retrieved, subsequent requests are probably serviced from memory/cache.
I don't know if it has something to do with NeoGet that it runs from a subroutine in my script.
I was using the neoapp you shared on this forum ... I did try to deploy it in the onDocumentReady subroutine ... but that did not help.
My drive is SSD and has good RW speeds.
Still, SSD access speeds are no match for Memory/Cache access speeds.