Wait command in simulator...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Wait command in simulator...
Hi all,
Is it just me or does the wait command not behave as expected in iOS (the sim in my case). Seems whenever I have a wait command anywhere in the stack opening message sequence (openCard for instance), nothing happens (cards don't draw for instance) until the period spec'd in the wait command passes.
I know there is "send after time" but is this just a bug or is there some difference in the systems' handling of this command I should be aware of.
Thanks!
Is it just me or does the wait command not behave as expected in iOS (the sim in my case). Seems whenever I have a wait command anywhere in the stack opening message sequence (openCard for instance), nothing happens (cards don't draw for instance) until the period spec'd in the wait command passes.
I know there is "send after time" but is this just a bug or is there some difference in the systems' handling of this command I should be aware of.
Thanks!
Re: Wait command in simulator...
Hi,
I'd say this is not a bug. The wait command, without "with messages" blocks the engine completely. Wait with messages works normally as far as I can tell.
Kind regards,
Mark
I'd say this is not a bug. The wait command, without "with messages" blocks the engine completely. Wait with messages works normally as far as I can tell.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Wait command in simulator...
Ok…
In card 1 of a stack…
No other script execution.
On the desktop… cd 1 is displayed for 3 seconds and then card 2 is displayed.
In iOS SIM, you see a blacked out screen for 3 seconds, and then the card 2 is displayed.
Are you suggesting this is expected behavior? If so, why the difference between the two platforms?
In card 1 of a stack…
Code: Select all
on openCard
wait 3 seconds
end openCard
On the desktop… cd 1 is displayed for 3 seconds and then card 2 is displayed.
In iOS SIM, you see a blacked out screen for 3 seconds, and then the card 2 is displayed.
Are you suggesting this is expected behavior? If so, why the difference between the two platforms?
Re: Wait command in simulator...
Hi,
Do you have any other scripts besides
?
What you describe isn't exactly expected behaviour, but I would never do it this way. The wait command, without "with messages", blocks the engine completely and I can very well understand that it also prevents the engine from drawing the card under specific circumstances. Just use "with messages".
Kind regards,
Mark
Do you have any other scripts besides
Code: Select all
on openCard
wait 3 seconds
end openCard
What you describe isn't exactly expected behaviour, but I would never do it this way. The wait command, without "with messages", blocks the engine completely and I can very well understand that it also prevents the engine from drawing the card under specific circumstances. Just use "with messages".
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Wait command in simulator...
Sorry… left out the line under the wait command to "go next".
To be clear, I am not doing it this way, instead using the send command. I just stumbled across it and thought I would ask if it was expected. Since it is a supported feature on all platforms, and it works differently on one platform vs another, I would consider it unexpected.
To be clear, I am not doing it this way, instead using the send command. I just stumbled across it and thought I would ask if it was expected. Since it is a supported feature on all platforms, and it works differently on one platform vs another, I would consider it unexpected.
Re: Wait command in simulator...
It sounds like the card is drawn only after the opencard handler finishes on iOS. I agree that adding "with messages" to the "wait" command could fix it. The difference is likely a limitation in iOS.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Wait command in simulator...
Hi Mark
Something i didn't understand ?
Best regards
Jean-Marc
I have some wait without "with messages" (for repeat with) and they work fine for me on simulator and iPad.The wait command, without "with messages" blocks the engine completely
Something i didn't understand ?
Best regards
Jean-Marc
https://alternatic.ch
Re: Wait command in simulator...
It seems that the "problem" is the use of the wait command in the openCard handler. From what I can gather, it appears that the card is being drawn on the screen at the beginning of the openCard handler on the desktop, and at the end of the openCard handler in iOS. Whether or not this is a bug is subjective. Without the "with messages" clause, the openCard handler will be unable to proceed, and the card on iOS will not be drawn until the wait period is over. It's probably worth filing a bug on this to bring the platforms to parity, but as Mark points out, just use the "with messages" format as a workaround.
Re: Wait command in simulator...
How does one do this… it seems I have found a number of them. (c:mwieder wrote:probably worth filing a bug on this to bring the platforms to parity
Re: Wait command in simulator...
<rant>
unfortunately, runrev has removed the ability for mere mortals to file bug reports.
send a bug report email to support@runrev.com and someone will enter it into the system.
</rant>
unfortunately, runrev has removed the ability for mere mortals to file bug reports.
send a bug report email to support@runrev.com and someone will enter it into the system.
</rant>
Re: Wait command in simulator...
I've just encountered this same problem.
It does seem like, on the iOS Simulator, the whole openCard script executes before anything is displayed.
I am trying to fade-in a menu by changing the blendlevel in a loop, but the loop completes before the card is displayed, and so the fade-in is not seen.
--paul
It does seem like, on the iOS Simulator, the whole openCard script executes before anything is displayed.
I am trying to fade-in a menu by changing the blendlevel in a loop, but the loop completes before the card is displayed, and so the fade-in is not seen.
--paul
Re: Wait command in simulator...
Hi guys,
1. the correct email address for bugs is in fact: bugs@runrev.com
2. if "wait" in an "opencard" handler is making trouble, well, then don''t combine them
Try something like this:
Best
Klaus
1. the correct email address for bugs is in fact: bugs@runrev.com
2. if "wait" in an "opencard" handler is making trouble, well, then don''t combine them

Try something like this:
Code: Select all
on opencard
## your other stuff here...
## Give the hanlder time to complete/draw the card and THEN do your stuff:
send "do_the_menu_fade" to me in 1
end opencard
command do_the_menu_fade
## do your menu fade or whatever here
wait X secs with messages
go next cd
end do_the_menu_fade
Klaus
Re: Wait command in simulator...
Thanks Klaus.
That's a good solution to the "wait" problem.
And "wait" commands do work if they are inside the do_the_menu_fade command script.
So, I can make ten menu buttons appear one after another, by placing a short wait between each fade-in.
But, I cannot make the fade work. The menu buttons just pop into view. My code looks like...
That would normally be a very slow fade, but as I say, no fade is visible.
Any ideas?
TIA
--paul
That's a good solution to the "wait" problem.
And "wait" commands do work if they are inside the do_the_menu_fade command script.
So, I can make ten menu buttons appear one after another, by placing a short wait between each fade-in.
But, I cannot make the fade work. The menu buttons just pop into view. My code looks like...
Code: Select all
put 100 into t_count
repeat while t_count >= 0
set the blendlevel of btn "BtnMenu2" to t_count
put t_count - 1 into t_count
end repeat
Any ideas?
TIA
--paul
Re: Wait command in simulator...
Hi Paul,
try to "lock screen":
Best
Klaus
try to "lock screen":
Code: Select all
repeat while t_count >= 0
lock screen
set the blendlevel of btn "BtnMenu2" to t_count
unlock screen
put t_count - 1 into t_count
end repeat
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Wait command in simulator...
Sounds like an easier way to submit bug reports than dealing with Bugzilla's UI directly.mwieder wrote:<rant>
unfortunately, runrev has removed the ability for mere mortals to file bug reports.
send a bug report email to support@runrev.com and someone will enter it into the system.
</rant>

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn