Process_Globals variable question?

wes58

Active Member
Licensed User
Longtime User
I have declared some variable in Sub Process_Globals in Main Activity.
I have assigned some values to those variables.
When I open Activity2 and try to use those variables (with the values from Main Activity) I get an error message "Error description: Undeclared variable 'info_cur' is used before it was assigned any value."


Is there a way to pass variable values from one Activity to another?
Is there a way to hide one layout (file) and display another layout in Main Activity? This way wouldn't be a problem with access to variables.
Is there an equivalent statement to "GoTo LabelName" to bypass part of the code in the sub?
 

JesseW

Active Member
Licensed User
Longtime User
Erel said not too long ago that he was planning on implementing some kind of global space where modules could share sub's. I personally thought Sub Process_Globals could share variables between modules, as shown in the excerpt below...

B4X:
Sub Process_Globals
   'These global variables will be declared once when the application starts.
   'These variables can be accessed from all modules.

ps. wes58, wrap code in CODE tags, not QUOTE tags. Highlight the text you want to show inside the quote box and click the [#] icon in the editor's toolbox.
 
Upvote 0

wes58

Active Member
Licensed User
Longtime User
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…