2021-01-15 12:21 AM
It is Value A in model.cpp
Attempt to initialize Value A from the model.cpp function.
However, before Value A initializes, setupsrceen() in B_Screenview is executed first, indicating an incorrect value.
I want to know how to initialize Value A in model.cpp before setupscreen() in B_Screenview runs.
#TouchGFX
Solved! Go to Solution.
2021-01-19 07:00 PM
Hello PKunk.1,
This a very strange behavior because the Model is called before the View.
If you initialize your variable in Model.cpp as follows this should work correctly.
Model::Model() : modelListener(0)
{
//Initialize here
}
Do you notice this behavior also with the simulator ? If you could provide a UI example where you have this issue, this would be helpful.
/Alexandre
2021-01-19 07:00 PM
Hello PKunk.1,
This a very strange behavior because the Model is called before the View.
If you initialize your variable in Model.cpp as follows this should work correctly.
Model::Model() : modelListener(0)
{
//Initialize here
}
Do you notice this behavior also with the simulator ? If you could provide a UI example where you have this issue, this would be helpful.
/Alexandre
2021-01-20 12:05 AM
I will test it with the method you told me.
Thank you for reading my writing