Gathering Type info

BlitzMax Forums/BlitzMax Programming/Gathering Type info

Drey(Posted 2006) [#1]
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.


N(Posted 2006) [#2]
Try overriding ToString( ).


Drey(Posted 2006) [#3]
Hmm, it is just refering to the base object and not the derived type?


Dreamora(Posted 2006) [#4]
Yes


Drey(Posted 2006) [#5]
I need the derived type though. I would look into more myself but college is just face kicking my freetime.