Page 1 of 1
Cancel Wait on CloseCard
Posted: Fri Jan 31, 2014 1:08 am
by istech
I am sorry if this has been answered before I have been checking the dictionary and forums and cannot find the right command to cancel wait blocking commands for mobile.
I have looked at "exit to top" but this blocks opencard on destination cards
FlushEvents command is not supported on mobile
pendingmessages does not cancel wait command
please enlighten me if there is a better option.
(Yes I have learnt the errors of my ways and vow to start to use the send command instead of wait.

)
Re: Cancel Wait on CloseCard
Posted: Fri Jan 31, 2014 4:42 am
by dunbarx
Hi.
Do you have a "wait" command in a closeCard handler? And you want to terminate that command while it is "ticking"?
I am not sure what might be different on mobile as opposed to desktop, where I live, but whatever it is there is either an answer or a rework of the schema to fix it.
Craig Newman
Re: Cancel Wait on CloseCard
Posted: Fri Jan 31, 2014 9:31 am
by istech
sorry no.
I have a wait command in a open card which waits for a user input to do something.
however if the user decides to change card before inputting.
I get a warning/error from LC about it after the wait period has expired. (complaining about the something it had to do)
So in the close card I have used the cancel line 1 of item 1 method to cancel all pending messages.
But as far I know that does not include "wait" commands only for pendingmessages. Please correct me if I am wrong.
I have rewritten most to send the command to me as a custom message. (e.g send something to me in 2 seconds) But what if I wanted to use a wait command and cancel in
the closecard is this possible?
Re: Cancel Wait on CloseCard
Posted: Fri Jan 31, 2014 3:01 pm
by dunbarx
Hi.
Wait commands are blocking. They should only be used when it is your intention to force the user to take an action in a certain way. or to delay the entire system for some purpose. An "answer" dialog is one example of this sort of thing. It is a blocking process, and the only thing you can do is to click one of the buttons on it. Another example is this, in a button script:
Code: Select all
on mouseUp
wait 20
if the mouseClick then answer "two" else answer "one"
end mouseUp
Here we have a wait command, and the only thing that can happen during its interval is that the user might or might not click the mouse within that time period. It is a way to detect double-clicks.
When you have more than one possible user path, (as you say, the user might want to navigate to another card instead of performing the action the wait command has presented) then you need to change the way you are working your interface. Sometimes it is far better to take a different route than to try to maneuver around an existing troublesome situation.
Or am I missing your point?
Craig
Re: Cancel Wait on CloseCard
Posted: Mon Feb 03, 2014 9:37 am
by istech
Lesson learnt.
Thanks.