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

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

If you mean copying the components, then I need to create another extension as this extension’s job is creating and deleting components dynamically.

However, in next release there are several new methods which allows you to set and get properties of any component (instead of using Any Component blocks anymore) :wink:

So this allows you to store component’s properties in a list and set the same properties of the newly created components automatically by using a loop.

4 Likes

I can’t wait to see what can be done with that!

2 Likes

I needed them for a new type of app which is not even created before :shushing_face:

3 Likes

Using your extension to build dynamic badges, clickable images, and it works perfectly.

9 Likes

Nice job. Can you show how you did this?

6 Likes

Translated my blocks from Dutch in English


For sure the code can be optimized.

9 Likes

anyone know the internal name of the WebViewer?

I receive an error when using name " WebViewer "

:thinking:

1 Like