Sunday, June 14, 2009

Saving and Loading

Well, saving and loading to a file is complete now. It was actually quite simple, since I just used serialization. It appears to be working well. You can see in the image below that the menu items are now enabled, and the model that is shown in the Geometry window was saved and loaded later.



Because I used serialization, it wasn't much work to do, and even as I make future modifications to the model class, I won't ever have to change anything about the saving and loading component.

The drawback is, it won't be easy to read in files from a previous version of the model class in some situations (if we remove something). I don't think that will be a problem, but if it becomes one, I suppose I can make a converter for it.

No comments:

Post a Comment