Tinderbox v10 Icon

update(scope)


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

 As at baseline

 [More on scoped arguments in Action Code]


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 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 FLOOR has been updated "recently", 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().


See also—notes linking to here: