Need help with lists within types

BlitzMax Forums/BlitzMax Programming/Need help with lists within types

OK, I got it to work (I had another typo... Point #3 never got named). So I'm even more confused... because this works here, but not in my larger program.

I may have to go back to arrays...

SuperStrict

Type TChain
	Field Size:Int
	Field Weight:Int
	Field LinkedPoint:TPoint
End Type

Type TPoint
	Field Name:String
	Field x:Int,y:Int
	Field ChainList:TList = New TList
	
	
	Method makeChain(Point_in:TPoint,size_in:Int,Weight_in:Int)
	
		Local TempChain:TChain = New TChain
		tempChain.size = size_in
		tempChain.weight = weight_in
		tempChain.LinkedPoint = Point_in
		self.ChainList.addlast(tempChain)
			DebugLog "Added Chain"
	
	End Method
	
	Method CheckChains()
	
		For Local temp:TChain = EachIn self.ChainList
			Print self.name + " is linked to " + temp.LinkedPoint.name
		Next
	
	EndMethod
	
	
EndType

Local Point1:TPoint = New TPoint
	Point1.name = "Point #1"
Local Point2:TPoint = New TPoint
	Point2.name = "Point #2"
Local Point3:TPoint = New TPoint
	Point3.name = "Point #3"

Point1.makeChain(Point2,1,20)
Point1.makeChain(Point3,2,40)
Point2.makeChain(Point1,1,20)
Point2.makeChain(Point3,2,40)


Point1.checkChains()
Point2.checkchains()