Hi,
I’m saving a large file to “disk”, and it takes 4 to 10 seconds …
I’d like to display a message to that effect, but my attempts have failed (i.e., no message appears). (#1)
(My terminology is going to be wrong, sorry.)
My understanding is that the physical screen is updated when I come to the “end” of my code (“fall off”),
and logically return to the Corona jacket (and wait for some event to occur). (Or, perhaps its updated at the start of the frame…same effect for me.) .
For uploads/downloads to the network, that’s fine … because those (somehow) get handled
asynchronously.
But, that’s not case when I’m using Lua code to write thousands of lines to a file.
(Yes, I could implement an incredibly ugly kludge: save some lines, set a timer interrupt for a
few milliseconds from now, and effectively loop by “exiting” my Lua code every now and then,
and I know that would cause the screen to be updated.)
I’d like to find something like: display.renderNow ()
Back in 2015, Rob said:
It usually creates problem when you try to do a progress bar,
start a bunch of things loading in the same block of code and wonder
why the progress bar didn’t update. The frame buffer won’t update again to
show the new progress bar until that block finishes.
…and that’s what I’m running into
thanks,
SS
#1. In my current attempt, I mark all the current on-screen objects as “invisible”, and mark a text block
I created earlier (for holding my “wait, I’m saving a file” text) as “visible”.
I know that works in and of itself, via separate testing.
(At the end of the file saving, I mark the wait text block “invisible”, and all the old on-screen objects as “visible” … my version of scenes.)