@Manuel said in Problem Adding description parameter by clicking button and access this:
The parameters values are stored (most of the time) in the BaseContainer so be careful, you need to "clean" the BaseContainer each time you delete a level, otherwise it will reload the previous values.
Sorry Manuel ,
it took a while to work out a few things, so now I am ready for your answer.
So here is an example plugin, I made it to create description elements by clicking a button. So this example is better for the answer you hopefully can give me.
I keeped track of the ID`s as you recommended in an array.
So when the user clicks the button Add Measurement a new ID will be created in the array. And accordingly to that, a Group with this ID will be created in the description and a Baselink, a real and a Delete Button will be added to the group. Just for example.
I have also overwritten Read(), Write() and Copy() methods.
And when the user clicks "Delete", the ID will be deleted from the array and so the group and it's parameters dissapear.
So when the user clicks again "Add Measurement" then it searches the array and the next smallest ID that is not in the array is used again. To save some ID`s :v: . God saves the ID's
But since this ID already was in the description. It is not empty as you can hardly see in the small video example.
You told me something about cleaning the BaseContainer?