Thanks for your reply. Unfortunately that’s not what I meant. I know each component has a unique ID. And I know you can reorder components.
Let me elaborate the given example a little more. I want to create a keyboard to type the characters “A”, “B”, “!” (random selection). The target component is “tTarget”, the buttons are labeled “bA”, “bB”, “bExcl”, whose “.txt” attribute contains the caracter they shall type.
In the touch release event of “bA” I write:
Not too hard, right? But this code line only works for “bA”. For “bB” and “bExcl” I have to modify it. Even worse if you don’t have 3 keys, but dozens. Therefore I hoped there was something like a “self” variable that always points to the current component. So I could write
And it would work for every button.
As I said, this exists for pages. If I want to access the current page, I can do it on any page with the same expression
dp automatically contains the ID of the active page. But I couldn’t find a similar variable that always contains the ID of the active component.
I hope this makes my question more clear. Oh, and I have another question: there is no possibility to define a function, right? I needed to calculate a square root, and I implemented it with a hidden number element, that I triggered with a click command. There is no simpler way, right…?