Android Question Map Not Initialized

Tim Chapman

Active Member
Licensed User
Longtime User
I found the answer to this through trial and error. It means that the map is empty.:)

I am getting this in my log saying map is not initialize. No error is raised. The program executes as though there is no problem.

I am running B4A 6.80 Beta #3.

Here is the log:

Justification Map = (MyMap) {StatName=Right, Stat=Left}
RowMap = (Map) Not initialized

Code is here:
B4X:
Sub SaveListOfMapsToCSV(FileDir As String, FileName As String, ListOfMaps As List, HeaderList As List, Justification As Map)
    Log("Justification Map = " & Justification)

    Dim su As StringUtils
    Dim ListOfArrays As List : ListOfArrays.Initialize
    Dim RowMap1 As Map
    RowMap1.Initialize
    Dim FileDirBackup As String

    FileDir = File.DirRootExternal & "/dnd"
    FileDirBackup = File.DirRootExternal & "/dnd/backup"

        RowMap1 = Justification.Get(1)
        Log("RowMap = " & RowMap1)

    'Walk Through List of Maps.
    'Get each Map from the list.
    'Get each Item from the Row.

    For Each item As Map In ListOfMaps
        Dim Row(HeaderList.Size) As String
        For c = 0 To HeaderList.Size - 1
            Row(c) = item.Get(HeaderList.Get(c))
            'Log("row("&c&") = " & Row(c))
        Next
        ListOfArrays.Add(Row)
    Next
    'File.Copy(FileDir, FileName, FileDir, FileName & "Old")
    'File.Delete(FileDir, FileName)
    su.SaveCSV2(FileDirBackup, FileName , "," , ListOfArrays, HeaderList)
End Sub

If it wasn't for puzzles, we would be bored, right?
 
Last edited:
Top