Tlists containing different types

BlitzMax Forums/BlitzMax Programming/Tlists containing different types

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.

Is it possible for Tlists to containing different types?
The below code goes someway to hinting this is possible as I can add the 'tTestA' and 'tTestB' types to my single 'test' TList but I don't know how to go about running through this list using a 'for' loop.
I`m pretty new on this level of type-based coding so all help is much welcomed.

Type tTestA
	Field Name:String="TESTA"
End Type


Type tTestB
	Field Name:String="TESTB"
End Type


Global Test:TList=New TList

Test.addlast (New tTestA)
Test.addlast (New tTestB)
Test.addlast (New tTestB)
Test.addlast (New tTestA)
Test.addlast (New tTestB)


For Local loop:Object=EachIn Test			''object' for 'loop' doesn't work.
	Print loop.name							'common field for both types
Next