Can reflection do this?
BlitzMax Forums/BlitzMax Programming/Can reflection do this?
| ||
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 |
| ||
Variables have to be defined somewhere. |
| ||
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. |