Ola
I dont know how to explain this. I am under the impression that when you call Dim x as Class and call x.Initialize for a class call, it completely creates a new instance of the class.
It seems like this is not the case with javascript as one would expect with B4J happening.
I will try and reproduce this.
An example is based on this assumption.
Create a class
Define a global variable in the class as a list
in initialize of the class call list.initialize
Somewhere on your code, call a sub that will assign a null to the list.
Have a click button that will dim x as class and initialize it. Call the sub that will set the list to null.
Click the button, for the first time the app runs well.
Click the button again, the app crashes with cannot set length to null.
#thoughts / #confused
I dont know how to explain this. I am under the impression that when you call Dim x as Class and call x.Initialize for a class call, it completely creates a new instance of the class.
It seems like this is not the case with javascript as one would expect with B4J happening.
I will try and reproduce this.
An example is based on this assumption.
Create a class
Define a global variable in the class as a list
in initialize of the class call list.initialize
Somewhere on your code, call a sub that will assign a null to the list.
Have a click button that will dim x as class and initialize it. Call the sub that will set the list to null.
Click the button, for the first time the app runs well.
Click the button again, the app crashes with cannot set length to null.
#thoughts / #confused