Types: After?

BlitzMax Forums/BlitzMax Beginners Area/Types: After?

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.

I've just been looking at TListEnum which has HasNext() and NextObject() methods. You can use it like this:
Local myList:TList = CreateList()
Local myEnum:TlistEnum = myList.ObjectEnumerator()

Local currentObj:TMyObj = TMyObj(myList.First())

'...

If myEnum.HasNext()
    currentObj = TMyObj(myEnum.NextObject())
EndIf

Unfortunately there's no way of resetting it back to the beginning of the list once it reaches the end. You might be able to Extend it though. The file is mod/brl.mod/linkedlist.mod/linkedlist.bmx