Help with Tlist
BlitzMax Forums/BlitzMax Beginners Area/Help with Tlist
| ||
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? |
| ||
You can do this also see this link on some TList discussion http://www.blitzmax.com/Community/posts.php?topic=67469 |
| ||
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) |
| ||
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. |
| ||
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()) |
| ||
thanks heaps guys ! works great now :) |