Activity Process_Globals not accessable after Resume?

riko

Member
Licensed User
Longtime User
In my app i have different activities...
Once and then it is happening that i get a "java.lang.NullPointerException" when the app is awakening and wants to display a value from a variable that is defined in an other activity's Process_Global.
In the Activity_Create it calls a function which needs values from the main-activity...

Is it possible that not all activities are accessable after the App is resumed/created from sleeping (Home-Button pressed and afterwards restarted)?
 

riko

Member
Licensed User
Longtime User
No, i have only a screenshot of the error from my customer...

The error must be in the first line of my refresh function, because i can see the label in the layout is not filled...

B4X:
Main-Activity:
Sub Process_Globals
     ' Type tVASData(... is defined in a Code module under its Process_Globals
     Dim DetailObj As tVASData
...

B4X:
LsDetail-Activity:

Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("gfdetail_header")
   bFirstRefresh = True
   Refresh
End Sub

Sub Refresh
   lblLine1.Text = Main.DetailObj.sDispoNumber & "/" & Main.DetailObj.sDate & "/" & Main.DetailObj.sNameBillTo
....
 

Attachments

  • error.JPG
    error.JPG
    33.1 KB · Views: 199
Upvote 0
Top