Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
brandcode
- Posts: 28
- Joined: Mon Dec 01, 2014 12:28 pm
Post
by brandcode » Fri Feb 13, 2015 8:52 pm
I have 2 cards in my ios app,and my second card take some time to load about 4 seconds.
is possible to use the mobilebusyindicator until the card be loaded?
i have try to put the bellow code but indicator is No show up.
Code: Select all
on mouseUp
mobileBusyIndicatorStart
go to cd "card2"
end mouseUp
end on the card2 i have include the mobileBusyIndicatorStop.
-
jacque
- VIP Livecode Opensource Backer

- Posts: 7393
- Joined: Sat Apr 08, 2006 8:31 pm
-
Contact:
Post
by jacque » Sat Feb 14, 2015 10:14 pm
I think I'd first try to figure out what is taking so long to change cards. Four seconds is a long time. Also, it may be that the indicator actually is being shown, but it is being removed so quickly that you don't see it. If the mobileBusyIndicatorStop command is in a preOpenCard handler then that could be the case. It would also mean that the delay isn't in leaving card 1, but in a preOpenCard or openCard handler on card 2.
What handler on card 2 removes the indicator?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
brandcode
- Posts: 28
- Joined: Mon Dec 01, 2014 12:28 pm
Post
by brandcode » Sun Feb 15, 2015 12:44 pm
thank you for the replay.
i have make a test with button. like bellow
Code: Select all
on mouseUp
mobileBusyIndicatorStart
wait 4 seconds
mobileBusyIndicatorStop
end mouseUp
the above code working.
my card take some time because of data loading from database.The 4 seconds yes is a long time but is only in the beginning when i start the app,after is bellow 500 milliseconds to open.
so the mobileBusyIndicatorStart is on mouseUp and the mobileBusyIndicatorStop is on the opencard
Code: Select all
on opencard
mobileBusyIndicatorStop
end opencard
-
jacque
- VIP Livecode Opensource Backer

- Posts: 7393
- Joined: Sat Apr 08, 2006 8:31 pm
-
Contact:
Post
by jacque » Sun Feb 15, 2015 6:45 pm
I see. I'm not sure why it doesn't work when you change cards, but the solution is probably to put the busy indicator commands directly into the handler that calls the database. That is the slow part, so just use it there. Show the busy indicator at the top of that handler and remove it in the last line of the same handler. The other parts of your script will be fast enough to show no delay.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
brandcode
- Posts: 28
- Joined: Mon Dec 01, 2014 12:28 pm
Post
by brandcode » Sun Feb 15, 2015 7:04 pm
jacque wrote:I see. I'm not sure why it doesn't work when you change cards, but the solution is probably to put the busy indicator commands directly into the handler that calls the database. That is the slow part, so just use it there. Show the busy indicator at the top of that handler and remove it in the last line of the same handler. The other parts of your script will be fast enough to show no delay.
thank you jacque i will give a try.. and i post the results