I've created a simple (Int, Int) type to use a key into a map, I've discovered that if I add an item to the map with a key value of (1,1) and at a future time I make a new key with the same value, it doesn't find it in the map, for example:
Am I missing something, or will I need to make the map(Int,value) and create a lookup function to translate the ordered pair?
B4X:
Sub Activity_Resume
' Point type is defined elsewhere as: Type Point(X As Int, Y As Int)
Dim poPt1 As Point
Dim poPt2 As Point
Dim poMap As Map
Dim poMap2 As Map
Dim psVal As String
Dim piVal1 As Int
Dim piVal2 As Int
poMap.Initialize
poPt1.Initialize
poPt1.X = 10
poPt1.Y = 14
poMap.Put(poPt1, "testing 1, 2, 3")
poPt2.Initialize
poPt2.X = 10
poPt2.Y = 14
psVal = poMap.Get(poPt2)
Log(psVal) 'outputs ->null
piVal1 = 5
poMap2.Initialize
poMap2.Put(piVal1, "Testing 4, 5, 6")
piVal2 = 5
psVal = poMap2.Get(piVal2)
Log(psVal) 'outputs ->Testing 4, 5, 6
End Sub