Bad Arguments to select list item

Hello dear members,
I am working with lists, because I want to create a previous and next button for 214 images, which I have uploaded for Chinese radicals (they are a part of the Chinese characters). The app shows an image with a radical and in the label below appears the meaning (also a list with 214 items). Could you please have a look at the block image, what is wrong please? I am not so good in programming and so I would happy about a detailed help, perhaps with the correct example. Always I get the error "Bad arguments to select list item".
![blocks|180x500]
Thank you very much. Have a great day!
Best,
Martina
![blocks|180x500]


Chinesische_Radikale.aia (1,3 MB)

Please have another go at uploading your blocks image

Dear TIMAI2, Thank you, now it is ok with the block.png. But I also do not know, which block or part comes into the purple procedure block, there is nothing, I have no idea. I also added the AIA file. Thanks. Best Martina

x should be get global index
also fix the other error

Taifun

Dear Taifun, Thank you. Which other errors do you you mean please? Thanks. Is it now better? Best Martina

I gave your aia project a bit of revision, replaced the two massive lists with a file. Also reset your component settings so that everything displayed on screen, you can adjust as you wish. Item 6 's image was not written correctly, so i have fixed that too.

Chinesische_Radikale (1).aia (1.2 MB)

1 Like

I marked it in my previous answer
here is it again

Taifun


Chinesische_Radikale (4).aia (1.3 MB)
Sample run

Pardon my artistic license with your UI.

P.S. My German is weak. I thought Zuruck meant back? The button functions might be switched.

P.P.S. I added extra protection against the two long lists getting out of sync with each other, using the min function.
image
That prevents the index from falling off the end of the shorter of the two lists, if ever one list is shorter than the other.

The usual way to force two lists to line up is to make a table, a list of pairs.

@TimAI2's file is better


(I wish I knew how he grabbed the block and got them out into a file so quickly)

Dear TIMAI2, Thank you very much, but I tried to put in some image names into the text field where was # symbol, but I get the same error. Also was an error in two parts where I have put in get global index. Here is the image of blocks:

Thank you! Martina

Dear ABG, Thank you so much, your file is great, exactly what want. Thank you! Good night! Martina

Be aware that there's a limit to how many blocks you can add to an AI2 Screen before it bogs down the editting and building process.

If you have lots more characters and names to add, you should switch to the file loading technique as shown by @TimAI2.

You fogot to fix the error I mentioned earlier

Taifun

If using a file, it would be better to use a google sheet to create a two column table, and to then download that sheet as a csv table to the app.

Also, given the smaller size of each of the image files, it may work just as well, if the images were stored online, and called down to the app as needed.

Better...

Chinesische_Radikale_rev2.aia (1.2 MB)

mainlist now a csv file, easier to maintain...

1 Like