JScript Context

From RealWorld Wiki

Jump to: navigation, search
RealWorld scripting reference

Context is a global object accessible in the JScript document operation.

[edit] Methods and properties

  • string GetState(string stateID) - return the specified state serialized into text or null.
  • void SetState(string stateID, string val) - read a new value of the given state from the string. The state must exist prior to this call in the Context object.
  • bool Canceled (get) - return true if user has cancelled the operation.
  • string ErrorMessage (put) - assign a custom error message to report to the user. Use together with the StopProcessing method.
  • int ItemIndex (get) - index of the processed item if this is a batch operation.
  • int ItemsRemaining (get) - number of remaining items to process if this is a batch operation. The numbe may not be accurate, items may be added to the batch.
  • int StepIndex (get) - index of this step in an operation if it consosts of multiple steps (e.g using the Sequence operation).
  • int StepsRemaining (get) - number of remaining steps in a multi-step operation.
  • void StopProcessing(bool showErrorBox) - aborts the operation in progress.
Personal tools