Duda componente web

Estoy desarrollando una app que hace mediante un boton
una llamada con un componente web para recibir json.
El problema esta en que siempre que hago la primera
llamada para cargar el json en una variable tipo lista
y quiero tratar dicha variable me da error de que el
elemento x de la lista no existe pero solo en la primera
llamada web que hago y controlo que el resultado sea siempre
200 y luego no vuelve a ocurrir haciendo las siguientes
Se le ocurre a alguien debido a que es debido.


I am developing an app that makes using a button
a call with a web component to receive json.
The problem is that whenever I do the first
call to load the json into a list variable
and I want to deal with this variable, I get the error that the
element x of the list does not exist but only in the first
web call I do and I check that the result is always
200 and then it doesn’t happen again by doing the following
It occurs to someone because it is due.

Thank you.
(Google Transate by Taifun)

Show us the responseContent value in text (not a picture)
and the blocks you use to process it (download blocks image)
While you’re at it, you might as well
also include a .aia Project Export file to save time.

the web component works asynchronously... which means first do the call and then receive the result in the Web.GotText event


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

Gracias a todos por la respuesta.
And waths is the procedure to obtain data sincronous?.
Or… How can I wait to get this data as AJAX?.


see my previous answer...

see also How to work with the web component and an API by Stephen

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.


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

Lots of examples in the Web Services section of FAQ

Thanks for the reply Taifun and Abraham.
Yes Taifun (i read your web page usually), i do this procedure.


and where do you use the Web.Got text block?
and how does your Web.GotText event look like?

Ok, I use a button to call web a send a url.
Is this what you mean?

yes, but as I can see now probably this is not where we have to look for the error...

where exactly are these blocks?
are you familiar with using Do it to debug your blocks?
see also tip 4 here App Inventor: How to Learn | Pura Vida Apps

Thanks. I use do it and error not appears when emulated.
May be when the first time a data arrived is a problem of sincro… when i ask at api?.


So far Javier has insisted in Instant Gratification,
believing the result will be available immediately.


How long will it take for Javier to use the required block
when Web1 Got Text