Android Question Uninitialized when previewing map variables

cxbs

Active Member
Licensed User
Longtime 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

  • ListToMap.zip
    9 KB · Views: 210
  • ListTomap.jpg
    ListTomap.jpg
    94.3 KB · Views: 192

Pendrush

Well-Known Member
Licensed User
Longtime 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"))
 
Upvote 0

cxbs

Active Member
Licensed User
Longtime 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
 
Upvote 0
Top