Merge: app.nit: improve apps life-cycle
authorJean Privat <jean@pryen.org>
Wed, 3 Aug 2016 16:38:46 +0000 (12:38 -0400)
committerJean Privat <jean@pryen.org>
Wed, 3 Aug 2016 16:38:46 +0000 (12:38 -0400)
commitf9e9728d691d57d1c43cc86c9d29721644c5dd5f
tree48a0cf0624e6a34e99ceaf28476728eb4a74b943
parent0ec26dfafd56c73adfd08a2cdb829f55d72c8018
parent8574738bd7cd5d35b91b307fa1c31877004051a5
Merge: app.nit: improve apps life-cycle

Modify the _app.nit_ life-cycle callbacks to add `on_restart`, and to remove `on_start` and `on_destroy`. `on_restart` is called when the app goes comes back from a `on_stop`. `on_start` duplicated other callbacks (`on_create` and the new `on_restart`), plus it didn't have a direct equivalent  in iOS. `on_destroy` also didn't have an iOS equivalent. These changes simplify the life-cycle and use only callbacks existing on both platforms.

This PR also improves the documentation of the _app.nit_ life-cycle with a nice little graph and references to the platform specific triggers.

Pull-Request: #2229
Reviewed-by: Ait younes Mehdi Adel <overpex@gmail.com>
lib/app/README.md
lib/app/app_base.nit