Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> How Best to Reference Code Notes?
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1421207724

Message started by Ted Goranson on Jan 13th, 2015, 10:55pm

Title: How Best to Reference Code Notes?
Post by Ted Goranson on Jan 13th, 2015, 10:55pm

I have two ways of importing code notes and would like to standardize on one method. I have code notes whose rule is $Rule("TargetNote")=$Text;

And I have notes whose rule includes action($Text("CodeNote"));

There must be some subtle benefit to one method over the other.

Title: Re: How Best to Reference Code Notes?
Post by Mark Anderson on Jan 14th, 2015, 3:28am

The first method is good for note-to-one assignments, e.g. complex rule code being set in a prototype. If however, the code note had to be used by 10 notes with no simple association (like using the same prototype) the the first form would need to cite each note - i.e. make 10 discrete assignments. In such a case it may be preferable to use a reverse call, i.e. an action() in each note’s rule.

A side case is the export code ^action()^. This is useful if you want to pull in a section of boilerplate action code into an export template (i.e. run code only during export).

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.