Issue with message: "Property setter was expecting a com.google.appinventor.components.runtime.TextBox component but got a String instead."

Sorry I am new with programming, I tried to create a Bingo Game, everything is going ok, except I am getting the following message: "Property setter was expecting a com.google.appinventor.components.runtime.TextBox component but got a String instead."
I have identified the block is causing it is:

image

Seems to me I am doing something wrong when adding the item to the list.

Do you have any idea to solve it?

Thanks in advance

4718cce8d230c5eeba2f4d47ba33c35dfa80a795

What are your intentions for global list resulados?
You treat it like a list of text box components in one place, and like a list of text values in another place.

1 Like

Bingo is a game of chance played with cards having numbered squares corresponding to numbered balls drawn at random and won by covering five such squares in a row also . The application intends to "drawn the ball". I have created a list with the following elements (B01, B02 ... B15, I16... I30, N31...N45, G46 ...G60, O61 ... O75), then I select one number of the list based on a random index, store the number in another list (Global resultados) to be displayed through a ListPicker. As the ball can not be repeated I remove the drawned number from the list Global Numeros. I have created three TextBox (Sorteado1, sorteado2 e sorteado3) to display the last three drawned numbers.

Do you have any suggestion?
Thank you a lot for the help.

Using three labels is a complexity you don't need.

You can do it in one label:
Capture last3.aia (2.8 KB)

All my logic is in the one Click event:

  • picking a random number 1-75
  • Deriving the letter (B,I,N,G,O) that matches the random number
  • adding the new letter & number to the last 3 list
  • clipping the list to just the last 3 items.

Ohhhh, very charming and much more inteligent solution, thanks a lot for helping. let's start the family games.