Hello forum
I was used to use tags in custom views like this
Until now i was setting tags with simple strings and everything worked as expected.
Now i need to set a map (collection) as tag.
I set it with:
but when i retrieve the tag with
i expect to get a map but when use it, an error says to me that:
Where i am wrong?
I was used to use tags in custom views like this
B4X:
Public Sub setTag1(ValoreTag1 As Object)
Tag1 = ValoreTag1
End Sub
Public Sub getTag1 As Object
Return Tag1
End Sub
Until now i was setting tags with simple strings and everything worked as expected.
Now i need to set a map (collection) as tag.
I set it with:
B4X:
dim m as map
m.initialize
m.put("x", "123")
CLV.Tag1 = m
but when i retrieve the tag with
B4X:
Sub Generic
dim m as map
m = CLV.Tag1
CallSubDelayed2(Me, "Elaborate", m)
End sub
Sub Elaborate(Values as map) '<--- Error here
End Sub
B4X:
argument 1 has type anywheresoftware.b4a.objects.collections.Map, got anywheresoftware.b4a.objects.collections.Map$MyMap
Where i am wrong?