I am stuck with what I expect should be something relatively simple to do. I am writing a class Superclass
such that:
Superclass < handle
and then:
MyClass < Superclass
MyClass
contains function DisplayObjectName
, which should do what the name suggests. That is, display the name of the class instance (object).
For example, I create an object:
TestObject = MyClass(inputvariable);
Then I would like to have a function such that when I call
TestObject.DisplayObjectName()
the output would be
ans = TestObject
I could not seem to find a way to do that. Any ideas? Any help would be very much appreciated.