set methods getting called before loadobj?

1 Ansicht (letzte 30 Tage)
Joseph Burgel
Joseph Burgel am 20 Mai 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.

Antworten (0)

Kategorien

Mehr zu Object Save and Load finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by