How do I use/setup TLink?

BlitzMax Forums/BlitzMax Programming/How do I use/setup TLink?

Amon(Posted 2011) [#1]
How would I go about setting up my lists so that they have a TLink associated with them or the objects?

Thanks!


Yasha(Posted 2011) [#2]
?

...what do you mean? TLinks are normally more or less implicit, aren't they?


jsp(Posted 2011) [#3]
Do you mean to store them for your own reference for fast access?
Type TSomething
	Global list:TList = New TList
	Field _link:TLink

	Method New()
		_link = list.AddLast(Self)
	End Method

	Function Create: TSomething ()
		Local S: TSomething = New TSomething 
		Return S
	End Function
	
	Method Kill()
		_link.Remove()
	End Method

End Type


Last edited 2011


Amon(Posted 2011) [#4]
Thank You jsp, that is exactly what I needed! :)