I have a question, should the variables declared under Process_Globals not be available to all modules? My understanding is that they should be. I can declare them and try to access them from a code module and get a variable undefined error. Is this normal? Are the Docs wrong or am I missing something. See Example:
B4X:
'MAIN Activity
Sub Process_Globals
Dim MyStr As String
MyStr = "Process Variable"
End Sub
'Code Module MySubs
Sub MessBox
MsgBox(MyStr, "")
End Sub
This generates a variable undefined error. Based on what I've seen, this seems wrong that it should through an error.:sign0163:
To access a Process_Global variable in another module you need to use the 'dot' notation, so MyStr in Main becomes Main.MyStr in the other modules, when you type Main. the auto complete will show all the items that are accessible in that module
Edward
To access a Process_Global variable in another module you need to use the 'dot' notation, so MyStr in Main becomes Main.MyStr in the other modules, when you type Main. the auto complete will show all the items that are accessible in that module
Edward
I went in and changed the code. It still has no idea about the variable and comes up undefined. The code I listed was for an example. The real code is dealing with an activity object. I think it's the end of the road. I don't think it can be made to work in process global. If you have any other info, please let me know.