Trapped-Processors.js 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929
  1. define("gh_herby_trapped/Trapped-Processors", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "gh_herby_trapped/Trapped-Frontend"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Trapped-Processors');
  3. smalltalk.packages["Trapped-Processors"].transport = {"type":"amd","amdNamespace":"gh_herby_trapped"};
  4. smalltalk.addClass('TrappedProcessorDataAdhoc', smalltalk.TrappedDataExpectingProcessor, ['toViewBlock'], 'Trapped-Processors');
  5. smalltalk.TrappedProcessorDataAdhoc.comment="I put data into target via contents: in toView:";
  6. smalltalk.addMethod(
  7. smalltalk.method({
  8. selector: "toView:",
  9. category: 'data transformation',
  10. fn: function (aDataCarrier){
  11. var self=this;
  12. return smalltalk.withContext(function($ctx1) {
  13. _st(self["@toViewBlock"])._value_(aDataCarrier);
  14. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorDataAdhoc)})},
  15. args: ["aDataCarrier"],
  16. source: "toView: aDataCarrier\x0a\x09toViewBlock value: aDataCarrier",
  17. messageSends: ["value:"],
  18. referencedClasses: []
  19. }),
  20. smalltalk.TrappedProcessorDataAdhoc);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "toViewBlock:",
  24. category: 'accessing',
  25. fn: function (aBlock){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) {
  28. self["@toViewBlock"]=aBlock;
  29. return self}, function($ctx1) {$ctx1.fill(self,"toViewBlock:",{aBlock:aBlock},smalltalk.TrappedProcessorDataAdhoc)})},
  30. args: ["aBlock"],
  31. source: "toViewBlock: aBlock\x0a\x09toViewBlock := aBlock",
  32. messageSends: [],
  33. referencedClasses: []
  34. }),
  35. smalltalk.TrappedProcessorDataAdhoc);
  36. smalltalk.addMethod(
  37. smalltalk.method({
  38. selector: "newToView:",
  39. category: 'instance creation',
  40. fn: function (aBlock){
  41. var self=this;
  42. return smalltalk.withContext(function($ctx1) {
  43. var $2,$3,$1;
  44. $2=self._new();
  45. _st($2)._toViewBlock_(aBlock);
  46. $3=_st($2)._yourself();
  47. $1=$3;
  48. return $1;
  49. }, function($ctx1) {$ctx1.fill(self,"newToView:",{aBlock:aBlock},smalltalk.TrappedProcessorDataAdhoc.klass)})},
  50. args: ["aBlock"],
  51. source: "newToView: aBlock\x0a\x09^self new\x0a\x09\x09toViewBlock: aBlock;\x0a\x09\x09yourself",
  52. messageSends: ["toViewBlock:", "new", "yourself"],
  53. referencedClasses: []
  54. }),
  55. smalltalk.TrappedProcessorDataAdhoc.klass);
  56. smalltalk.addClass('TrappedProcessorDescend', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  57. smalltalk.TrappedProcessorDescend.comment="I intepret data-trap in descendants of my brush.";
  58. smalltalk.addMethod(
  59. smalltalk.method({
  60. selector: "toView:",
  61. category: 'data transformation',
  62. fn: function (aDataCarrier){
  63. var self=this;
  64. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  65. return smalltalk.withContext(function($ctx1) {
  66. _st(_st($Trapped())._current())._injectToJQuery_(_st(_st(_st(aDataCarrier)._target())._asJQuery())._children());
  67. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorDescend)})},
  68. args: ["aDataCarrier"],
  69. source: "toView: aDataCarrier\x0a\x09Trapped current injectToJQuery: aDataCarrier target asJQuery children",
  70. messageSends: ["injectToJQuery:", "current", "children", "asJQuery", "target"],
  71. referencedClasses: ["Trapped"]
  72. }),
  73. smalltalk.TrappedProcessorDescend);
  74. smalltalk.addClass('TrappedProcessorGuardBase', smalltalk.TrappedProcessor, ['guardPath'], 'Trapped-Processors');
  75. smalltalk.TrappedProcessorGuardBase.comment="I serve as base class for brush-guarding processors.\x0a\x0aI cover instantiation and subclasses have to provide\x0aimplementation of toVIew: that react appropriately to guard releasing.";
  76. smalltalk.addMethod(
  77. smalltalk.method({
  78. selector: "guardPath:",
  79. category: 'accessing',
  80. fn: function (anArray){
  81. var self=this;
  82. return smalltalk.withContext(function($ctx1) {
  83. self["@guardPath"]=anArray;
  84. return self}, function($ctx1) {$ctx1.fill(self,"guardPath:",{anArray:anArray},smalltalk.TrappedProcessorGuardBase)})},
  85. args: ["anArray"],
  86. source: "guardPath: anArray\x0a\x09guardPath := anArray",
  87. messageSends: [],
  88. referencedClasses: []
  89. }),
  90. smalltalk.TrappedProcessorGuardBase);
  91. smalltalk.addMethod(
  92. smalltalk.method({
  93. selector: "toModel:",
  94. category: 'data transformation',
  95. fn: function (aDataCarrier){
  96. var self=this;
  97. return smalltalk.withContext(function($ctx1) {
  98. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorGuardBase)})},
  99. args: ["aDataCarrier"],
  100. source: "toModel: aDataCarrier\x0a\x09\x22stop\x22",
  101. messageSends: [],
  102. referencedClasses: []
  103. }),
  104. smalltalk.TrappedProcessorGuardBase);
  105. smalltalk.addMethod(
  106. smalltalk.method({
  107. selector: "toView:",
  108. category: 'data transformation',
  109. fn: function (aDataCarrier){
  110. var self=this;
  111. return smalltalk.withContext(function($ctx1) {
  112. self._subclassResponsibility();
  113. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorGuardBase)})},
  114. args: ["aDataCarrier"],
  115. source: "toView: aDataCarrier\x0a\x09self subclassResponsibility",
  116. messageSends: ["subclassResponsibility"],
  117. referencedClasses: []
  118. }),
  119. smalltalk.TrappedProcessorGuardBase);
  120. smalltalk.addMethod(
  121. smalltalk.method({
  122. selector: "new:",
  123. category: 'instance creation',
  124. fn: function (anArray){
  125. var self=this;
  126. return smalltalk.withContext(function($ctx1) {
  127. var $2,$3,$1;
  128. $2=self._new();
  129. _st($2)._guardPath_(anArray);
  130. $3=_st($2)._yourself();
  131. $1=$3;
  132. return $1;
  133. }, function($ctx1) {$ctx1.fill(self,"new:",{anArray:anArray},smalltalk.TrappedProcessorGuardBase.klass)})},
  134. args: ["anArray"],
  135. source: "new: anArray\x0a\x09^ self new\x0a\x09\x09guardPath: anArray;\x0a\x09\x09yourself",
  136. messageSends: ["guardPath:", "new", "yourself"],
  137. referencedClasses: []
  138. }),
  139. smalltalk.TrappedProcessorGuardBase.klass);
  140. smalltalk.addClass('TrappedProcessorGuardContents', smalltalk.TrappedProcessorGuardBase, [], 'Trapped-Processors');
  141. smalltalk.TrappedProcessorGuardContents.comment="I am used to guard contents of the brush I am installed on.\x0a\x0aI save the brush contents, then I observe guard expression in the model,\x0aand when it changes to nil or false, I delete the brush contents;\x0aon the other hand, when it changes to non-nil and non-false,\x0aI restore it from remembered state and interpret all contained\x0adata-trap attributes inside.";
  142. smalltalk.addMethod(
  143. smalltalk.method({
  144. selector: "toView:",
  145. category: 'data transformation',
  146. fn: function (aDataCarrier){
  147. var self=this;
  148. var frozen,contents;
  149. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  150. return smalltalk.withContext(function($ctx1) {
  151. var $3,$2,$1,$5,$4;
  152. frozen=_st(aDataCarrier)._copy();
  153. $3=_st(frozen)._target();
  154. $ctx1.sendIdx["target"]=1;
  155. $2=_st($3)._asJQuery();
  156. $ctx1.sendIdx["asJQuery"]=1;
  157. $1=_st($2)._contents();
  158. contents=_st($1)._detach();
  159. _st(_st(frozen)._target())._trapGuard_contents_(self["@guardPath"],(function(html){
  160. return smalltalk.withContext(function($ctx2) {
  161. $5=_st(html)._root();
  162. $ctx2.sendIdx["root"]=1;
  163. $4=_st($5)._asJQuery();
  164. $ctx2.sendIdx["asJQuery"]=2;
  165. _st($4)._append_(contents);
  166. return _st(_st($Trapped())._current())._injectToJQuery_(_st(_st(html)._root())._asJQuery());
  167. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  168. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,contents:contents},smalltalk.TrappedProcessorGuardContents)})},
  169. args: ["aDataCarrier"],
  170. source: "toView: aDataCarrier\x0a\x09| frozen contents |\x0a\x09frozen := aDataCarrier copy.\x0a\x09contents := frozen target asJQuery contents detach.\x0a\x09frozen target trapGuard: guardPath contents: [ :html |\x0a\x09\x09html root asJQuery append: contents.\x0a\x09\x09Trapped current injectToJQuery: html root asJQuery ]",
  171. messageSends: ["copy", "detach", "contents", "asJQuery", "target", "trapGuard:contents:", "append:", "root", "injectToJQuery:", "current"],
  172. referencedClasses: ["Trapped"]
  173. }),
  174. smalltalk.TrappedProcessorGuardContents);
  175. smalltalk.addClass('TrappedProcessorGuardProc', smalltalk.TrappedProcessorGuardBase, [], 'Trapped-Processors');
  176. smalltalk.TrappedProcessorGuardProc.comment="I am used to guard contents filling process of the brush I am installed on.\x0a\x0aI observe guard expression in the model,\x0aand when it changes to nil or false, I delete the brush contents;\x0aon the other hand, when it changes to non-nil and non-false,\x0aI run the rest on the chain, which should be one-time\x0athat sets up the contents,";
  177. smalltalk.addMethod(
  178. smalltalk.method({
  179. selector: "toView:",
  180. category: 'data transformation',
  181. fn: function (aDataCarrier){
  182. var self=this;
  183. var frozen;
  184. return smalltalk.withContext(function($ctx1) {
  185. frozen=_st(aDataCarrier)._copy();
  186. $ctx1.sendIdx["copy"]=1;
  187. _st(_st(frozen)._target())._trapGuard_contents_(self["@guardPath"],(function(){
  188. return smalltalk.withContext(function($ctx2) {
  189. return _st(_st(frozen)._copy())._proceed();
  190. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  191. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen},smalltalk.TrappedProcessorGuardProc)})},
  192. args: ["aDataCarrier"],
  193. source: "toView: aDataCarrier\x0a\x09| frozen |\x0a\x09frozen := aDataCarrier copy.\x0a\x09frozen target trapGuard: guardPath contents: [ frozen copy proceed ]",
  194. messageSends: ["copy", "trapGuard:contents:", "target", "proceed"],
  195. referencedClasses: []
  196. }),
  197. smalltalk.TrappedProcessorGuardProc);
  198. smalltalk.addClass('TrappedProcessorInputChecked', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  199. smalltalk.TrappedProcessorInputChecked.comment="I bind to checkbox checked attribute.";
  200. smalltalk.addMethod(
  201. smalltalk.method({
  202. selector: "installToView:toModel:",
  203. category: 'installation',
  204. fn: function (aDataCarrier,anotherDataCarrier){
  205. var self=this;
  206. var brush;
  207. return smalltalk.withContext(function($ctx1) {
  208. var $1,$2;
  209. brush=_st(aDataCarrier)._target();
  210. _st(brush)._onChange_((function(){
  211. return smalltalk.withContext(function($ctx2) {
  212. $1=_st(anotherDataCarrier)._copy();
  213. _st($1)._value_(_st(_st(_st(brush)._asJQuery())._attr_("checked"))._notNil());
  214. $2=_st($1)._proceed();
  215. return $2;
  216. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  217. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier,brush:brush},smalltalk.TrappedProcessorInputChecked)})},
  218. args: ["aDataCarrier", "anotherDataCarrier"],
  219. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09| brush |\x0a\x09brush := aDataCarrier target.\x0a\x09brush onChange: [ anotherDataCarrier copy value: (brush asJQuery attr: 'checked') notNil; proceed ]",
  220. messageSends: ["target", "onChange:", "value:", "copy", "notNil", "attr:", "asJQuery", "proceed"],
  221. referencedClasses: []
  222. }),
  223. smalltalk.TrappedProcessorInputChecked);
  224. smalltalk.addMethod(
  225. smalltalk.method({
  226. selector: "toView:",
  227. category: 'data transformation',
  228. fn: function (aDataCarrier){
  229. var self=this;
  230. return smalltalk.withContext(function($ctx1) {
  231. _st(aDataCarrier)._toTargetAttr_("checked");
  232. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorInputChecked)})},
  233. args: ["aDataCarrier"],
  234. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetAttr: 'checked'",
  235. messageSends: ["toTargetAttr:"],
  236. referencedClasses: []
  237. }),
  238. smalltalk.TrappedProcessorInputChecked);
  239. smalltalk.addClass('TrappedProcessorInputValue', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  240. smalltalk.TrappedProcessorInputValue.comment="I bind to input value.";
  241. smalltalk.addMethod(
  242. smalltalk.method({
  243. selector: "installToView:toModel:",
  244. category: 'installation',
  245. fn: function (aDataCarrier,anotherDataCarrier){
  246. var self=this;
  247. var brush;
  248. return smalltalk.withContext(function($ctx1) {
  249. var $1,$2;
  250. brush=_st(aDataCarrier)._target();
  251. _st(brush)._onChange_((function(){
  252. return smalltalk.withContext(function($ctx2) {
  253. $1=_st(anotherDataCarrier)._copy();
  254. _st($1)._value_(_st(_st(brush)._asJQuery())._val());
  255. $2=_st($1)._proceed();
  256. return $2;
  257. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  258. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier,brush:brush},smalltalk.TrappedProcessorInputValue)})},
  259. args: ["aDataCarrier", "anotherDataCarrier"],
  260. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09| brush |\x0a\x09brush := aDataCarrier target.\x0a\x09brush onChange: [ anotherDataCarrier copy value: brush asJQuery val; proceed ]",
  261. messageSends: ["target", "onChange:", "value:", "copy", "val", "asJQuery", "proceed"],
  262. referencedClasses: []
  263. }),
  264. smalltalk.TrappedProcessorInputValue);
  265. smalltalk.addMethod(
  266. smalltalk.method({
  267. selector: "toView:",
  268. category: 'data transformation',
  269. fn: function (aDataCarrier){
  270. var self=this;
  271. return smalltalk.withContext(function($ctx1) {
  272. _st(aDataCarrier)._toTargetValue();
  273. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorInputValue)})},
  274. args: ["aDataCarrier"],
  275. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetValue",
  276. messageSends: ["toTargetValue"],
  277. referencedClasses: []
  278. }),
  279. smalltalk.TrappedProcessorInputValue);
  280. smalltalk.addClass('TrappedProcessorLoopBase', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  281. smalltalk.TrappedProcessorLoopBase.comment="I serve as base class for looping processors.\x0a\x0aI cover instantiation and subclasses have to provide\x0aimplementation of toVIew: that loops appropriately.";
  282. smalltalk.addMethod(
  283. smalltalk.method({
  284. selector: "toModel:",
  285. category: 'data transformation',
  286. fn: function (aDataCarrier){
  287. var self=this;
  288. return smalltalk.withContext(function($ctx1) {
  289. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorLoopBase)})},
  290. args: ["aDataCarrier"],
  291. source: "toModel: aDataCarrier\x0a\x09\x22stop\x22",
  292. messageSends: [],
  293. referencedClasses: []
  294. }),
  295. smalltalk.TrappedProcessorLoopBase);
  296. smalltalk.addMethod(
  297. smalltalk.method({
  298. selector: "toView:",
  299. category: 'data transformation',
  300. fn: function (aDataCarrier){
  301. var self=this;
  302. return smalltalk.withContext(function($ctx1) {
  303. self._subclassResponsibility();
  304. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorLoopBase)})},
  305. args: ["aDataCarrier"],
  306. source: "toView: aDataCarrier\x0a\x09self subclassResponsibility",
  307. messageSends: ["subclassResponsibility"],
  308. referencedClasses: []
  309. }),
  310. smalltalk.TrappedProcessorLoopBase);
  311. smalltalk.addClass('TrappedProcessorLoopContents', smalltalk.TrappedProcessorLoopBase, [], 'Trapped-Processors');
  312. smalltalk.TrappedProcessorLoopContents.comment="I am used to loop over data and repeat the contents\x0aof the brush I am installed on.\x0a\x0aI save the brush contents, then I observe the data in the model,\x0aand when it changes, I loop over it\x0aand restore the contents from remembered state\x0aand interpret all contained data-trap attributes inside\x0afor each element, putting the result _after_ my brush.\x0a\x0aMy brush itself should be as least visible as possible,\x0aas it only serve as a position flag (use for example\x0anoscript, ins or del).";
  313. smalltalk.addMethod(
  314. smalltalk.method({
  315. selector: "toView:",
  316. category: 'data transformation',
  317. fn: function (aDataCarrier){
  318. var self=this;
  319. var frozen,contents;
  320. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  321. return smalltalk.withContext(function($ctx1) {
  322. var $3,$2,$1,$5,$4;
  323. frozen=_st(aDataCarrier)._copy();
  324. $3=_st(frozen)._target();
  325. $ctx1.sendIdx["target"]=1;
  326. $2=_st($3)._asJQuery();
  327. $ctx1.sendIdx["asJQuery"]=1;
  328. $1=_st($2)._contents();
  329. contents=_st($1)._detach();
  330. _st(_st(frozen)._target())._trapIter_after_([],(function(html){
  331. return smalltalk.withContext(function($ctx2) {
  332. $5=_st(html)._root();
  333. $ctx2.sendIdx["root"]=1;
  334. $4=_st($5)._asJQuery();
  335. $ctx2.sendIdx["asJQuery"]=2;
  336. _st($4)._append_(_st(contents)._clone());
  337. return _st(_st($Trapped())._current())._injectToJQuery_(_st(_st(html)._root())._asJQuery());
  338. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  339. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,contents:contents},smalltalk.TrappedProcessorLoopContents)})},
  340. args: ["aDataCarrier"],
  341. source: "toView: aDataCarrier\x0a\x09| frozen contents |\x0a\x09frozen := aDataCarrier copy.\x0a\x09contents := frozen target asJQuery contents detach.\x0a\x09frozen target trapIter: #() after: [ :html |\x0a\x09\x09html root asJQuery append: contents clone.\x0a\x09\x09Trapped current injectToJQuery: html root asJQuery ]",
  342. messageSends: ["copy", "detach", "contents", "asJQuery", "target", "trapIter:after:", "append:", "root", "clone", "injectToJQuery:", "current"],
  343. referencedClasses: ["Trapped"]
  344. }),
  345. smalltalk.TrappedProcessorLoopContents);
  346. smalltalk.addClass('TrappedProcessorLoopProc', smalltalk.TrappedProcessorLoopBase, [], 'Trapped-Processors');
  347. smalltalk.TrappedProcessorLoopProc.comment="I am used to loop over data and repeat the contents filling process\x0aof the brush I am installed on.\x0a\x0aI observe the data in the model,\x0aand when it changes, I loop over it\x0aand run the rest of the processing chain\x0afor each element, putting the result _after_ my brush.\x0a\x0aMy brush itself should be as least visible as possible,\x0aas it only serve as a position flag (use for example\x0anoscript, ins or del).";
  348. smalltalk.addMethod(
  349. smalltalk.method({
  350. selector: "toView:",
  351. category: 'data transformation',
  352. fn: function (aDataCarrier){
  353. var self=this;
  354. var frozen;
  355. return smalltalk.withContext(function($ctx1) {
  356. var $1,$2;
  357. frozen=_st(aDataCarrier)._copy();
  358. $ctx1.sendIdx["copy"]=1;
  359. _st(_st(frozen)._target())._trapIter_after_([],(function(html){
  360. return smalltalk.withContext(function($ctx2) {
  361. $1=_st(frozen)._copy();
  362. _st($1)._target_(_st(html)._root());
  363. $2=_st($1)._proceed();
  364. return $2;
  365. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  366. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen},smalltalk.TrappedProcessorLoopProc)})},
  367. args: ["aDataCarrier"],
  368. source: "toView: aDataCarrier\x0a\x09| frozen |\x0a\x09frozen := aDataCarrier copy.\x0a\x09frozen target trapIter: #() after: [ :html | frozen copy target: html root; proceed ]",
  369. messageSends: ["copy", "trapIter:after:", "target", "target:", "root", "proceed"],
  370. referencedClasses: []
  371. }),
  372. smalltalk.TrappedProcessorLoopProc);
  373. smalltalk.addClass('TrappedProcessorSignal', smalltalk.TrappedProcessor, ['selector'], 'Trapped-Processors');
  374. smalltalk.TrappedProcessorSignal.comment="Instead of writing data directly to model,\x0aI instead modify it by sending a message specified when instantiating me.";
  375. smalltalk.addMethod(
  376. smalltalk.method({
  377. selector: "selector:",
  378. category: 'accessing',
  379. fn: function (aString){
  380. var self=this;
  381. return smalltalk.withContext(function($ctx1) {
  382. self["@selector"]=aString;
  383. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.TrappedProcessorSignal)})},
  384. args: ["aString"],
  385. source: "selector: aString\x0a\x09selector := aString",
  386. messageSends: [],
  387. referencedClasses: []
  388. }),
  389. smalltalk.TrappedProcessorSignal);
  390. smalltalk.addMethod(
  391. smalltalk.method({
  392. selector: "toModel:",
  393. category: 'data transformation',
  394. fn: function (aDataCarrier){
  395. var self=this;
  396. return smalltalk.withContext(function($ctx1) {
  397. _st(aDataCarrier)._modifyTargetByPerforming_(self["@selector"]);
  398. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorSignal)})},
  399. args: ["aDataCarrier"],
  400. source: "toModel: aDataCarrier\x0a\x09aDataCarrier modifyTargetByPerforming: selector",
  401. messageSends: ["modifyTargetByPerforming:"],
  402. referencedClasses: []
  403. }),
  404. smalltalk.TrappedProcessorSignal);
  405. smalltalk.addMethod(
  406. smalltalk.method({
  407. selector: "toView:",
  408. category: 'data transformation',
  409. fn: function (aDataCarrier){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) {
  412. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorSignal)})},
  413. args: ["aDataCarrier"],
  414. source: "toView: aDataCarrier\x0a\x09\x22stop\x22",
  415. messageSends: [],
  416. referencedClasses: []
  417. }),
  418. smalltalk.TrappedProcessorSignal);
  419. smalltalk.addMethod(
  420. smalltalk.method({
  421. selector: "new:",
  422. category: 'instance creation',
  423. fn: function (aString){
  424. var self=this;
  425. return smalltalk.withContext(function($ctx1) {
  426. var $2,$3,$1;
  427. $2=self._new();
  428. _st($2)._selector_(aString);
  429. $3=_st($2)._yourself();
  430. $1=$3;
  431. return $1;
  432. }, function($ctx1) {$ctx1.fill(self,"new:",{aString:aString},smalltalk.TrappedProcessorSignal.klass)})},
  433. args: ["aString"],
  434. source: "new: aString\x0a\x09^self new\x0a\x09\x09selector: aString;\x0a\x09\x09yourself",
  435. messageSends: ["selector:", "new", "yourself"],
  436. referencedClasses: []
  437. }),
  438. smalltalk.TrappedProcessorSignal.klass);
  439. smalltalk.addClass('TrappedProcessorWhenClicked', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  440. smalltalk.TrappedProcessorWhenClicked.comment="I bind to an element and send true to blackboard when clicked.";
  441. smalltalk.addMethod(
  442. smalltalk.method({
  443. selector: "installToView:toModel:",
  444. category: 'installation',
  445. fn: function (aDataCarrier,anotherDataCarrier){
  446. var self=this;
  447. return smalltalk.withContext(function($ctx1) {
  448. _st(_st(aDataCarrier)._target())._onClick_((function(){
  449. return smalltalk.withContext(function($ctx2) {
  450. _st(_st(anotherDataCarrier)._copy())._proceed();
  451. return false;
  452. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  453. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier},smalltalk.TrappedProcessorWhenClicked)})},
  454. args: ["aDataCarrier", "anotherDataCarrier"],
  455. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09aDataCarrier target onClick: [ anotherDataCarrier copy proceed. false ]",
  456. messageSends: ["onClick:", "target", "proceed", "copy"],
  457. referencedClasses: []
  458. }),
  459. smalltalk.TrappedProcessorWhenClicked);
  460. smalltalk.addClass('TrappedProcessorWhenSubmitted', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  461. smalltalk.TrappedProcessorWhenSubmitted.comment="I bind to a form and send true to blackboard when submitted.";
  462. smalltalk.addMethod(
  463. smalltalk.method({
  464. selector: "installToView:toModel:",
  465. category: 'installation',
  466. fn: function (aDataCarrier,anotherDataCarrier){
  467. var self=this;
  468. return smalltalk.withContext(function($ctx1) {
  469. _st(_st(aDataCarrier)._target())._onSubmit_((function(){
  470. return smalltalk.withContext(function($ctx2) {
  471. _st(_st(anotherDataCarrier)._copy())._proceed();
  472. return false;
  473. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  474. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier},smalltalk.TrappedProcessorWhenSubmitted)})},
  475. args: ["aDataCarrier", "anotherDataCarrier"],
  476. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09aDataCarrier target onSubmit: [ anotherDataCarrier copy proceed. false ]",
  477. messageSends: ["onSubmit:", "target", "proceed", "copy"],
  478. referencedClasses: []
  479. }),
  480. smalltalk.TrappedProcessorWhenSubmitted);
  481. smalltalk.addClass('TrappedProcessorWidget', smalltalk.TrappedProcessor, ['viewName'], 'Trapped-Processors');
  482. smalltalk.TrappedProcessorWidget.comment="I insert a widget instance of the class specified when creating me.";
  483. smalltalk.addMethod(
  484. smalltalk.method({
  485. selector: "toView:",
  486. category: 'data transformation',
  487. fn: function (aDataCarrier){
  488. var self=this;
  489. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  490. return smalltalk.withContext(function($ctx1) {
  491. _st(_st(aDataCarrier)._target())._with_(_st(_st(_st($Smalltalk())._current())._at_(self["@viewName"]))._new());
  492. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorWidget)})},
  493. args: ["aDataCarrier"],
  494. source: "toView: aDataCarrier\x0a\x09aDataCarrier target with: (Smalltalk current at: viewName) new",
  495. messageSends: ["with:", "target", "new", "at:", "current"],
  496. referencedClasses: ["Smalltalk"]
  497. }),
  498. smalltalk.TrappedProcessorWidget);
  499. smalltalk.addMethod(
  500. smalltalk.method({
  501. selector: "viewName:",
  502. category: 'accessing',
  503. fn: function (aString){
  504. var self=this;
  505. return smalltalk.withContext(function($ctx1) {
  506. self["@viewName"]=aString;
  507. return self}, function($ctx1) {$ctx1.fill(self,"viewName:",{aString:aString},smalltalk.TrappedProcessorWidget)})},
  508. args: ["aString"],
  509. source: "viewName: aString\x0a\x09viewName := aString",
  510. messageSends: [],
  511. referencedClasses: []
  512. }),
  513. smalltalk.TrappedProcessorWidget);
  514. smalltalk.addMethod(
  515. smalltalk.method({
  516. selector: "new:",
  517. category: 'instance creation',
  518. fn: function (aString){
  519. var self=this;
  520. return smalltalk.withContext(function($ctx1) {
  521. var $2,$3,$1;
  522. $2=self._new();
  523. _st($2)._viewName_(aString);
  524. $3=_st($2)._yourself();
  525. $1=$3;
  526. return $1;
  527. }, function($ctx1) {$ctx1.fill(self,"new:",{aString:aString},smalltalk.TrappedProcessorWidget.klass)})},
  528. args: ["aString"],
  529. source: "new: aString\x0a\x09^self new\x0a\x09\x09viewName: aString;\x0a\x09\x09yourself",
  530. messageSends: ["viewName:", "new", "yourself"],
  531. referencedClasses: []
  532. }),
  533. smalltalk.TrappedProcessorWidget.klass);
  534. smalltalk.addMethod(
  535. smalltalk.method({
  536. selector: "modifyTarget",
  537. category: '*Trapped-Processors',
  538. fn: function (){
  539. var self=this;
  540. return smalltalk.withContext(function($ctx1) {
  541. _st(self._target())._modify_((function(){
  542. return smalltalk.withContext(function($ctx2) {
  543. return self._value();
  544. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  545. return self}, function($ctx1) {$ctx1.fill(self,"modifyTarget",{},smalltalk.TrappedDataCarrier)})},
  546. args: [],
  547. source: "modifyTarget\x0a\x09self target modify: [ self value ]",
  548. messageSends: ["modify:", "target", "value"],
  549. referencedClasses: []
  550. }),
  551. smalltalk.TrappedDataCarrier);
  552. smalltalk.addMethod(
  553. smalltalk.method({
  554. selector: "modifyTargetByPerforming:",
  555. category: '*Trapped-Processors',
  556. fn: function (aString){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) {
  559. _st(self._target())._modify_((function(m){
  560. return smalltalk.withContext(function($ctx2) {
  561. return _st(m)._perform_(aString);
  562. }, function($ctx2) {$ctx2.fillBlock({m:m},$ctx1,1)})}));
  563. return self}, function($ctx1) {$ctx1.fill(self,"modifyTargetByPerforming:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  564. args: ["aString"],
  565. source: "modifyTargetByPerforming: aString\x0a\x09self target modify: [ :m | m perform: aString ]",
  566. messageSends: ["modify:", "target", "perform:"],
  567. referencedClasses: []
  568. }),
  569. smalltalk.TrappedDataCarrier);
  570. smalltalk.addMethod(
  571. smalltalk.method({
  572. selector: "toTargetAttr:",
  573. category: '*Trapped-Processors',
  574. fn: function (aString){
  575. var self=this;
  576. return smalltalk.withContext(function($ctx1) {
  577. var $1,$3,$2;
  578. $1=_st(self._target())._asJQuery();
  579. $3=self._value();
  580. $ctx1.sendIdx["value"]=1;
  581. if(($receiver = $3) == nil || $receiver == null){
  582. $2=(function(){
  583. return smalltalk.withContext(function($ctx2) {
  584. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})});
  585. } else {
  586. var o;
  587. o=$receiver;
  588. $2=_st(o)._value();
  589. };
  590. _st($1)._attr_put_(aString,$2);
  591. return self}, function($ctx1) {$ctx1.fill(self,"toTargetAttr:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  592. args: ["aString"],
  593. source: "toTargetAttr: aString\x0a\x09self target asJQuery attr: aString put: (self value ifNotNil: [ :o | o value ] ifNil: [[]])",
  594. messageSends: ["attr:put:", "asJQuery", "target", "ifNotNil:ifNil:", "value"],
  595. referencedClasses: []
  596. }),
  597. smalltalk.TrappedDataCarrier);
  598. smalltalk.addMethod(
  599. smalltalk.method({
  600. selector: "toTargetContents",
  601. category: '*Trapped-Processors',
  602. fn: function (){
  603. var self=this;
  604. return smalltalk.withContext(function($ctx1) {
  605. _st(self._target())._contents_(self._value());
  606. return self}, function($ctx1) {$ctx1.fill(self,"toTargetContents",{},smalltalk.TrappedDataCarrier)})},
  607. args: [],
  608. source: "toTargetContents\x0a\x09self target contents: self value",
  609. messageSends: ["contents:", "target", "value"],
  610. referencedClasses: []
  611. }),
  612. smalltalk.TrappedDataCarrier);
  613. smalltalk.addMethod(
  614. smalltalk.method({
  615. selector: "toTargetValue",
  616. category: '*Trapped-Processors',
  617. fn: function (){
  618. var self=this;
  619. return smalltalk.withContext(function($ctx1) {
  620. var $1,$3,$2;
  621. $1=_st(self._target())._asJQuery();
  622. $3=self._value();
  623. $ctx1.sendIdx["value"]=1;
  624. if(($receiver = $3) == nil || $receiver == null){
  625. $2=(function(){
  626. return smalltalk.withContext(function($ctx2) {
  627. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})});
  628. } else {
  629. var o;
  630. o=$receiver;
  631. $2=_st(o)._value();
  632. };
  633. _st($1)._val_($2);
  634. return self}, function($ctx1) {$ctx1.fill(self,"toTargetValue",{},smalltalk.TrappedDataCarrier)})},
  635. args: [],
  636. source: "toTargetValue\x0a\x09self target asJQuery val: (self value ifNotNil: [ :o | o value ] ifNil: [[]])",
  637. messageSends: ["val:", "asJQuery", "target", "ifNotNil:ifNil:", "value"],
  638. referencedClasses: []
  639. }),
  640. smalltalk.TrappedDataCarrier);
  641. smalltalk.addMethod(
  642. smalltalk.method({
  643. selector: "dataToView:",
  644. category: '*Trapped-Processors',
  645. fn: function (aBlock){
  646. var self=this;
  647. function $TrappedProcessorDataAdhoc(){return smalltalk.TrappedProcessorDataAdhoc||(typeof TrappedProcessorDataAdhoc=="undefined"?nil:TrappedProcessorDataAdhoc)}
  648. return smalltalk.withContext(function($ctx1) {
  649. var $1;
  650. $1=_st($TrappedProcessorDataAdhoc())._newToView_(aBlock);
  651. return $1;
  652. }, function($ctx1) {$ctx1.fill(self,"dataToView:",{aBlock:aBlock},smalltalk.TrappedProcessor.klass)})},
  653. args: ["aBlock"],
  654. source: "dataToView: aBlock\x0a\x09^TrappedProcessorDataAdhoc newToView: aBlock",
  655. messageSends: ["newToView:"],
  656. referencedClasses: ["TrappedProcessorDataAdhoc"]
  657. }),
  658. smalltalk.TrappedProcessor.klass);
  659. smalltalk.addMethod(
  660. smalltalk.method({
  661. selector: "guardContents:",
  662. category: '*Trapped-Processors',
  663. fn: function (anArray){
  664. var self=this;
  665. function $TrappedProcessorGuardContents(){return smalltalk.TrappedProcessorGuardContents||(typeof TrappedProcessorGuardContents=="undefined"?nil:TrappedProcessorGuardContents)}
  666. return smalltalk.withContext(function($ctx1) {
  667. var $1;
  668. $1=_st($TrappedProcessorGuardContents())._new_(anArray);
  669. return $1;
  670. }, function($ctx1) {$ctx1.fill(self,"guardContents:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
  671. args: ["anArray"],
  672. source: "guardContents: anArray\x0a\x09^TrappedProcessorGuardContents new: anArray",
  673. messageSends: ["new:"],
  674. referencedClasses: ["TrappedProcessorGuardContents"]
  675. }),
  676. smalltalk.TrappedProcessor.klass);
  677. smalltalk.addMethod(
  678. smalltalk.method({
  679. selector: "guardProc:",
  680. category: '*Trapped-Processors',
  681. fn: function (anArray){
  682. var self=this;
  683. function $TrappedProcessorGuardProc(){return smalltalk.TrappedProcessorGuardProc||(typeof TrappedProcessorGuardProc=="undefined"?nil:TrappedProcessorGuardProc)}
  684. return smalltalk.withContext(function($ctx1) {
  685. var $1;
  686. $1=_st($TrappedProcessorGuardProc())._new_(anArray);
  687. return $1;
  688. }, function($ctx1) {$ctx1.fill(self,"guardProc:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
  689. args: ["anArray"],
  690. source: "guardProc: anArray\x0a\x09^TrappedProcessorGuardProc new: anArray",
  691. messageSends: ["new:"],
  692. referencedClasses: ["TrappedProcessorGuardProc"]
  693. }),
  694. smalltalk.TrappedProcessor.klass);
  695. smalltalk.addMethod(
  696. smalltalk.method({
  697. selector: "inputChecked",
  698. category: '*Trapped-Processors',
  699. fn: function (){
  700. var self=this;
  701. function $TrappedProcessorInputChecked(){return smalltalk.TrappedProcessorInputChecked||(typeof TrappedProcessorInputChecked=="undefined"?nil:TrappedProcessorInputChecked)}
  702. return smalltalk.withContext(function($ctx1) {
  703. var $1;
  704. $1=_st($TrappedProcessorInputChecked())._new();
  705. return $1;
  706. }, function($ctx1) {$ctx1.fill(self,"inputChecked",{},smalltalk.TrappedProcessor.klass)})},
  707. args: [],
  708. source: "inputChecked\x0a\x09^TrappedProcessorInputChecked new",
  709. messageSends: ["new"],
  710. referencedClasses: ["TrappedProcessorInputChecked"]
  711. }),
  712. smalltalk.TrappedProcessor.klass);
  713. smalltalk.addMethod(
  714. smalltalk.method({
  715. selector: "inputValue",
  716. category: '*Trapped-Processors',
  717. fn: function (){
  718. var self=this;
  719. function $TrappedProcessorInputValue(){return smalltalk.TrappedProcessorInputValue||(typeof TrappedProcessorInputValue=="undefined"?nil:TrappedProcessorInputValue)}
  720. return smalltalk.withContext(function($ctx1) {
  721. var $1;
  722. $1=_st($TrappedProcessorInputValue())._new();
  723. return $1;
  724. }, function($ctx1) {$ctx1.fill(self,"inputValue",{},smalltalk.TrappedProcessor.klass)})},
  725. args: [],
  726. source: "inputValue\x0a\x09^TrappedProcessorInputValue new",
  727. messageSends: ["new"],
  728. referencedClasses: ["TrappedProcessorInputValue"]
  729. }),
  730. smalltalk.TrappedProcessor.klass);
  731. smalltalk.addMethod(
  732. smalltalk.method({
  733. selector: "loopContents",
  734. category: '*Trapped-Processors',
  735. fn: function (){
  736. var self=this;
  737. function $TrappedProcessorLoopContents(){return smalltalk.TrappedProcessorLoopContents||(typeof TrappedProcessorLoopContents=="undefined"?nil:TrappedProcessorLoopContents)}
  738. return smalltalk.withContext(function($ctx1) {
  739. var $1;
  740. $1=_st($TrappedProcessorLoopContents())._new();
  741. return $1;
  742. }, function($ctx1) {$ctx1.fill(self,"loopContents",{},smalltalk.TrappedProcessor.klass)})},
  743. args: [],
  744. source: "loopContents\x0a\x09^TrappedProcessorLoopContents new",
  745. messageSends: ["new"],
  746. referencedClasses: ["TrappedProcessorLoopContents"]
  747. }),
  748. smalltalk.TrappedProcessor.klass);
  749. smalltalk.addMethod(
  750. smalltalk.method({
  751. selector: "loopProc",
  752. category: '*Trapped-Processors',
  753. fn: function (){
  754. var self=this;
  755. function $TrappedProcessorLoopProc(){return smalltalk.TrappedProcessorLoopProc||(typeof TrappedProcessorLoopProc=="undefined"?nil:TrappedProcessorLoopProc)}
  756. return smalltalk.withContext(function($ctx1) {
  757. var $1;
  758. $1=_st($TrappedProcessorLoopProc())._new();
  759. return $1;
  760. }, function($ctx1) {$ctx1.fill(self,"loopProc",{},smalltalk.TrappedProcessor.klass)})},
  761. args: [],
  762. source: "loopProc\x0a\x09^TrappedProcessorLoopProc new",
  763. messageSends: ["new"],
  764. referencedClasses: ["TrappedProcessorLoopProc"]
  765. }),
  766. smalltalk.TrappedProcessor.klass);
  767. smalltalk.addMethod(
  768. smalltalk.method({
  769. selector: "path",
  770. category: '*Trapped-Processors',
  771. fn: function (){
  772. var self=this;
  773. function $TrappedProcessorDescend(){return smalltalk.TrappedProcessorDescend||(typeof TrappedProcessorDescend=="undefined"?nil:TrappedProcessorDescend)}
  774. return smalltalk.withContext(function($ctx1) {
  775. var $1;
  776. $1=_st($TrappedProcessorDescend())._new();
  777. return $1;
  778. }, function($ctx1) {$ctx1.fill(self,"path",{},smalltalk.TrappedProcessor.klass)})},
  779. args: [],
  780. source: "path\x0a\x09^TrappedProcessorDescend new",
  781. messageSends: ["new"],
  782. referencedClasses: ["TrappedProcessorDescend"]
  783. }),
  784. smalltalk.TrappedProcessor.klass);
  785. smalltalk.addMethod(
  786. smalltalk.method({
  787. selector: "signal:",
  788. category: '*Trapped-Processors',
  789. fn: function (aString){
  790. var self=this;
  791. function $TrappedProcessorSignal(){return smalltalk.TrappedProcessorSignal||(typeof TrappedProcessorSignal=="undefined"?nil:TrappedProcessorSignal)}
  792. return smalltalk.withContext(function($ctx1) {
  793. var $1;
  794. $1=_st($TrappedProcessorSignal())._new_(aString);
  795. return $1;
  796. }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  797. args: ["aString"],
  798. source: "signal: aString\x0a\x09^TrappedProcessorSignal new: aString",
  799. messageSends: ["new:"],
  800. referencedClasses: ["TrappedProcessorSignal"]
  801. }),
  802. smalltalk.TrappedProcessor.klass);
  803. smalltalk.addMethod(
  804. smalltalk.method({
  805. selector: "whenClicked",
  806. category: '*Trapped-Processors',
  807. fn: function (){
  808. var self=this;
  809. function $TrappedProcessorWhenClicked(){return smalltalk.TrappedProcessorWhenClicked||(typeof TrappedProcessorWhenClicked=="undefined"?nil:TrappedProcessorWhenClicked)}
  810. return smalltalk.withContext(function($ctx1) {
  811. var $1;
  812. $1=_st($TrappedProcessorWhenClicked())._new();
  813. return $1;
  814. }, function($ctx1) {$ctx1.fill(self,"whenClicked",{},smalltalk.TrappedProcessor.klass)})},
  815. args: [],
  816. source: "whenClicked\x0a\x09^TrappedProcessorWhenClicked new",
  817. messageSends: ["new"],
  818. referencedClasses: ["TrappedProcessorWhenClicked"]
  819. }),
  820. smalltalk.TrappedProcessor.klass);
  821. smalltalk.addMethod(
  822. smalltalk.method({
  823. selector: "whenSubmitted",
  824. category: '*Trapped-Processors',
  825. fn: function (){
  826. var self=this;
  827. function $TrappedProcessorWhenSubmitted(){return smalltalk.TrappedProcessorWhenSubmitted||(typeof TrappedProcessorWhenSubmitted=="undefined"?nil:TrappedProcessorWhenSubmitted)}
  828. return smalltalk.withContext(function($ctx1) {
  829. var $1;
  830. $1=_st($TrappedProcessorWhenSubmitted())._new();
  831. return $1;
  832. }, function($ctx1) {$ctx1.fill(self,"whenSubmitted",{},smalltalk.TrappedProcessor.klass)})},
  833. args: [],
  834. source: "whenSubmitted\x0a\x09^TrappedProcessorWhenSubmitted new",
  835. messageSends: ["new"],
  836. referencedClasses: ["TrappedProcessorWhenSubmitted"]
  837. }),
  838. smalltalk.TrappedProcessor.klass);
  839. smalltalk.addMethod(
  840. smalltalk.method({
  841. selector: "widget:",
  842. category: '*Trapped-Processors',
  843. fn: function (aString){
  844. var self=this;
  845. function $TrappedProcessorWidget(){return smalltalk.TrappedProcessorWidget||(typeof TrappedProcessorWidget=="undefined"?nil:TrappedProcessorWidget)}
  846. return smalltalk.withContext(function($ctx1) {
  847. var $1;
  848. $1=_st($TrappedProcessorWidget())._new_(aString);
  849. return $1;
  850. }, function($ctx1) {$ctx1.fill(self,"widget:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  851. args: ["aString"],
  852. source: "widget: aString\x0a\x09^TrappedProcessorWidget new: aString",
  853. messageSends: ["new:"],
  854. referencedClasses: ["TrappedProcessorWidget"]
  855. }),
  856. smalltalk.TrappedProcessor.klass);
  857. });