Sorry if this is a trivial question but I actually don’t figure out how to handle this.
What I want to do is the following.
To enter numbers in various scenes I wrote my own numPad instead of using the native.textField.
So, my various number fields in different scenes are simply buttons instead of native.textFields.
When pushed, my numPad comes in showing some number Buttons and an OK Button. I can now enter a number and when pressing the OK-Button the numPad disappears again.
But I can’t figure out how to get the new number from the numPad into the various number fields.
So e.g: I have sceneA with the buttons A1, A2, A3 displaying a number as their text. (A3 = ui.newButton{...} A3:setText( value3 ) sceneA:insert(A3)
) Then I have a sceneB with the buttons B1, B2 and so on.
When A3 is pressed, the numPad is called. It’s easy to get the value of A3 into the numPad as I can send it as a parameter (showNumPad( value3)
). Now I can change the number inside the numPad, and when I’m finally pressing OK, the numPad disappears. But how does now sceneA or button A3 know about the new number of the numPad?
If numPad could generate an event that I could catch inside sceneA or if I could tell numPad where to return the value (showNumPad( A3, value3 )
)? I believe this is a standard task but I really don’t know how this has to be done.
Thanks for your help.
[import]uid: 21480 topic_id: 33152 reply_id: 333152[/import]