Separating a selection from the list

Hello. I am a student and beginner in using MIT App Inventor. We are creating a simple application. In here, I have textboxes to input the product name and price of it. After adding, it will be shown in the list view. Once I select it (ListView.Selection), if only I have 2 index (example: Mint 45), it will reflect and shown in the textboxes, but if I have more than 2, it will have error. Please kindly help me solve this.


The disblaed blocks above works for 2 index. But the blocks I am trying if the length of the selection is greater than 2 (the blocks below) is not correct.

You are mixing the global list "List" and the ListView. Selection...

If "List" length is 3, that doesn't mind that the ListView.Selection (after splitting) has 3 elements.... If your ListView elements are always formed by two elements (after split them), then don't try to get element 3.

Why are you checking the length of "List"? What do you expect with that?

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