cp.ui.OldTable

Represents an AXTable in the Apple Accessibility UX API.


API Overview

Functions - API calls offered directly by the extension

  • cellTextValue
  • cellTextValueIs
  • discloseRow
  • findRow
  • is
  • matches
  • matchesContent
  • visitRow

Constructors - API calls which return an object, typically one that offers API methods

  • OldTable

Fields - Variables which can only be accessed from an object returned by a constructor

  • contentUI
  • horizontalScrollBarUI
  • isFocused
  • verticalScrollBarUI

Methods - API calls which can only be made on an object returned by a constructor

  • columnsUI
  • deselectAll
  • deselectRow
  • deselectRowAt
  • findCellUI
  • findColumnIndex
  • loadLayout
  • rowsUI
  • saveLayout
  • selectAll
  • selectedRowsUI
  • selectRow
  • selectRowAt
  • showRow
  • showRowAt
  • toCSV
  • topRowsUI
  • viewFrame

API Documentation

Functions

cellTextValue

   
Signature cp.ui.OldTable.cellTextValue(cell) -> boolean
Type Function
Description Returns the cell's text value.
Parameters
  • cell - The cell to check
Returns
  • The combined text value of the cell.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 40

cellTextValueIs

   
Signature cp.ui.OldTable.cellTextValueIs(cell, value) -> boolean
Type Function
Description Checks if the cell's text value equals value.
Parameters
  • cell - The cell to check
  • value - The text value to compare.
Returns
  • true if the cell text value equals the provided value.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 69

discloseRow

   
Signature cp.ui.OldTable.discloseRow(row) -> boolean
Type Function
Description Discloses the row, if possible.
Parameters
  • row - The row to disclose
Returns
  • true if the row is disclosable and is now expanded.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 83

findRow

   
Signature cp.ui.OldTable.findRow(rows, names) -> axuielement
Type Function
Description Finds the row at the sub-level named in the names table and returns it.
Parameters
  • rows - The array of rows to process.
  • names - The array of names to navigate down
Returns
  • The row that was visited, or nil if not.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 102

is

   
Signature cp.ui.OldTable.is(thing) -> boolean
Type Function
Description Checks if the thing is a Table.
Parameters
  • thing - The thing to check
Returns
  • true if the thing is a Table instance.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 27

matches

   
Signature cp.ui.OldTable.matches(element)
Type Function
Description Checks if the element is a valid table.
Parameters
  • element - The element to check.
Returns
  • true if it matches.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 161

matchesContent

   
Signature cp.ui.OldTable.matchesContent(element) -> boolean
Type Function
Description Checks if the element is a valid table content element.
Parameters
  • element - The element to check
Returns
  • true if the element is a valid content element.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 220

visitRow

   
Signature cp.ui.OldTable.visitRow(rows, names) -> axuielement
Type Function
Description Selects the row at the sub-level named in the names table.
Parameters
  • rows - The array of rows to process.
  • names - The array of names to navigate down
Returns
  • The row that was visited, or nil if not.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 147

Constructors

OldTable

   
Signature cp.ui.OldTable(parent, uiFinder) -> self
Type Constructor
Description Creates a new Table.
Parameters
  • parent - The parent object.
  • uiFinder - A function or cp.prop which will return the axuielement that this table represents.
Returns
  • A new Table instance.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 172

Fields

contentUI

   
Signature cp.ui.OldTable.contentUI <cp.prop: hs.axuielement; read-only>
Type Field
Description Returns the axuielement that contains the actual rows.
Notes None
Source src/extensions/cp/ui/OldTable.lua line 183

horizontalScrollBarUI

   
Signature cp.ui.OldTable.horizontalScrollBarUI <cp.prop: hs.axuielement; read-only>
Type Field
Description The horizontal scroll bar UI element, if present.
Notes None
Source src/extensions/cp/ui/OldTable.lua line 203

isFocused

   
Signature cp.ui.OldTable.isFocused <cp.prop: boolean; read-only>
Type Field
Description Returns true if the table is focused by the user.
Notes None
Source src/extensions/cp/ui/OldTable.lua line 210

verticalScrollBarUI

   
Signature cp.ui.OldTable.verticalScrollBarUI <cp.prop: hs.axuielement; read-only>
Type Field
Description The vertical scroll bar UI element, if present.
Notes None
Source src/extensions/cp/ui/OldTable.lua line 196

Methods

columnsUI

   
Signature cp.ui.OldTable:columnsUI() -> table of axuielements | nil
Type Method
Description Return a list of column headers, if present.
Parameters
  • None
Returns
  • Table of column headers. If the table is visible but no column headers are defined, an empty table is returned. If it's not visible, nil is returned.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 278

deselectAll

   
Signature cp.ui.OldTable:deselectAll(rowUI) -> boolean
Type Method
Description Deselects the specified rows. If rowsUI is nil, then all rows will be deselected.
Parameters
  • rowUI - A table of hs.axuielement objects for the rows you want to deselect.
Returns
  • true if successful, otherwise false.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 545

deselectRow

   
Signature cp.ui.OldTable:deselectRow(rowUI) -> boolean
Type Method
Description Deselect a specific row.
Parameters
  • rowUI - The hs.axuielement object of the row you want to deselect.
Returns
  • true if successful, otherwise false.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 491

deselectRowAt

   
Signature cp.ui.OldTable:deselectRowAt(index) -> boolean
Type Method
Description Deselects a row at a specific index.
Parameters
  • index - The index of the row you wish to deselect.
Returns
  • true if successful, otherwise false.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 509

findCellUI

   
Signature cp.ui.OldTable:findCellUI(rowNumber, columnId) -> hs.axuielement | nil
Type Method
Description Finds a specific Cell UI.
Parameters
  • rowNumber - The row number.
  • columnId - The Column ID.
Returns
  • A hs.axuielement object for the cell, or nil if the cell cannot be found.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 322

findColumnIndex

   
Signature cp.ui.OldTable:findColumnIndex(id) -> number | nil
Type Method
Description Finds the Column Index based on an AXIdentifier ID.
Parameters
  • id - The AXIdentifier of the column index you want to find.
Returns
  • A column index as a number, or nil if no index can be found.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 301

loadLayout

   
Signature cp.ui.OldTable:loadLayout(layout) -> none
Type Method
Description Loads a Table layout.
Parameters
  • layout - A table containing the Table layout settings - created using cp.ui.OldTable:saveLayout().
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 654

rowsUI

   
Signature cp.ui.OldTable:rowsUI([filterFn]) -> table of axuielements | nil
Type Method
Description Returns the list of rows in the table. An optional filter function may be provided. It will be passed a single AXRow element and should return true if the row should be included.
Parameters
  • filterFn - An optional function that will be called to check if individual rows should be included. If not provided, all rows are returned.
Returns
  • Table of rows. If the table is visible but no rows match, it will be an empty table, otherwise it will be nil.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 237

saveLayout

   
Signature cp.ui.OldTable:saveLayout() -> table
Type Method
Description Saves the current Table layout to a table.
Parameters
  • None
Returns
  • A table containing the current Table Layout.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 630

selectAll

   
Signature cp.ui.OldTable:selectAll(rowUI) -> boolean
Type Method
Description Selects the specified rows. If rowsUI is nil, then all rows will be selected.
Parameters
  • rowUI - A table of hs.axuielement objects for the rows you want to select.
Returns
  • true if successful, otherwise false.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 526

selectedRowsUI

   
Signature cp.ui.OldTable:selectedRowsUI() -> table of axuielements | nil
Type Method
Description Return a table of selected row UIs.
Parameters
  • None
Returns
  • Table of hs.axuielement objects, or nil if none could be found.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 341

selectRow

   
Signature cp.ui.OldTable:selectRow(rowUI) -> boolean
Type Method
Description Select a specific row.
Parameters
  • rowUI - The hs.axuielement object of the row you want to select.
Returns
  • true if successful, otherwise false.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 456

selectRowAt

   
Signature cp.ui.OldTable:selectRowAt(index) -> boolean
Type Method
Description Select a row at a specific index.
Parameters
  • index - The index of the row you wish to select.
Returns
  • true if successful, otherwise false.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 474

showRow

   
Signature cp.ui.OldTable:showRow(rowUI) -> boolean
Type Method
Description Shows a specific row.
Parameters
  • rowUI - The hs.axuielement object of the row you want to show.
Returns
  • true if successful, otherwise false.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 395

showRowAt

   
Signature cp.ui.OldTable:showRowAt(index) -> boolean
Type Method
Description Shows a row at a specific index.
Parameters
  • index - The index of the row you wish to show.
Returns
  • true if successful, otherwise false.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 437

toCSV

   
Signature cp.ui.OldTable:toCSV() -> string | nil
Type Method
Description Gets the contents of the table and formats it as a CSV string.
Parameters
  • None
Returns
  • A string or nil if an error occurs.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 565

topRowsUI

   
Signature cp.ui.OldTable:topRowsUI(filterFn) -> table of axuielements | nil
Type Method
Description Returns a list of top-level rows in the table. An optional filter function may be provided. It will be passed a single AXRow element and should return true if the row should be included.
Parameters
  • filterFn - An optional function that will be called to check if individual rows should be included. If not provided, all rows are returned.
Returns
  • Table of rows. If the table is visible but no rows match, it will be an empty table, otherwise it will be nil.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 262

viewFrame

   
Signature cp.ui.OldTable:viewFrame() -> hs.geometry rect
Type Method
Description Returns the Table frame.
Parameters
  • None
Returns
  • The frame in the form of a hs.geometry rect object.
Notes None
Examples None
Source src/extensions/cp/ui/OldTable.lua line 364