Welcome, Guest. Please Login
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
Pages: 1
Send Topic Print
How Best to Reference Code Notes? (Read 1934 times)
Ted Goranson
Full Member

Posts: 141
Virginia Beach VA
How Best to Reference Code Notes?
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.
Back to top
WWW TedGoranson   IP Logged
Mark Anderson
YaBB Administrator

User - not staff!

Posts: 5689
Southsea, UK
Re: How Best to Reference Code Notes?
Reply #1 - 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).
Back to top

Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print