Skip to content

Latest commit

 

History

History
40 lines (22 loc) · 1.07 KB

QElementList.md

File metadata and controls

40 lines (22 loc) · 1.07 KB

Quixote API: QElementList

QElementList instances contain a list of QElement objects. It's provided by QFrame.getAll().

Methods

list.length()

Stability: 3 - Stable

Determine the number of elements in the list.

length = list.length()

  • length (number) The number of elements in the list.

list.at()

Stability: 3 - Stable

Retrieve an element from the list. Positive and negative indices are allowed (see below). Throws an exception if the index is out of bounds.

element = list.at(index, nickname)

  • element (QElement) The element retrieved.

  • index (number) Zero-based index of the element to retrieve. If the index is negative, it counts from the end of the list.

  • nickname (optional string) The name to use when describing element in error messages. Uses the list's nickname with a subscript (e.g., myList[0]) by default.

Example: Retrieve the last element: var element = list.index(-1);