TList

BlitzMax Forums/BlitzMax Beginners Area/TList

You can access the type instance directly using it's handle variable. However, once you create another type instance using the same handle you will lose contact with the first. Same thing happened in BB except they were automatically added to a list you could loop through.
Bmax doesn't do the auto-add to a list so you have to do it yourself. Advantage is you can add the same type instance to numerous lists.
<edit> Just in case it's needed. Using your code...
Type Vector2D
	Field _x:Int	= 0
	Field _y:Int	= 0
End Type
Global myList:TList=CreateList()
MyVector2D:Vector2D = New Vector2D
	MyVector2D._x = 50
	MyVector2D._y = 70
	ListAddLast mylist,myvector2d
MyVector2D:Vector2D = New Vector2D
	MyVector2D._x = 10
	MyVector2D._y = 90
        ListAddLast mylist,myvector2d
Graphics 640,480

render()
Flip
WaitKey()

Function Render()
	DrawText "TEST",50,50
	
	Local p:Int = 0
	
	For MyVector2D:Vector2D = EachIn mylist
		DrawText MyVector2D._x,50, 80+p
		DrawText MyVector2D._y,50, 90+p
		
		p :+ 50
	Next
End Function