TField

BlitzMax Forums/BlitzMax Beginners Area/TField

Craig H. Nisbet(Posted 2007) [#1]
I'm trying to write a save routine that will save all the data for a type I've created. I've gotten it to iterate through all the fields in the type and save them to disk, I just haven't figured out how to pull the name of the fields themselves so I can save that along with data in the file. My goal is to make a save file that I can load up in a text editor and actually be able to make sense out of the data and change it there if needed.


Craig H. Nisbet(Posted 2007) [#2]
never mind, I got it.


tonyg(Posted 2007) [#3]
Check the reflection samples from 1.26. Think its enumfields
<edit> See you got it. Do you want to post so others might benefit?


Craig H. Nisbet(Posted 2007) [#4]
it was as simple as

name:string = myField.name()

you have to get the field type first. That's explained in the reflections section of the docs.