Best method to exchange data between child container and parent container
I have built a custom container (TextInput) where the user can enter a string of fixed length.
It is relatively similar in structure to the existing Keyboard Container
When the maximum string length is reached, a second custom container(TextValidation) becomes visible and shows the entire string, divided into several text boxes. If the user now clicks on a textbox, the TextValidation container should become invisible again and the substring should be available for modification in the TextInput window.
Currently I have a public method setText in the TextInput class, which calls setWildecard.
In the TextValidation container, after a button click, the getParent method is called, the drawable object is casted to a TextInput and from this the setText method is called.
I am relatively new to c++ and probably there are much better ways to solve this problem.
What is the recommend way to resolve this problem?
