Hi all,
please find attached a very short and schematic app that shows why an IsInitialized function could be useful for the Mediaplayer object.
A java exception is raised when you exit the app and soon after that you launch it again.
This derives from the code in the FirstTime section in Create sub that is not executed under the above situation due to the fact the app is still in memory and so FirstTime return False because the process was not yet destructed by the garbage collector.
I undertsnd the "problem" could be circumvented in various ways, but maybe testing for mp.isInitialized followed by the Init/load istructions where appropriate could make it simpler and more readable.
Umberto
please find attached a very short and schematic app that shows why an IsInitialized function could be useful for the Mediaplayer object.
A java exception is raised when you exit the app and soon after that you launch it again.
This derives from the code in the FirstTime section in Create sub that is not executed under the above situation due to the fact the app is still in memory and so FirstTime return False because the process was not yet destructed by the garbage collector.
I undertsnd the "problem" could be circumvented in various ways, but maybe testing for mp.isInitialized followed by the Init/load istructions where appropriate could make it simpler and more readable.
Umberto