Cyclic Objects

BlitzMax Forums/BlitzMax Programming/Cyclic Objects

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This might be because field cycle:TCycle = XXXX isn't really defined when it has to be exectuted.

This is the correct way of doing it:

Type TParent
	Field cycle:TCycle
	
	Method New ()
		cycle = New TCycle 
	End Method
EndType 

Type TCycle
	Field list:TList  
	Method New ()
		list = New TList
	End Method
EndType 

Global parent:TParent = New TParent
FlushMem
DebugStop 


(Initialisation of data in constructor )