I can store/restore fine in MyMap, but I can't restore MyArray values with File.ReadMap
Thank you in advance
B4X:
'Activity module
Sub Process_Globals
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim MyMap As Map
Dim MyArray(2) As Boolean
MyMap.Initialize
MyArray(0)=True
MyArray(1)=False
Log("* Charge")
For number = 0 To 3
MyMap.Put(number, MyArray)
Log(MyArray(0) & "-" & MyArray(1))
Next
Log("* Load Directly")
For number = 0 To 3
MyArray = MyMap.Get(number)
Log(MyArray(0) & "-" & MyArray(1))
Next
Log("* Write file")
File.WriteMap(File.DirRootExternal ,"MyMap_deleteme.txt", MyMap)
Log("* Read file")
MyMap.Clear
MyMap = File.ReadMap(File.DirRootExternal ,"MyMap_deleteme.txt")
Log("* Load from readed file")
For number = 0 To 3
MyArray = MyMap.Get(number) '<--------- I'M FAILED!!!!
Log(MyArray(0) & "-" & MyArray(1))
Next
End Sub
Sub Activity_Pause (UserClosed As Boolean)
Activity.Finish
End Sub
Thank you in advance