What is the purpose of adding list to id section? If it was a String id, you wouldn’t able to add lists too. Lists has own type. They are not string.
It is so that i can refer to the correct JSON list when a card is clicked. Like how the daily section has its own JSON list and top shows has one JSON list too.
If i cannot identify the card properly, I will have a incorrect result
You should use join block from Text category if you want to join two text pieces, because list block doesn’t join two items.
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.
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.
Can you please tell me cardview name
“MakeroidCardView” is the internal name of CardView as I said in earlier posts.
Also, what’s the internal name of the space component?
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
- 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.
@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?
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.
When screen closes all global variables backs to the their first value when you open again, so it is same for this extension.
An excellent extension! Creating and managing components dynamically went quietly easy.
Has anyone succeeded in creating a dynamic list using it?
Busy now I can’t try the excellent extension now
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 @.
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.
I searched for it but find no answer - so I guess nobody ask for before
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 ). As a workaround I use the same “creation loops” to delete the buttons one by one and than create them again.
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.
I already added a RemoveAll method for next release of extension (along with new blocks )
But as @appsbeheerder said, you can use loop for it.
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.