Hi everyone:
Consider the following two code parts:
The code snippet 2 is in a code module called CommonFunctions2. My problem is that in the first code snippet the NetNav2 key with the corresponding value is never added to the map. There is no logic in this.
Any suggestions are welcome.
Consider the following two code parts:
B4X:
Sub CreateConfig
Dim m As Map
m = CommonFunctions2.ReadConfig
If m.IsInitialized = False Then m.Initialize
m.Put("NetNav2", imgNetNavig.Tag)
End Sub
B4X:
Sub ReadConfig As Map
Dim m1 As Map
m1 = DBUtils.ExecuteMap(Starter.conn, "SELECT cfg FROM [01_AppSettings]", Null)
Dim m2 As Map
Try
Dim jp As JSONParser
jp.Initialize(m1.Get("cfg"))
m2 = jp.NextObject
Catch
Log(LastException)
Dim m3 As Map
Return m3 'Return uninitialized map
End Try
Return m2
End Sub
The code snippet 2 is in a code module called CommonFunctions2. My problem is that in the first code snippet the NetNav2 key with the corresponding value is never added to the map. There is no logic in this.
Any suggestions are welcome.