1 $group
2 $
3 var sect = {
4 title: 'Ittf documents as code units'
5 };
6 section( §)
7 p Primary and fragment ITTF Documents have their own local (code unit scoped) evaluation context.
8 + An mTree loading also has a global evaluation context that may contain
9 ul
10 li built-in javascript components that JsWizzi can safely access
11 li context objects passed to the wizzi-mtree.loader.loadMTree function
12 li variables declared in ITTF Documents using the
13 high-code $global
14 + command.
15 p Template commands and JsWizzi expressions contained in node names and node values can
16 + access the global context and their code unit context.
17 p There are two ITTF commands that can declare or modify variables in the evaluation contexts.
18 ittf-panel
19 title The '$' command
20 ittf
21 ...
22 ${'$'} jswizzi-statement
23 p The '$' command can be used to declare single line or multi-line jswizzi-statements, that
24 + during the evaluation step, are executed in the scope of the code unit
25 + to which the command belongs.
26 p It can declare and modify variables that have code unit scope, and
27 + only modify variables that have global scope.
28 ittf-panel
29 title Single line format example
30 ittf
31 ...
32 ${'$'} var names = ['stefi', 'annie'];
33 ittf-panel
34 title Multi line format example
35 ittf
36 ${'$'}
37 jswizzi-statement
38 jswizzi-statement
39 ...
40 h4 Example
41 ittf-panel
42 ittf
43 - ...
44 -
45 - var names = ['stefi', 'annie'];
46 - var j = 0;
47 h3 The $global command
48 p Can be used to declare single line or multi-line jswizzi-statements, that
49 + are executed in the global scope.
50 p They can declare and modify variables that have global scope.
51 h4 Single line format
52 ittf-panel
53 title The $global command - single line
54 ittf
55 - ...
56 - $global jswizzi-statement
57 ittf-panel
58 title The $global command - multi-line
59 ittf
60 - $global
61 - jswizzi-statement
62 - jswizzi-statement
63 - ...