In order to scan all of components and to save the result on screen to file inside a window, you may use following code.
for ( i = 0 ; i < getNumChildComponents(); i ++ )
child = getChildComponent (i);
How can you know what the each component is ?
for example:
for ( i = 0 ; i < getNumChildComponents(); i ++ )
{
child = getChildComponent (i);
if(child->type == String(T(“Combobox”))
{
getName();
save the data in file;
read current selected value();
save the data in file;
}
else if child->type == String(T(“Slider”))
{
getName();
save the data in file;
read current value();
save the data in file;
}
}
the purpose of this approaching is to save current status in file and load the status in future without knowing each component pointer and reload with referent name.
Additionally, you can make only one easy code to handle for many window. you don’t need to know each component to write code inside each window.
is it possible ?