Copy link to clipboard
Copied
Hi all,
I'm trying to add a method on the prototype of an object.
I put these objects into an array called changes by doing new Changes.
Then I call the method using:
changes[0].createTable();
Why does it not work?
function Changes ( changedBy, changedOn, changeType, change, changeFrom, changePage, row ) {
this.changedBy = changedBy;
this.changedOn = changedOn;
this.changeType = changeType;
this.change = change;
this.changeFrom = changeFrom;
this.changePage = changePage;
// use row to control how many rows the table needs
this.row = row;
}Changes.prototype.createTable = function () {
// set the document properties to A4 margin 10mm make the text frame fill the page
app.documents.add( );
var doc = app.activeDocument;
var textFrame = doc.pages[0].textFrames.add ( {geometricBounds: [12.7,12.7,284.299999999461,197.299999999936] } );
// add the content to a table
//if a table exists then add a new row
}
Have something to add?