Hi,
the problem is:
java.lang.ClassCastException: anywheresoftware.b4a.objects.collections.Map cannot be cast to anywheresoftware.b4a.objects.collections.Map$MyMap
please see my code segment:
In Library file,
In B4A file,
what is the problem ?
the problem is:
java.lang.ClassCastException: anywheresoftware.b4a.objects.collections.Map cannot be cast to anywheresoftware.b4a.objects.collections.Map$MyMap
please see my code segment:
In Library file,
B4X:
List mConfigureList = new List();mConfigureList.Initialize();
for(i=0;i<mConfigurations.size();i++){
Map mp = new Map();mp.Initialize();
mp.Put("k1", "v1");
mp.Put("k2","v2");
mConfigureList.Add(mp);
}
this.mBa.raiseEvent(this, this.eventName+"_showlist", new Object[]{mConfigureList});
B4X:
Sub myapp_showlist(configurations As List)
Log("configurations size="&configurations.Size)
Dim i As Int
Dim mp As Map
For i=0 To configurations.Size-1
mp = configurations.Get(i)
Log("k1="&mp.Get("k1"))
Log("k2="&mp.Get("k2"))
Next
End Sub
what is the problem ?