How to add list in component in extension?

I’m creating an extension. How to use list in a component in extension and get separated item?
I want to make a block in which I want make a list block fit into it.

can’t understand, elaborate more

I want my extension block make a list block fit into it for multiple values

Take YailList as parameter. Then use the getString() method.

To get integer.

@SimpleFunction(description="")
public void Method(YailList sampleList){
 int number1= Integer.parseInt(sampleList.getString(1));
 int number2= Integer.parseInt(sampleList.getString(2));
 int number3= Integer.parseInt(sampleList.getString(3));
}
5 Likes

What is yalilist??

1 Like

Thank you.

YailList is the main list primitive used by App Inventor components.

1 Like

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