Progress Bar on iOS Simulator

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
Eoghan
Posts: 9
Joined: Tue Dec 17, 2013 3:38 pm

Progress Bar on iOS Simulator

Post by Eoghan » Sun Jan 05, 2014 7:11 pm

I'm not sure if this is just the behaviour of the iOS Simulator, but unfortunately I can't test it on a physical iOS device (I'm testing in Mac OS X 10.9.1, using iOS Simulator 7.0.3 in Xcode 5.0.2)

The attached ProgressBar_Test script displays a progress bar when I use LiveCode 6.5.1 Commercial's 'Development' > 'Test' menu option to deploy to a mobile device (it loads in a sample image 1000 times, just to simulate a loading process).

If I deploy to an Android device (Nexus 7, version 4.3), then the progress bar fills up as expected.

If I deploy it to an iOS Simulator (version 7.0.3) then the Simulator screen stays black until the message pops up to say all the images have been loaded.

I had read that repeat statements lock up the LiveCode engine, so a 'wait for 10 milliseconds with messages' command can be used to give the engine time to update the screen, and advance the progress bar. My full app seems to need the 'wait' command to show the progress bar on Android, but this test app doesn't seem to need the 'wait' to show the progress bar correctly on Android. Using the 'wait' doesn't seem to make a difference on the iOS Simulator.

Should this test stack show a progress bar on a physical iOS device - or am I missing something?

Thanks,
Eoghan.
ProgressBar_Test.zip
Progress Bar test stack
(227.85 KiB) Downloaded 104 times

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Progress Bar on iOS Simulator

Post by LCNeil » Wed Jan 08, 2014 5:20 pm

Hi Eoghan,

I have tested your stack on both the iOS simulator and iOS device and can replicate the issue you are experiencing. It works as expected on Android.

This could be an iOS specific bug but I will have to investigate it in more depth. I will get back in touch here with any further developments.

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com

Eoghan
Posts: 9
Joined: Tue Dec 17, 2013 3:38 pm

Re: Progress Bar on iOS Simulator

Post by Eoghan » Thu Jan 09, 2014 10:48 am

Excellent, thanks - that would be a great help.

Best wishes,
Eoghan.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Progress Bar on iOS Simulator

Post by LCNeil » Thu Jan 09, 2014 1:47 pm

Hi Eoghan,

I think I've managed to track down what is causing the issue.

When deploying your stack to iOS, it seems to be executing so quickly that it doesn't have a chance to show the progress on screen.

What I had to do was move your progressBar script from the openCard handler into its own handler. I then used the "send" command to execute this handler after a short 1 milisecond delay. I also placed true into useWait.

Please find the amended stack attached to this reply.

I hope it is of some assistance

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
Attachments
ProgressBar_Test 2.zip
(228.53 KiB) Downloaded 98 times

Eoghan
Posts: 9
Joined: Tue Dec 17, 2013 3:38 pm

Re: Progress Bar on iOS Simulator

Post by Eoghan » Sun Jan 12, 2014 6:19 pm

Fantastic, thanks Neil - that's a simple solution, and looks like it works well in my app.

Thanks,
Eoghan

Post Reply

Return to “idea2app and Coding School”