This is the hoary old problem of iterating and deleting from a collection.
Erel may or may not consider this a bug!
Intuitively I expect the following to work on a Map but it errors with a NoSuchElementException.
I assume because B4A Map is not a pure Map but has some internal indexing code.
Erel may or may not consider this a bug!
Intuitively I expect the following to work on a Map but it errors with a NoSuchElementException.
I assume because B4A Map is not a pure Map but has some internal indexing code.
B4X:
Dim ViewsMap As Map
...
For Each dv As DraggableView In ViewsMap.keys
Dim v As View
v = dv.dView
v.RemoveView
ViewsMap.Remove(dv)
Next
Last edited: