Erel,
I figured out what happens with this problem.
It seems than in B4I, when a map comes from a JSON Object it turns out automatically to a Read Only Map:
JSON:
{"favoritos":[{"item1", "item2", "item3"}]}
.....
Dim map1 As Map = JSONP.NextObject
favoritos = map1.get("favoritos")
Dim m as Map
For i = 0 To favoritos.Size - 1
m = favoritos.Get(i)
log(m)
next
This code execution, in the log will bring a (read only map), which I cannot "PUT" any other item into it. This disables any chance that from a CustomListView to retrieve any object that’s inside (which is an excellent method to reference any views created dynamically).
After some tests, I did a small function to transform a Read Only Map to an NSMapTable
Sub map2Map(m As Map) As Map
Dim m2 As Map
m2.Initialize
For Each key As String In m.keys
m2.put(key,m.Get(key))
Next
Return m2
End Sub
Dim mProcess as Map=map2Map(m)
log(mProcess)
Now if we log the mProcess Map after passing it through map2map function, now it contains a writeable Map
Hope it helps any lost souls with this same trouble.
FBP