HandleFromObject - HandleToObject ?

BlitzMax Forums/BlitzMax Programming/HandleFromObject - HandleToObject ?

Plash, I found that when I tried to cast to a custom type other than a default blitzmax type, the compiler came up with an error saying it can't convert from an int to an <unknown>. So that's why I thought I needed to use the handle conversion commands. I will try the casting to an integer like you have done and see how that goes. Is your method really supposed to be able to work with casting custom types to integers and back?

Yan, thanks for the explaination, you perfectly articulated what I wanted to know about how that works. So I basically convert to an integer handle and store it somewhere, like in an array, and then I can use it any number of times I like - converting back from an int to an object basically looks in the hash table and finds the object, and then when I'm totally done with what I converted to an int handle, I Release it and then can collect the array.