[Seaside] [Mewa] Updating a model from an external XML
Germán S. Arduino
gsa at softhome.net
Wed Aug 11 23:17:42 CEST 2004
Not sure if this msg is only suitable to Mewa or may be to squeak-dev, but
I'm starting here :)
I've a complete system represented by a model, as usual. The model has
several instvars, some of them are collections with her respectives instvars
represented by anothers objects in my system.
I'm updating this model (adding objects, deleting objects and updating
objects) as usual using Mewa.
But I wants to give users a way to backup and restore the data (that I'm
using in the image), then I'm using Yaxo and SIXX to file-out the "data" to
an XML format (I haven't a big data volume).
Then, if a crash happens in the image and not a valid backup or if a user
wants to export his data to import them in another image, I want to read
this XML and transform it in my objects of MyModel.
I've tried with MyModel allInstances (I've only one, because is a
singleton), MyModel allSubInstances and so and I can see my objects but I
can't figure out how process them, means how to empty my model and create it
again with the data coming from the external XML.
Any help will be appreciated.
More information about the Seaside