Page 1 of 1

Problem with changing app states and OnLeave actions

Posted: Wed May 14, 2014 12:34 pm
by Rado1
When AppState has some actions in the OnLeave section and somewhere in code is used this app state in SetAppState multiple times, the actions are not called.

It seems that OnLeave section is executed only in the case when app state is switched to another state; if application is being switched to the same state the OnLeave section is not executed. This is not a consistent behavior, because, for instance, the OnStart section is executed always. Could it be corrected and OnLeave called each time app state is switched?

As an example see the attached testing model. Just press the Space key which should switch the app state. If set to the same state AppState1, the OnLeave section is not called and the counter remains always 0. If the app state is switched to AppState2 (change the value of the SetAppState in the OnPressed section) the counter is being updated.

Posted: Wed May 14, 2014 12:40 pm
by VilleK
Should be fixed now. Download beta again.

Posted: Wed May 14, 2014 12:58 pm
by Rado1
Tested, works perfectly. Thanks!