Android Question Reset all public variables in code module, Bug compiling

bernardR

Member
Licensed User
Longtime User
Hello,

My goal is to reset many public variables defined in a code module named 'zz'.
The zz.Process_Globals command seems fine. (See attached example).
The first compilation works in debug and release mode. However, if a compilation in relase mode has already been done, a compilation error occurs if you want to compile again (debug or release mode). Here is the error:
zz.Process_Globals
src\b4a\example\main.java:432: error: cannot find symbol
mostCurrent._zz._process_globals /*String*/ ();
^
symbol: method _process_globals()
location: variable _zz of type zz​
Thanks,

B4X:
In main activity
Sub Button1_Click
    zz.Process_Globals
    labl1.Text = "Test="&zz.test
End Sub

In zzmodule
Sub Process_Globals
    Public test As Int
End Sub
 

Attachments

  • ResetVar.zip
    6.9 KB · Views: 153

kimstudio

Active Member
Licensed User
Longtime User
I never know that sub Process_Globals is actually a sub that can be called... maybe there are some speical code will be added when translate it to java code.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…