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.
TField
BlitzMax Forums/BlitzMax Beginners Area/TField never mind, I got it.
Check the reflection samples from 1.26. Think its enumfields
<edit> See you got it. Do you want to post so others might benefit?
<edit> See you got it. Do you want to post so others might benefit?
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.
name:string = myField.name()
you have to get the field type first. That's explained in the reflections section of the docs.