set methods getting called before loadobj?

조회 수: 1 (최근 30일)
Joseph Burgel
Joseph Burgel 2011년 5월 20일
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.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Object Save and Load에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by