Help with Tlist

BlitzMax Forums/BlitzMax Beginners Area/Help with Tlist

freshmeat(Posted 2007) [#1]
Hi I've just started learning blitzbasic and I was wondering if there's a way to manually call the next item in a Tlist?? Without using a for-eachin-next loop?


assari(Posted 2007) [#2]
You can do this

also see this link on some TList discussion
http://www.blitzmax.com/Community/posts.php?topic=67469


freshmeat(Posted 2007) [#3]
thanks! :)

But how do i convert to different object type other than strings :

i.e the line Nlink.Value().ToString()

can i do something like

entity:TEntity = Nlink.Value() ? (gives me a error saying cant' convert from object to TEntity type atm)


Gabriel(Posted 2007) [#4]
   entity:TEntity = TEntity(Nlink.Value())


But only do it if you're 100% sure it's a TEntity. If it's not a TEntity, you will have a null object.


assari(Posted 2007) [#5]
You have to cast the generic object into your own object
A modified version of the above example with casting

This is casting in action
M=MyType(NLink.Value())



freshmeat(Posted 2007) [#6]
thanks heaps guys ! works great now :)