TList.First and TList.Last

BlitzMax Forums/BlitzMax Programming/TList.First and TList.Last

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.

Howdy,

I'm not getting the clue how to work with an object from a TList addressed by TList.First or TList.Last
Help only says those methods return objects but trying to bind them like you do with the for...eachin doesn't work (item:type = TList:Last)

Say I have got an object enemy with field image saved in EnemyList.
Using a loop you have access by "for e:enemy = eachin EnemyList" and objects are accessible within the loop by e.image etc.
How does this work when I wanna address the last object in the list with EnemyList.Last?