1 Reply Latest reply on Jun 25, 2012 8:31 AM by Bernd Alheit

    eval in setProps

    valeri_dzia

      Hello

       

      I have following JS code:

       

       

      var annot = this.addAnnot()


      var c = '{page: 0,points: [[10,40],[200,200]],strokeColor: color.red,author: "A. C. Robat",contents: "Check with Jones on this point.",popupOpen: true,popupRect: [200, 100, 400, 200],arrowarrowBegin: "Diamond",arrowEnd:"OpenArrow"}';

       

      annot.setProps(eval("c"));

       

       

      but It not set annotation

       

      What is problem?

        • 1. Re: eval in setProps
          Bernd Alheit Adobe Community Professional & MVP

          Use somethins like this:

          var annot = this.addAnnot();


          var c = {page: 0,points: [[10,40],[200,200]],strokeColor: color.red,author: "A. C. Robat",contents: "Check with Jones on this point.",popupOpen: true,popupRect: [200, 100, 400, 200],arrowBegin: "Diamond",arrowEnd:"OpenArrow"};

           

          annot.setProps(c);