0 Replies Latest reply on Mar 17, 2017 4:57 AM by jakec88782761

    prototype issue

    jakec88782761 Level 2

      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:





      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