I try to create a map with a userdefined type and log the items with for each:
in the for each line I get the errormessage from compiler:
Kompiliere generierten Java Code. Error
B4A line: 41
For Each gg In grinders
src\Test\TH\starter.java:311: error: incompatible types: Map cannot be converted to IterableList
final anywheresoftware.b4a.BA.IterableList group18 = _grinders;
1. In general: Is it possible to use userdefined types as value in maps?
2. Is it not possible, to iterate through a map?
B4X:
Dim gr(2) As Grinder_Values 'user defined type
gr(0).Initialize()
gr(0)=CreateGrinder_Values(17.5, 71, 200,12,12,"",0,False)
gr(1).Initialize
gr(1)=CreateGrinder_Values(66,30,200,12,12,"",0,False)
grinders=CreateMap("Name1":gr(0),"Name2":gr(1))
For Each gg In grinders
Log (gg)
Next
in the for each line I get the errormessage from compiler:
Kompiliere generierten Java Code. Error
B4A line: 41
For Each gg In grinders
src\Test\TH\starter.java:311: error: incompatible types: Map cannot be converted to IterableList
final anywheresoftware.b4a.BA.IterableList group18 = _grinders;
1. In general: Is it possible to use userdefined types as value in maps?
2. Is it not possible, to iterate through a map?