Trapped-Processors.js 39 KB

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