Wish Referencing Globals/Process_Globals Easily

Jack Cole

Well-Known Member
Licensed User
Longtime User
It would be nice to be able to reference variables from Globals/Process_Globals easily. One way to do it would be similar to how custom types are referenced.

Here is what I imagine.
Proposed Code:
Sub Process_Globals
    Dim SomeVariable as String
End Sub

Sub Globals
    Dim SomeImageView as ImageView
End Sub

Sub Activity_Create(FirstTime as Boolean)
    Vars.Globals.SomeImageView.Initialize("")
    Vars.Process_Globals.SomeString = "Test"
End Sub

Maybe it would be better to not split up Globals and Process_Globals for cross platform compatibility between B4A and B4i.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Maybe it would be better to not split up Globals and Process_Globals for cross platform compatibility between B4A and B4i
There are important differences between Globals and Process_Globals. Best thing to do with both of them is to never use them and switch to B4XPages. Simpler and cross platform.
 

Jack Cole

Well-Known Member
Licensed User
Longtime User
There are important differences between Globals and Process_Globals. Best thing to do with both of them is to never use them and switch to B4XPages. Simpler and cross platform.
I use both. It is not practical to port my largest project from the cross platform system I developed that simulates the activity lifecycle on b4i.
 

Cableguy

Expert
Licensed User
Longtime User
I use both. It is not practical to port my largest project from the cross platform system I developed that simulates the activity lifecycle on b4i.
So you turned an I....phone into an android smartphone??? Don't let them know that!!!!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…