How do I use dynamiccomponent.getid?

how do we use this, there are two component inputs? Thanks

component_method (1)

Not sure, you might need to ask on the Kodular community topic:

looks like you are using Any Component...


I think:

To create a new component using Dynamic components, you need a unique id to create that component. An id can be an integer.

Yes, suggestion?

I created the components, now I want to get its Id when it is clicked

then don't use the Any DynamicComponent, just.use the specific one you dragged into the designer.

I need to use dynamic

The getid method should give me Id, just dont know how to use that. I use it under when any click, then get the component, but the method needs 2 components, maybe just put button as the other component?

I see what u mean, but need to use dynamic components

i know you need to use dynamiccomponent, but drag dynamiccomponent blocks from first place, then you will have the block with only one socket 'component'.

Show me, thanks

already explained very clear,pls DO IT by your self.

1 Like

If I do not use any component, how can I click any button to get Id for the clicked one. Maybe I'm just too dumb? Anyone else can help?

of course you can use any button, but NO need to use any dynamiccomponent

The buttons created dynamiclly will not be in the "first place" u referred to

no the dynamicly created buttons not there, but you still can use any button.
Pls read the whole thread in Kodular for better understanding.

I just don't know how to do it, If U show me a block, i will bake u some cookie and also help u to eat it

Maybe you can explain more about what you want to do?