get next object in list that is red

BlitzMax Forums/BlitzMax Beginners Area/get next object in list that is red

yes, if you have the link. in my types I always have a field called link so that I can do that among other things.... make sure you have and call a remove method to remove the object.

example
Type TObject
	Global list:TList = New TList
	
	Field link:TLink
	Field x:Int
	Field y:int
	
	Method New()
		link = list.AddLast(Self)
	End Method
	
	Method Remove()
		link.Remove
	End Method
	
End Type