Undocumented

Hierarchy

Constructors

Properties

asJSON: string

Gets the object as serialized JSON string. Or sets serialized JSON (to fill this object's metadata by the metadata included within the JSON)

autoSort: boolean

Undocumented

autoSortDisabled: boolean

Undocumented

autoSortString: string

Undocumented

autoUpdateDisabled: boolean

Undocumented

count: number

Total count of items in list.

deleted: boolean

Set to true after deletion so that 'change' event is called and item is removed from UI lists.

disableAlbumTracksLimit: boolean

Undocumented

dontNotify: boolean

Undocumented

firstSelected: Person

Returns first selected item (if any item is selected). Added in 5.0.4

Returns

focusedIndex: number

Index of focused item in the list.

focusedItem: Person

Gets focused item in the list.

globalModifyWatch: boolean

Undocumented

groupName: string

Undocumented

id: number

Gets integer id of the object

isLoaded: boolean

Undocumented

isObservable: boolean

Whether this object can be listened (e.g. for 'change' event)

isStatusBarSource: boolean

Is source for status bar informations.

itemsSelected: number

Undocumented

objectType: string

Gets the object type as string

persistentID: string

Gets persistent id of the object

sortedWatch: boolean

Undocumented

statusInfo: Promise<any>

Undocumented

title: string

Gets the object title

Methods

  • Undocumented

    Parameters

    Returns number

  • Add list of items to the list.

    Parameters

    Returns void

  • Add list of items to the list and preserve flags from the source list.

    Parameters

    Returns void

  • Return true when any item is checked

    Returns boolean

  • Asynchronous copy of JS objects to list items. As example check musicBrainz script.

    Parameters

    • totalCount: number
    • callback: any

      to fill one item (with parameters: int, item)

    Returns Promise<any>

  • Return status of the updates. True when auto-updates are suspended by suspendUpdates method.

    Returns boolean

  • Lock object to update state. Events are not called when in update state.

    Returns void

  • Updates the object every X ms when called periodically. Useful e.g. when filling lists. Can be used only in the update lock! (i.e. between beginUpdate/endUpdate)

    Parameters

    • interval: number

    Returns void

  • Clear list (remove all items).

    Returns void

  • Undocumented

    Returns Promise<any>

  • Clears selection.

    Returns void

  • Copies selection from one list to another. Returns a promise which is fulfilled with the index of the first selected item when it's all done.

    Parameters

    Returns Promise<any>

  • Undocumented

    Parameters

    • aComparer: any

    Returns void

  • Delete item at specified index.

    Parameters

    • index: number

      Index of a item to be removed

    Returns void

  • Removes selected items from the list

    Returns number

  • Undocumented

    Parameters

    Returns Promise<any>

  • Unlock object from update state. beginUpdate and endUpdate must be in pair. When endUpdate is called, change event is called.

    Returns boolean

  • Returns list with items including the string value. Space is used as OR operator (if not in quotes)

    Parameters

    • value: string

      Infix to check

    Returns SharedList<Person>

  • Returns list with items starting with specified string value. Space is used as OR operator (if not in quotes)

    Parameters

    • value: string

      Prefix to check

    Returns SharedList<Person>

  • Returns list with items starting with specified string value (within any word). Space is used as OR operator (if not in quotes)

    Parameters

    • value: string

      Word prefix to check

    Returns SharedList<Person>

  • Browse all items and send them one by one in defined callback. Note that the items for the callback method are prepared using getFastObject, i.e. the performance is good, but you should only use them in the callback method and don't preserve them for later use.

    Example

    list.forEach(function(item) {
    // Process the item
    })

    Parameters

    • cbk: ((item, index) => void)
        • (item, index): void
        • Parameters

          Returns void

    Returns void

  • Return true when all items are checked

    Returns boolean

  • Gets an array of all values of the specified property key. This is faster than getFastObject if you need to retrieve only one or two property values (instead of the entire object). [ADDED IN VERSION 5.0.2]

    Parameters

    • Rest ...params: any[]

    Returns any

  • Gets class name of the object.

    Returns string

  • Gets fast access to item at specified index. Note that this call always returns the same JS object, just modifies the internals so that properties/methods work on different data. It means, that you shouldn't preserve this object for later use, because it would be modified and the result would be unexpected.

    Parameters

    • index: number

      Index of the item

    • obj: any

    Returns any

  • Undocumented

    Parameters

    • groupid: string

    Returns any

  • Since

    5.0.1

    Parameters

    • groupid: string

    Returns number

  • Undocumented

    Returns string

  • Undocumented

    Returns number

  • Undocumented

    Returns number

  • Undocumented

    Parameters

    • value: string
    • startIndex: number
    • reverseOrder: boolean

    Returns number

  • Undocumented

    Parameters

    • Rest ...params: any[]

    Returns any

  • Undocumented

    Parameters

    • Rest ...params: any[]

    Returns any

  • Gets copy of the list with specified range indexes.

    Parameters

    • fromIndex: number

      Starting index

    • toIndex: number

      Ending index

    Returns SharedList<Person>

  • Gets object from specified index. List needs to be locked before use (see locked).

    Parameters

    • index: number

      Index of item

    Returns Person

  • Returns true, if all is selected in the list.

    Returns boolean

  • Returns true, if something is selected in the list.

    Returns boolean

  • Compares two lists for the same content

    Parameters

    Returns boolean

  • Gets index of a item in list.

    Parameters

    • data: Person

      Object to be found

    Returns number

  • Get position of the item identified by persistent ID.

    Parameters

    • persistentID: string

    Returns Promise<any>

  • Inserts a new item to a specified position in the list.

    Parameters

    • position: number

      The desired position in the list

    • data: Person

      Object to be added in list

    Returns number

  • Inserts list of items to the list at specified position.

    Parameters

    Returns void

  • Gets item at specified index is checked.

    Parameters

    • index: number

      Index of the item

    Returns boolean

  • Undocumented

    Parameters

    • itemCallback: any

    Returns boolean

  • Undocumented

    Parameters

    • id: number

    Returns boolean

  • Undocumented

    Parameters

    • Rest ...params: any[]

    Returns Promise<any>

  • Gets item at specified index is selected.

    Parameters

    • index: number

      Index of the item

    Returns boolean

  • Call defined method with locked data so user can access them.

    Parameters

    • func: (() => any)

      Method to call

        • (): any
        • Returns any

    Returns void

  • Call defined method with the list locked for modifications. It tries to perform the callback immediatelly, but in case there's already a write lock on the list, it performs the callback later.

    Parameters

    • Rest ...params: any[]

    Returns Promise<any>

  • Move selected items to new position.

    Parameters

    • newIndex: number

      New index where to move selected items

    Returns void

  • Notifies that the object was changed (e.g. to force visual update etc.)

    Parameters

    • Rest ...params: any[]

    Returns void

  • Notifies list was loaded and whenLoaded promise can be fulfilled.

    Returns void

  • Undocumented

    Parameters

    • Rest ...params: any[]

    Returns Promise<any>

  • Delete item from list.

    Parameters

    • data: Person

      Object to be removed from list

    Returns number

  • Delete item from list asynchronously.

    Parameters

    • data: Person

      Object to be removed from list

    Returns Promise<any>

  • Resume auto updates and run auto update immediatelly when any update is pending.

    Returns boolean

  • Select items in range.

    Parameters

    • fromIndex: number

      Start index

    • toIndex: number

      End index

    • select: boolean

      Whether to select or unselect

    Returns void

  • Select items in range, asynchronously.

    Parameters

    • Rest ...params: any[]

    Returns Promise<any>

  • Set all items to (un)checked state

    Parameters

    • state: boolean

      Check state

    Returns void

  • Undocumented

    Parameters

    • newState: boolean

    Returns void

  • Sets checked flag to item in specified index.

    Parameters

    • index: number

      Index of the item

    • value: boolean

      True when checked

    Returns void

  • Undocumented

    Parameters

    • groupid: string
    • newState: boolean

    Returns void

  • Undocumented

    Parameters

    • groupid: string
    • rowGroupDimension: number
    • colGroupDimension: number

    Returns void

  • Undocumented

    Parameters

    • rowGroupDimension: number
    • colGroupDimension: number

    Returns void

  • Undocumented

    Parameters

    • value: boolean

    Returns void

  • Undocumented

    Parameters

    • id: number
    • value: boolean

    Returns void

  • Sets selected flag to item in specified index.

    Parameters

    • index: number

      Index of the item

    • value: boolean

      True when selected

    Returns void

  • SYNCHRONOUSLY sorts the list with the given sorting rule and disables auto-sort.

    To specify sort direction, append ' ASC' or ' DESC' to the tag name and separate them by semicolons.

    Fields are NOT case sensitive (e.g. 'artist', 'Artist', and 'ArTiSt') are all valid, but sort direction IS case sensitive ('ASC' and 'DESC' are valid; 'asc' and 'desc' are not)

    Valid examples:

    list.setSortRule('title');
    list.setSortRule('artist; title');
    list.setSortRule('rating DESC; title ASC');
    list.setSortRule('Rating DESC; TITLE;');

    Invalid examples:

    list.setSortRule('tagThatDoesNotExist');
    list.setSortRule('rating desc; title asc');

    Parameters

    • Value: string

    Returns boolean

  • Sets object at specified index in the list. List needs to be locked before use (see locked).

    Parameters

    • index: number

      Index where to be added

    • value: Person

      Object to be added

    Returns void

  • Undocumented

    Returns void

  • Undocumented

    Returns void

  • Undocumented

    Returns string

  • Undocumented

    Returns string

  • Undocumented

    Returns void

  • Add list of items to the list, but clears the old values. i.e. is the same as calling clear+addList

    Parameters

    Returns void

  • Returns a promise which is called when loading is finished. Returns a copy of the list. Loading is finished by calling notifyLoaded method.

    Returns Promise<PersonList>

Events

event_beforeSort: (() => void)

Type declaration

    • (): void
    • Event is called before list sort begins

      See App.listen

      Returns void

event_change: ((changeType, ...additionalArgs) => void)

Type declaration

    • (changeType, ...additionalArgs): void
    • Event is called when object is somehow changed

      See App.listen

      Example

      app.listen(object, 'change', (changeType) => {  });
      

      Parameters

      • changeType: string

        additional change type (can have values like 'tracklist', 'deleted', 'title' or undefined)

      • Rest ...additionalArgs: any[]

      Returns void

event_destroying: (() => void)

Type declaration

    • (): void
    • Event is called when object is going to destroy

      See App.listen

      Returns void

event_focuschange: ((newIdx, oldIdx) => void)

Type declaration

    • (newIdx, oldIdx): void
    • Event is called when focused item is changed

      See App.listen

      Parameters

      • newIdx: number

        new focused item index

      • oldIdx: number

        old focused index

      Returns void

event_loaded: (() => void)

Type declaration

    • (): void
    • Event is called when list is notified as loaded

      See App.listen

      Returns void

event_sorted: (() => void)

Type declaration

    • (): void
    • Event is called when list sort is finished

      See App.listen

      Returns void

event_statuschange: (() => void)

Type declaration

    • (): void
    • Event is called when status info of the object is changed

      See App.listen

      Returns void