Structure components question?


#1

i have two separated component classes, named classA and classB
inside classA I have classB object (as child),
that object needs to repaint classA after some process
i know how to solve this with classB declared inside classA then passing “classA pointer” to classB
and i be able to access classA’s repaint() method,
but i want those classes serparated
what are my options on this?

thanks.


#2

A timer in classA checking a flag in classB, or:

classB::requestParentRepaint(void)
{
    getParentComponent()->repaint();
}

#3

thanks, second solution works for me!