Select list item:list index too large

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


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

ok i make that but my app working only when i close and again open. the list not empty you can see in this image

the number 4 in block initialize show that both of the empty list have elements. the buttons only activate when i push them

maybe the elements of the list are not added in the empty list?.

You could also simplify your initialise blocks

1 Like

ok thanks i will do that, but my error in my last question. why i am getting a list empty if this will be with elements inside the empty list? is very confuse.

i am getting the error but why the list empty prueba dont have the lists of images if in the block initialize i am set to the empty list the filelist taifun route of list files, why i get a empty list? or how can fix that?

maybe using the block make a list could be work?

Names of variables are important.

Tell us about those two variable names and their purposes.

the only porpouse about the two global variables with empty list is to test the two forms to add into the list the taifun filelist. only that.

Try this example:

simplifyGetFiles.aia (36.7 KB)

and how can get a sorted list to order using ascend and descent about the name of every item that are in disorder. i like to get a sequence order using the alphabet or number order.

i see this example but this works with alphabetic and how can make that? and where can i add a sort list to get order every pick next or previously image

Use the list sort blocks on your list. See the example provided in help for how to do this

when i try inverse sort list i get error using back button


taifunloadimages(1).aia (52.8 KB)

your error message is trying to tell you, that your list is not a list

the make new sorted list from block however is expecting a list

it looks like you are still helpless if an error occurs..
remember to use Do it to debug your blocks

Taifun

to get a sorted list of your images, use a new global variable, for example listSorted like this

set listSorted to make new sorted list from get global name

and use naming conventions to be able to understand your blocks yourself and easier spot errors...
for example rename your global variable name to listImages
and rename global variable prueba to listAllImages

btw it does not make much sense to sort an empty list, does it?

Taifun

to use a images sort list. i am need to use two differents lists? one for use a sort list and the other to select the list?

i am getting this error in my app using next button but the back button works fine.

this is my code blocks.

why i get bad new sorted error but in inverse new sorted using back button works fine.

The error message is trying to tell you, that you are trying to sort a boolean value false... you only can sort lists...

I recommended you already a few times to make your blocks more readable... unfortunately you ignored it...

@ABG said today in another thread

global data (worst possible name for a variable)

Your variable names are worse, same for your procedure names and component names

Taifun

but if you see in the blocks. i dont work with boolean variables. i am working with a list. why i get boolean results?

if the inverse sorted list works with the button previous?

Make your blocks readable for yourself and others, then post again a screenshot of your relevant blocks
Sorry, I will not search for bugs in your mess

Taifun