Page 1 of 1

App.State.OnLeave is called first

Posted: Tue Jan 07, 2014 11:22 pm
by Rado1
When AppState is set from ZApplication.OnLoaded section, its OnLeave section is called before OnStart; it should not.

I also observed that after making some structural changes in a project, running the application (Alt+Enter) executes OnLeave section of the AppState which is not initially activated. This is really strange. However, this behavior seems to be non-deterministic and I cannot always reproduce it. It just sometimes happened.

To reproduce the bug, just run the attached project and watch the trace log -> "AppState1.OnLeave" appears before "AppState1.OnStart". (occasionally "AppState2.OnLeave" appears instead of "AppState1.OnLeave")

Posted: Thu Jan 09, 2014 8:21 am
by VilleK
Hi,

I've now fixed this. Please download latest beta.

Posted: Thu Jan 09, 2014 3:23 pm
by Rado1
Thanks Ville. BTW this version does not contain an updated Zge.java, so it cannot be used for ES2 Android live wallpapers, right? Do you plan to support building of live wallpapers directly from ZGE in (near) future?

Posted: Fri Jan 10, 2014 11:40 am
by VilleK
I'm afraid I'm still too busy to add built-in Android wallpaper support. Also I suspect the number of users waiting for this feature is too small to warrant the work required (anyone think I'm wrong let me know!). For the time being the recommended way to build wallpapers is to use a standard ZGE Android project and then apply the changes from your wallpaper thread.