Hi,
I'm trying to find out if it is possible to recover the functionality of '=' for properties in a class that have their own set method.
For instance, this piece of code:
classdef myClass < hgsetget properties myProperty end methods function set.myProperty(obj,value) mySetFunction(obj,value); end function mySetFunction(obj,value) obj.myProperty = value; end endend
generates a recursion error if we try to set the property myProperty by any value.
Is there a way to avoid this effect? If there were a builtin function that represents the effect of the "=" I could use it inside mySetFunction, but I do not know if this is possible.
In other words, I know that inside the set.myProperty function, a command
obj.myProperty = value;
would call the builtin function corresponding to "=", but I do not know how to force this behaviour explicitely in any function that is not a set.<property>
Best, Daniel
Best Answer