Gathering Type info

BlitzMax Forums/BlitzMax Programming/Gathering Type info

Well, I understand that you can use

X = HandleFromObject(Object)

{Type}(HandleToObject(X)).{fields}

however, you have to know the type before you can use it. I want a way i can get what type the Object is.
I know about the If {Type}(Object) = null. I just want a way i can extract the info because i know blitz knows in the background. I want a Generic way to convert to the correct type and access properties. I understand how sensitive the code would have to be too. (Ex calling a field that the object doesn't have). I just dont' want to have a huge if list.

Try overriding ToString( ).

Hmm, it is just refering to the base object and not the derived type?

Yes

I need the derived type though. I would look into more myself but college is just face kicking my freetime.