2 Replies Latest reply on May 26, 2008 12:48 PM by (Joe_Cabrera)

    AS: setting table properties in ID CS3 invokes odd error message

    Level 1
      I'm converting an InDesign CS2 script to CS3 and am having the strangest error. This code used to work in ID CS2 for the selected text frame:

      >tell parent story of insertion point 1 of selection

      >set theTable to make table with properties {width:gridColumnWidth, body row count:totalGridRows, header row count:0, footer row count:0, column count:totalGridColumns, height:gridRowHeight, left border stroke weight:gridBorderWeight, right border stroke weight:gridBorderWeight, top border stroke weight:gridBorderWeight, bottom border stroke weight:gridBorderWeight, left border stroke type:"Solid", right border stroke type:"Solid", top border stroke type:"Solid", bottom border stroke type:"Solid", space after:0, space before:0}

      >end tell

      But now it chokes and gives me this strange error:

      >Adobe InDesign CS3 got an error: Invalid value for set property 'height'. Expected number or string, but received 21.80909090909093.

      Huh? That obviously has to be a number or string, so what's going on? What's even weirder is if I delete all the table properties except for weight and height, the script doesn't give the error. I know I can do this with a table style, but I'd like to understand what the problem is before I take that step.