I recently started using prototyping for a project. It is one of my first times using prototyping, so still finding my legs :) I come from an object oriented background, so excuse me if some of my terminology is not correct.
One of my main reasons for using it is to create a scoping framework for the project, to avoid any conflicts later on. I also use it to allow me to create objects spread over several files.
I am however having trouble with something.
I declare my base "class" in one file. In another file, I then declare an extension to the class. In this extension I declare a function, which I then try to call from the base class. Lastly I declare an instance of the extension inside the base class to allow me to call the extended functions from the base class.
When I try and create the instance, however, I get the following error:
SCRIPT445: Object doesn't support this action leave.js, line 2 character 5
Here is a snippet of my code:
leave.js
var _LEAVE = function () {
this.WORK_LIST = new this._WORK_LIST();
}
worklist.js
_LEAVE.prototype._WORK_LIST = function (params) {
var Render = function(){
...
}
}
Any suggestions about what I am doing wrong and how to fix it would be greatly appreciated.