Not sure whether this question has been asked before, but I couldn't find it. Given this situation:
When MyClass.myMethod() is invoked, it doesn't call doSomething(). That's why I changed MyClass to:
Is this the way to do it, or should working with interfaces and overwriting a method in it, be done differently?
Code:
isc.defineInterface('MyInterface').addInterfaceProperties({ myMethod: function () { doSomething(); } }); isc.defineClass('MyClass', isc.VLayout, isc.MyInterface).addProperties({ myMethod: function () { this.Super('myMethod', arguments); });
Code:
isc.defineClass('MyClass', isc.VLayout, isc.MyInterface).addProperties({ myMethod: function () { isc.MyInterface.getPrototype().myMethod.apply(this, arguments) });