I am defining an object like this:
function Project(Attributes, ProjectWidth, ProjectHeight)
{
this.ProjectHeight = ProjectHeight;
this.ProjectWidth = ProjectWidth;
this.ProjectScale = this.GetProjectScale();
this.Attributes = Attributes;
this.currentLayout = '';
this.CreateLayoutArray = function()
{....}
}
I then try to create and instance like this:
var newProj = new Project(a,b,c);
But this execption is thrown:
Project is not a constructor
What could be wrong? I googled around a lot, but still can't figure out what I am doing wrong.