F FrankBerra Active Member Licensed User Longtime User May 13, 2019 #1 Hello forum I was used to use tags in custom views like this Code: Copy 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: Code: Copy dim m as map m.initialize m.put("x", "123") CLV.Tag1 = m but when i retrieve the tag with Code: Copy Sub Generic dim m as map m = CLV.Tag1 CallSubDelayed2(Me, "Elaborate", m) End sub Sub Elaborate(Values as map) '<--- Error here End Sub i expect to get a map but when use it, an error says to me that: Code: Copy argument 1 has type anywheresoftware.b4a.objects.collections.Map, got anywheresoftware.b4a.objects.collections.Map$MyMap Where i am wrong?
Hello forum I was used to use tags in custom views like this Code: Copy 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: Code: Copy dim m as map m.initialize m.put("x", "123") CLV.Tag1 = m but when i retrieve the tag with Code: Copy Sub Generic dim m as map m = CLV.Tag1 CallSubDelayed2(Me, "Elaborate", m) End sub Sub Elaborate(Values as map) '<--- Error here End Sub i expect to get a map but when use it, an error says to me that: Code: Copy argument 1 has type anywheresoftware.b4a.objects.collections.Map, got anywheresoftware.b4a.objects.collections.Map$MyMap Where i am wrong?
DonManfred Expert Licensed User Longtime User May 13, 2019 #2 Try it this way Code: Copy Sub Elaborate(Values as Object) dim m as map = Values End Sub Upvote 0