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

You should use join block from Text category if you want to join two text pieces, because list block doesn’t join two items.

3 Likes

I think you have a little confusion there. I don’t see a benefit of using a list in the component ID.
If you want to access every component, then you create a list of ID’s and iterate thru it by using a FOR EACH item IN LIST block.

Or if your confusion is about “building” the id with different pieces or strings, then what @yusufcihan said about using JOIN is what you need.

Put ID in a list, not a list in ID. :grin:

4 Likes

Faced Error during the horizontal arrangement.

1 Like

You are using Kodular’s built-in dynamic components, you should migrate to the my extension for creating all dynamic components. Otherwise extension won’t work for you.

As Kodular’s dynamic components returns a reference to the component instead of just returning itself, you can’t use Kodular’s dynamic components with my extension. This is not my fault. :upside_down_face:

3 Likes

Can you please tell me cardview name

1 Like

“MakeroidCardView” is the internal name of CardView as I said in earlier posts.

2 Likes

Thanks :blush: :blush:
Also, what’s the internal name of the space component?

2 Likes

I don’t know because I never created a Space yet however, you can learn its name by following these steps instead of asking to me for each component :sweat_smile:

  • Connect to the companion.
  • Add the component to designer which you want to learn its name.
  • Go to the blocks.
  • Click the component from left panel which you just added.
  • Get last green block.
  • Right click and select “Do It”.
  • It will show component’s internal name.

As Peter said here:

Also I suggest you to read earlier posts to don’t ask questions which is already answered. :slightly_smiling_face:

10 Likes

@yusufcihan, a little question. What happens when I create components with your extension in a screen and I close that screen? Are the components destroyed from memory or do I need to use the Remove block before closing the screen?
I’m mostly asking about the possible memory issues if I don’t clear that memory the right way. Is that needed?

3 Likes

All components are just saved in a variable like a array/list, so it is same as when you storing a number, string etc in a variable. So one variable won’t cause any memory problems. :slightly_smiling_face:

When screen closes all global variables backs to the their first value when you open again, so it is same for this extension.

6 Likes

An excellent extension! Creating and managing components dynamically went quietly easy.

5 Likes

Has anyone succeeded in creating a dynamic list using it?

Busy now I can’t try the excellent extension now

1 Like

To find the component name, I set an alert notifier in the initialize procedure. then add the “dummy” component to it and it will print the full component name to the alert. Then look for what is printed before the @.

3 Likes

I used it to create a list of sorts. I have a parts list for various machines that are created dynamically. Each one is a horizontal layout with a checkbox and a textbox that is only visible if the checkbox is true so the user can enter the number of parts used. I used a few different procedures. One for creating the checkbox and setting the properties, One for the textbox, and one for each parts list entry. I then used a for each loop to run through a list and dynamically create each entry while adding each checkbox and textbox to lists so I could link them to each other.

2 Likes

I searched for it but find no answer - so I guess nobody ask for before :grin:
I created a scoreboard for a dice game with just over 50 buttons in 5 arrangements. To start a new round I have to initialize all the generated buttons.
Coming to my question.
Is it possible to implement a “Clear All” and eg something like “Clear All in Arrangement”? I think such functions can be very helpful (not only for my scoreboard :slightly_smiling_face:). As a workaround I use the same “creation loops” to delete the buttons one by one and than create them again.

1 Like

You have given the answer @H_L. Use a loop to destroy the dynamic components and rebuild the dynamic components again. Make a function to do it, call it ‘Clear_All’ and you are done.

3 Likes

I already added a RemoveAll method for next release of extension (along with new blocks :grin: )

But as @appsbeheerder said, you can use loop for it.

3 Likes

I would add all the buttons to a list and use a for each loop to remove them all. then just add the new group of buttons to that list afterward. Hell, you could start the creation procedure with that loop to ensure that they are destroyed prior to the next creation cycle.

1 Like

you can create an extension to copy a set of items, for example, arrangements with items inside to create a list

1 Like

That sounds useful. A block that copy one arrangement with all the components contained.
But with a little work with blocks, you can do that too.
You just have to create one arrangement and its dependent components as a sample, and use this same extension to “multiply it” all you want.

2 Likes