File DelayedProgressScope.lua

Functions

DelayedProgressScope:new (t) Constructor for new instances.
DelayedProgressScope:newClass (t) Constructor for extending class.
DelayedProgressScope:setIndeterminateProgress (yield) Call to indicate operation is progressing, yet amount til completion unknown.


Functions

DelayedProgressScope:new (t)
Constructor for new instances.

Parameters:

  • t: Initial table, with all the same members as regular lr-progress-scope, plus (all are optional):
    • functionContext (lr-function-context, default nil): if not set in constructor, must be manually attached afterward.
    • modal (boolean, default true): set true to use modal dialog box instead of the upper left corner.
    • indeterminate (boolean, default true): calling set-portion-complete converts an indeterminate scope to a determinate one.
    • cannotCancel (boolean, default false): set true to make it un-cancelable.
    • delaySecs (number, default 1): the number of seconds allowed to elapse before an actual scope is displayed.
    • updateSecs updateSecs (number, default 0.25): the number of seconds between actual updates to the display of the scope. This allows thousands or hundreds of thousands of call to setCaption() or setPortionComplete() per second without paying much overhead.

Usage:

    Can be used anywhere a LrProgressScope object can be used, except: 
    supports determinate progress scopes only - i.e. you have to set portion-complete or the actual scope will never by created.
DelayedProgressScope:newClass (t)
Constructor for extending class.

Parameters:

  • t:
DelayedProgressScope:setIndeterminateProgress (yield)
Call to indicate operation is progressing, yet amount til completion unknown.

Parameters:

  • yield: (boolean, default: false) true => yield every update interval.
    Leave false if calling context yields naturally, but yields are necessary for scope to be displayed.

Usage:

  • auto-converts determinate progress scope to indeterminate one.
  • must be called from task or it'll never get displayed. 

Valid XHTML 1.0!