classafReflux::ProgressWorker

sys::Obj
  afReflux::ProgressWorker

Used by ProgressDialogues to update the progress bar.

Example:

dialogue.open(window) |ProgressWorker worker| {
    worker.update(1, 4, "Processing...")
    Actor.sleep(2sec)

    worker.update(2, 4, "A Very Long...")
    Actor.sleep(2sec)

    worker.update(3, 4, "Process...")
    Actor.sleep(2sec)

    worker.update(4, 4, "Done.")
}
cancelled

Source

Bool cancelled { internal set }

Returns true if the user clicked the Cancel button.

detailText

Source

Str detailText

The text displayed in the details panel.

image

Source

Image? image

The image displayed in the progress dialogue.

text

Source

Str text

The message displayed in the progress dialogue.

update

Source

Void update(Int workDone, Int workTotal, Str? msg := null)

Updates the progress bar to show work done. msg is optional and sets the dialogue text and is appended to the detail text.

If the dialogue has been cancelled then this throws a CancelledErr.