Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now