Background task and progress class manager. Access via the global app.backgroundTasks.

BackgroundTasks

Hierarchy (view full)

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)

count: number

Gets total count of background progresses

id: number

Gets integer id of the object

objectType: string

Gets the object type as string

onChanged: JSCallbacks

Undocumented

persistentID: string

Gets persistent id of the object

statusInfo: Promise<any>

Undocumented

title: string

Gets the object title

Methods

  • Parameters

    Returns Promise<any>

    Undocumented

  • Gets class name of the object.

    Returns string

  • Gets background task in given index

    Parameters

    • index: number

      Index of the task in list

    Returns BackgroundTask

    BackgroundTask

  • Gets count of tasks with visible progresses

    Returns number

    integer

  • Parameters

    • id: number

    Returns boolean

    Undocumented

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

    Parameters

    • func: (() => any)

      Method to call

        • (): any
        • Returns any

    Returns void

  • Parameters

    • id: number
    • value: boolean

    Returns void

    Undocumented

  • Terminate all background tasks

    Returns void

Events

event_changed: ((op, task) => void)

Change event is called every time something is changed in any background task.
Available operations:

  • 'unregistered' - task was removed
  • 'registered' - task is just started
  • 'enabled' - task is enabled
  • 'disabled' - task is disabled
  • 'textchanged' - text of the progress was changed
  • 'progresschanged' - percent of progress was changed
  • 'descriptionchanged' - description of the progress was changed

See App.listen

Type declaration

    • (op, task): void
    • Parameters

      • op: string

        Operation performed to task.

      • task: BackgroundTask

        task related do operation. When operation is 'unregistered', ID is returned instead of task

      Returns void