Hi, i am declaring a list in Process sub global and initializing it in Sub Activity_Create(FirstTime As Boolean)
List1.Initialize
List1.AddAll(Array As Int(1, 2, 3, 4, 5,6,7,8,9,10))
if i run following code in activity create, it runs fine
For i = 0 To 9
Log(List1.Get(i))
Next
however if i try to call this list in a sub by following code
Dim num2 as int
num2 = List1.Get(0)
i get following error
java.lang.RuntimeException: Object should first be initialized (List).
this list is already initilized in the create_actvity, i just dont understand where i am going wrong.
List1.Initialize
List1.AddAll(Array As Int(1, 2, 3, 4, 5,6,7,8,9,10))
if i run following code in activity create, it runs fine
For i = 0 To 9
Log(List1.Get(i))
Next
however if i try to call this list in a sub by following code
Dim num2 as int
num2 = List1.Get(0)
i get following error
java.lang.RuntimeException: Object should first be initialized (List).
this list is already initilized in the create_actvity, i just dont understand where i am going wrong.