Repeat a code only add 1 to numbers

i must repeat code in click button 100 once .only 1 add to numbers this very difficult . i must be use array and loop .please help me?
for (i=1;to i<100;i++)[

Can you explain more clearly what you want?

Add 1 to the value in the text box every time you click a button until…?

hi. i want make a cross word with 100 textBox.i want user can only one charecter write in a text box .i have 100 textbox and must add 100 once this code .

I'm sorry, I still do not understand what it is you want to do:

I have 100 textboxs and want users can write only one character in these(number of character that user write in textBox is 1).these textBoxs made a cross word.
I use this
for cross word .
i have 100 textBox(TextBox1,textBox2,textBox3 ,…)

I understand that part. Why do you want a for loop ?

hi.this is for a textBox.
i have 100 textBox . Do I need to add 100 of these???for textBox1 ,for textBox2 ,… for textBox 100.excuse me my english language is very bad. :pensive:
i made this project with android studio.

Ahh OK - you need a list of the textboxes and to use the any component blocks for that. I will make an example of what to do for you.

This will check over all the textboxes:

blocks (17)

1 Like

hi thanks it is very excellent idea. :v: :wave:

in android studio,when i introduce objects :



this is very difficult.i use below code instead of above codes:

for (int i = 0; i < 100; i++) {
    String buttonID = "button_" + i;
    int resID = getResources().getIdentifier(buttonID, "id", getPackageName());
    buttons[i] = findViewById(resID);

in appinventor i use:


are there same above code(in android studio ) for simlify in appinventor and reduce numer of codes?

As far as I know, there is no other method for making a list of components

1 Like

hi ,very thanks

You can mitigate the problem by declaring them one row at a time in a table.
That reduces the Blocks Editor pain of too many sockets in a block to fit your screen.
That also allows for the possibility of addressing the components by row and column.

1 Like

hi thanks . i read .i hope that i understand . :grin:

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