Annotation of parser3/tests/176.html, revision 1.3
1.1 misha 1: @main[][sDir]
2: $tClass[^table::create{sName
3: a.p
4: b.p
5: c.p
6: d.p
7: }]
8:
1.2 misha 9: $sDir[176_dir]
1.1 misha 10: ^tClass.menu{
11: ^use[$sDir/$tClass.sName]
12: }
13:
14:
15: <table border="1" style="font-size: 80%">
16: <tr>
17: <th rowspan="2"><br /></th>
18: <th colspan="3">var value</th>
19: </tr>
20: <tr>
21: <th>local</th>
22: <th>not local</th>
23: <th>self</th>
24: </tr>
25:
26: ^one[]
27: ^two[]
28: ^print[MAIN vars;$MAIN:CLASS]
29:
30:
31:
32: ^hr[]
33: $oa1[^a::create[]]
34: ^add_methods[$oa1]
35:
36: ^oa1.run[]
1.3 ! misha 37: ^print[first <b>a</b> instance (dynamic, has @OPTIONS in self);$oa1;$.bProcess(true)]
1.1 misha 38:
39:
40: $oa2[^a::create[]]
1.3 ! misha 41: ^print[second <b>a</b> instance without setting vars (dynamic, has @OPTIONS in self);$oa2;$.bProcess(true)]
1.1 misha 42:
1.3 ! misha 43: ^print[<b>a</b> without setting vars (static, has @OPTIONS in self);$a:CLASS]
1.1 misha 44:
45: ^a:run[]
1.3 ! misha 46: ^print[<b>a</b> (static, has @OPTIONS in self);$a:CLASS]
1.1 misha 47:
48:
49: ^hr[]
50: ^b:run[]
1.3 ! misha 51: ^print[<b>b</b> (static, no @OPTIONS in self);$b:CLASS]
1.1 misha 52:
53:
54: $ob[^b::create[]]
55: ^add_methods[$ob]
56:
57: ^ob.run[]
1.3 ! misha 58: ^print[<b>b</b> (dynamic, no @OPTIONS in self);$ob;$.bProcess(true)]
1.1 misha 59:
60:
61:
62: ^hr[]
63: ^c:run[]
1.3 ! misha 64: ^print[<b>c</b> (static, child of 'a', no @OPTIONS in self);$c:CLASS]
1.1 misha 65:
66:
67: $oc[^c::create[]]
68: ^oc.run[]
1.3 ! misha 69: ^print[<b>c</b> (dynamic, child of 'a', no @OPTIONS in self);$oc]
1.1 misha 70:
71:
72:
73: ^hr[]
74: ^d:run[]
1.3 ! misha 75: ^print[<b>d</b> (static, child of 'a', has @OPTIONS in self);$d:CLASS]
1.1 misha 76:
77:
78: $od[^d::create[]]
79: ^od.run[]
1.3 ! misha 80: ^print[<b>d</b> (dynamic, child of 'a', has @OPTIONS in self);$od]
1.1 misha 81:
82:
83: </table>
84:
85:
86:
87:
88:
89: @one[][locals;one_1]
90: $one_1[one_1] ^rem{ local }
91: $one_2[one_2] ^rem{ local because of 'locals' }
92: $self.one_3[one_3] ^rem{ not local }
93:
94:
95:
96: @two[][two_1]
97: $two_1[two_1] ^rem{ local }
98: $two_2[two_2] ^rem{ not local }
99: $self.two_3[two_3] ^rem{ not local }
100:
101:
102:
103: @add_methods[uObject]
104: ^process[$uObject]{@three[][locals^;three_1]
105: ^$three_1[three_1]
106: ^$three_2[three_2]
107: ^$self.three_3[three_3]^#0A@four[][four_1]
108: ^$four_1[four_1]
109: ^$four_2[four_2]
110: ^$self.four_3[four_3]
111: }
112:
113:
114:
115: @hr[sTitle]
116: <tr>
117: <td colspan="4">^if(def $sTitle){$sTitle}{<br />}</td>
118: </tr>
119:
120:
121:
122: @print[sTitle;uObject;hParam]
123: ^hr[$sTitle]
124: ^vars[Method with [^;locals^;];$uObject;one]
125:
126: ^vars[Method without [^;locals^;];$uObject;two]
127:
128: ^if($hParam.bProcess){
129: ^vars[Runtime added method with [^;locals^;];$uObject;three]
130:
131: ^vars[Runtime added method without [^;locals^;];$uObject;four]
132: }
133:
134:
135:
136: @vars[sTitle;uObject;sPrefix]
137: <tr>
138: <td>$sTitle</td>
139: <td>^var[$uObject.[${sPrefix}_1]]</td>
140: <td>^var[$uObject.[${sPrefix}_2]]</td>
141: <td>^var[$uObject.[${sPrefix}_3]]</td>
142: </tr>
143:
144:
145:
146: @var[sValue]
147: ^if(def $sValue){<b>$sValue</b>}{undef}
E-mail: