Android Question Uninitialized when previewing map variables

cxbs

Member
Licensed User
Hello everyone!
Although the program can run normally,
but can not preview the map variable content,
I do not know how to solve
Hope to get a hint thank you!

B4X:
    Dim List1 As List
    Dim Map1 As Map
    Dim Map2 As Map
    List1.Initialize
    Map1.Initialize
    Map1.Put("0","aa")
    Map1.Put("1","bb")
    Map1.Put("2","cc")
    List1.Add(Map1)
    Map1.Initialize
    Map2=List1.Get(0)
    Log(Map2.Get("1"))
 

Attachments

Pendrush

Well-Known Member
Licensed User
B4X:
  Dim List1 As List
    Dim Map1 As Map
    Dim Map2 As Map
    List1.Initialize
    Map1.Initialize
    Map1.Put("0","aa")
    Map1.Put("1","bb")
    Map1.Put("2","cc")
    List1.Add(Map1)
    Map1.Initialize   '<--- REMOVE THIS LINE
    Map2=List1.Get(0)
    Log(Map2.Get("1"))
 

cxbs

Member
Licensed User
B4X:
  Dim List1 As List
    Dim Map1 As Map
    Dim Map2 As Map
    List1.Initialize
    Map1.Initialize
    Map1.Put("0","aa")
    Map1.Put("1","bb")
    Map1.Put("2","cc")
    List1.Add(Map1)
    Map1.Initialize   '<--- REMOVE THIS LINE
    Map2=List1.Get(0)
    Log(Map2.Get("1"))
Thank you for your reply

I want to see the content information of Map2
 
Top