#cp.ui.OldTable

Represents an AXTable in the Apple Accessibility UX API.


#API Overview

Functions - API calls offered directly by the extension

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

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

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


#API Documentation

#Functions

Signaturecp.ui.OldTable.cellTextValue(cell) -> boolean
TypeFunction
DescriptionReturns the cell's text value.
Parameters
  • cell - The cell to check
Returns
  • The combined text value of the cell.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 40

Signaturecp.ui.OldTable.cellTextValueIs(cell, value) -> boolean
TypeFunction
DescriptionChecks 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 69

Signaturecp.ui.OldTable.discloseRow(row) -> boolean
TypeFunction
DescriptionDiscloses the row, if possible.
Parameters
  • row - The row to disclose
Returns
  • true if the row is disclosable and is now expanded.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 83

Signaturecp.ui.OldTable.findRow(rows, names) -> axuielement
TypeFunction
DescriptionFinds 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 102

Signaturecp.ui.OldTable.is(thing) -> boolean
TypeFunction
DescriptionChecks if the thing is a Table.
Parameters
  • thing - The thing to check
Returns
  • true if the thing is a Table instance.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 27

Signaturecp.ui.OldTable.matches(element)
TypeFunction
DescriptionChecks if the element is a valid table.
Parameters
  • element - The element to check.
Returns
  • true if it matches.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 161

Signaturecp.ui.OldTable.matchesContent(element) -> boolean
TypeFunction
DescriptionChecks 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 220

Signaturecp.ui.OldTable.visitRow(rows, names) -> axuielement
TypeFunction
DescriptionSelects 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 147

#Constructors

Signaturecp.ui.OldTable(parent, uiFinder) -> self
TypeConstructor
DescriptionCreates 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 172

#Fields

Signaturecp.ui.OldTable.contentUI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionReturns the axuielement that contains the actual rows.
NotesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 183

Signaturecp.ui.OldTable.horizontalScrollBarUI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionThe horizontal scroll bar UI element, if present.
NotesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 203

Signaturecp.ui.OldTable.isFocused <cp.prop: boolean; read-only>
TypeField
DescriptionReturns true if the table is focused by the user.
NotesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 210

Signaturecp.ui.OldTable.verticalScrollBarUI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionThe vertical scroll bar UI element, if present.
NotesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 196

#Methods

Signaturecp.ui.OldTable:columnsUI() -> table of axuielements | nil
TypeMethod
DescriptionReturn 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 278

Signaturecp.ui.OldTable:deselectAll(rowUI) -> boolean
TypeMethod
DescriptionDeselects 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 545

Signaturecp.ui.OldTable:deselectRow(rowUI) -> boolean
TypeMethod
DescriptionDeselect a specific row.
Parameters
  • rowUI - The hs.axuielement object of the row you want to deselect.
Returns
  • true if successful, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 491

Signaturecp.ui.OldTable:deselectRowAt(index) -> boolean
TypeMethod
DescriptionDeselects a row at a specific index.
Parameters
  • index - The index of the row you wish to deselect.
Returns
  • true if successful, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 509

Signaturecp.ui.OldTable:findCellUI(rowNumber, columnId) -> hs.axuielement | nil
TypeMethod
DescriptionFinds 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 322

Signaturecp.ui.OldTable:findColumnIndex(id) -> number | nil
TypeMethod
DescriptionFinds 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 301

Signaturecp.ui.OldTable:loadLayout(layout) -> none
TypeMethod
DescriptionLoads a Table layout.
Parameters
  • layout - A table containing the Table layout settings - created using cp.ui.OldTable:saveLayout().
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 654

Signaturecp.ui.OldTable:rowsUI([filterFn]) -> table of axuielements | nil
TypeMethod
DescriptionReturns 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 237

Signaturecp.ui.OldTable:saveLayout() -> table
TypeMethod
DescriptionSaves the current Table layout to a table.
Parameters
  • None
Returns
  • A table containing the current Table Layout.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 630

Signaturecp.ui.OldTable:selectAll(rowUI) -> boolean
TypeMethod
DescriptionSelects 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 526

Signaturecp.ui.OldTable:selectedRowsUI() -> table of axuielements | nil
TypeMethod
DescriptionReturn a table of selected row UIs.
Parameters
  • None
Returns
  • Table of hs.axuielement objects, or nil if none could be found.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 341

Signaturecp.ui.OldTable:selectRow(rowUI) -> boolean
TypeMethod
DescriptionSelect a specific row.
Parameters
  • rowUI - The hs.axuielement object of the row you want to select.
Returns
  • true if successful, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 456

Signaturecp.ui.OldTable:selectRowAt(index) -> boolean
TypeMethod
DescriptionSelect a row at a specific index.
Parameters
  • index - The index of the row you wish to select.
Returns
  • true if successful, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 474

Signaturecp.ui.OldTable:showRow(rowUI) -> boolean
TypeMethod
DescriptionShows a specific row.
Parameters
  • rowUI - The hs.axuielement object of the row you want to show.
Returns
  • true if successful, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 395

Signaturecp.ui.OldTable:showRowAt(index) -> boolean
TypeMethod
DescriptionShows a row at a specific index.
Parameters
  • index - The index of the row you wish to show.
Returns
  • true if successful, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 437

Signaturecp.ui.OldTable:toCSV() -> string | nil
TypeMethod
DescriptionGets the contents of the table and formats it as a CSV string.
Parameters
  • None
Returns
  • A string or nil if an error occurs.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 565

Signaturecp.ui.OldTable:topRowsUI(filterFn) -> table of axuielements | nil
TypeMethod
DescriptionReturns 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 262

Signaturecp.ui.OldTable:viewFrame() -> hs.geometry rect
TypeMethod
DescriptionReturns the Table frame.
Parameters
  • None
Returns
  • The frame in the form of a hs.geometry rect object.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/ui/OldTable.lua line 364