Hi,
the setActivityIndicator don't works fine... It blocks the screen but don't show the activiti indicator.
It's a problem only for me?
Thanks in advance
Alessandro
It happens only on the device, in the simulator the activity indicator show correctly.
Here the code:
...
function loadData(page)
native.setActivityIndicator( true )
b, c, h = http.request( "http://www.xxx.net/" .. page .. ".txt" )
native.setActivityIndicator( false )
...
end
...
Do you need all the code?
My last trial day :)
This is very important for my application, there is a solution?
Thanks
Alessandro
I believe this does work, but if so we need to document the workaround. Logged as bug #128 in the meantime.
Alessandro
still having issues?
Did your trial expired?
reach me at info @ anscamobile.com
c
I have similar code, but opposite problem: Indicator shows, but screen is not blocked
Corona 2.0 Beta 4, iPhone 3GS, Software version 3.1.3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | local rightPress = function( event ) native.setActivityIndicator( true ) end local rightRelease = function( event ) downloadingURL = server..path.."buttons.php?user_name="..userName table1[1] = nil -- delete 1st position of table, otherwise every new stuff goes after it! http.request{ url = downloadingURL, sink = ltn12.sink.table(table1), } native.setActivityIndicator( false ) end |
I had a similar problem and I think it is because you are doing it in 1 loop
if you set and remove the activity indicator in the same loop you will never see it as both those commands are processed before the screen is updated
I setup 2 functions in the end and it works as expected
function 1
- show activity indicator
- do http request
function 2
- remove activity indicator
the http request needs to call function 2 when it has completed
sorry can be more helpful as away from computer but the above works (you just need to code it)
Makes sense @Matthew ...
Corona does never updates the screen while code is running.
This applies to the synchronous http request as well!
This also means that you will never get a "enterFrame" event interrupt while your code runs. Which means you do not need to lock states for changes in the stage as long as they are done in the same "event".
I just was thinking about stuff like that because of my store / restore of the gamestate which besides of other stuffs lets the play-field uninitialized for quiet some time. I do not need to stop the "enterFrame" events for this time as I had to do for other frameworks.
can you provide a code snippet that is giving you trouble?
Carlos