I need a control flow (wait until a task is done)

button

My problem concerns a control flow like in the example given in the picture:
FIRST the displayed values shall be set and AFTER THAT the if procedure shall
be processed.

In occasional cases the if procedure is processed before the other things are ready.
I suppose that everything is done parallel.

-> Is there possibility to let the "if"-procedure wait until the rest is done? (everything but a delay of some milliseconds)

Thanks for Help!

Use a clock timer

An exaggerated example:

workflow.aia (2.6 KB)

1 Like

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

Thanks for the answers. I think the if-else-method will do the job.

Maybe I do not understand the wait-method correctly.
(so only for my understanding, but very interesting)

If we have several blocks, they will be processed in parallel, e.g. the "set" routine is not
waiting until "call" is ready in my example.
What happens, if I do have a "wait"? If its working the same way, "set" and "call"
and "wait" are processed in parallel. Otherwise if "wait" is breaking the flow,
than should a minimal value like 1 ms last to respect the order!?

My question is now:
Is "wait" breaking the parallel processing flow?

App Inventor processes instructions asynchronously, not in parallel Alexander.
App Inventor is single threaded, see also the model of event processing in App Inventor by Lyn.