Small but important update!
Added a new system that lets you use the keyword override at the top of a function to prevent the function call from calling parent functions first.
Mob
function a()
alert(1)
Child
function a()
override
alert(2)
onNew()
this.a()
The above example would only run the alert(2) code when onNew was called for Mob/Child. Without the override, you would get the alert(1) first and then the alert(2) when the Mob/Child was created.
To go along with this, you can now get the return value of parent functions inside of a child function using the new retVal variable.
Mob
function a()
alert(1)
return 2
Child
function a()
alert(retVal)
onNew()
this.a()
The above example would call the Mob.a function, alert 1, return 2, then call the Mob/Child.a function and retVal would be equal to 2.
Also added a new function to the Type static object that lets you call type functions within another function and apply your own "this" to it. So you could override the parent functions for an object, then after you run the child function code, you could use Type.callFunction(pType, pFunc, pObj, pArgs) to call the parent functions. Or you could call completely different functions from completely different types.
Mob
function a()
alert(2)
return 3
Child
function a()
override
alert(1)
retVal = Type.callFunction('Mob', 'a', this, arguments)
alert(retVal)
onNew()
this.a()
The above example has Mob/Child overriding its parent function calls for the function a but then it uses Type.callFunction after running some code to force call the parent function and get the return value, then continue with more code to alert that return value.
More updates coming soon!
Added a new system that lets you use the keyword override at the top of a function to prevent the function call from calling parent functions first.
Mob function a() alert(1) Child function a() override alert(2) onNew() this.a()
The above example would only run the alert(2) code when onNew was called for Mob/Child. Without the override, you would get the alert(1) first and then the alert(2) when the Mob/Child was created.
To go along with this, you can now get the return value of parent functions inside of a child function using the new retVal variable.
Mob function a() alert(1) return 2 Child function a() alert(retVal) onNew() this.a()
The above example would call the Mob.a function, alert 1, return 2, then call the Mob/Child.a function and retVal would be equal to 2.
Also added a new function to the Type static object that lets you call type functions within another function and apply your own "this" to it. So you could override the parent functions for an object, then after you run the child function code, you could use Type.callFunction(pType, pFunc, pObj, pArgs) to call the parent functions. Or you could call completely different functions from completely different types.
Mob function a() alert(2) return 3 Child function a() override alert(1) retVal = Type.callFunction('Mob', 'a', this, arguments) alert(retVal) onNew() this.a()
The above example has Mob/Child overriding its parent function calls for the function a but then it uses Type.callFunction after running some code to force call the parent function and get the return value, then continue with more code to alert that return value.
More updates coming soon!