Ok, so I have this object Object1. One of its properties is another object, Object2 : Object1.prop = Object2.
Now from within a method of Object1, I am creating GUI controls whose callbacks I want to be one of Object2's public methods, say Object2.publicMethod.
So in Object1 I have something of the form:
function callbackWillBeCreated(this)
guicontrol('Callback', @this.prop.publicMethod);
end
This doesn't work ! When the callback is called, Matlab sends an error saying it doesn't know the function.
Does anyone have a fix or an explanation as to why it doesn't work ?
Thanks
Best Answer