This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

update(group)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 List   [operators of similar scope]

 Data manipulation   [other Data manipulation operators]

 9.1.0

 


update(noteList)

The action update(group) asks Tinderbox to update one or more notes defined in the list group by evaluating both their rule and edict of each listed note. group may be an individual or group designator, or a list of paths. If the note has been evaluated recently, Tinderbox will not evaluate it again.

update() returns a list of updated notes. This allow the user, to check, if necessary, which notes have actually been updated

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.

Note also that we can use update() at the start of an action to be sure we are ready to work, and we can also use update() after an action if we know some other note will want to respond to our new values.

On the whole, update() 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.