[Q] OOP in ExtendScript / ECMAscript 3
Hi,
I am looking for some pointers and examples of what is possible in terms of OOP in ExtendScript. I'm not too lazy to Google, but Googling this info is quite hard as a lot of what pops up is for later versions of JavaScript in which OOP syntax is considerable different. I'm hoping for a clean example of what is possible in terms of inheritance and encapsulation with the state-of-the-art in 1999 🙂
For example, I notice that the following are not available:
Object.create()
class
I'm happily using this syntax:
function MyClass(myParameter) {
this.dataMember1 = ...;
this.dataMember2 = ...;
this.memberFunction1 = function(myParameter, myParameter) {
// do something
}
this.memberFunction2 = function(myParameter, myParameter) {
// do something
}
}
which works well and am interested how much further I can take this.
I read this:
https://alistapart.com/article/prototypal-object-oriented-programming-using-javascript/
which is helpful but also assumes more modern Javascript than ExtendScript offers.
Any help greatly appreciated.
// Tom
