old_sql 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +362 -0
  2. data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +69 -0
  3. data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +179 -0
  4. data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +17 -0
  5. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +814 -0
  6. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +1703 -0
  7. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +755 -0
  8. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +1197 -0
  9. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +168 -0
  10. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +187 -0
  11. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +300 -0
  12. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +524 -0
  13. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +420 -0
  14. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +142 -0
  15. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +38 -0
  16. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +240 -0
  17. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +508 -0
  18. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +244 -0
  19. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +385 -0
  20. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +384 -0
  21. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +1161 -0
  22. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +447 -0
  23. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +113 -0
  24. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +767 -0
  25. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +1445 -0
  26. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +651 -0
  27. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +1143 -0
  28. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +145 -0
  29. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +197 -0
  30. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +258 -0
  31. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +454 -0
  32. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +348 -0
  33. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +128 -0
  34. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +26 -0
  35. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +203 -0
  36. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +498 -0
  37. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +186 -0
  38. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +353 -0
  39. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +362 -0
  40. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +895 -0
  41. data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +83 -0
  42. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +69 -0
  43. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +401 -0
  44. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +10 -0
  45. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +40 -0
  46. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +96 -0
  47. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +4 -0
  48. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +95 -0
  49. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +31 -0
  50. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +23 -0
  51. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
  52. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
  53. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +54 -0
  54. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +150 -0
  55. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +42 -0
  56. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +90 -0
  57. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +29 -0
  58. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +38 -0
  59. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +189 -0
  60. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +28 -0
  61. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +73 -0
  62. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +38 -0
  63. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +36 -0
  64. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +65 -0
  65. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +31 -0
  66. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +18 -0
  67. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +61 -0
  68. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +38 -0
  69. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +67 -0
  70. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +67 -0
  71. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +30 -0
  72. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +483 -0
  73. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +62 -0
  74. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +71 -0
  75. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
  76. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +150 -0
  77. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +88 -0
  78. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +54 -0
  79. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +373 -0
  80. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +78 -0
  81. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +5 -0
  82. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +85 -0
  83. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +46 -0
  84. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +78 -0
  85. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +11 -0
  86. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +74 -0
  87. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +73 -0
  88. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +125 -0
  89. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +88 -0
  90. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +17 -0
  91. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +59 -0
  92. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +28 -0
  93. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +3 -0
  94. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +19 -0
  95. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +45 -0
  96. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +119 -0
  97. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +40 -0
  98. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +43 -0
  99. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +91 -0
  100. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +54 -0
  101. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +93 -0
  102. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +64 -0
  103. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +71 -0
  104. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +66 -0
  105. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +203 -0
  106. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +177 -0
  107. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +339 -0
  108. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +30 -0
  109. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +31 -0
  110. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +22 -0
  111. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +23 -0
  112. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +71 -0
  113. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +40 -0
  114. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +29 -0
  115. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +61 -0
  116. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +622 -0
  117. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +1 -0
  118. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +19 -0
  119. data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +70 -0
  120. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
  121. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
  122. data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
  123. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +130 -0
  124. data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +48 -0
  125. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +682 -0
  126. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +1489 -0
  127. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +863 -0
  128. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +1256 -0
  129. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +222 -0
  130. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +793 -0
  131. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +304 -0
  132. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +844 -0
  133. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +315 -0
  134. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +353 -0
  135. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +188 -0
  136. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +115 -0
  137. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +236 -0
  138. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +415 -0
  139. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +897 -0
  140. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +589 -0
  141. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +594 -0
  142. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +162 -0
  143. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +2026 -0
  144. data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +18 -0
  145. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +7829 -0
  146. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +6 -0
  147. data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +251 -0
  148. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +40 -0
  149. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +381 -0
  150. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +159 -0
  151. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +28 -0
  152. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +6 -0
  153. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +25 -0
  154. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +16 -0
  155. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +577 -0
  156. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +137 -0
  157. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +52 -0
  158. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +30 -0
  159. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +89 -0
  160. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +186 -0
  161. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +88 -0
  162. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +408 -0
  163. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +1 -0
  164. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +34 -0
  165. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +84 -0
  166. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +48 -0
  167. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +363 -0
  168. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +39 -0
  169. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +54 -0
  170. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +39 -0
  171. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +38 -0
  172. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +32 -0
  173. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +40 -0
  174. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +18 -0
  175. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +295 -0
  176. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +43 -0
  177. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +223 -0
  178. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +197 -0
  179. data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +481 -0
  180. data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +28 -0
  181. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +406 -0
  182. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +683 -0
  183. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +161 -0
  184. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +756 -0
  185. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +151 -0
  186. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +2177 -0
  187. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +705 -0
  188. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +348 -0
  189. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +247 -0
  190. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +9 -0
  191. data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +723 -0
  192. data/public/javascripts/old_sql/plotkit-0.9.1/README +1 -0
  193. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +2 -0
  194. data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +2 -0
  195. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +302 -0
  196. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +139 -0
  197. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +172 -0
  198. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +81 -0
  199. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +155 -0
  200. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +50 -0
  201. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +428 -0
  202. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +330 -0
  203. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +368 -0
  204. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +256 -0
  205. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +436 -0
  206. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +299 -0
  207. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +159 -0
  208. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +64 -0
  209. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +131 -0
  210. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +34 -0
  211. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +131 -0
  212. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +34 -0
  213. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +334 -0
  214. data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +151 -0
  215. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +304 -0
  216. data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +144 -0
  217. data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
  218. data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
  219. data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
  220. data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
  221. data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +62 -0
  222. data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +37 -0
  223. data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
  224. data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
  225. data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
  226. data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
  227. data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
  228. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
  229. data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +58 -0
  230. data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +31 -0
  231. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +25 -0
  232. data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +143 -0
  233. data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +56 -0
  234. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +58 -0
  235. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +133 -0
  236. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +57 -0
  237. data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +136 -0
  238. data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +161 -0
  239. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
  240. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
  241. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
  242. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
  243. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
  244. data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
  245. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +38 -0
  246. data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +43 -0
  247. data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +28 -0
  248. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +29 -0
  249. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +53 -0
  250. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +29 -0
  251. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +61 -0
  252. data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +57 -0
  253. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +6 -0
  254. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +29 -0
  255. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +141 -0
  256. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +26 -0
  257. data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +147 -0
  258. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +24 -0
  259. data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +89 -0
  260. data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +66 -0
  261. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +20 -0
  262. data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +31 -0
  263. metadata +264 -2
@@ -0,0 +1,767 @@
1
+ .. title:: MochiKit.Async - manage asynchronous tasks
2
+
3
+ Name
4
+ ====
5
+
6
+ MochiKit.Async - manage asynchronous tasks
7
+
8
+
9
+ Synopsis
10
+ ========
11
+
12
+ ::
13
+
14
+ var url = "/src/b/bo/bob/MochiKit.Async/META.json";
15
+ /*
16
+
17
+ META.json looks something like this:
18
+
19
+ {"name": "MochiKit", "version": "0.5"}
20
+
21
+ */
22
+ var d = loadJSONDoc(url);
23
+ var gotMetadata = function (meta) {
24
+ if (MochiKit.Async.VERSION == meta.version) {
25
+ alert("You have the newest MochiKit.Async!");
26
+ } else {
27
+ alert("MochiKit.Async "
28
+ + meta.version
29
+ + " is available, upgrade!");
30
+ }
31
+ };
32
+ var metadataFetchFailed = function (err) {
33
+ alert("The metadata for MochiKit.Async could not be fetched :(");
34
+ };
35
+ d.addCallbacks(gotMetadata, metadataFetchFailed);
36
+
37
+
38
+ Description
39
+ ===========
40
+
41
+ MochiKit.Async provides facilities to manage asynchronous (as in AJAX
42
+ [1]_) tasks. The model for asynchronous computation used in this
43
+ module is heavily inspired by Twisted [2]_.
44
+
45
+
46
+ Dependencies
47
+ ============
48
+
49
+ - :mochiref:`MochiKit.Base`
50
+
51
+
52
+ Security Concerns
53
+ =================
54
+
55
+ The current implementation of evalJSONRequest does no input validation.
56
+ Invalid JSON can execute arbitrary JavaScript code in the client. This isn't
57
+ normally a concern because of the same-origin policy in web browsers; the
58
+ server is already sending arbitrary code to the client (your program!).
59
+
60
+ While this isn't directly relevant to MochiKit, server-side code that produces
61
+ JSON should consider potential cross-site request forgery. Currently known
62
+ exploits require a JSON array to be the outer-most object, and the data to be
63
+ leaked must be known keys in objects contained by that array::
64
+
65
+ [{"some_known_key": "this can be leaked"}, "but not this"]
66
+
67
+ This exploit does not apply to the most common usage of JSON, sending an
68
+ object::
69
+
70
+ {"some_known_key": "this can't be leaked"}
71
+
72
+ There are several ways to avoid this, here are a few:
73
+
74
+ * Use some non-standard addition to JSON that adds constructs to prevent
75
+ script tag parsing, such as wrapping the data in a comment or an infinite
76
+ loop. MochiKit supports comment-wrapped JSON, but it's up to the server
77
+ to send it that way.
78
+ * Require some kind of authentication token in the URL.
79
+ * Allow only POST requests to access sensitive JSON.
80
+ * Only send JSON objects, not arrays. JSON objects aren't valid JavaScript
81
+ syntax on their own without parentheses.
82
+
83
+ Overview
84
+ ========
85
+
86
+ Deferred
87
+ --------
88
+
89
+ The Deferred constructor encapsulates a single value that is not
90
+ available yet. The most important example of this in the context of a
91
+ web browser would be an ``XMLHttpRequest`` to a server. The importance
92
+ of the Deferred is that it allows a consistent API to be exposed for
93
+ all asynchronous computations that occur exactly once.
94
+
95
+ The producer of the Deferred is responsible for doing all of the
96
+ complicated work behind the scenes. This often means waiting for a
97
+ timer to fire, or waiting for an event (e.g. ``onreadystatechange`` of
98
+ ``XMLHttpRequest``). It could also be coordinating several events
99
+ (e.g. ``XMLHttpRequest`` with a timeout, or several Deferreds
100
+ (e.g. fetching a set of XML documents that should be processed at the
101
+ same time).
102
+
103
+ Since these sorts of tasks do not respond immediately, the producer of
104
+ the Deferred does the following steps before returning to the
105
+ consumer:
106
+
107
+ 1. Create a ``new`` :mochiref:`Deferred();` object and keep a
108
+ reference to it, because it will be needed later when the value is
109
+ ready.
110
+ 2. Setup the conditions to create the value requested (e.g. create a
111
+ new ``XMLHttpRequest``, set its ``onreadystatechange``).
112
+ 3. Return the :mochiref:`Deferred` object.
113
+
114
+ Since the value is not yet ready, the consumer attaches a function to
115
+ the Deferred that will be called when the value is ready. This is not
116
+ unlike ``setTimeout``, or other similar facilities you may already be
117
+ familiar with. The consumer can also attach an "errback" to the
118
+ :mochiref:`Deferred`, which is a callback for error handling.
119
+
120
+ When the value is ready, the producer simply calls
121
+ ``myDeferred.callback(theValue)``. If an error occurred, it should
122
+ call ``myDeferred.errback(theValue)`` instead. As soon as this
123
+ happens, the callback that the consumer attached to the
124
+ :mochiref:`Deferred` is called with ``theValue`` as the only argument.
125
+
126
+ There are quite a few additional "advanced" features baked into
127
+ :mochiref:`Deferred`, such as cancellation and callback chains, so
128
+ take a look at the API reference if you would like to know more!
129
+
130
+ API Reference
131
+ =============
132
+
133
+ Errors
134
+ ------
135
+
136
+ :mochidef:`AlreadyCalledError`:
137
+
138
+ Thrown by a :mochiref:`Deferred` if ``.callback`` or ``.errback``
139
+ are called more than once.
140
+
141
+ *Availability*:
142
+ Available in MochiKit 1.3.1+
143
+
144
+
145
+ :mochidef:`BrowserComplianceError`:
146
+
147
+ Thrown when the JavaScript runtime is not capable of performing
148
+ the given function. Currently, this happens if the browser does
149
+ not support ``XMLHttpRequest``.
150
+
151
+ *Availability*:
152
+ Available in MochiKit 1.3.1+
153
+
154
+
155
+ :mochidef:`CancelledError`:
156
+
157
+ Thrown by a :mochiref:`Deferred` when it is cancelled, unless a
158
+ canceller is present and throws something else.
159
+
160
+ *Availability*:
161
+ Available in MochiKit 1.3.1+
162
+
163
+
164
+ :mochidef:`GenericError`:
165
+
166
+ Results passed to ``.fail`` or ``.errback`` of a
167
+ :mochiref:`Deferred` are wrapped by this ``Error`` if ``!(result
168
+ instanceof Error)``.
169
+
170
+ *Availability*:
171
+ Available in MochiKit 1.3.1+
172
+
173
+
174
+ :mochidef:`XMLHttpRequestError`:
175
+
176
+ Thrown when an ``XMLHttpRequest`` does not complete successfully
177
+ for any reason. The ``req`` property of the error is the failed
178
+ ``XMLHttpRequest`` object, and for convenience the ``number``
179
+ property corresponds to ``req.status``.
180
+
181
+ *Availability*:
182
+ Available in MochiKit 1.3.1+
183
+
184
+
185
+ Constructors
186
+ ------------
187
+
188
+ :mochidef:`Deferred()`:
189
+
190
+ Encapsulates a sequence of callbacks in response to a value that
191
+ may not yet be available. This is modeled after the Deferred class
192
+ from Twisted [3]_.
193
+
194
+ .. _`Twisted`: http://twistedmatrix.com/
195
+
196
+ Why do we want this? JavaScript has no threads, and even if it
197
+ did, threads are hard. Deferreds are a way of abstracting
198
+ non-blocking events, such as the final response to an
199
+ ``XMLHttpRequest``.
200
+
201
+ The sequence of callbacks is internally represented as a list of
202
+ 2-tuples containing the callback/errback pair. For example, the
203
+ following call sequence::
204
+
205
+ var d = new Deferred();
206
+ d.addCallback(myCallback);
207
+ d.addErrback(myErrback);
208
+ d.addBoth(myBoth);
209
+ d.addCallbacks(myCallback, myErrback);
210
+
211
+ is translated into a :mochiref:`Deferred` with the following
212
+ internal representation::
213
+
214
+ [
215
+ [myCallback, null],
216
+ [null, myErrback],
217
+ [myBoth, myBoth],
218
+ [myCallback, myErrback]
219
+ ]
220
+
221
+ The :mochiref:`Deferred` also keeps track of its current status
222
+ (fired). Its status may be one of the following three values:
223
+
224
+
225
+ ===== ================================
226
+ Value Condition
227
+ ===== ================================
228
+ -1 no value yet (initial condition)
229
+ 0 success
230
+ 1 error
231
+ ===== ================================
232
+
233
+ A :mochiref:`Deferred` will be in the error state if one of the
234
+ following conditions are met:
235
+
236
+ 1. The result given to callback or errback is "``instanceof
237
+ Error``"
238
+ 2. The callback or errback threw while executing. If the thrown
239
+ object is not ``instanceof Error``, it will be wrapped with
240
+ :mochiref:`GenericError`.
241
+
242
+ Otherwise, the :mochiref:`Deferred` will be in the success
243
+ state. The state of the :mochiref:`Deferred` determines the next
244
+ element in the callback sequence to run.
245
+
246
+ When a callback or errback occurs with the example deferred chain,
247
+ something equivalent to the following will happen (imagine that
248
+ exceptions are caught and returned as-is)::
249
+
250
+ // d.callback(result) or d.errback(result)
251
+ if (!(result instanceof Error)) {
252
+ result = myCallback(result);
253
+ }
254
+ if (result instanceof Error) {
255
+ result = myErrback(result);
256
+ }
257
+ result = myBoth(result);
258
+ if (result instanceof Error) {
259
+ result = myErrback(result);
260
+ } else {
261
+ result = myCallback(result);
262
+ }
263
+
264
+ The result is then stored away in case another step is added to
265
+ the callback sequence. Since the :mochiref:`Deferred` already has
266
+ a value available, any new callbacks added will be called
267
+ immediately.
268
+
269
+ There are two other "advanced" details about this implementation
270
+ that are useful:
271
+
272
+ Callbacks are allowed to return :mochiref:`Deferred` instances, so
273
+ you can build complicated sequences of events with (relative)
274
+ ease.
275
+
276
+ The creator of the :mochiref:`Deferred` may specify a
277
+ canceller. The canceller is a function that will be called if
278
+ :mochiref:`Deferred.prototype.cancel` is called before the
279
+ :mochiref:`Deferred` fires. You can use this to allow an
280
+ ``XMLHttpRequest`` to be cleanly cancelled, for example. Note that
281
+ cancel will fire the :mochiref:`Deferred` with a
282
+ :mochiref:`CancelledError` (unless your canceller throws or
283
+ returns a different ``Error``), so errbacks should be prepared to
284
+ handle that ``Error`` gracefully for cancellable
285
+ :mochiref:`Deferred` instances.
286
+
287
+ *Availability*:
288
+ Available in MochiKit 1.3.1+
289
+
290
+
291
+ :mochidef:`Deferred.prototype.addBoth(func)`:
292
+
293
+ Add the same function as both a callback and an errback as the
294
+ next element on the callback sequence. This is useful for code
295
+ that you want to guarantee to run, e.g. a finalizer.
296
+
297
+ If additional arguments are given, then ``func`` will be replaced
298
+ with :mochiref:`MochiKit.Base.partial.apply(null,
299
+ arguments)`. This differs from `Twisted`_, because the result of
300
+ the callback or errback will be the *last* argument passed to
301
+ ``func``.
302
+
303
+ If ``func`` returns a :mochiref:`Deferred`, then it will be
304
+ chained (its value or error will be passed to the next
305
+ callback). Note that once the returned ``Deferred`` is chained, it
306
+ can no longer accept new callbacks.
307
+
308
+ *Availability*:
309
+ Available in MochiKit 1.3.1+
310
+
311
+
312
+ :mochidef:`Deferred.prototype.addCallback(func[, ...])`:
313
+
314
+ Add a single callback to the end of the callback sequence.
315
+
316
+ If additional arguments are given, then ``func`` will be replaced
317
+ with :mochiref:`MochiKit.Base.partial.apply(null,
318
+ arguments)`. This differs from `Twisted`_, because the result of
319
+ the callback will be the *last* argument passed to ``func``.
320
+
321
+ If ``func`` returns a :mochiref:`Deferred`, then it will be
322
+ chained (its value or error will be passed to the next
323
+ callback). Note that once the returned ``Deferred`` is chained, it
324
+ can no longer accept new callbacks.
325
+
326
+ *Availability*:
327
+ Available in MochiKit 1.3.1+
328
+
329
+
330
+ :mochidef:`Deferred.prototype.addCallbacks(callback, errback)`:
331
+
332
+ Add separate callback and errback to the end of the callback
333
+ sequence. Either callback or errback may be ``null``, but not
334
+ both.
335
+
336
+ If ``callback`` or ``errback`` returns a :mochiref:`Deferred`,
337
+ then it will be chained (its value or error will be passed to the
338
+ next callback). Note that once the returned ``Deferred`` is
339
+ chained, it can no longer accept new callbacks.
340
+
341
+ *Availability*:
342
+ Available in MochiKit 1.3.1+
343
+
344
+
345
+ :mochidef:`Deferred.prototype.addErrback(func)`:
346
+
347
+ Add a single errback to the end of the callback sequence.
348
+
349
+ If additional arguments are given, then ``func`` will be replaced
350
+ with :mochiref:`MochiKit.Base.partial.apply(null,
351
+ arguments)`. This differs from `Twisted`_, because the result of
352
+ the errback will be the *last* argument passed to ``func``.
353
+
354
+ If ``func`` returns a :mochiref:`Deferred`, then it will be
355
+ chained (its value or error will be passed to the next
356
+ callback). Note that once the returned ``Deferred`` is chained, it
357
+ can no longer accept new callbacks.
358
+
359
+ *Availability*:
360
+ Available in MochiKit 1.3.1+
361
+
362
+
363
+ :mochidef:`Deferred.prototype.callback([result])`:
364
+
365
+ Begin the callback sequence with a non-``Error`` result. Result
366
+ may be any value except for a :mochiref:`Deferred`.
367
+
368
+ Either ``.callback`` or ``.errback`` should be called exactly once
369
+ on a :mochiref:`Deferred`.
370
+
371
+ *Availability*:
372
+ Available in MochiKit 1.3.1+
373
+
374
+
375
+ :mochidef:`Deferred.prototype.cancel()`:
376
+
377
+ Cancels a :mochiref:`Deferred` that has not yet received a value,
378
+ or is waiting on another :mochiref:`Deferred` as its value.
379
+
380
+ If a canceller is defined, the canceller is called. If the
381
+ canceller did not return an ``Error``, or there was no canceller,
382
+ then the errback chain is started with :mochiref:`CancelledError`.
383
+
384
+ *Availability*:
385
+ Available in MochiKit 1.3.1+
386
+
387
+
388
+ :mochidef:`Deferred.prototype.errback([result])`:
389
+
390
+ Begin the callback sequence with an error result. Result may be
391
+ any value except for a :mochiref:`Deferred`, but if ``!(result
392
+ instanceof Error)``, it will be wrapped with
393
+ :mochiref:`GenericError`.
394
+
395
+ Either ``.callback`` or ``.errback`` should be called exactly once
396
+ on a :mochidef:`Deferred`.
397
+
398
+ *Availability*:
399
+ Available in MochiKit 1.3.1+
400
+
401
+
402
+ :mochidef:`DeferredLock()`:
403
+
404
+ A lock for asynchronous systems.
405
+
406
+ The ``locked`` property of a :mochiref:`DeferredLock` will be
407
+ ``true`` if it locked, ``false`` otherwise. Do not change this
408
+ property.
409
+
410
+ *Availability*:
411
+ Available in MochiKit 1.3.1+
412
+
413
+
414
+ :mochidef:`DeferredLock.prototype.acquire()`:
415
+
416
+ Attempt to acquire the lock. Returns a :mochiref:`Deferred` that
417
+ fires on lock acquisition with the :mochiref:`DeferredLock` as the
418
+ value. If the lock is locked, then the :mochiref:`Deferred` goes
419
+ into a waiting list.
420
+
421
+ *Availability*:
422
+ Available in MochiKit 1.3.1+
423
+
424
+
425
+ :mochidef:`DeferredLock.prototype.release()`:
426
+
427
+ Release the lock. If there is a waiting list, then the first
428
+ :mochiref:`Deferred` in that waiting list will be called back.
429
+
430
+ *Availability*:
431
+ Available in MochiKit 1.3.1+
432
+
433
+
434
+ :mochidef:`DeferredList(list, [fireOnOneCallback, fireOnOneErrback, consumeErrors, canceller])`:
435
+
436
+ Combine a list of :mochiref:`Deferred` into one. Track the
437
+ callbacks and return a list of (success, result) tuples, 'success'
438
+ being a boolean indicating whether result is a normal result or an
439
+ error.
440
+
441
+ Once created, you have access to all :mochiref:`Deferred` methods,
442
+ like addCallback, addErrback, addBoth. The behaviour can be
443
+ changed by the following options:
444
+
445
+ ``fireOnOneCallback``:
446
+ Flag for launching the callback once the first Deferred of the
447
+ list has returned.
448
+
449
+ ``fireOnOneErrback``:
450
+ Flag for calling the errback at the first error of a Deferred.
451
+
452
+ ``consumeErrors``:
453
+ Flag indicating that any errors raised in the Deferreds should
454
+ be consumed by the DeferredList.
455
+
456
+ Example::
457
+
458
+ // We need to fetch data from 2 different urls
459
+ var d1 = loadJSONDoc(url1);
460
+ var d2 = loadJSONDoc(url2);
461
+ var l1 = new DeferredList([d1, d2], false, false, true);
462
+ l1.addCallback(function (resultList) {
463
+ MochiKit.Base.map(function (result) {
464
+ if (result[0]) {
465
+ alert("Data is here: " + result[1]);
466
+ } else {
467
+ alert("Got an error: " + result[1]);
468
+ }
469
+ }, resultList);
470
+ });
471
+
472
+ *Availability*:
473
+ Available in MochiKit 1.3.1+
474
+
475
+
476
+ Functions
477
+ ---------
478
+
479
+ :mochidef:`callLater(seconds, func[, args...])`:
480
+
481
+ Call ``func(args...)`` after at least ``seconds`` seconds have
482
+ elapsed. This is a convenience method for::
483
+
484
+ func = partial.apply(extend(null, arguments, 1));
485
+ return wait(seconds).addCallback(function (res) { return func() });
486
+
487
+ Returns a cancellable :mochiref:`Deferred`.
488
+
489
+ *Availability*:
490
+ Available in MochiKit 1.3.1+
491
+
492
+
493
+ :mochidef:`doXHR(url[, {option: value, ...}])`:
494
+
495
+ Perform a customized ``XMLHttpRequest`` and wrap it with a
496
+ :mochiref:`Deferred` that may be cancelled.
497
+
498
+ Note that only ``200`` (OK), ``201`` (CREATED),
499
+ ``204`` (NO CONTENT) and ``304`` (NOT MODIFIED) are considered
500
+ success codes. All other status codes will
501
+ result in an errback with an ``XMLHttpRequestError``.
502
+
503
+ ``url``:
504
+ The URL for this request.
505
+
506
+ The following options are currently accepted:
507
+
508
+ ``method``:
509
+ The HTTP method. Default is ``'GET'``.
510
+
511
+ ``sendContent``:
512
+ The content to send (e.g. with POST). Default is no content.
513
+
514
+ ``queryString``:
515
+ If present it will be used to build a query string to append to
516
+ the url using :mochiref:`MochiKit.Base.queryString`. Default is
517
+ no query string.
518
+
519
+ ``username``:
520
+ The username for the request. Default is no username.
521
+
522
+ ``password``:
523
+ The password for the request. Default is no password.
524
+
525
+ ``headers``:
526
+ Additional headers to set in the request, either as an object
527
+ such as ``{'Accept': 'text/xml'}`` or as an Array of 2-Arrays
528
+ ``[['Accept', 'text/xml']]``. Default is no additional headers.
529
+
530
+ ``mimeType``:
531
+ An override mime type. The typical use of this is to pass
532
+ 'text/xml' to force XMLHttpRequest to attempt to parse responseXML.
533
+ Default is no override.
534
+
535
+ *returns*:
536
+ :mochiref:`Deferred` that will callback with the
537
+ ``XMLHttpRequest`` instance on success
538
+
539
+ *Availability*:
540
+ Available in MochiKit 1.4+.
541
+
542
+
543
+ :mochidef:`doSimpleXMLHttpRequest(url[, queryArguments...])`:
544
+
545
+ Perform a simple ``XMLHttpRequest`` and wrap it with a
546
+ :mochiref:`Deferred` that may be cancelled.
547
+
548
+ Note that only ``200`` (OK), ``201`` (CREATED),
549
+ ``204`` (NO CONTENT) and ``304`` (NOT MODIFIED) are considered
550
+ success codes. All other status codes will
551
+ result in an errback with an ``XMLHttpRequestError``.
552
+
553
+ ``url``:
554
+ The URL to GET
555
+
556
+ ``queryArguments``:
557
+ If this function is called with more than one argument, a
558
+ ``"?"`` and the result of
559
+ :mochiref:`MochiKit.Base.queryString` with the rest of the
560
+ arguments are appended to the URL.
561
+
562
+ For example, this will do a GET request to the URL
563
+ ``http://example.com?bar=baz``::
564
+
565
+ doSimpleXMLHttpRequest("http://example.com", {bar: "baz"});
566
+
567
+ *returns*:
568
+ :mochiref:`Deferred` that will callback with the
569
+ ``XMLHttpRequest`` instance on success
570
+
571
+ *Availability*:
572
+ Available in MochiKit 1.3.1+. Support for 201 and 204 were added in
573
+ MochiKit 1.4.
574
+
575
+
576
+ :mochidef:`evalJSONRequest(req)`:
577
+
578
+ Evaluate a JSON [4]_ ``XMLHttpRequest``
579
+
580
+ ``req``:
581
+ The request whose ``.responseText`` property is to be
582
+ evaluated. If the JSON is wrapped in a comment, the comment will
583
+ be stripped before evaluation.
584
+
585
+ *returns*:
586
+ A JavaScript object
587
+
588
+ *Availability*:
589
+ Available in MochiKit 1.3.1+
590
+
591
+
592
+ :mochidef:`fail([result])`:
593
+
594
+ Return a :mochiref:`Deferred` that has already had
595
+ ``.errback(result)`` called.
596
+
597
+ See ``succeed`` documentation for rationale.
598
+
599
+ ``result``:
600
+ The result to give to
601
+ :mochiref:`Deferred.prototype.errback(result)`.
602
+
603
+ *returns*:
604
+ A ``new`` :mochiref:`Deferred()`
605
+
606
+ *Availability*:
607
+ Available in MochiKit 1.3.1+
608
+
609
+
610
+ :mochidef:`gatherResults(deferreds)`:
611
+
612
+ A convenience function that returns a :mochiref:`DeferredList`
613
+ from the given ``Array`` of :mochiref:`Deferred` instances that
614
+ will callback with an ``Array`` of just results when they're
615
+ available, or errback on the first array.
616
+
617
+ *Availability*:
618
+ Available in MochiKit 1.3.1+
619
+
620
+
621
+ :mochidef:`getXMLHttpRequest()`:
622
+
623
+ Return an ``XMLHttpRequest`` compliant object for the current
624
+ platform.
625
+
626
+ In order of preference:
627
+
628
+ - ``new XMLHttpRequest()``
629
+ - ``new ActiveXObject('Msxml2.XMLHTTP')``
630
+ - ``new ActiveXObject('Microsoft.XMLHTTP')``
631
+ - ``new ActiveXObject('Msxml2.XMLHTTP.4.0')``
632
+
633
+ *Availability*:
634
+ Available in MochiKit 1.3.1+
635
+
636
+
637
+ :mochidef:`maybeDeferred(func[, argument...])`:
638
+
639
+ Call a ``func`` with the given arguments and ensure the result is
640
+ a :mochiref:`Deferred`.
641
+
642
+ ``func``:
643
+ The function to call.
644
+
645
+ *returns*:
646
+ A new :mochiref:`Deferred` based on the call to ``func``. If
647
+ ``func`` does not naturally return a :mochiref:`Deferred`, its
648
+ result or error value will be wrapped by one.
649
+
650
+ *Availability*:
651
+ Available in MochiKit 1.3.1+
652
+
653
+
654
+ :mochidef:`loadJSONDoc(url[, queryArguments...])`:
655
+
656
+ Do a simple ``XMLHttpRequest`` to a URL and get the response as a
657
+ JSON [4]_ document.
658
+
659
+ ``url``:
660
+ The URL to GET
661
+
662
+ ``queryArguments``:
663
+ If this function is called with more than one argument, a
664
+ ``"?"`` and the result of
665
+ :mochiref:`MochiKit.Base.queryString` with the rest of the
666
+ arguments are appended to the URL.
667
+
668
+ For example, this will do a GET request to the URL
669
+ ``http://example.com?bar=baz``::
670
+
671
+ loadJSONDoc("http://example.com", {bar: "baz"});
672
+
673
+ *returns*:
674
+ :mochiref:`Deferred` that will callback with the evaluated
675
+ JSON [4]_ response upon successful ``XMLHttpRequest``
676
+
677
+ *Availability*:
678
+ Available in MochiKit 1.3.1+
679
+
680
+
681
+ :mochidef:`sendXMLHttpRequest(req[, sendContent])`:
682
+
683
+ Set an ``onreadystatechange`` handler on an ``XMLHttpRequest``
684
+ object and send it off. Will return a cancellable
685
+ :mochiref:`Deferred` that will callback on success.
686
+
687
+ Note that only ``200`` (OK), ``201`` (CREATED),
688
+ ``204`` (NO CONTENT) and ``304`` (NOT MODIFIED) are considered
689
+ success codes. All other status codes will
690
+ result in an errback with an ``XMLHttpRequestError``.
691
+
692
+ ``req``:
693
+ An preconfigured ``XMLHttpRequest`` object (open has been
694
+ called).
695
+
696
+ ``sendContent``:
697
+ Optional string or DOM content to send over the
698
+ ``XMLHttpRequest``.
699
+
700
+ *returns*:
701
+ :mochiref:`Deferred` that will callback with the
702
+ ``XMLHttpRequest`` instance on success.
703
+
704
+ *Availability*:
705
+ Available in MochiKit 1.3.1+. Support for 201 and 204 were added in
706
+ MochiKit 1.4.
707
+
708
+
709
+ :mochidef:`succeed([result])`:
710
+
711
+ Return a :mochiref:`Deferred` that has already had
712
+ ``.callback(result)`` called.
713
+
714
+ This is useful when you're writing synchronous code to an
715
+ asynchronous interface: i.e., some code is calling you expecting a
716
+ :mochiref:`Deferred` result, but you don't actually need to do
717
+ anything asynchronous. Just return ``succeed(theResult)``.
718
+
719
+ See ``fail`` for a version of this function that uses a failing
720
+ :mochiref:`Deferred` rather than a successful one.
721
+
722
+ ``result``:
723
+ The result to give to
724
+ :mochiref:`Deferred.prototype.callback(result)`
725
+
726
+ *returns*:
727
+ a ``new`` :mochiref:`Deferred`
728
+
729
+ *Availability*:
730
+ Available in MochiKit 1.3.1+
731
+
732
+
733
+ :mochidef:`wait(seconds[, res])`:
734
+
735
+ Return a new cancellable :mochiref:`Deferred` that will
736
+ ``.callback(res)`` after at least ``seconds`` seconds have
737
+ elapsed.
738
+
739
+ *Availability*:
740
+ Available in MochiKit 1.3.1+
741
+
742
+
743
+ See Also
744
+ ========
745
+
746
+ .. [1] AJAX, Asynchronous JavaScript and XML: http://en.wikipedia.org/wiki/AJAX
747
+ .. [2] Twisted, an event-driven networking framework written in Python: http://twistedmatrix.com/
748
+ .. [3] Twisted Deferred Reference: http://twistedmatrix.com/projects/core/documentation/howto/defer.html
749
+ .. [4] JSON, JavaScript Object Notation: http://json.org/
750
+
751
+
752
+ Authors
753
+ =======
754
+
755
+ - Bob Ippolito <bob@redivi.com>
756
+
757
+
758
+ Copyright
759
+ =========
760
+
761
+ Copyright 2005 Bob Ippolito <bob@redivi.com>. This program is
762
+ dual-licensed free software; you can redistribute it and/or modify it
763
+ under the terms of the `MIT License`_ or the `Academic Free License
764
+ v2.1`_.
765
+
766
+ .. _`MIT License`: http://www.opensource.org/licenses/mit-license.php
767
+ .. _`Academic Free License v2.1`: http://www.opensource.org/licenses/afl-2.1.php