The operation add items to list cannot accept the arguments: ,"[6]"

Hola de tarea estoy haciendo una lista de compras y me marca este error cuando quiero agregar un elemento a la lista, no se que hacer :c
Igual se que es algo muy sencillo pero apenas llevo 3 semanas usando app inventor jsjsjsjs
Les subo mis proyecto.aia

Ejercicio_07.aia (4.3 KB)

welcome to the community!

you are only opening screens and never closing them

you might want to follow tip 1 here and use virtual screens, which makes things easier...

if you still want to use different screens, store the list in TinyDB and read it again from there in the other screen ... and next time you start your app, the list still should be there... another reason to use TinyDB to store the list...

Unbenannt
currently if you are starting the app, the global Lista will be initialized with an empty string, which does not make sense and most probably results in the error you are experiencing...

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


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

1 Like

Looks like the list has been initialized to a blank string (which is why there's a blank argument); this is probably the issue:

How can you add / remove an item to a string?

2 Likes

You can't.
Neither can you use a List function on a String, which is the cause of the error here.

Muchas gracias a todos ya pude resolver mi problema y la aplicación funciona sin errores ^-^

Please show how you solved your problem so that others may learn.

Es una solución un tanto arcaica pero las especificaciones de la tarea eran especificas asi que no pude aplicar lo que me dijeron jsjsjsjsj


Y aquí esta mi proyecto.aia
Ejercicio_07 (1).aia (5.0 KB)

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