P
Peter Webb
Following a suggestion in this newsgroup, I have used xmlserializer to
construct a save file. It works extremely well, and reduced a task that I
though would take a couple of days to less than an hour, learning time
included.
I did notice one strange thing though. It generated and loaded almost all of
my instance data, with the sole exception of the color fields. Looking at
the xml file, it generates a "stub" for color, but does not store the actual
color data. Indeed, the xml file consists entirely of value fields, with no
reference fields.
It took about 30 seconds to extract the RGB values and store them as value
fields in my class, and reconstitute the colors from these fields on load.
But it does seem strange that this wasn't done automatically for me - the
colors could have been saved in the xml as color.R, color.G, color.B and
rebuilt on load.
Why is this? Am I correct that xmlserializer will only work on value fields?
If so, why does this limitation exist? What am I missing?
Peter Webb
construct a save file. It works extremely well, and reduced a task that I
though would take a couple of days to less than an hour, learning time
included.
I did notice one strange thing though. It generated and loaded almost all of
my instance data, with the sole exception of the color fields. Looking at
the xml file, it generates a "stub" for color, but does not store the actual
color data. Indeed, the xml file consists entirely of value fields, with no
reference fields.
It took about 30 seconds to extract the RGB values and store them as value
fields in my class, and reconstitute the colors from these fields on load.
But it does seem strange that this wasn't done automatically for me - the
colors could have been saved in the xml as color.R, color.G, color.B and
rebuilt on load.
Why is this? Am I correct that xmlserializer will only work on value fields?
If so, why does this limitation exist? What am I missing?
Peter Webb