Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Operator Uses Scoped Arguments:
Function [other Function type actions]
List [operators of similar scope]
Data manipulation [other Data manipulation operators]
success boolean
v9.1.0
Baseline
10.1.1, 10.2.0
update(scope)
The action update(scope) asks Tinderbox to update one or more notes defined in the list scope by evaluating both their rule and edict of each listed note (defining scope). If the note has been evaluated recently, Tinderbox will not evaluate it again.
For example, suppose there is a note 'INSTALL DISHWASHER', which has a rule saying that the dishwasher cannot start to be installed until the task of note 'FLOOR' is finished.
if($StartDate < $EndDate("FLOOR")) {
$StartDate = $EndDate("FLOOR");
$EndDate = $StartDate+$MyInterval;
}
This rule works best if the 'FLOOR' note is up to date. So, before doing anything else, the 'FLOOR' note is updated:
update("FLOOR");
if($StartDate < $EndDate("FLOOR")) {
$StartDate = $EndDate("FLOOR");
$EndDate - $StartDate + $MyInterval;
}
Note that, if note 'FLOOR' has been updated recently (a duration as decided by the app), it will not be updated again; the prevents Tinderbox from doing lots of unwanted and unnecessary work.
On the whole, update(scope) is envisaged an esoteric command for unusual cases, but may prove popular for some users with demanding applications. For light/occasional use, a need to use update() is likely an indication that some review of current code use is needed.
The non-argument form of update() is documented separately: see update().
From v10.1.1, if update() is called on a note inside /Hints/Library
, any functions in the text of that note will be recompiled and the actions in the text of the note will be performed.
From v10.2.0, when applied to an agent, update() updates the agent as well as performing its rule and edict.
See also—notes linking to here: