I created an app with the following components:
- Main Activity (obvoiusly) with a layout containing a ListView and a Button
- Class for manage my object
- Class that encapsulate a list of my objects (collection)
- Second Activity with a layout containing view to modify my objects
In Main Activity I show in ListView all my objects conteined on collection Class.
When Button is clicked a new object is created (and stored in a typed module variable) and i execute a CallSubDelayed2("SecondActivity","MySub",objectVariable): objectVariable is passed by reference.
On SecondActivity.MySub i store the objectVariable in another typed module variable ever by reference (myVar=objectVariable).
In SecondActivity myVar is modified and then is called Activity.Finish.
Now, in Main Activity_Resume i check objectVariable to perform other actions: i aspect objectVariable modified because in ever passed as reference.
When I run the project in debug mode using brakpoint before the CallSubDelayed2 all work corractly, but if I set a breakpoint only on Activity_Resume (Main Activity) objectVariable is Null.
Another strangeness is:
- run project without breakpoint before CallSubDelayed2 --> objectVariable is Null in Activity_Resume
- set breakpoint before CallSubDelayed2 without stopping project --> objectVariable is correct in Activity_Resume
- remove all breackpoint --> run correctly until stop project.
This problem does not occurs in Release mode
Is this a bug?
- Main Activity (obvoiusly) with a layout containing a ListView and a Button
- Class for manage my object
- Class that encapsulate a list of my objects (collection)
- Second Activity with a layout containing view to modify my objects
In Main Activity I show in ListView all my objects conteined on collection Class.
When Button is clicked a new object is created (and stored in a typed module variable) and i execute a CallSubDelayed2("SecondActivity","MySub",objectVariable): objectVariable is passed by reference.
On SecondActivity.MySub i store the objectVariable in another typed module variable ever by reference (myVar=objectVariable).
In SecondActivity myVar is modified and then is called Activity.Finish.
Now, in Main Activity_Resume i check objectVariable to perform other actions: i aspect objectVariable modified because in ever passed as reference.
When I run the project in debug mode using brakpoint before the CallSubDelayed2 all work corractly, but if I set a breakpoint only on Activity_Resume (Main Activity) objectVariable is Null.
Another strangeness is:
- run project without breakpoint before CallSubDelayed2 --> objectVariable is Null in Activity_Resume
- set breakpoint before CallSubDelayed2 without stopping project --> objectVariable is correct in Activity_Resume
- remove all breackpoint --> run correctly until stop project.
This problem does not occurs in Release mode
Is this a bug?