Can reflection do this?

BlitzMax Forums/BlitzMax Programming/Can reflection do this?

EOF(Posted 2009) [#1]
I know next to nothing about refection and how to use it
Can it be used to define variable types?

So, instead of:
Global Horse:TImage , Mouse:TImage, Cat:TImage

Would it be possible to do this (Where GlobalImage is a function which creates the variables passed as a TImage type) ?
GlobalImage Horse, Mouse, Cat



Azathoth(Posted 2009) [#2]
Variables have to be defined somewhere.


Arowx(Posted 2009) [#3]
Reflection would probably be better used to define a list of image objects that could be loaded/saved to/from file.

Brucey has a nice XML module that lets you store objects and retrieve objects from an XML file.