set methods getting called before loadobj?

2 visualizaciones (últimos 30 días)
Joseph Burgel
Joseph Burgel el 20 de Mayo de 2011
Hi all,
I've got a user defined object that was saved to a file. One of the properties of the class has a set method defined for it. I've also defined a static loadobj method for the class. When I load the object from the file using load(), the set method for the property gets called before the loadobj. Why is this? Initially, the property was not transient so it was saved to the file. In my latest class revision, I've changed the property to be transient.
Also, I'm still not clear on what gets passed to loadobj. In my case, I've saved an object to the file but the input argument to loadobj is a structure. why don't I get an object type passed. Also, the object seems to instantiate regardless of what I return from loadobj - either returning the passed structure or initializing a new object and returning that.

Respuestas (0)

Categorías

Más información sobre Object Save and Load en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by