TableRowWriter

Package: Libraries.Web.Page · Inherits from: Libraries.Language.Object

TableRowWriter adds cells to one row of a table, one after another. In the row naming the columns, every cell names a column; in the other rows, the first cell names the row and the rest hold its values. Each cell takes its look from the page's style options, and its text is made safe for the page. Cell returns the same writer, so a row's cells can be chained in one line. A page gets one from TableHeader or TableRow.

Example Code

use Libraries.Web.Page.all

class Main is WebPage
    action Main
        Table("Keys")
        TableHeader():Cell("Key"):Cell("What it does")
        TableRow():Cell("Enter"):Cell("Places the item")
    end
end

Actions

Cell(text value)

Adds a cell holding plain words.

Parameters

  • value text: The cell's words.

Returns

Libraries.Web.Page.TableRowWriter: This writer, to add more cells.

Cell()

Adds an empty cell, and returns a writer to fill it in with words named by what they are, such as a key to press. Keep this writer in a variable to add more cells after it.

Returns

Libraries.Web.Page.RichText: A writer for the cell.

Example

use Libraries.Web.Page.all

class Main is WebPage
    action Main
        Table("Keys")
        TableRowWriter save = TableRow()
        save:Cell():Keys("Ctrl", "S")
        save:Cell("Saves the scene")
    end
end

SetTarget(Libraries.Web.Page.TableRow row, boolean namesColumns, Libraries.Web.Page.WebPage page)

Attaches this writer to its row. WebPage calls this; people making pages don't.

Parameters

Inherited Actions

3 actions from Libraries.Language.Object