Tinderbox v9 Icon

Storing function code

Important note: all examples follow aTbRef naming conventions.


Functions can be defined in any action code space:

Given their re-useable nature, Library notes are probably the most logical place for storage, but is not a requirement. Regardless of where stored, every function in the current document can be called from any action.

So, for novice users, the last option—a Library note, is the best place to start. Also, new users might choose to add only only function per note until comfortable with the process.

A library note can contain:

In combination, the above two an allow Library notes to act as a way to store and share 'libraries' of code between different Tinderbox documents and/or users.

If storing code such as rules in a Library note, it may be useful to enclose such code in an inert function, thus:

function fDoNotUse(){... code ...} 

i.e. one with no inputs and no return and with a name unlikely to be called in code.


Next: Naming functions