5 Replies Latest reply on Dec 28, 2011 8:14 PM by TD_TAD

    Invalid object for this request

    TD_TAD

      hi friends i have one more problem regarding textframe.

      my java script code is like this,

       

      var firstLine =  xmlElement.lines.firstItem();

       

      var newTextFrame=  firstLine.textFrames.add();

       

      ------>newTextFrame.geometricBounds = [0,0,50,50]; error:Invalid object for this request

       

      newTextFrame.contents = queryNumber;

       

      newTextFrame.appliedObjectStyle =this.jrnlIDDoc.objectStyles.itemByName (((columnIndex==0)?"AQ_LEFT":"AQ_RIGHT"));

       

      newTextFrame.fit(FitOptions.FRAME_TO_CONTENT);

       

      if(firstLine.textFrames.length > 0) {

       

      newTextFrame.move(null,[0,(newTextFrame.geometricBounds[2] - newTextFrame.geometricBounds[0]+3 ) * (firstLine.textFrames.length)]);

       

      after executing this file i got an error:Invalid object for this request


      if anybody knows the soln pls help me.

       

      regards

      tahir.