Skip to main content
Participating Frequently
September 1, 2009
Question

[CS4][JS]Error : Invoke cell in a Table

  • September 1, 2009
  • 1 reply
  • 480 views

Hi,

    I am using trail version of IndesignCS4 JavaScript.I have an empty cell in a table.When I am invoking a empty cell in a table using the statement "myCell.lines.length". Obviously there is no lines in the empty cell.But If i am execute alert(myCell.lines.length); It displays 1. Is it bug ? or any other reason?

Please explain me.

Regards

Kumar

This topic has been closed for replies.

1 reply

Marc Autret
Legend
September 1, 2009

It's not a bug. Every text container uses at least 1 line, because it contains at least 1 insertion point.

Interestingly, an empty cell contains one line . . . and zero paragraph!

You may also observe that the single line of an empty container has no character:

myEmptyCell.lines[0].characters.length == 0

(but you have: myEmptyCell.lines[0].insertionPoints.length == 1 )

@+

Marc