Reason for asking: I have a Map of all icons loaded by my app, but sometimes I'll load an icon on demand that ISN'T in the map (like "three=" below). So I need a way to work out if any given icon is in the map or not. I thought ForEach/Next could do this, but with an endless loop I can't use it.
Code: Select all
NewMap IconMap()
IconMap("1")=1
IconMap("2")=2
three=LoadIcon_(0,#IDI_APPLICATION) ; Purposely not in the map.
icon=1 ; Endless loop, but NOT if set to 2 or 3. Why?
ForEach IconMap()
Debug IconMap(Str(icon))
Next


