What do I not understand about lists?

The following code shows adding data to a list, but the length of the list does not change - why?

Thanks for your help.

Before calling procedure

after procedure call

Where is discrepancy?

Edit: If app inventor allowed to set debug point and you have set it at add item to list item, then you were able to intercept the length of list before and after adding to it.

It is the same list, added as a parameter for the procedure, however the workflow is not great and the OP is not consistent in using the parameter :wink:

1 Like

Thanks for the reply. In your examples, I would have expected, for the first example, the first ‘Do It’ result would be 4 and the 2nd ‘Do It’ would be 5 since you are adding one piece of data to the list of 4. The second example would be the same, ie adding one to a list of 4 should show a 5 in the second ‘Do I’.

What am I missing? It seems like the the procedure is run completely first and then it goes back through again and fills in the results. How else can I see that my procedure is working the way I want?

again I would say

Procedure is run in one go, so you woun't be able to see/watch the changes that happens. Yes, but you can veryfy it in the output screen, I provided above.

By looking the values which are there in DisplayDataArea1Lable and DataDisplayArea2Lable( if I am correct, it should be DisplayDataArea2Lable, to be in sync in naming convention), would be what you are looking for.


The procedure is called 3 times. One time it is called with ‘whichList’ is = FWNowList

don't confuse yourself...
as it already has been said

protip: write easy readable and maintainable code...


Thanks for all the help. I thought the 'Do It' would show real time as the code was executed but now I see I must look at the display labels on the screen for actual values.

Thanks again

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.