Order instructions

Hi, i would like to know if there is a way to order instructions. For example if i want first a procedure to execute entirely before other instructions?

Because i use a clock component, called in a procedure, but there is lag while listview is populated. So i would like to execute first the procedure till the end and after that only populate the listview.

Thanks.

But that is how it happens, doesn't it?
All operations in App Inventor are performed asynchronously, so why should you worry? :thinking:

can you show us your block?

get an image of your blocks (→ right mouse click in Blocks area)
https://community-appinventor-mit-edu.ezproxy.canberra.edu.au/t/how-to-ask-a-question-open-new-topic/

Here is a very simple example of how you can use a counter and a clock timer to get more control over the order of instructions. You could use a variable and a set of if/else statements instead to control the delivery of instructions.

image

1 Like

Thanks, its a solutuon.
Here are my blocks.
As you can see, 'call rebound button' procedure is called first, but there is a little bit lag while proceeding.
Its true that i don't understand why there is lag if instructions are not synchronized, but i'm not pretty sure of that.
If a block calls a procedure wich contains clock object, clock will start but other instructions will continue to execut, even if clock is still running. That's why i thought that a 'finalize procedure' block could be useful, to complete some instruction before to continue with others

.