[F/OS] - Dynamic Components Extension (for every component) 2.3.0

Fabulous extension, Yusuf! :clap:
Congrats :tada:

7 Likes

That was admob banner ad.how can I use that with webview.by the way can we can create dynamically webview with this extention

7 Likes

I have been waiting for something like this. My app as forms of checkboxes the user needs to fill out and adding them was always a pain. Now I should be able to dynamically generate my forms just based on the list of questions and make everything so much easier. Thanks a bunch!

7 Likes

@yusufcihan Hey, just a stupid question
 How can I create two or more same components in a “for”? Because give me an ‘error’ “same id”.

Sorry for my english
 and thanks again!

4 Likes

what about using a new id for each new component?
Taifun

5 Likes

but how do you do it if it’s in the same for? An example of my blocks

blocks (2)

4 Likes

Use a different variable. Like cardviewID and gridviewID, increment in 1 each in every pass. Use those instead of the local variable number.
Make cardviewID to start at 100 and gridview to start at 200 so both will be different.

Or use your current blocks but join “cardview”+number for cardview and “gridview”+number for gridview.

7 Likes

Is it possible to send an AIA with these blocks to me privately? If there is an error in extension I want to fix it as soon as possible.

5 Likes

It’s not an error I think. I call error because I thought I can create multiple same component in one “for”. Anyway I’ll send you the AIA. Thanks!

I will try, thanks.

4 Likes

I checked the AIA and found two things,

  1. In the AIA you sent me (which blocks was different) you are creating 2 dynamic components with same ID.

  2. You are loading an URL for Image property. This causes the app to hang for a while. (And may cause to components not work properly during this time.) Use Async Image Utils component to load online images.

5 Likes
  1. Yes, I fixed using @Italo idea (thanks!).
  2. OMG. I didn’t know that exist. Load faster now, thanks for the feedback!

Beautiful >.<

6 Likes

Again, @yusufcihan with another great extension.

5 Likes

Looks like Kodular added their components in the same package name as in App Inventor. (Kodular staff might need to confirm it) So I don’t need to update the extension for supporting Kodular specific components!

I don’t have a full available component names for Kodular components (because I don’t know their internal names), so looks like you will need to find out which will work. :sweat_smile:

For example to create a CardView dynamically with this extension, use MakeroidCardView name in the componentName parameter.

4 Likes

I guess you can find the name by dragging the component block for instance
List_View1 and do a do it on it.

It is always the latest block in the menu.

You get a text like
Do It Result: com.google.appinventor.components.runtime.ListView@c1e81ee

You can see that you will need to use the part that contains ListView when using this extension.

or
Do It Result: com.google.appinventor.components.runtime.WebViewer@5d27bdd

you need to use WebViewer with this extension.

10 Likes

Oh I never thought about learning internal names like this. :sweat_smile: Thanks :grin:

4 Likes

How about you add the text blocks already populated with the components names? Is that possible?

6 Likes

That’s a good idea. I think it’s possible

2 Likes

It should be possible but there are a lot of components which I can’t count. Because it also allows to create hidden components of App Inventor. :sweat_smile: Like, a Form (Screen), and a Sprite (which is base class of ImageSprite).

But I think I can add a block called AvailableComponentNames. And it can return a list.

As a workaround, you can see a list of components / classes of App Inventor here:

7 Likes

Just one question, how do we check for the correct component name?

2 Likes

Tried to add a vertical arrangement but failed


Blocks view

2 Likes