wee 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. data/ChangeLog +286 -0
  2. data/Features +185 -0
  3. data/doc/rdoc/classes/ActionView.html +107 -0
  4. data/doc/rdoc/classes/ActionView/Base.html +133 -0
  5. data/doc/rdoc/classes/Array.html +7 -59
  6. data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
  7. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
  8. data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
  9. data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
  10. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
  11. data/doc/rdoc/classes/Enumerable.html +6 -6
  12. data/doc/rdoc/classes/Hash.html +120 -0
  13. data/doc/rdoc/classes/Main.html +58 -34
  14. data/doc/rdoc/classes/Object.html +12 -12
  15. data/doc/rdoc/classes/OgScaffolder.html +165 -166
  16. data/doc/rdoc/classes/OgScaffolder/Editor.html +112 -112
  17. data/doc/rdoc/classes/String.html +7 -59
  18. data/doc/rdoc/classes/Struct.html +14 -14
  19. data/doc/rdoc/classes/Wee.html +70 -6
  20. data/doc/rdoc/classes/Wee/AbstractSession.html +502 -0
  21. data/doc/rdoc/classes/Wee/AnswerDecoration.html +11 -11
  22. data/doc/rdoc/classes/Wee/Application.html +139 -84
  23. data/doc/rdoc/classes/Wee/Brush.html +21 -18
  24. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +90 -17
  25. data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +162 -0
  26. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +7 -7
  27. data/doc/rdoc/classes/Wee/Brush/FormTag.html +41 -17
  28. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
  29. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
  30. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +112 -86
  31. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
  32. data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +160 -0
  33. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +15 -15
  34. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +21 -21
  35. data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
  36. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
  37. data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
  38. data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +234 -0
  39. data/doc/rdoc/classes/Wee/Brush/RadioButtonTag/RadioGroup.html +207 -0
  40. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +124 -28
  41. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +7 -7
  42. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
  43. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +7 -7
  44. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
  45. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
  46. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
  47. data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
  48. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +48 -15
  49. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +7 -7
  50. data/doc/rdoc/classes/Wee/CallbackRegistry.html +38 -38
  51. data/doc/rdoc/classes/Wee/CallbackStream.html +18 -18
  52. data/doc/rdoc/classes/Wee/CanvasMixin.html +225 -0
  53. data/doc/rdoc/classes/Wee/Component.html +202 -201
  54. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +7 -7
  55. data/doc/rdoc/classes/Wee/ComponentDispatcher.html +289 -0
  56. data/doc/rdoc/classes/Wee/ComponentRunner.html +321 -0
  57. data/doc/rdoc/classes/Wee/Context.html +63 -3
  58. data/doc/rdoc/classes/Wee/Decoration.html +45 -45
  59. data/doc/rdoc/classes/Wee/Delegate.html +30 -30
  60. data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +164 -0
  61. data/doc/rdoc/classes/Wee/ErrorResponse.html +16 -16
  62. data/doc/rdoc/classes/Wee/Examples.html +114 -0
  63. data/doc/rdoc/classes/Wee/Examples/Calculator.html +319 -0
  64. data/doc/rdoc/classes/Wee/Examples/Counter.html +289 -0
  65. data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +210 -0
  66. data/doc/rdoc/classes/Wee/Examples/Window.html +346 -0
  67. data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +227 -0
  68. data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
  69. data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
  70. data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +1230 -0
  71. data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
  72. data/doc/rdoc/classes/Wee/IdGenerator.html +148 -0
  73. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +27 -14
  74. data/doc/rdoc/classes/Wee/LoginDecoration.html +261 -0
  75. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +14 -14
  76. data/doc/rdoc/classes/Wee/MessageBox.html +14 -14
  77. data/doc/rdoc/classes/Wee/Nitro.html +114 -0
  78. data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +192 -0
  79. data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +345 -0
  80. data/doc/rdoc/classes/Wee/Nitro/FormTag.html +155 -0
  81. data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +178 -0
  82. data/doc/rdoc/classes/Wee/Page.html +4 -0
  83. data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
  84. data/doc/rdoc/classes/Wee/PagelessApplication.html +13 -11
  85. data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +296 -0
  86. data/doc/rdoc/classes/Wee/PagelessRequest.html +52 -21
  87. data/doc/rdoc/classes/Wee/PagelessSession.html +130 -91
  88. data/doc/rdoc/classes/Wee/Pager.html +534 -0
  89. data/doc/rdoc/classes/Wee/Presenter.html +482 -298
  90. data/doc/rdoc/classes/Wee/Rails.html +114 -0
  91. data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +192 -0
  92. data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +342 -0
  93. data/doc/rdoc/classes/Wee/Rails/FormTag.html +155 -0
  94. data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +177 -0
  95. data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
  96. data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
  97. data/doc/rdoc/classes/Wee/Renderer.html +208 -0
  98. data/doc/rdoc/classes/Wee/RenderingContext.html +175 -3
  99. data/doc/rdoc/classes/Wee/Request.html +197 -46
  100. data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
  101. data/doc/rdoc/classes/Wee/Response.html +44 -43
  102. data/doc/rdoc/classes/Wee/Session.html +296 -402
  103. data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +14 -14
  104. data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
  105. data/doc/rdoc/classes/Wee/Utils.html +22 -22
  106. data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
  107. data/doc/rdoc/classes/Wee/ValueHolder.html +19 -19
  108. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +72 -46
  109. data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
  110. data/doc/rdoc/created.rid +1 -1
  111. data/doc/rdoc/files/INSTALL.html +1 -1
  112. data/doc/rdoc/files/README.html +8 -12
  113. data/doc/rdoc/files/lib/cache/cache_rb.html +1 -1
  114. data/doc/rdoc/files/lib/wee/abstractsession_rb.html +108 -0
  115. data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +108 -0
  116. data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +101 -0
  117. data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +101 -0
  118. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
  119. data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
  120. data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +108 -0
  121. data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +1 -1
  122. data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +101 -0
  123. data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +1 -1
  124. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
  125. data/doc/rdoc/files/lib/wee/components/pager_rb.html +101 -0
  126. data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +1 -1
  127. data/doc/rdoc/files/lib/wee/components_rb.html +4 -1
  128. data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +1 -1
  129. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -1
  130. data/doc/rdoc/files/lib/wee/continuation_rb.html +1 -1
  131. data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
  132. data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
  133. data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +110 -0
  134. data/doc/rdoc/files/lib/wee/core/context_rb.html +101 -0
  135. data/doc/rdoc/files/lib/wee/core/decoration_rb.html +1 -1
  136. data/doc/rdoc/files/lib/wee/core/idgen_rb.html +101 -0
  137. data/doc/rdoc/files/lib/wee/core/page_rb.html +101 -0
  138. data/doc/rdoc/files/lib/wee/core/presenter_rb.html +1 -1
  139. data/doc/rdoc/files/lib/wee/core/renderer_rb.html +107 -0
  140. data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +1 -1
  141. data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +2 -2
  142. data/doc/rdoc/files/lib/wee/core_ext_rb.html +101 -0
  143. data/doc/rdoc/files/lib/wee/core_rb.html +7 -14
  144. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +1 -1
  145. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +1 -1
  146. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +1 -1
  147. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +1 -1
  148. data/doc/rdoc/files/lib/wee/databases/og_rb.html +1 -1
  149. data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +107 -0
  150. data/doc/rdoc/files/lib/wee/examples/counter_rb.html +101 -0
  151. data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +114 -0
  152. data/doc/rdoc/files/lib/wee/examples/window_rb.html +101 -0
  153. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +1 -1
  154. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +1 -1
  155. data/doc/rdoc/files/lib/wee/page_rb.html +1 -1
  156. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +8 -1
  157. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +1 -1
  158. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +2 -1
  159. data/doc/rdoc/files/lib/wee/pageless_rb.html +1 -1
  160. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
  161. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +1 -1
  162. data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +1 -1
  163. data/doc/rdoc/files/lib/wee/request_rb.html +5 -4
  164. data/doc/rdoc/files/lib/wee/requesthandler_rb.html +1 -1
  165. data/doc/rdoc/files/lib/wee/response_rb.html +2 -1
  166. data/doc/rdoc/files/lib/wee/session_rb.html +2 -3
  167. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +1 -1
  168. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +2 -2
  169. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +1 -1
  170. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +1 -1
  171. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +1 -1
  172. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +1 -1
  173. data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +1 -1
  174. data/doc/rdoc/files/lib/wee/template_rb.html +1 -1
  175. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
  176. data/doc/rdoc/files/lib/wee/utils/cache_rb.html +1 -1
  177. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
  178. data/doc/rdoc/files/lib/wee/utils_rb.html +1 -1
  179. data/doc/rdoc/files/lib/wee_rb.html +5 -3
  180. data/doc/rdoc/fr_class_index.html +34 -2
  181. data/doc/rdoc/fr_file_index.html +17 -1
  182. data/doc/rdoc/fr_method_index.html +464 -314
  183. data/examples/ajax/ajax.rb +1 -1
  184. data/examples/demo.rb +47 -0
  185. data/examples/{calendar.rb → demo/calendar.rb} +89 -97
  186. data/examples/{example.rb → demo/example.rb} +17 -97
  187. data/examples/dispatcher.rb +37 -0
  188. data/examples/draw.rb +14 -11
  189. data/examples/nitro/run.rb +42 -0
  190. data/examples/radio.rb +44 -0
  191. data/examples/test.rb +3 -27
  192. data/lib/wee.rb +15 -3
  193. data/lib/wee/adaptors/nitro.rb +154 -0
  194. data/lib/wee/adaptors/rails.rb +154 -0
  195. data/lib/wee/application.rb +22 -20
  196. data/lib/wee/components.rb +3 -0
  197. data/lib/wee/components/component_dispatcher.rb +46 -0
  198. data/lib/wee/components/login_decoration.rb +35 -0
  199. data/lib/wee/components/messagebox.rb +2 -2
  200. data/lib/wee/components/pager.rb +102 -0
  201. data/lib/wee/continuation/core/component.rb +13 -12
  202. data/lib/wee/continuation/session.rb +11 -19
  203. data/lib/wee/core.rb +8 -7
  204. data/lib/wee/core/component.rb +8 -28
  205. data/lib/wee/core/componentrunner.rb +73 -0
  206. data/lib/wee/core/context.rb +27 -0
  207. data/lib/wee/core/idgen.rb +5 -0
  208. data/lib/wee/core/page.rb +1 -0
  209. data/lib/wee/core/presenter.rb +10 -126
  210. data/lib/wee/core/renderer.rb +23 -0
  211. data/lib/wee/core_ext.rb +122 -0
  212. data/lib/wee/databases/og/scaffolder.rb +0 -1
  213. data/lib/wee/examples/calculator.rb +70 -0
  214. data/lib/wee/examples/counter.rb +33 -0
  215. data/lib/wee/examples/editable_counter.rb +31 -0
  216. data/{examples → lib/wee/examples}/window.rb +29 -23
  217. data/lib/wee/idgen/md5.rb +1 -1
  218. data/lib/wee/idgen/simple.rb +1 -1
  219. data/lib/wee/pageless/session.rb +2 -3
  220. data/lib/wee/renderer/html/brushes.rb +142 -22
  221. data/lib/wee/renderer/html/canvas.rb +57 -19
  222. data/lib/wee/response.rb +3 -2
  223. data/lib/wee/session.rb +10 -54
  224. data/lib/wee/skeleton/og/components/main.rb +5 -1
  225. data/lib/wee/skeleton/og/conf/db.rb +1 -1
  226. data/lib/wee/snapshot_ext.rb +4 -10
  227. data/lib/wee/template.rb +19 -5
  228. data/lib/wee/utils/helper.rb +2 -2
  229. metadata +90 -13
  230. data/examples/calculator.rb +0 -67
  231. data/lib/wee/context.rb +0 -2
@@ -87,7 +87,7 @@
87
87
  <div id="description">
88
88
  <p>
89
89
  The base class of all components. You should at least overwrite method <a
90
- href="Component.html#M000254">render</a> in your own subclasses.
90
+ href="Component.html#M000326">render</a> in your own subclasses.
91
91
  </p>
92
92
 
93
93
  </div>
@@ -96,14 +96,14 @@ href="Component.html#M000254">render</a> in your own subclasses.
96
96
  <div id="contents-list">
97
97
  <h3 class="section-bar">Contents</h3>
98
98
  <ul>
99
- <li><a href="#SEC00072">Render</a></li>
100
- <li><a href="#SEC00073">Callback</a></li>
101
- <li><a href="#SEC00074">Init</a></li>
102
- <li><a href="#SEC00075">Children</a></li>
103
- <li><a href="#SEC00076">Decoration</a></li>
104
- <li><a href="#SEC00077">Backtrack</a></li>
105
- <li><a href="#SEC00078">Call/Answer</a></li>
106
- <li><a href="#SEC00121">Call/Answer</a></li>
99
+ <li><a href="#SEC00080">Render</a></li>
100
+ <li><a href="#SEC00081">Callback</a></li>
101
+ <li><a href="#SEC00082">Init</a></li>
102
+ <li><a href="#SEC00083">Children/Composite</a></li>
103
+ <li><a href="#SEC00084">Decoration</a></li>
104
+ <li><a href="#SEC00085">Backtrack</a></li>
105
+ <li><a href="#SEC00086">Call/Answer</a></li>
106
+ <li><a href="#SEC00161">Call/Answer</a></li>
107
107
  </ul>
108
108
  </div>
109
109
 
@@ -111,24 +111,24 @@ href="Component.html#M000254">render</a> in your own subclasses.
111
111
  <h3 class="section-bar">Methods</h3>
112
112
 
113
113
  <div class="name-list">
114
- <a href="#M000259">add_child</a>&nbsp;&nbsp;
115
- <a href="#M000263">add_decoration</a>&nbsp;&nbsp;
116
- <a href="#M000269">answer</a>&nbsp;&nbsp;
117
- <a href="#M000267">backtrack_state</a>&nbsp;&nbsp;
118
- <a href="#M000266">backtrack_state_chain</a>&nbsp;&nbsp;
119
- <a href="#M000268">call</a>&nbsp;&nbsp;
120
- <a href="#M000270">call</a>&nbsp;&nbsp;
121
- <a href="#M000258">children</a>&nbsp;&nbsp;
122
- <a href="#M000260">decoration</a>&nbsp;&nbsp;
123
- <a href="#M000261">decoration=</a>&nbsp;&nbsp;
124
- <a href="#M000253">do_render_chain</a>&nbsp;&nbsp;
125
- <a href="#M000262">each_decoration</a>&nbsp;&nbsp;
126
- <a href="#M000257">initialize</a>&nbsp;&nbsp;
127
- <a href="#M000256">process_callbacks</a>&nbsp;&nbsp;
128
- <a href="#M000255">process_callbacks_chain</a>&nbsp;&nbsp;
129
- <a href="#M000264">remove_decoration</a>&nbsp;&nbsp;
130
- <a href="#M000265">remove_decoration_if</a>&nbsp;&nbsp;
131
- <a href="#M000254">render</a>&nbsp;&nbsp;
114
+ <a href="#M000331">add_child</a>&nbsp;&nbsp;
115
+ <a href="#M000335">add_decoration</a>&nbsp;&nbsp;
116
+ <a href="#M000341">answer</a>&nbsp;&nbsp;
117
+ <a href="#M000339">backtrack_state</a>&nbsp;&nbsp;
118
+ <a href="#M000338">backtrack_state_chain</a>&nbsp;&nbsp;
119
+ <a href="#M000340">call</a>&nbsp;&nbsp;
120
+ <a href="#M000342">call</a>&nbsp;&nbsp;
121
+ <a href="#M000330">children</a>&nbsp;&nbsp;
122
+ <a href="#M000332">decoration</a>&nbsp;&nbsp;
123
+ <a href="#M000333">decoration=</a>&nbsp;&nbsp;
124
+ <a href="#M000325">do_render_chain</a>&nbsp;&nbsp;
125
+ <a href="#M000334">each_decoration</a>&nbsp;&nbsp;
126
+ <a href="#M000329">initialize</a>&nbsp;&nbsp;
127
+ <a href="#M000328">process_callbacks</a>&nbsp;&nbsp;
128
+ <a href="#M000327">process_callbacks_chain</a>&nbsp;&nbsp;
129
+ <a href="#M000336">remove_decoration</a>&nbsp;&nbsp;
130
+ <a href="#M000337">remove_decoration_if</a>&nbsp;&nbsp;
131
+ <a href="#M000326">render</a>&nbsp;&nbsp;
132
132
  </div>
133
133
  </div>
134
134
 
@@ -148,7 +148,7 @@ href="Component.html#M000254">render</a> in your own subclasses.
148
148
 
149
149
  <!-- if method_list -->
150
150
  <div id="section">
151
- <h2 class="section-title"><a name="SEC00072">Render</a></h2>
151
+ <h2 class="section-title"><a name="SEC00080">Render</a></h2>
152
152
  <div class="section-comment">
153
153
 
154
154
  </div>
@@ -164,11 +164,11 @@ href="Component.html#M000254">render</a> in your own subclasses.
164
164
  <div id="methods">
165
165
  <h3 class="section-bar">Public Instance methods</h3>
166
166
 
167
- <div id="method-M000253" class="method-detail">
168
- <a name="M000253"></a>
167
+ <div id="method-M000325" class="method-detail">
168
+ <a name="M000325"></a>
169
169
 
170
170
  <div class="method-heading">
171
- <a href="#M000253" class="method-signature">
171
+ <a href="#M000325" class="method-signature">
172
172
  <span class="method-name">do_render_chain</span><span class="method-args">(rendering_context)</span>
173
173
  </a>
174
174
  </div>
@@ -176,7 +176,7 @@ href="Component.html#M000254">render</a> in your own subclasses.
176
176
  <div class="method-description">
177
177
  <p>
178
178
  Starts rendering the decoration chain by calling method <a
179
- href="Presenter.html#M000288">Presenter#do_render</a> for the first
179
+ href="Presenter.html#M000375">Presenter#do_render</a> for the first
180
180
  decoration of the component, or calling <em>do_render</em> for the
181
181
  component itself if no decorations were specified.
182
182
  </p>
@@ -186,8 +186,8 @@ component itself if no decorations were specified.
186
186
  </dd>
187
187
  </dl>
188
188
  <p><a class="source-toggle" href="#"
189
- onclick="toggleCode('M000253-source');return false;">[Source]</a></p>
190
- <div class="method-source-code" id="M000253-source">
189
+ onclick="toggleCode('M000325-source');return false;">[Source]</a></p>
190
+ <div class="method-source-code" id="M000325-source">
191
191
  <pre>
192
192
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 19</span>
193
193
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_render_chain</span>(<span class="ruby-identifier">rendering_context</span>)
@@ -198,11 +198,11 @@ component itself if no decorations were specified.
198
198
  </div>
199
199
  </div>
200
200
 
201
- <div id="method-M000254" class="method-detail">
202
- <a name="M000254"></a>
201
+ <div id="method-M000326" class="method-detail">
202
+ <a name="M000326"></a>
203
203
 
204
204
  <div class="method-heading">
205
- <a href="#M000254" class="method-signature">
205
+ <a href="#M000326" class="method-signature">
206
206
  <span class="method-name">render</span><span class="method-args">()</span>
207
207
  </a>
208
208
  </div>
@@ -219,8 +219,8 @@ view. By default this method does nothing!
219
219
  Use the current renderer as returned by renderer or it&#8217;s short-cut r.
220
220
  </p>
221
221
  <p><a class="source-toggle" href="#"
222
- onclick="toggleCode('M000254-source');return false;">[Source]</a></p>
223
- <div class="method-source-code" id="M000254-source">
222
+ onclick="toggleCode('M000326-source');return false;">[Source]</a></p>
223
+ <div class="method-source-code" id="M000326-source">
224
224
  <pre>
225
225
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 30</span>
226
226
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
@@ -233,7 +233,7 @@ Use the current renderer as returned by renderer or it&#8217;s short-cut r.
233
233
 
234
234
  </div>
235
235
  <div id="section">
236
- <h2 class="section-title"><a name="SEC00073">Callback</a></h2>
236
+ <h2 class="section-title"><a name="SEC00081">Callback</a></h2>
237
237
  <div class="section-comment">
238
238
 
239
239
  </div>
@@ -249,12 +249,12 @@ Use the current renderer as returned by renderer or it&#8217;s short-cut r.
249
249
  <div id="methods">
250
250
  <h3 class="section-bar">Public Instance methods</h3>
251
251
 
252
- <div id="method-M000256" class="method-detail">
253
- <a name="M000256"></a>
252
+ <div id="method-M000328" class="method-detail">
253
+ <a name="M000328"></a>
254
254
 
255
255
  <div class="method-heading">
256
- <a href="#M000256" class="method-signature">
257
- <span class="method-name">process_callbacks</span><span class="method-args">(callback_stream)</span>
256
+ <a href="#M000328" class="method-signature">
257
+ <span class="method-name">process_callbacks</span><span class="method-args">(&amp;block)</span>
258
258
  </a>
259
259
  </div>
260
260
 
@@ -263,26 +263,23 @@ Use the current renderer as returned by renderer or it&#8217;s short-cut r.
263
263
  Process and invoke all callbacks specified for this component and all of
264
264
  it&#8217;s child components.
265
265
  </p>
266
- <p>
267
- All input callbacks of this component and it&#8217;s child components are
268
- processed/invoked before any of the action callbacks are processed/invoked.
269
- </p>
270
266
  <dl>
271
- <dt><tt>callback_stream</tt></dt><dd>An object of class <a href="CallbackStream.html">CallbackStream</a>
267
+ <dt><tt>block</tt></dt><dd>Specifies the action to be taken (e.g. whether to invoke input or action
268
+ callbacks).
272
269
 
273
270
  </dd>
274
271
  </dl>
275
272
  <p><a class="source-toggle" href="#"
276
- onclick="toggleCode('M000256-source');return false;">[Source]</a></p>
277
- <div class="method-source-code" id="M000256-source">
273
+ onclick="toggleCode('M000328-source');return false;">[Source]</a></p>
274
+ <div class="method-source-code" id="M000328-source">
278
275
  <pre>
279
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 59</span>
280
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
281
- <span class="ruby-keyword kw">super</span> <span class="ruby-keyword kw">do</span>
282
- <span class="ruby-comment cmt"># process callbacks of all children</span>
283
- <span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">child</span><span class="ruby-operator">|</span>
284
- <span class="ruby-identifier">child</span>.<span class="ruby-identifier">process_callbacks_chain</span>(<span class="ruby-identifier">callback_stream</span>)
285
- <span class="ruby-keyword kw">end</span>
276
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 58</span>
277
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
278
+ <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-keyword kw">self</span>)
279
+
280
+ <span class="ruby-comment cmt"># process callbacks of all children</span>
281
+ <span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">child</span><span class="ruby-operator">|</span>
282
+ <span class="ruby-identifier">child</span>.<span class="ruby-identifier">process_callbacks_chain</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
286
283
  <span class="ruby-keyword kw">end</span>
287
284
  <span class="ruby-keyword kw">end</span>
288
285
  </pre>
@@ -290,33 +287,34 @@ processed/invoked before any of the action callbacks are processed/invoked.
290
287
  </div>
291
288
  </div>
292
289
 
293
- <div id="method-M000255" class="method-detail">
294
- <a name="M000255"></a>
290
+ <div id="method-M000327" class="method-detail">
291
+ <a name="M000327"></a>
295
292
 
296
293
  <div class="method-heading">
297
- <a href="#M000255" class="method-signature">
298
- <span class="method-name">process_callbacks_chain</span><span class="method-args">(callback_stream)</span>
294
+ <a href="#M000327" class="method-signature">
295
+ <span class="method-name">process_callbacks_chain</span><span class="method-args">(&amp;block)</span>
299
296
  </a>
300
297
  </div>
301
298
 
302
299
  <div class="method-description">
303
300
  <p>
304
301
  Starts processing the callbacks for the decoration chain by invoking method
305
- <a href="Component.html#M000256">process_callbacks</a> of the first
302
+ <a href="Component.html#M000328">process_callbacks</a> of the first
306
303
  decoration or the component itself if no decorations were specified.
307
304
  </p>
308
305
  <dl>
309
- <dt><tt>callback_stream</tt></dt><dd>An object of class <a href="CallbackStream.html">CallbackStream</a>
306
+ <dt><tt>block</tt></dt><dd>Specifies the action to be taken (e.g. whether to invoke input or action
307
+ callbacks).
310
308
 
311
309
  </dd>
312
310
  </dl>
313
311
  <p><a class="source-toggle" href="#"
314
- onclick="toggleCode('M000255-source');return false;">[Source]</a></p>
315
- <div class="method-source-code" id="M000255-source">
312
+ onclick="toggleCode('M000327-source');return false;">[Source]</a></p>
313
+ <div class="method-source-code" id="M000327-source">
316
314
  <pre>
317
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 46</span>
318
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks_chain</span>(<span class="ruby-identifier">callback_stream</span>)
319
- <span class="ruby-identifier">decoration</span>.<span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
315
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 47</span>
316
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks_chain</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
317
+ <span class="ruby-identifier">decoration</span>.<span class="ruby-identifier">process_callbacks</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
320
318
  <span class="ruby-keyword kw">end</span>
321
319
  </pre>
322
320
  </div>
@@ -326,7 +324,7 @@ decoration or the component itself if no decorations were specified.
326
324
 
327
325
  </div>
328
326
  <div id="section">
329
- <h2 class="section-title"><a name="SEC00074">Init</a></h2>
327
+ <h2 class="section-title"><a name="SEC00082">Init</a></h2>
330
328
  <div class="section-comment">
331
329
 
332
330
  </div>
@@ -342,11 +340,11 @@ decoration or the component itself if no decorations were specified.
342
340
  <div id="methods">
343
341
  <h3 class="section-bar">Protected Instance methods</h3>
344
342
 
345
- <div id="method-M000257" class="method-detail">
346
- <a name="M000257"></a>
343
+ <div id="method-M000329" class="method-detail">
344
+ <a name="M000329"></a>
347
345
 
348
346
  <div class="method-heading">
349
- <a href="#M000257" class="method-signature">
347
+ <a href="#M000329" class="method-signature">
350
348
  <span class="method-name">initialize</span><span class="method-args">()</span>
351
349
  </a>
352
350
  </div>
@@ -360,13 +358,13 @@ Call this method from your own components&#8217; <em>initialize</em> method
360
358
  using <tt>super</tt>, before setting up anything else!
361
359
  </p>
362
360
  <p><a class="source-toggle" href="#"
363
- onclick="toggleCode('M000257-source');return false;">[Source]</a></p>
364
- <div class="method-source-code" id="M000257-source">
361
+ onclick="toggleCode('M000329-source');return false;">[Source]</a></p>
362
+ <div class="method-source-code" id="M000329-source">
365
363
  <pre>
366
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 79</span>
364
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 78</span>
367
365
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>() <span class="ruby-comment cmt"># :notnew:</span>
368
- <span class="ruby-ivar">@decoration</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">ValueHolder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
369
- <span class="ruby-ivar">@children</span> = []
366
+ <span class="ruby-ivar">@__decoration</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">ValueHolder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
367
+ <span class="ruby-ivar">@__children</span> = []
370
368
  <span class="ruby-keyword kw">end</span>
371
369
  </pre>
372
370
  </div>
@@ -376,7 +374,7 @@ using <tt>super</tt>, before setting up anything else!
376
374
 
377
375
  </div>
378
376
  <div id="section">
379
- <h2 class="section-title"><a name="SEC00075">Children</a></h2>
377
+ <h2 class="section-title"><a name="SEC00083">Children/Composite</a></h2>
380
378
  <div class="section-comment">
381
379
 
382
380
  </div>
@@ -392,11 +390,11 @@ using <tt>super</tt>, before setting up anything else!
392
390
  <div id="methods">
393
391
  <h3 class="section-bar">Protected Instance methods</h3>
394
392
 
395
- <div id="method-M000259" class="method-detail">
396
- <a name="M000259"></a>
393
+ <div id="method-M000331" class="method-detail">
394
+ <a name="M000331"></a>
397
395
 
398
396
  <div class="method-heading">
399
- <a href="#M000259" class="method-signature">
397
+ <a href="#M000331" class="method-signature">
400
398
  <span class="method-name">add_child</span><span class="method-args">(child)</span>
401
399
  </a>
402
400
  </div>
@@ -425,10 +423,10 @@ course only if you want backtracking at all):
425
423
  end
426
424
  </pre>
427
425
  <p><a class="source-toggle" href="#"
428
- onclick="toggleCode('M000259-source');return false;">[Source]</a></p>
429
- <div class="method-source-code" id="M000259-source">
426
+ onclick="toggleCode('M000331-source');return false;">[Source]</a></p>
427
+ <div class="method-source-code" id="M000331-source">
430
428
  <pre>
431
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 115</span>
429
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 117</span>
432
430
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_child</span>(<span class="ruby-identifier">child</span>)
433
431
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">children</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">child</span>
434
432
  <span class="ruby-identifier">child</span>
@@ -438,11 +436,11 @@ course only if you want backtracking at all):
438
436
  </div>
439
437
  </div>
440
438
 
441
- <div id="method-M000258" class="method-detail">
442
- <a name="M000258"></a>
439
+ <div id="method-M000330" class="method-detail">
440
+ <a name="M000330"></a>
443
441
 
444
442
  <div class="method-heading">
445
- <a href="#M000258" class="method-signature">
443
+ <a href="#M000330" class="method-signature">
446
444
  <span class="method-name">children</span><span class="method-args">()</span>
447
445
  </a>
448
446
  </div>
@@ -450,14 +448,18 @@ course only if you want backtracking at all):
450
448
  <div class="method-description">
451
449
  <p>
452
450
  Returns all direct child components collected in an array.
451
+ </p>
452
+ <p>
453
+ You can overwrite this method to return all direct child components of this
454
+ component.
453
455
  </p>
454
456
  <p><a class="source-toggle" href="#"
455
- onclick="toggleCode('M000258-source');return false;">[Source]</a></p>
456
- <div class="method-source-code" id="M000258-source">
457
+ onclick="toggleCode('M000330-source');return false;">[Source]</a></p>
458
+ <div class="method-source-code" id="M000330-source">
457
459
  <pre>
458
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 92</span>
460
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 94</span>
459
461
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">children</span>
460
- <span class="ruby-ivar">@children</span>
462
+ <span class="ruby-ivar">@__children</span>
461
463
  <span class="ruby-keyword kw">end</span>
462
464
  </pre>
463
465
  </div>
@@ -467,7 +469,7 @@ Returns all direct child components collected in an array.
467
469
 
468
470
  </div>
469
471
  <div id="section">
470
- <h2 class="section-title"><a name="SEC00076">Decoration</a></h2>
472
+ <h2 class="section-title"><a name="SEC00084">Decoration</a></h2>
471
473
  <div class="section-comment">
472
474
 
473
475
  </div>
@@ -483,11 +485,11 @@ Returns all direct child components collected in an array.
483
485
  <div id="methods">
484
486
  <h3 class="section-bar">Public Instance methods</h3>
485
487
 
486
- <div id="method-M000263" class="method-detail">
487
- <a name="M000263"></a>
488
+ <div id="method-M000335" class="method-detail">
489
+ <a name="M000335"></a>
488
490
 
489
491
  <div class="method-heading">
490
- <a href="#M000263" class="method-signature">
492
+ <a href="#M000335" class="method-signature">
491
493
  <span class="method-name">add_decoration</span><span class="method-args">(d)</span>
492
494
  </a>
493
495
  </div>
@@ -505,10 +507,10 @@ global decorations.
505
507
  Returns: <tt>self</tt>
506
508
  </p>
507
509
  <p><a class="source-toggle" href="#"
508
- onclick="toggleCode('M000263-source');return false;">[Source]</a></p>
509
- <div class="method-source-code" id="M000263-source">
510
+ onclick="toggleCode('M000335-source');return false;">[Source]</a></p>
511
+ <div class="method-source-code" id="M000335-source">
510
512
  <pre>
511
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 158</span>
513
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 160</span>
512
514
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_decoration</span>(<span class="ruby-identifier">d</span>)
513
515
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">global?</span>
514
516
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">owner</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decoration</span>
@@ -540,11 +542,11 @@ Returns: <tt>self</tt>
540
542
  </div>
541
543
  </div>
542
544
 
543
- <div id="method-M000260" class="method-detail">
544
- <a name="M000260"></a>
545
+ <div id="method-M000332" class="method-detail">
546
+ <a name="M000332"></a>
545
547
 
546
548
  <div class="method-heading">
547
- <a href="#M000260" class="method-signature">
549
+ <a href="#M000332" class="method-signature">
548
550
  <span class="method-name">decoration</span><span class="method-args">()</span>
549
551
  </a>
550
552
  </div>
@@ -555,23 +557,23 @@ Returns the first decoration from the component&#8217;s decoration chain,
555
557
  or <tt>self</tt> if no decorations were specified for the component.
556
558
  </p>
557
559
  <p><a class="source-toggle" href="#"
558
- onclick="toggleCode('M000260-source');return false;">[Source]</a></p>
559
- <div class="method-source-code" id="M000260-source">
560
+ onclick="toggleCode('M000332-source');return false;">[Source]</a></p>
561
+ <div class="method-source-code" id="M000332-source">
560
562
  <pre>
561
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 129</span>
563
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 131</span>
562
564
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decoration</span>
563
- <span class="ruby-ivar">@decoration</span>.<span class="ruby-identifier">value</span>
565
+ <span class="ruby-ivar">@__decoration</span>.<span class="ruby-identifier">value</span>
564
566
  <span class="ruby-keyword kw">end</span>
565
567
  </pre>
566
568
  </div>
567
569
  </div>
568
570
  </div>
569
571
 
570
- <div id="method-M000261" class="method-detail">
571
- <a name="M000261"></a>
572
+ <div id="method-M000333" class="method-detail">
573
+ <a name="M000333"></a>
572
574
 
573
575
  <div class="method-heading">
574
- <a href="#M000261" class="method-signature">
576
+ <a href="#M000333" class="method-signature">
575
577
  <span class="method-name">decoration=</span><span class="method-args">(d)</span>
576
578
  </a>
577
579
  </div>
@@ -581,23 +583,23 @@ or <tt>self</tt> if no decorations were specified for the component.
581
583
  Set the pointer to the first decoration to <tt>d</tt>.
582
584
  </p>
583
585
  <p><a class="source-toggle" href="#"
584
- onclick="toggleCode('M000261-source');return false;">[Source]</a></p>
585
- <div class="method-source-code" id="M000261-source">
586
+ onclick="toggleCode('M000333-source');return false;">[Source]</a></p>
587
+ <div class="method-source-code" id="M000333-source">
586
588
  <pre>
587
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 135</span>
589
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 137</span>
588
590
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decoration=</span>(<span class="ruby-identifier">d</span>)
589
- <span class="ruby-ivar">@decoration</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">d</span>
591
+ <span class="ruby-ivar">@__decoration</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">d</span>
590
592
  <span class="ruby-keyword kw">end</span>
591
593
  </pre>
592
594
  </div>
593
595
  </div>
594
596
  </div>
595
597
 
596
- <div id="method-M000262" class="method-detail">
597
- <a name="M000262"></a>
598
+ <div id="method-M000334" class="method-detail">
599
+ <a name="M000334"></a>
598
600
 
599
601
  <div class="method-heading">
600
- <a href="#M000262" class="method-signature">
602
+ <a href="#M000334" class="method-signature">
601
603
  <span class="method-name">each_decoration</span><span class="method-args">( {|decoration| ...}</span>
602
604
  </a>
603
605
  </div>
@@ -607,10 +609,10 @@ Set the pointer to the first decoration to <tt>d</tt>.
607
609
  Iterates over all decorations (note that the component itself is excluded).
608
610
  </p>
609
611
  <p><a class="source-toggle" href="#"
610
- onclick="toggleCode('M000262-source');return false;">[Source]</a></p>
611
- <div class="method-source-code" id="M000262-source">
612
+ onclick="toggleCode('M000334-source');return false;">[Source]</a></p>
613
+ <div class="method-source-code" id="M000334-source">
612
614
  <pre>
613
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 141</span>
615
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 143</span>
614
616
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_decoration</span> <span class="ruby-comment cmt"># :yields: decoration</span>
615
617
  <span class="ruby-identifier">d</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decoration</span>
616
618
  <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
@@ -624,11 +626,11 @@ Iterates over all decorations (note that the component itself is excluded).
624
626
  </div>
625
627
  </div>
626
628
 
627
- <div id="method-M000264" class="method-detail">
628
- <a name="M000264"></a>
629
+ <div id="method-M000336" class="method-detail">
630
+ <a name="M000336"></a>
629
631
 
630
632
  <div class="method-heading">
631
- <a href="#M000264" class="method-signature">
633
+ <a href="#M000336" class="method-signature">
632
634
  <span class="method-name">remove_decoration</span><span class="method-args">(d)</span>
633
635
  </a>
634
636
  </div>
@@ -642,10 +644,10 @@ Returns the removed decoration or <tt>nil</tt> if it did not exist in the
642
644
  decoration chain.
643
645
  </p>
644
646
  <p><a class="source-toggle" href="#"
645
- onclick="toggleCode('M000264-source');return false;">[Source]</a></p>
646
- <div class="method-source-code" id="M000264-source">
647
+ onclick="toggleCode('M000336-source');return false;">[Source]</a></p>
648
+ <div class="method-source-code" id="M000336-source">
647
649
  <pre>
648
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 190</span>
650
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 192</span>
649
651
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_decoration</span>(<span class="ruby-identifier">d</span>)
650
652
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decoration</span> <span class="ruby-comment cmt"># 'd' is in front</span>
651
653
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decoration</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">owner</span>
@@ -668,11 +670,11 @@ decoration chain.
668
670
  </div>
669
671
  </div>
670
672
 
671
- <div id="method-M000265" class="method-detail">
672
- <a name="M000265"></a>
673
+ <div id="method-M000337" class="method-detail">
674
+ <a name="M000337"></a>
673
675
 
674
676
  <div class="method-heading">
675
- <a href="#M000265" class="method-signature">
677
+ <a href="#M000337" class="method-signature">
676
678
  <span class="method-name">remove_decoration_if</span><span class="method-args">( {|decoration| ...}</span>
677
679
  </a>
678
680
  </div>
@@ -688,10 +690,10 @@ Example (removes all decorations of class <tt>HaloDecoration</tt>):
688
690
  remove_decoration_if {|d| d.class == HaloDecoration}
689
691
  </pre>
690
692
  <p><a class="source-toggle" href="#"
691
- onclick="toggleCode('M000265-source');return false;">[Source]</a></p>
692
- <div class="method-source-code" id="M000265-source">
693
+ onclick="toggleCode('M000337-source');return false;">[Source]</a></p>
694
+ <div class="method-source-code" id="M000337-source">
693
695
  <pre>
694
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 215</span>
696
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 217</span>
695
697
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_decoration_if</span> <span class="ruby-comment cmt"># :yields: decoration</span>
696
698
  <span class="ruby-identifier">to_remove</span> = []
697
699
  <span class="ruby-identifier">each_decoration</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">to_remove</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">d</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">d</span>}
@@ -705,7 +707,7 @@ Example (removes all decorations of class <tt>HaloDecoration</tt>):
705
707
 
706
708
  </div>
707
709
  <div id="section">
708
- <h2 class="section-title"><a name="SEC00077">Backtrack</a></h2>
710
+ <h2 class="section-title"><a name="SEC00085">Backtrack</a></h2>
709
711
  <div class="section-comment">
710
712
 
711
713
  </div>
@@ -721,11 +723,11 @@ Example (removes all decorations of class <tt>HaloDecoration</tt>):
721
723
  <div id="methods">
722
724
  <h3 class="section-bar">Public Instance methods</h3>
723
725
 
724
- <div id="method-M000267" class="method-detail">
725
- <a name="M000267"></a>
726
+ <div id="method-M000339" class="method-detail">
727
+ <a name="M000339"></a>
726
728
 
727
729
  <div class="method-heading">
728
- <a href="#M000267" class="method-signature">
730
+ <a href="#M000339" class="method-signature">
729
731
  <span class="method-name">backtrack_state</span><span class="method-args">(snapshot)</span>
730
732
  </a>
731
733
  </div>
@@ -745,14 +747,14 @@ objects to take the snapshot (they behave like <em>marshal_dump</em> and
745
747
  behaviour.
746
748
  </p>
747
749
  <p>
748
- By default only <tt>@decoration</tt> is backtracked (which actually is a <a
749
- href="ValueHolder.html">ValueHolder</a>, as only the pointer changes not
750
+ By default only <tt>@__decoration</tt> is backtracked (which actually is a
751
+ <a href="ValueHolder.html">ValueHolder</a>, as only the pointer changes not
750
752
  the decoration-object itself!).
751
753
  </p>
752
754
  <p>
753
755
  For example if you dynamically add children to your component, you might
754
756
  want to backtrack the children array. Therefore you simply pass it to the
755
- <a href="Snapshot.html#M000142">Snapshot#add</a> method:
757
+ <a href="Snapshot.html#M000259">Snapshot#add</a> method:
756
758
  </p>
757
759
  <pre>
758
760
  def backtrack_state(snapshot)
@@ -761,12 +763,10 @@ want to backtrack the children array. Therefore you simply pass it to the
761
763
  end
762
764
  </pre>
763
765
  <p>
764
- This will call <a href="../Array.html#M000010">Array#take_snapshot</a> to
765
- take the snapshot for the children array. If at a later point in time a
766
- snapshot is restored, <a
767
- href="../Array.html#M000011">Array#restore_snapshot</a> will be called with
768
- the return value of <a href="../Array.html#M000010">Array#take_snapshot</a>
769
- as argument.
766
+ This will call Array#take_snapshot to take the snapshot for the children
767
+ array. If at a later point in time a snapshot is restored,
768
+ Array#restore_snapshot will be called with the return value of
769
+ Array#take_snapshot as argument.
770
770
  </p>
771
771
  <dl>
772
772
  <dt><tt>snapshot</tt></dt><dd>An object of class <a href="Snapshot.html">Snapshot</a>
@@ -774,12 +774,12 @@ as argument.
774
774
  </dd>
775
775
  </dl>
776
776
  <p><a class="source-toggle" href="#"
777
- onclick="toggleCode('M000267-source');return false;">[Source]</a></p>
778
- <div class="method-source-code" id="M000267-source">
777
+ onclick="toggleCode('M000339-source');return false;">[Source]</a></p>
778
+ <div class="method-source-code" id="M000339-source">
779
779
  <pre>
780
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 272</span>
780
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 274</span>
781
781
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrack_state</span>(<span class="ruby-identifier">snapshot</span>)
782
- <span class="ruby-identifier">snapshot</span>.<span class="ruby-identifier">add</span>(<span class="ruby-ivar">@decoration</span>)
782
+ <span class="ruby-identifier">snapshot</span>.<span class="ruby-identifier">add</span>(<span class="ruby-ivar">@__decoration</span>)
783
783
  <span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">child</span><span class="ruby-operator">|</span> <span class="ruby-identifier">child</span>.<span class="ruby-identifier">backtrack_state_chain</span>(<span class="ruby-identifier">snapshot</span>) <span class="ruby-keyword kw">end</span>
784
784
  <span class="ruby-keyword kw">end</span>
785
785
  </pre>
@@ -787,11 +787,11 @@ as argument.
787
787
  </div>
788
788
  </div>
789
789
 
790
- <div id="method-M000266" class="method-detail">
791
- <a name="M000266"></a>
790
+ <div id="method-M000338" class="method-detail">
791
+ <a name="M000338"></a>
792
792
 
793
793
  <div class="method-heading">
794
- <a href="#M000266" class="method-signature">
794
+ <a href="#M000338" class="method-signature">
795
795
  <span class="method-name">backtrack_state_chain</span><span class="method-args">(snapshot)</span>
796
796
  </a>
797
797
  </div>
@@ -799,11 +799,11 @@ as argument.
799
799
  <div class="method-description">
800
800
  <p>
801
801
  Starts the backtrack-state phase for the decoration chain, by invoking
802
- method <a href="Component.html#M000267">backtrack_state</a> of the first
802
+ method <a href="Component.html#M000339">backtrack_state</a> of the first
803
803
  decoration or the component itself if no decorations were specified.
804
804
  </p>
805
805
  <p>
806
- See <a href="Component.html#M000267">backtrack_state</a> for details.
806
+ See <a href="Component.html#M000339">backtrack_state</a> for details.
807
807
  </p>
808
808
  <dl>
809
809
  <dt><tt>snapshot</tt></dt><dd>An object of class <a href="Snapshot.html">Snapshot</a>
@@ -811,10 +811,10 @@ See <a href="Component.html#M000267">backtrack_state</a> for details.
811
811
  </dd>
812
812
  </dl>
813
813
  <p><a class="source-toggle" href="#"
814
- onclick="toggleCode('M000266-source');return false;">[Source]</a></p>
815
- <div class="method-source-code" id="M000266-source">
814
+ onclick="toggleCode('M000338-source');return false;">[Source]</a></p>
815
+ <div class="method-source-code" id="M000338-source">
816
816
  <pre>
817
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 236</span>
817
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 238</span>
818
818
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrack_state_chain</span>(<span class="ruby-identifier">snapshot</span>)
819
819
  <span class="ruby-identifier">decoration</span>.<span class="ruby-identifier">backtrack_state</span>(<span class="ruby-identifier">snapshot</span>)
820
820
  <span class="ruby-keyword kw">end</span>
@@ -826,7 +826,7 @@ See <a href="Component.html#M000267">backtrack_state</a> for details.
826
826
 
827
827
  </div>
828
828
  <div id="section">
829
- <h2 class="section-title"><a name="SEC00078">Call/Answer</a></h2>
829
+ <h2 class="section-title"><a name="SEC00086">Call/Answer</a></h2>
830
830
  <div class="section-comment">
831
831
 
832
832
  </div>
@@ -848,11 +848,11 @@ See <a href="Component.html#M000267">backtrack_state</a> for details.
848
848
  <div id="methods">
849
849
  <h3 class="section-bar">Protected Instance methods</h3>
850
850
 
851
- <div id="method-M000269" class="method-detail">
852
- <a name="M000269"></a>
851
+ <div id="method-M000341" class="method-detail">
852
+ <a name="M000341"></a>
853
853
 
854
854
  <div class="method-heading">
855
- <a href="#M000269" class="method-signature">
855
+ <a href="#M000341" class="method-signature">
856
856
  <span class="method-name">answer</span><span class="method-args">(*args)</span>
857
857
  </a>
858
858
  </div>
@@ -862,17 +862,17 @@ See <a href="Component.html#M000267">backtrack_state</a> for details.
862
862
  Return from a called component.
863
863
  </p>
864
864
  <p>
865
- NOTE that <a href="Component.html#M000269">answer</a> never returns.
865
+ NOTE that <a href="Component.html#M000341">answer</a> never returns.
866
866
  </p>
867
867
  <p>
868
- See <a href="Component.html#M000268">call</a> for a detailed description of
868
+ See <a href="Component.html#M000340">call</a> for a detailed description of
869
869
  the call/answer mechanism.
870
870
  </p>
871
871
  <p><a class="source-toggle" href="#"
872
- onclick="toggleCode('M000269-source');return false;">[Source]</a></p>
873
- <div class="method-source-code" id="M000269-source">
872
+ onclick="toggleCode('M000341-source');return false;">[Source]</a></p>
873
+ <div class="method-source-code" id="M000341-source">
874
874
  <pre>
875
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 350</span>
875
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 352</span>
876
876
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">answer</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
877
877
  <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_answer</span>, <span class="ruby-identifier">args</span>
878
878
  <span class="ruby-keyword kw">end</span>
@@ -881,11 +881,11 @@ the call/answer mechanism.
881
881
  </div>
882
882
  </div>
883
883
 
884
- <div id="method-M000268" class="method-detail">
885
- <a name="M000268"></a>
884
+ <div id="method-M000340" class="method-detail">
885
+ <a name="M000340"></a>
886
886
 
887
887
  <div class="method-heading">
888
- <a href="#M000268" class="method-signature">
888
+ <a href="#M000340" class="method-signature">
889
889
  <span class="method-name">call</span><span class="method-args">(component, return_callback=nil, *args)</span>
890
890
  </a>
891
891
  </div>
@@ -894,14 +894,14 @@ the call/answer mechanism.
894
894
  <p>
895
895
  Call another component. The calling component is neither rendered nor are
896
896
  it&#8217;s callbacks processed until the called component answers using
897
- method <a href="Component.html#M000269">answer</a>.
897
+ method <a href="Component.html#M000341">answer</a>.
898
898
  </p>
899
899
  <dl>
900
900
  <dt><tt>component</tt></dt><dd>The component to be called.
901
901
 
902
902
  </dd>
903
903
  <dt><tt>return_callback</tt></dt><dd>Is invoked when the called component answers. Either a symbol or any object
904
- that responds to <a href="Component.html#M000268">call</a>. If it&#8217;s a
904
+ that responds to <a href="Component.html#M000340">call</a>. If it&#8217;s a
905
905
  symbol, then the corresponding method of the current component will be
906
906
  called.
907
907
 
@@ -927,32 +927,33 @@ component (self), which delegates to the component to be called
927
927
  </p>
928
928
  <p>
929
929
  Then we unwind the calling stack back to the <a
930
- href="Session.html">Session</a> by throwing <em>:wee_back_to_session</em>.
931
- This means, that there is only ever one action callback invoked per
932
- request. This is not neccessary, we could simply omit this, but then
933
- we&#8217;d break compatibility with the implementation using continuations.
930
+ href="Session.html">Session</a> by throwing
931
+ <em>:wee_abort_callback_processing</em>. This means, that there is only
932
+ ever one action callback invoked per request. This is not neccessary, we
933
+ could simply omit this, but then we&#8217;d break compatibility with the
934
+ implementation using continuations.
934
935
  </p>
935
936
  <p>
936
937
  When at a later point in time the called component invokes <a
937
- href="Component.html#M000269">answer</a>, this will throw a
938
+ href="Component.html#M000341">answer</a>, this will throw a
938
939
  <em>:wee_answer</em> exception which is catched in the <a
939
940
  href="AnswerDecoration.html">AnswerDecoration</a>. The <a
940
941
  href="AnswerDecoration.html">AnswerDecoration</a> then invokes the
941
942
  <tt>on_answer</tt> callback which cleans up the decorations we added during
942
- <a href="Component.html#M000268">call</a>, and finally passes control to
943
+ <a href="Component.html#M000340">call</a>, and finally passes control to
943
944
  the <tt>return_callback</tt>.
944
945
  </p>
945
946
  <p><a class="source-toggle" href="#"
946
- onclick="toggleCode('M000268-source');return false;">[Source]</a></p>
947
- <div class="method-source-code" id="M000268-source">
947
+ onclick="toggleCode('M000340-source');return false;">[Source]</a></p>
948
+ <div class="method-source-code" id="M000340-source">
948
949
  <pre>
949
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 321</span>
950
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 323</span>
950
951
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">component</span>, <span class="ruby-identifier">return_callback</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
951
952
  <span class="ruby-identifier">add_decoration</span>(<span class="ruby-identifier">delegate</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Delegate</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">component</span>))
952
953
  <span class="ruby-identifier">component</span>.<span class="ruby-identifier">add_decoration</span>(<span class="ruby-identifier">answer</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">AnswerDecoration</span>.<span class="ruby-identifier">new</span>)
953
954
  <span class="ruby-identifier">answer</span>.<span class="ruby-identifier">on_answer</span> = <span class="ruby-constant">OnAnswer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">component</span>, <span class="ruby-identifier">delegate</span>, <span class="ruby-identifier">answer</span>,
954
955
  <span class="ruby-identifier">return_callback</span>, <span class="ruby-identifier">args</span>)
955
- <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_back_to_session</span>
956
+ <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_abort_callback_processing</span>, <span class="ruby-keyword kw">nil</span>
956
957
  <span class="ruby-keyword kw">end</span>
957
958
  </pre>
958
959
  </div>
@@ -962,7 +963,7 @@ the <tt>return_callback</tt>.
962
963
 
963
964
  </div>
964
965
  <div id="section">
965
- <h2 class="section-title"><a name="SEC00121">Call/Answer</a></h2>
966
+ <h2 class="section-title"><a name="SEC00161">Call/Answer</a></h2>
966
967
  <div class="section-comment">
967
968
 
968
969
  </div>
@@ -978,11 +979,11 @@ the <tt>return_callback</tt>.
978
979
  <div id="methods">
979
980
  <h3 class="section-bar">Protected Instance methods</h3>
980
981
 
981
- <div id="method-M000270" class="method-detail">
982
- <a name="M000270"></a>
982
+ <div id="method-M000342" class="method-detail">
983
+ <a name="M000342"></a>
983
984
 
984
985
  <div class="method-heading">
985
- <a href="#M000270" class="method-signature">
986
+ <a href="#M000342" class="method-signature">
986
987
  <span class="method-name">call</span><span class="method-args">(component, return_callback=:use_continuation, *additional_args)</span>
987
988
  </a>
988
989
  </div>
@@ -991,7 +992,7 @@ the <tt>return_callback</tt>.
991
992
  <p>
992
993
  Call another component. The calling component is neither rendered nor are
993
994
  it&#8217;s callbacks processed until the called component answers using
994
- method <a href="Component.html#M000269">answer</a>.
995
+ method <a href="Component.html#M000341">answer</a>.
995
996
  </p>
996
997
  <dl>
997
998
  <dt><tt>component</tt></dt><dd>The component to be called.
@@ -1008,29 +1009,29 @@ the continuation is assigned to it&#8217;s <tt>on_answer</tt> attribute.
1008
1009
  Then a <a href="Delegate.html">Delegate</a> decoration is added to the
1009
1010
  calling component (self), which delegates to the component to be called
1010
1011
  (<tt>component</tt>). Then we unwind the calling stack back to the <a
1011
- href="Session.html">Session</a> by throwing <em>:wee_back_to_session</em>.
1012
- This means, that there is only ever one action callback invoked per
1013
- request. When at a later point in time the called component invokes <a
1014
- href="Component.html#M000269">answer</a>, this will throw a
1015
- <em>:wee_answer</em> exception which is catched in the <a
1012
+ href="Session.html">Session</a> by throwing
1013
+ <em>:wee_abort_callback_processing</em>. This means, that there is only
1014
+ ever one action callback invoked per request. When at a later point in time
1015
+ the called component invokes <a href="Component.html#M000341">answer</a>,
1016
+ this will throw a <em>:wee_answer</em> exception which is catched in the <a
1016
1017
  href="AnswerDecoration.html">AnswerDecoration</a>. The <a
1017
1018
  href="AnswerDecoration.html">AnswerDecoration</a> then jumps back to the
1018
1019
  continuation we created at the beginning, and finally method <a
1019
- href="Component.html#M000268">call</a> returns.
1020
+ href="Component.html#M000340">call</a> returns.
1020
1021
  </p>
1021
1022
  <p>
1022
- Note that <a href="Component.html#M000268">call</a> returns to an
1023
+ Note that <a href="Component.html#M000340">call</a> returns to an
1023
1024
  &quot;old&quot; stack-frame from a previous request. That is why we throw
1024
- <em>:wee_back_to_session</em> after invoking an action callback, and
1025
- that&#8217;s why only ever one is invoked. We could remove this limitation
1026
- without problems, but then there would be a difference between those action
1027
- callbacks that call other components and those that do not.
1025
+ <em>:wee_abort_callback_processing</em> after invoking an action callback,
1026
+ and that&#8217;s why only ever one is invoked. We could remove this
1027
+ limitation without problems, but then there would be a difference between
1028
+ those action callbacks that call other components and those that do not.
1028
1029
  </p>
1029
1030
  <p><a class="source-toggle" href="#"
1030
- onclick="toggleCode('M000270-source');return false;">[Source]</a></p>
1031
- <div class="method-source-code" id="M000270-source">
1031
+ onclick="toggleCode('M000342-source');return false;">[Source]</a></p>
1032
+ <div class="method-source-code" id="M000342-source">
1032
1033
  <pre>
1033
- <span class="ruby-comment cmt"># File lib/wee/continuation/core/component.rb, line 36</span>
1034
+ <span class="ruby-comment cmt"># File lib/wee/continuation/core/component.rb, line 37</span>
1034
1035
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">component</span>, <span class="ruby-identifier">return_callback</span>=<span class="ruby-identifier">:use_continuation</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">additional_args</span>)
1035
1036
  <span class="ruby-identifier">add_decoration</span>(<span class="ruby-identifier">delegate</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Delegate</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">component</span>))
1036
1037
  <span class="ruby-identifier">component</span>.<span class="ruby-identifier">add_decoration</span>(<span class="ruby-identifier">answer</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">AnswerDecoration</span>.<span class="ruby-identifier">new</span>)
@@ -1038,7 +1039,7 @@ callbacks that call other components and those that do not.
1038
1039
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">return_callback</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:use_continuation</span>
1039
1040
  <span class="ruby-identifier">result</span> = <span class="ruby-identifier">callcc</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">cc</span><span class="ruby-operator">|</span>
1040
1041
  <span class="ruby-identifier">answer</span>.<span class="ruby-identifier">on_answer</span> = <span class="ruby-identifier">cc</span>
1041
- <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_back_to_session</span>
1042
+ <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_abort_callback_processing</span>, <span class="ruby-keyword kw">nil</span>
1042
1043
  }
1043
1044
  <span class="ruby-identifier">remove_decoration</span>(<span class="ruby-identifier">delegate</span>)
1044
1045
  <span class="ruby-identifier">component</span>.<span class="ruby-identifier">remove_decoration</span>(<span class="ruby-identifier">answer</span>)
@@ -1046,7 +1047,7 @@ callbacks that call other components and those that do not.
1046
1047
  <span class="ruby-keyword kw">else</span>
1047
1048
  <span class="ruby-identifier">answer</span>.<span class="ruby-identifier">on_answer</span> = <span class="ruby-constant">OnAnswer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">component</span>, <span class="ruby-identifier">delegate</span>, <span class="ruby-identifier">answer</span>,
1048
1049
  <span class="ruby-identifier">return_callback</span>, <span class="ruby-identifier">additional_args</span>)
1049
- <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_back_to_session</span>
1050
+ <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_abort_callback_processing</span>, <span class="ruby-keyword kw">nil</span>
1050
1051
  <span class="ruby-keyword kw">end</span>
1051
1052
  <span class="ruby-keyword kw">end</span>
1052
1053
  </pre>