cancel
Showing results for 
Search instead for 
Did you mean: 

How to access to a model variable from a custom class.

Zui
Senior

I have a custom class doing stuff, it's not made from touchGFX , so it doesn't have a presenter for comunicating with the model.

i need to read a value from a structure in the model.

Tnx

1 REPLY 1
Martin KJELDSEN
Chief III

Does it need to have that direction? Usually you'd just update the class via the Model::tick() or modelListener interface when something happens, or update it once a presenter becomes active . E.g.

void MyPresenter::activate()
{
    myClass.set(model.get());
}