TList inside object

BlitzMax Forums/BlitzMax Beginners Area/TList inside object

Jeroen(Posted 2005) [#1]
How can I get an identifier to the last object in a list?

Sumthing like:

Local cl = CountList(plaatje.plaatjesList)
ListRemove plaatje.plaatjesList, cl

(except ofcourse I don't get the object returned in CountList, but only the amount of numbers)


The r0nin(Posted 2005) [#2]
You want the last object in a list, correct? This should do it:
object:Tobject = new Tobject
list:Tlist new Tlist
ListAddLast (list,object)
...

[add more objects to list]

...

Local last_object:Tobject = list.lastlink()

If I understand correctly, the local variable "last_object" should contain the last object of type Tobject in the list called "list."


Jeroen(Posted 2005) [#3]
Thanks!
Clear!