HTMLDocument.getTableCell(3kaya)

HTMLDocument.getTableCell3kaya

Retrieve a table cell

Usage

ElementTree getTableCell( ElementTree tsect, Int row, Int col )

Arguments

tsect The table header, footer or body section

row The row to retrieve from (starting at 0)

col The column to retrieve from (starting at 0)

Overview

Retrieve a table cell so that content may be added to it. An Array.OutOfBounds (3kaya) Exception will be thrown if the row and column are not within the table.

table = addTable(parent,"Example table");
tbody = addTableBodySection(table);
for i in [0..2] {
void(addTableRow(tbody));
}
addTableColumns(table,3);
for i in [0..2] {
for j in [0..2] {
td = getTableCell(tbody,i,j);
addString(td,String(i+j));
}
}
/*
Example table
+---+---+---+
| 0 | 1 | 2 |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 2 | 3 | 4 |
+---+---+---+
*/

Naturally, the table in this simple example would be easier to generate using HTMLDocument.initialiseTable (3kaya)

Releases

4 releases since Debian 5.0 (Lenny); the text changed 3 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8

Authors

Kaya standard library by Edwin Brady, Chris Morris and others ([email protected]). For further information see http://kayalang.org/

License

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

From kaya 0.4.4-6.2 in Debian 8 (Jessie). Parsed by carta from the page's man source.