Skip to main content

run_calculations

Function run_calculations 

Source
pub fn run_calculations(tree: &mut FieldTree, handler: &mut dyn JsActionHandler)
Expand description

Run the calculation scripts (/AA /C) of all fields in the calculation order (/CO), storing each result in the field’s value.

The handler does the script work; see [crate::calculate::SandboxedJsHandler] for the sandboxed one. A field without a calculate script is skipped, and so is one whose handler returns None (script error, or the script rejected the value).