Hello to all,
I'm trying to Read and Write a List of Maps, but it don't works
Here is the code:
I'm trying to Read and Write a List of Maps, but it don't works
Here is the code:
B4X:
Dim Ll As List
Ll.Initialize
Dim Mm As Map
Mm.Initialize
Mm.Put("Sigla", "AA")
Mm.Put("Provincia", "Prima provincia")
Mm.Put("Ipt", "30%")
Mm.Put("Perc", "30")
Ll.Add(Mm)
Dim Mm As Map
Mm.Initialize
Mm.Put("Sigla", "BB")
Mm.Put("Provincia", "Seconda provincia")
Mm.Put("Ipt", "20%")
Mm.Put("Perc", "20")
Ll.Add(Mm)
Dim Mm As Map
Mm.Initialize
Mm.Put("Sigla", "CC")
Mm.Put("Provincia", "Terza provincia")
Mm.Put("Ipt", "10%")
Mm.Put("Perc", "10")
Ll.Add(Mm)
File.WriteList(File.DirDefaultExternal, "prov.cfg", Ll)
' now I read the List
Ll = File.ReadList(File.DirDefaultExternal , "prov.cfg")
For x = 0 To Ll.Size - 1
Dim Mm As Map
Mm = Ll.Get(x) ' <<<<<<<<< this don't work
Next