Trapped-Processors.js 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402
  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. _st(aDataCarrier)._toTargetAttr_(self["@attrName"]);
  29. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorAttribute)})},
  30. args: ["aDataCarrier"],
  31. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetAttr: attrName",
  32. messageSends: ["toTargetAttr:"],
  33. referencedClasses: []
  34. }),
  35. smalltalk.TrappedProcessorAttribute);
  36. smalltalk.addMethod(
  37. smalltalk.method({
  38. selector: "new:",
  39. category: 'instance creation',
  40. fn: function (aString){
  41. var self=this;
  42. return smalltalk.withContext(function($ctx1) {
  43. var $2,$3,$1;
  44. $2=self._new();
  45. _st($2)._attrName_(aString);
  46. $3=_st($2)._yourself();
  47. $1=$3;
  48. return $1;
  49. }, function($ctx1) {$ctx1.fill(self,"new:",{aString:aString},smalltalk.TrappedProcessorAttribute.klass)})},
  50. args: ["aString"],
  51. source: "new: aString\x0a\x09^self new\x0a\x09\x09attrName: aString;\x0a\x09\x09yourself",
  52. messageSends: ["attrName:", "new", "yourself"],
  53. referencedClasses: []
  54. }),
  55. smalltalk.TrappedProcessorAttribute.klass);
  56. smalltalk.addClass('TrappedProcessorDataAdhoc', smalltalk.TrappedDataExpectingProcessor, ['toViewBlock'], 'Trapped-Processors');
  57. smalltalk.TrappedProcessorDataAdhoc.comment="I put data into target via contents: in toView:";
  58. smalltalk.addMethod(
  59. smalltalk.method({
  60. selector: "toView:",
  61. category: 'data transformation',
  62. fn: function (aDataCarrier){
  63. var self=this;
  64. return smalltalk.withContext(function($ctx1) {
  65. _st(self["@toViewBlock"])._value_(aDataCarrier);
  66. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorDataAdhoc)})},
  67. args: ["aDataCarrier"],
  68. source: "toView: aDataCarrier\x0a\x09toViewBlock value: aDataCarrier",
  69. messageSends: ["value:"],
  70. referencedClasses: []
  71. }),
  72. smalltalk.TrappedProcessorDataAdhoc);
  73. smalltalk.addMethod(
  74. smalltalk.method({
  75. selector: "toViewBlock:",
  76. category: 'accessing',
  77. fn: function (aBlock){
  78. var self=this;
  79. return smalltalk.withContext(function($ctx1) {
  80. self["@toViewBlock"]=aBlock;
  81. return self}, function($ctx1) {$ctx1.fill(self,"toViewBlock:",{aBlock:aBlock},smalltalk.TrappedProcessorDataAdhoc)})},
  82. args: ["aBlock"],
  83. source: "toViewBlock: aBlock\x0a\x09toViewBlock := aBlock",
  84. messageSends: [],
  85. referencedClasses: []
  86. }),
  87. smalltalk.TrappedProcessorDataAdhoc);
  88. smalltalk.addMethod(
  89. smalltalk.method({
  90. selector: "newToView:",
  91. category: 'instance creation',
  92. fn: function (aBlock){
  93. var self=this;
  94. return smalltalk.withContext(function($ctx1) {
  95. var $2,$3,$1;
  96. $2=self._new();
  97. _st($2)._toViewBlock_(aBlock);
  98. $3=_st($2)._yourself();
  99. $1=$3;
  100. return $1;
  101. }, function($ctx1) {$ctx1.fill(self,"newToView:",{aBlock:aBlock},smalltalk.TrappedProcessorDataAdhoc.klass)})},
  102. args: ["aBlock"],
  103. source: "newToView: aBlock\x0a\x09^self new\x0a\x09\x09toViewBlock: aBlock;\x0a\x09\x09yourself",
  104. messageSends: ["toViewBlock:", "new", "yourself"],
  105. referencedClasses: []
  106. }),
  107. smalltalk.TrappedProcessorDataAdhoc.klass);
  108. smalltalk.addClass('TrappedProcessorDescend', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  109. smalltalk.TrappedProcessorDescend.comment="I intepret data-trap in descendants of my brush.";
  110. smalltalk.addMethod(
  111. smalltalk.method({
  112. selector: "toView:",
  113. category: 'data transformation',
  114. fn: function (aDataCarrier){
  115. var self=this;
  116. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  117. return smalltalk.withContext(function($ctx1) {
  118. _st(_st($Trapped())._current())._injectToChildren_(_st(_st(aDataCarrier)._target())._element());
  119. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorDescend)})},
  120. args: ["aDataCarrier"],
  121. source: "toView: aDataCarrier\x0a\x09Trapped current injectToChildren: aDataCarrier target element",
  122. messageSends: ["injectToChildren:", "current", "element", "target"],
  123. referencedClasses: ["Trapped"]
  124. }),
  125. smalltalk.TrappedProcessorDescend);
  126. smalltalk.addClass('TrappedProcessorGuardBase', smalltalk.TrappedProcessor, ['guardPath'], 'Trapped-Processors');
  127. 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.";
  128. smalltalk.addMethod(
  129. smalltalk.method({
  130. selector: "guardPath:",
  131. category: 'accessing',
  132. fn: function (anArray){
  133. var self=this;
  134. return smalltalk.withContext(function($ctx1) {
  135. self["@guardPath"]=anArray;
  136. return self}, function($ctx1) {$ctx1.fill(self,"guardPath:",{anArray:anArray},smalltalk.TrappedProcessorGuardBase)})},
  137. args: ["anArray"],
  138. source: "guardPath: anArray\x0a\x09guardPath := anArray",
  139. messageSends: [],
  140. referencedClasses: []
  141. }),
  142. smalltalk.TrappedProcessorGuardBase);
  143. smalltalk.addMethod(
  144. smalltalk.method({
  145. selector: "toModel:",
  146. category: 'data transformation',
  147. fn: function (aDataCarrier){
  148. var self=this;
  149. return smalltalk.withContext(function($ctx1) {
  150. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorGuardBase)})},
  151. args: ["aDataCarrier"],
  152. source: "toModel: aDataCarrier\x0a\x09\x22stop\x22",
  153. messageSends: [],
  154. referencedClasses: []
  155. }),
  156. smalltalk.TrappedProcessorGuardBase);
  157. smalltalk.addMethod(
  158. smalltalk.method({
  159. selector: "toView:",
  160. category: 'data transformation',
  161. fn: function (aDataCarrier){
  162. var self=this;
  163. return smalltalk.withContext(function($ctx1) {
  164. self._subclassResponsibility();
  165. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorGuardBase)})},
  166. args: ["aDataCarrier"],
  167. source: "toView: aDataCarrier\x0a\x09self subclassResponsibility",
  168. messageSends: ["subclassResponsibility"],
  169. referencedClasses: []
  170. }),
  171. smalltalk.TrappedProcessorGuardBase);
  172. smalltalk.addMethod(
  173. smalltalk.method({
  174. selector: "new:",
  175. category: 'instance creation',
  176. fn: function (anArray){
  177. var self=this;
  178. return smalltalk.withContext(function($ctx1) {
  179. var $2,$3,$1;
  180. $2=self._new();
  181. _st($2)._guardPath_(anArray);
  182. $3=_st($2)._yourself();
  183. $1=$3;
  184. return $1;
  185. }, function($ctx1) {$ctx1.fill(self,"new:",{anArray:anArray},smalltalk.TrappedProcessorGuardBase.klass)})},
  186. args: ["anArray"],
  187. source: "new: anArray\x0a\x09^ self new\x0a\x09\x09guardPath: anArray;\x0a\x09\x09yourself",
  188. messageSends: ["guardPath:", "new", "yourself"],
  189. referencedClasses: []
  190. }),
  191. smalltalk.TrappedProcessorGuardBase.klass);
  192. smalltalk.addClass('TrappedProcessorGuard', smalltalk.TrappedProcessorGuardBase, [], 'Trapped-Processors');
  193. smalltalk.TrappedProcessorGuard.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,";
  194. smalltalk.addMethod(
  195. smalltalk.method({
  196. selector: "toView:",
  197. category: 'data transformation',
  198. fn: function (aDataCarrier){
  199. var self=this;
  200. var frozen,xon;
  201. return smalltalk.withContext(function($ctx1) {
  202. var $1,$2;
  203. frozen=_st(aDataCarrier)._copy();
  204. $ctx1.sendIdx["copy"]=1;
  205. xon=_st(frozen)._xontent();
  206. _st(_st(frozen)._target())._trapGuard_contents_(self["@guardPath"],(function(html){
  207. return smalltalk.withContext(function($ctx2) {
  208. $1=_st(frozen)._copy();
  209. _st($1)._target_(_st(html)._root());
  210. _st($1)._xontent_(xon);
  211. $2=_st($1)._proceed();
  212. return $2;
  213. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  214. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,xon:xon},smalltalk.TrappedProcessorGuard)})},
  215. args: ["aDataCarrier"],
  216. source: "toView: aDataCarrier\x0a\x09| frozen xon |\x0a\x09frozen := aDataCarrier copy.\x0a\x09xon := frozen xontent.\x0a\x09frozen target trapGuard: guardPath contents: [ :html | frozen copy target: html root; xontent: xon; proceed ]",
  217. messageSends: ["copy", "xontent", "trapGuard:contents:", "target", "target:", "root", "xontent:", "proceed"],
  218. referencedClasses: []
  219. }),
  220. smalltalk.TrappedProcessorGuard);
  221. smalltalk.addClass('TrappedProcessorInputChecked', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  222. smalltalk.TrappedProcessorInputChecked.comment="I bind to checkbox checked state.";
  223. smalltalk.addMethod(
  224. smalltalk.method({
  225. selector: "installToView:toModel:",
  226. category: 'installation',
  227. fn: function (aDataCarrier,anotherDataCarrier){
  228. var self=this;
  229. var brush;
  230. return smalltalk.withContext(function($ctx1) {
  231. var $1,$2;
  232. brush=_st(aDataCarrier)._target();
  233. _st(brush)._onChange_((function(){
  234. return smalltalk.withContext(function($ctx2) {
  235. $1=_st(anotherDataCarrier)._copy();
  236. _st($1)._value_(_st(_st(brush)._asJQuery())._prop_("checked"));
  237. $2=_st($1)._proceed();
  238. return $2;
  239. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  240. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier,brush:brush},smalltalk.TrappedProcessorInputChecked)})},
  241. args: ["aDataCarrier", "anotherDataCarrier"],
  242. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09| brush |\x0a\x09brush := aDataCarrier target.\x0a\x09brush onChange: [ anotherDataCarrier copy value: (brush asJQuery prop: 'checked'); proceed ]",
  243. messageSends: ["target", "onChange:", "value:", "copy", "prop:", "asJQuery", "proceed"],
  244. referencedClasses: []
  245. }),
  246. smalltalk.TrappedProcessorInputChecked);
  247. smalltalk.addMethod(
  248. smalltalk.method({
  249. selector: "toView:",
  250. category: 'data transformation',
  251. fn: function (aDataCarrier){
  252. var self=this;
  253. return smalltalk.withContext(function($ctx1) {
  254. _st(aDataCarrier)._toTargetProp_("checked");
  255. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorInputChecked)})},
  256. args: ["aDataCarrier"],
  257. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetProp: 'checked'",
  258. messageSends: ["toTargetProp:"],
  259. referencedClasses: []
  260. }),
  261. smalltalk.TrappedProcessorInputChecked);
  262. smalltalk.addClass('TrappedProcessorInputValue', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  263. smalltalk.TrappedProcessorInputValue.comment="I bind to input value.";
  264. smalltalk.addMethod(
  265. smalltalk.method({
  266. selector: "installToView:toModel:",
  267. category: 'installation',
  268. fn: function (aDataCarrier,anotherDataCarrier){
  269. var self=this;
  270. var brush;
  271. return smalltalk.withContext(function($ctx1) {
  272. var $1,$2;
  273. brush=_st(aDataCarrier)._target();
  274. _st(brush)._onChange_((function(){
  275. return smalltalk.withContext(function($ctx2) {
  276. $1=_st(anotherDataCarrier)._copy();
  277. _st($1)._value_(_st(_st(brush)._asJQuery())._val());
  278. $2=_st($1)._proceed();
  279. return $2;
  280. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  281. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier,brush:brush},smalltalk.TrappedProcessorInputValue)})},
  282. args: ["aDataCarrier", "anotherDataCarrier"],
  283. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09| brush |\x0a\x09brush := aDataCarrier target.\x0a\x09brush onChange: [ anotherDataCarrier copy value: brush asJQuery val; proceed ]",
  284. messageSends: ["target", "onChange:", "value:", "copy", "val", "asJQuery", "proceed"],
  285. referencedClasses: []
  286. }),
  287. smalltalk.TrappedProcessorInputValue);
  288. smalltalk.addMethod(
  289. smalltalk.method({
  290. selector: "toView:",
  291. category: 'data transformation',
  292. fn: function (aDataCarrier){
  293. var self=this;
  294. return smalltalk.withContext(function($ctx1) {
  295. _st(aDataCarrier)._toTargetValue();
  296. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorInputValue)})},
  297. args: ["aDataCarrier"],
  298. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetValue",
  299. messageSends: ["toTargetValue"],
  300. referencedClasses: []
  301. }),
  302. smalltalk.TrappedProcessorInputValue);
  303. smalltalk.addClass('TrappedProcessorLoopBase', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  304. 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.";
  305. smalltalk.addMethod(
  306. smalltalk.method({
  307. selector: "toModel:",
  308. category: 'data transformation',
  309. fn: function (aDataCarrier){
  310. var self=this;
  311. return smalltalk.withContext(function($ctx1) {
  312. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorLoopBase)})},
  313. args: ["aDataCarrier"],
  314. source: "toModel: aDataCarrier\x0a\x09\x22stop\x22",
  315. messageSends: [],
  316. referencedClasses: []
  317. }),
  318. smalltalk.TrappedProcessorLoopBase);
  319. smalltalk.addMethod(
  320. smalltalk.method({
  321. selector: "toView:",
  322. category: 'data transformation',
  323. fn: function (aDataCarrier){
  324. var self=this;
  325. return smalltalk.withContext(function($ctx1) {
  326. self._subclassResponsibility();
  327. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorLoopBase)})},
  328. args: ["aDataCarrier"],
  329. source: "toView: aDataCarrier\x0a\x09self subclassResponsibility",
  330. messageSends: ["subclassResponsibility"],
  331. referencedClasses: []
  332. }),
  333. smalltalk.TrappedProcessorLoopBase);
  334. smalltalk.addClass('TrappedProcessorLoopZ', smalltalk.TrappedProcessorLoopBase, [], 'Trapped-Processors');
  335. smalltalk.TrappedProcessorLoopZ.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\x0ascript type=application/x-beacon, noscript, ins or del).";
  336. smalltalk.addMethod(
  337. smalltalk.method({
  338. selector: "toView:",
  339. category: 'data transformation',
  340. fn: function (aDataCarrier){
  341. var self=this;
  342. var frozen,xon;
  343. return smalltalk.withContext(function($ctx1) {
  344. var $1,$2;
  345. frozen=_st(aDataCarrier)._copy();
  346. $ctx1.sendIdx["copy"]=1;
  347. xon=_st(frozen)._xontent();
  348. _st(_st(frozen)._target())._trapIter_after_([],(function(html){
  349. return smalltalk.withContext(function($ctx2) {
  350. $1=_st(frozen)._copy();
  351. _st($1)._target_(_st(html)._root());
  352. _st($1)._xontent_(xon);
  353. $2=_st($1)._proceed();
  354. return $2;
  355. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  356. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,xon:xon},smalltalk.TrappedProcessorLoopZ)})},
  357. args: ["aDataCarrier"],
  358. source: "toView: aDataCarrier\x0a\x09| frozen xon |\x0a\x09frozen := aDataCarrier copy.\x0a\x09xon := frozen xontent.\x0a\x09frozen target trapIter: #() after: [ :html | frozen copy target: html root; xontent: xon; proceed ]",
  359. messageSends: ["copy", "xontent", "trapIter:after:", "target", "target:", "root", "xontent:", "proceed"],
  360. referencedClasses: []
  361. }),
  362. smalltalk.TrappedProcessorLoopZ);
  363. smalltalk.addClass('TrappedProcessorOptionValue', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  364. smalltalk.TrappedProcessorOptionValue.comment="I set the option value.\x0a\x0aAdditionally, when changed (by toView:),\x0aI ping closest <select> with 'trappedselectreplay' event.";
  365. smalltalk.addMethod(
  366. smalltalk.method({
  367. selector: "toView:",
  368. category: 'data transformation',
  369. fn: function (aDataCarrier){
  370. var self=this;
  371. return smalltalk.withContext(function($ctx1) {
  372. _st(aDataCarrier)._toTargetValue();
  373. _st(_st(_st(_st(aDataCarrier)._target())._asJQuery())._closest_("select"))._trigger_("trappedselectreplay");
  374. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorOptionValue)})},
  375. args: ["aDataCarrier"],
  376. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetValue.\x0a\x09(aDataCarrier target asJQuery closest: 'select')\x0a\x09\x09trigger: 'trappedselectreplay'",
  377. messageSends: ["toTargetValue", "trigger:", "closest:", "asJQuery", "target"],
  378. referencedClasses: []
  379. }),
  380. smalltalk.TrappedProcessorOptionValue);
  381. smalltalk.addClass('TrappedProcessorReplace', smalltalk.TrappedProcessor, ['left', 'right'], 'Trapped-Processors');
  382. smalltalk.TrappedProcessorReplace.comment="I convert data to string representation and do a regex replace.\x0aI get two parameters, in toView:, first is replaced with second,\x0aand in toModel:, the second is replaced with first.\x0a\x0aI remove leading '^' and ending '$' from the string used as replacement,\x0aso it safe to replace ^to with ^To, for example.\x0a";
  383. smalltalk.addMethod(
  384. smalltalk.method({
  385. selector: "left:",
  386. category: 'accessing',
  387. fn: function (aString){
  388. var self=this;
  389. return smalltalk.withContext(function($ctx1) {
  390. self["@left"]=aString;
  391. return self}, function($ctx1) {$ctx1.fill(self,"left:",{aString:aString},smalltalk.TrappedProcessorReplace)})},
  392. args: ["aString"],
  393. source: "left: aString\x0a\x09left := aString",
  394. messageSends: [],
  395. referencedClasses: []
  396. }),
  397. smalltalk.TrappedProcessorReplace);
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "right:",
  401. category: 'accessing',
  402. fn: function (aString){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) {
  405. self["@right"]=aString;
  406. return self}, function($ctx1) {$ctx1.fill(self,"right:",{aString:aString},smalltalk.TrappedProcessorReplace)})},
  407. args: ["aString"],
  408. source: "right: aString\x0a\x09right := aString",
  409. messageSends: [],
  410. referencedClasses: []
  411. }),
  412. smalltalk.TrappedProcessorReplace);
  413. smalltalk.addMethod(
  414. smalltalk.method({
  415. selector: "toModel:",
  416. category: 'data transformation',
  417. fn: function (aDataCarrier){
  418. var self=this;
  419. var replacement,old;
  420. return smalltalk.withContext(function($ctx1) {
  421. var $1,$2;
  422. $1=_st(self["@left"])._replace_with_("^\x5c^","");
  423. $ctx1.sendIdx["replace:with:"]=2;
  424. replacement=_st($1)._replace_with_("\x5c$$","");
  425. $ctx1.sendIdx["replace:with:"]=1;
  426. old=_st(_st(aDataCarrier)._value())._asString();
  427. _st(aDataCarrier)._value_whenDifferentFrom_(_st(old)._replace_with_(self["@right"],replacement),old);
  428. $2=_st(aDataCarrier)._proceed();
  429. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier,replacement:replacement,old:old},smalltalk.TrappedProcessorReplace)})},
  430. args: ["aDataCarrier"],
  431. source: "toModel: aDataCarrier\x0a\x09| replacement old |\x0a\x09replacement := (left replace: '^\x5c^' with: '') replace: '\x5c$$' with: ''.\x0a\x09old := aDataCarrier value asString.\x0a\x09aDataCarrier\x0a\x09\x09value: (old replace: right with: replacement) whenDifferentFrom: old;\x0a\x09\x09proceed",
  432. messageSends: ["replace:with:", "asString", "value", "value:whenDifferentFrom:", "proceed"],
  433. referencedClasses: []
  434. }),
  435. smalltalk.TrappedProcessorReplace);
  436. smalltalk.addMethod(
  437. smalltalk.method({
  438. selector: "toView:",
  439. category: 'data transformation',
  440. fn: function (aDataCarrier){
  441. var self=this;
  442. var replacement,old;
  443. return smalltalk.withContext(function($ctx1) {
  444. var $1,$2;
  445. $1=_st(self["@right"])._replace_with_("^\x5c^","");
  446. $ctx1.sendIdx["replace:with:"]=2;
  447. replacement=_st($1)._replace_with_("\x5c$$","");
  448. $ctx1.sendIdx["replace:with:"]=1;
  449. old=_st(_st(aDataCarrier)._value())._asString();
  450. _st(aDataCarrier)._value_whenDifferentFrom_(_st(old)._replace_with_(self["@left"],replacement),old);
  451. $2=_st(aDataCarrier)._proceed();
  452. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,replacement:replacement,old:old},smalltalk.TrappedProcessorReplace)})},
  453. args: ["aDataCarrier"],
  454. source: "toView: aDataCarrier\x0a\x09| replacement old |\x0a\x09replacement := (right replace: '^\x5c^' with: '') replace: '\x5c$$' with: ''.\x0a\x09old := aDataCarrier value asString.\x0a\x09aDataCarrier\x0a\x09\x09value: (old replace: left with: replacement) whenDifferentFrom: old;\x0a\x09\x09proceed",
  455. messageSends: ["replace:with:", "asString", "value", "value:whenDifferentFrom:", "proceed"],
  456. referencedClasses: []
  457. }),
  458. smalltalk.TrappedProcessorReplace);
  459. smalltalk.addMethod(
  460. smalltalk.method({
  461. selector: "new:with:",
  462. category: 'instance creation',
  463. fn: function (aString,anotherString){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) {
  466. var $2,$3,$4,$5,$1;
  467. $2=self._new();
  468. $3=$2;
  469. $4=_st(aString)._asString();
  470. $ctx1.sendIdx["asString"]=1;
  471. _st($3)._left_($4);
  472. _st($2)._right_(_st(anotherString)._asString());
  473. $5=_st($2)._yourself();
  474. $1=$5;
  475. return $1;
  476. }, function($ctx1) {$ctx1.fill(self,"new:with:",{aString:aString,anotherString:anotherString},smalltalk.TrappedProcessorReplace.klass)})},
  477. args: ["aString", "anotherString"],
  478. source: "new: aString with: anotherString\x0a\x09^ self new\x0a\x09\x09left: aString asString;\x0a\x09\x09right: anotherString asString;\x0a\x09\x09yourself",
  479. messageSends: ["left:", "new", "asString", "right:", "yourself"],
  480. referencedClasses: []
  481. }),
  482. smalltalk.TrappedProcessorReplace.klass);
  483. smalltalk.addClass('TrappedProcessorSelectValue', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  484. smalltalk.TrappedProcessorSelectValue.comment="I bind to select value.\x0a\x0aWhen changed (by toView: or by user),\x0aI remember the selected set.\x0a\x0aWhen pinged by 'trappedselectreplay',\x0aI set the remembered value.\x0a\x0aThis allows to have select-option groups\x0awith later setting of option values\x0a(if those are set via related processor 'optionValue',\x0awhich pings me with 'trappedselectreplay').";
  485. smalltalk.addMethod(
  486. smalltalk.method({
  487. selector: "installToView:toModel:",
  488. category: 'installation',
  489. fn: function (aDataCarrier,anotherDataCarrier){
  490. var self=this;
  491. var jq,val;
  492. return smalltalk.withContext(function($ctx1) {
  493. var $1,$2,$3,$4;
  494. jq=_st(_st(aDataCarrier)._target())._asJQuery();
  495. val=_st(jq)._val();
  496. $ctx1.sendIdx["val"]=1;
  497. $1=jq;
  498. _st($1)._data_("trapped.saved.val");
  499. $ctx1.sendIdx["data:"]=1;
  500. _st($1)._on_bind_("change",(function(){
  501. return smalltalk.withContext(function($ctx2) {
  502. $2=_st(anotherDataCarrier)._copy();
  503. _st($2)._value_(_st(jq)._val());
  504. $3=_st($2)._proceed();
  505. return $3;
  506. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  507. $ctx1.sendIdx["on:bind:"]=1;
  508. $4=_st($1)._on_bind_("trappedselectreplay",(function(){
  509. return smalltalk.withContext(function($ctx2) {
  510. return _st(jq)._val_(_st(jq)._data_("trapped.saved.val"));
  511. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  512. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier,jq:jq,val:val},smalltalk.TrappedProcessorSelectValue)})},
  513. args: ["aDataCarrier", "anotherDataCarrier"],
  514. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09| jq val |\x0a\x09jq := aDataCarrier target asJQuery.\x0a\x09val := jq val.\x0a\x09jq\x0a\x09\x09data: 'trapped.saved.val';\x0a\x09\x09on: 'change' bind: [ anotherDataCarrier copy value: jq val; proceed ];\x0a\x09\x09on: 'trappedselectreplay' bind: [ jq val: (jq data: 'trapped.saved.val') ]",
  515. messageSends: ["asJQuery", "target", "val", "data:", "on:bind:", "value:", "copy", "proceed", "val:"],
  516. referencedClasses: []
  517. }),
  518. smalltalk.TrappedProcessorSelectValue);
  519. smalltalk.addMethod(
  520. smalltalk.method({
  521. selector: "toView:",
  522. category: 'data transformation',
  523. fn: function (aDataCarrier){
  524. var self=this;
  525. return smalltalk.withContext(function($ctx1) {
  526. _st(aDataCarrier)._toTargetValue();
  527. _st(_st(_st(aDataCarrier)._target())._asJQuery())._data_put_("trapped.saved.val",_st(aDataCarrier)._value());
  528. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorSelectValue)})},
  529. args: ["aDataCarrier"],
  530. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetValue.\x0a\x09aDataCarrier target asJQuery data: 'trapped.saved.val' put: aDataCarrier value",
  531. messageSends: ["toTargetValue", "data:put:", "asJQuery", "target", "value"],
  532. referencedClasses: []
  533. }),
  534. smalltalk.TrappedProcessorSelectValue);
  535. smalltalk.addClass('TrappedProcessorSignal', smalltalk.TrappedProcessor, ['selector'], 'Trapped-Processors');
  536. smalltalk.TrappedProcessorSignal.comment="Instead of writing data directly to model,\x0aI instead modify it by sending a message specified when instantiating me.";
  537. smalltalk.addMethod(
  538. smalltalk.method({
  539. selector: "selector:",
  540. category: 'accessing',
  541. fn: function (aString){
  542. var self=this;
  543. return smalltalk.withContext(function($ctx1) {
  544. self["@selector"]=aString;
  545. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.TrappedProcessorSignal)})},
  546. args: ["aString"],
  547. source: "selector: aString\x0a\x09selector := aString",
  548. messageSends: [],
  549. referencedClasses: []
  550. }),
  551. smalltalk.TrappedProcessorSignal);
  552. smalltalk.addMethod(
  553. smalltalk.method({
  554. selector: "toModel:",
  555. category: 'data transformation',
  556. fn: function (aDataCarrier){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) {
  559. _st(aDataCarrier)._modifyTargetByPerforming_(self["@selector"]);
  560. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorSignal)})},
  561. args: ["aDataCarrier"],
  562. source: "toModel: aDataCarrier\x0a\x09aDataCarrier modifyTargetByPerforming: selector",
  563. messageSends: ["modifyTargetByPerforming:"],
  564. referencedClasses: []
  565. }),
  566. smalltalk.TrappedProcessorSignal);
  567. smalltalk.addMethod(
  568. smalltalk.method({
  569. selector: "toView:",
  570. category: 'data transformation',
  571. fn: function (aDataCarrier){
  572. var self=this;
  573. return smalltalk.withContext(function($ctx1) {
  574. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorSignal)})},
  575. args: ["aDataCarrier"],
  576. source: "toView: aDataCarrier\x0a\x09\x22stop\x22",
  577. messageSends: [],
  578. referencedClasses: []
  579. }),
  580. smalltalk.TrappedProcessorSignal);
  581. smalltalk.addMethod(
  582. smalltalk.method({
  583. selector: "new:",
  584. category: 'instance creation',
  585. fn: function (aString){
  586. var self=this;
  587. return smalltalk.withContext(function($ctx1) {
  588. var $2,$3,$1;
  589. $2=self._new();
  590. _st($2)._selector_(aString);
  591. $3=_st($2)._yourself();
  592. $1=$3;
  593. return $1;
  594. }, function($ctx1) {$ctx1.fill(self,"new:",{aString:aString},smalltalk.TrappedProcessorSignal.klass)})},
  595. args: ["aString"],
  596. source: "new: aString\x0a\x09^self new\x0a\x09\x09selector: aString;\x0a\x09\x09yourself",
  597. messageSends: ["selector:", "new", "yourself"],
  598. referencedClasses: []
  599. }),
  600. smalltalk.TrappedProcessorSignal.klass);
  601. smalltalk.addClass('TrappedProcessorToBlackboard', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  602. smalltalk.TrappedProcessorToBlackboard.comment="I save the data to blackboard in toModel:, to position specified by path.";
  603. smalltalk.addMethod(
  604. smalltalk.method({
  605. selector: "toModel:",
  606. category: 'data transformation',
  607. fn: function (aDataCarrier){
  608. var self=this;
  609. return smalltalk.withContext(function($ctx1) {
  610. _st(_st(aDataCarrier)._target())._modify_((function(){
  611. return smalltalk.withContext(function($ctx2) {
  612. return _st(aDataCarrier)._value();
  613. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  614. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorToBlackboard)})},
  615. args: ["aDataCarrier"],
  616. source: "toModel: aDataCarrier\x0a\x09aDataCarrier target modify: [ aDataCarrier value ]",
  617. messageSends: ["modify:", "target", "value"],
  618. referencedClasses: []
  619. }),
  620. smalltalk.TrappedProcessorToBlackboard);
  621. smalltalk.addClass('TrappedProcessorUriComponentDecode', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  622. smalltalk.TrappedProcessorUriComponentDecode.comment="I uriComponentDecode in toView:\x0aand encode in toModel:";
  623. smalltalk.addMethod(
  624. smalltalk.method({
  625. selector: "toModel:",
  626. category: 'data transformation',
  627. fn: function (aDataCarrier){
  628. var self=this;
  629. return smalltalk.withContext(function($ctx1) {
  630. var $1;
  631. _st(aDataCarrier)._value_(_st(_st(aDataCarrier)._value())._uriComponentEncoded());
  632. $1=_st(aDataCarrier)._proceed();
  633. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorUriComponentDecode)})},
  634. args: ["aDataCarrier"],
  635. source: "toModel: aDataCarrier\x0a\x09aDataCarrier\x0a\x09\x09value: aDataCarrier value uriComponentEncoded;\x0a\x09\x09proceed",
  636. messageSends: ["value:", "uriComponentEncoded", "value", "proceed"],
  637. referencedClasses: []
  638. }),
  639. smalltalk.TrappedProcessorUriComponentDecode);
  640. smalltalk.addMethod(
  641. smalltalk.method({
  642. selector: "toView:",
  643. category: 'data transformation',
  644. fn: function (aDataCarrier){
  645. var self=this;
  646. return smalltalk.withContext(function($ctx1) {
  647. var $1;
  648. _st(aDataCarrier)._value_(_st(_st(aDataCarrier)._value())._uriComponentDecoded());
  649. $1=_st(aDataCarrier)._proceed();
  650. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorUriComponentDecode)})},
  651. args: ["aDataCarrier"],
  652. source: "toView: aDataCarrier\x0a\x09aDataCarrier\x0a\x09\x09value: aDataCarrier value uriComponentDecoded;\x0a\x09\x09proceed",
  653. messageSends: ["value:", "uriComponentDecoded", "value", "proceed"],
  654. referencedClasses: []
  655. }),
  656. smalltalk.TrappedProcessorUriComponentDecode);
  657. smalltalk.addClass('TrappedProcessorUriComponentEncode', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  658. smalltalk.TrappedProcessorUriComponentEncode.comment="I uriComponentEncode in toView:\x0aand decode in toModel:";
  659. smalltalk.addMethod(
  660. smalltalk.method({
  661. selector: "toModel:",
  662. category: 'data transformation',
  663. fn: function (aDataCarrier){
  664. var self=this;
  665. return smalltalk.withContext(function($ctx1) {
  666. var $1;
  667. _st(aDataCarrier)._value_(_st(_st(aDataCarrier)._value())._uriComponentDecoded());
  668. $1=_st(aDataCarrier)._proceed();
  669. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorUriComponentEncode)})},
  670. args: ["aDataCarrier"],
  671. source: "toModel: aDataCarrier\x0a\x09aDataCarrier\x0a\x09\x09value: aDataCarrier value uriComponentDecoded;\x0a\x09\x09proceed",
  672. messageSends: ["value:", "uriComponentDecoded", "value", "proceed"],
  673. referencedClasses: []
  674. }),
  675. smalltalk.TrappedProcessorUriComponentEncode);
  676. smalltalk.addMethod(
  677. smalltalk.method({
  678. selector: "toView:",
  679. category: 'data transformation',
  680. fn: function (aDataCarrier){
  681. var self=this;
  682. return smalltalk.withContext(function($ctx1) {
  683. var $1;
  684. _st(aDataCarrier)._value_(_st(_st(aDataCarrier)._value())._uriComponentEncoded());
  685. $1=_st(aDataCarrier)._proceed();
  686. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorUriComponentEncode)})},
  687. args: ["aDataCarrier"],
  688. source: "toView: aDataCarrier\x0a\x09aDataCarrier\x0a\x09\x09value: aDataCarrier value uriComponentEncoded;\x0a\x09\x09proceed",
  689. messageSends: ["value:", "uriComponentEncoded", "value", "proceed"],
  690. referencedClasses: []
  691. }),
  692. smalltalk.TrappedProcessorUriComponentEncode);
  693. smalltalk.addClass('TrappedProcessorWhenClicked', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  694. smalltalk.TrappedProcessorWhenClicked.comment="I bind to an element and send true to blackboard when clicked.";
  695. smalltalk.addMethod(
  696. smalltalk.method({
  697. selector: "installToView:toModel:",
  698. category: 'installation',
  699. fn: function (aDataCarrier,anotherDataCarrier){
  700. var self=this;
  701. return smalltalk.withContext(function($ctx1) {
  702. _st(_st(aDataCarrier)._target())._onClick_((function(){
  703. return smalltalk.withContext(function($ctx2) {
  704. _st(_st(anotherDataCarrier)._copy())._proceed();
  705. return false;
  706. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  707. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier},smalltalk.TrappedProcessorWhenClicked)})},
  708. args: ["aDataCarrier", "anotherDataCarrier"],
  709. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09aDataCarrier target onClick: [ anotherDataCarrier copy proceed. false ]",
  710. messageSends: ["onClick:", "target", "proceed", "copy"],
  711. referencedClasses: []
  712. }),
  713. smalltalk.TrappedProcessorWhenClicked);
  714. smalltalk.addClass('TrappedProcessorWhenSubmitted', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  715. smalltalk.TrappedProcessorWhenSubmitted.comment="I bind to a form and send true to blackboard when submitted.";
  716. smalltalk.addMethod(
  717. smalltalk.method({
  718. selector: "installToView:toModel:",
  719. category: 'installation',
  720. fn: function (aDataCarrier,anotherDataCarrier){
  721. var self=this;
  722. return smalltalk.withContext(function($ctx1) {
  723. _st(_st(aDataCarrier)._target())._onSubmit_((function(){
  724. return smalltalk.withContext(function($ctx2) {
  725. _st(_st(anotherDataCarrier)._copy())._proceed();
  726. return false;
  727. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  728. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier},smalltalk.TrappedProcessorWhenSubmitted)})},
  729. args: ["aDataCarrier", "anotherDataCarrier"],
  730. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09aDataCarrier target onSubmit: [ anotherDataCarrier copy proceed. false ]",
  731. messageSends: ["onSubmit:", "target", "proceed", "copy"],
  732. referencedClasses: []
  733. }),
  734. smalltalk.TrappedProcessorWhenSubmitted);
  735. smalltalk.addClass('TrappedProcessorWidget', smalltalk.TrappedProcessor, ['viewName'], 'Trapped-Processors');
  736. smalltalk.TrappedProcessorWidget.comment="I insert a widget instance of the class specified when creating me.";
  737. smalltalk.addMethod(
  738. smalltalk.method({
  739. selector: "toView:",
  740. category: 'data transformation',
  741. fn: function (aDataCarrier){
  742. var self=this;
  743. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  744. return smalltalk.withContext(function($ctx1) {
  745. _st(_st(aDataCarrier)._target())._with_(_st(_st(_st($Smalltalk())._current())._at_(self["@viewName"]))._new());
  746. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorWidget)})},
  747. args: ["aDataCarrier"],
  748. source: "toView: aDataCarrier\x0a\x09aDataCarrier target with: (Smalltalk current at: viewName) new",
  749. messageSends: ["with:", "target", "new", "at:", "current"],
  750. referencedClasses: ["Smalltalk"]
  751. }),
  752. smalltalk.TrappedProcessorWidget);
  753. smalltalk.addMethod(
  754. smalltalk.method({
  755. selector: "viewName:",
  756. category: 'accessing',
  757. fn: function (aString){
  758. var self=this;
  759. return smalltalk.withContext(function($ctx1) {
  760. self["@viewName"]=aString;
  761. return self}, function($ctx1) {$ctx1.fill(self,"viewName:",{aString:aString},smalltalk.TrappedProcessorWidget)})},
  762. args: ["aString"],
  763. source: "viewName: aString\x0a\x09viewName := aString",
  764. messageSends: [],
  765. referencedClasses: []
  766. }),
  767. smalltalk.TrappedProcessorWidget);
  768. smalltalk.addMethod(
  769. smalltalk.method({
  770. selector: "new:",
  771. category: 'instance creation',
  772. fn: function (aString){
  773. var self=this;
  774. return smalltalk.withContext(function($ctx1) {
  775. var $2,$3,$1;
  776. $2=self._new();
  777. _st($2)._viewName_(aString);
  778. $3=_st($2)._yourself();
  779. $1=$3;
  780. return $1;
  781. }, function($ctx1) {$ctx1.fill(self,"new:",{aString:aString},smalltalk.TrappedProcessorWidget.klass)})},
  782. args: ["aString"],
  783. source: "new: aString\x0a\x09^self new\x0a\x09\x09viewName: aString;\x0a\x09\x09yourself",
  784. messageSends: ["viewName:", "new", "yourself"],
  785. referencedClasses: []
  786. }),
  787. smalltalk.TrappedProcessorWidget.klass);
  788. smalltalk.addClass('TrappedProcessorXontent', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  789. smalltalk.TrappedProcessorXontent.comment="I am used to show xontent of the brush I am installed on\x0a(see jQuery plugin Xontent for details).\x0a\x0aI clone xontent of the brush, put it into HTML\x0aand interpret all contained data-trap attributes.";
  790. smalltalk.addMethod(
  791. smalltalk.method({
  792. selector: "toView:",
  793. category: 'data transformation',
  794. fn: function (aDataCarrier){
  795. var self=this;
  796. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  797. return smalltalk.withContext(function($ctx1) {
  798. _st(_st(_st(aDataCarrier)._target())._asJQuery())._append_(_st(_st($Trapped())._current())._cloneAndInject_(_st(_st(aDataCarrier)._xontent())._get_((0))));
  799. _st(aDataCarrier)._proceed();
  800. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorXontent)})},
  801. args: ["aDataCarrier"],
  802. source: "toView: aDataCarrier\x0a\x09aDataCarrier target asJQuery append: (Trapped current cloneAndInject: (aDataCarrier xontent get: 0)).\x0a\x09aDataCarrier proceed",
  803. messageSends: ["append:", "asJQuery", "target", "cloneAndInject:", "current", "get:", "xontent", "proceed"],
  804. referencedClasses: ["Trapped"]
  805. }),
  806. smalltalk.TrappedProcessorXontent);
  807. smalltalk.addMethod(
  808. smalltalk.method({
  809. selector: "modifyTarget",
  810. category: '*Trapped-Processors',
  811. fn: function (){
  812. var self=this;
  813. return smalltalk.withContext(function($ctx1) {
  814. _st(self._target())._modify_((function(){
  815. return smalltalk.withContext(function($ctx2) {
  816. return self._value();
  817. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  818. return self}, function($ctx1) {$ctx1.fill(self,"modifyTarget",{},smalltalk.TrappedDataCarrier)})},
  819. args: [],
  820. source: "modifyTarget\x0a\x09self target modify: [ self value ]",
  821. messageSends: ["modify:", "target", "value"],
  822. referencedClasses: []
  823. }),
  824. smalltalk.TrappedDataCarrier);
  825. smalltalk.addMethod(
  826. smalltalk.method({
  827. selector: "modifyTargetByPerforming:",
  828. category: '*Trapped-Processors',
  829. fn: function (aString){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) {
  832. _st(self._target())._modify_((function(m){
  833. return smalltalk.withContext(function($ctx2) {
  834. return _st(m)._perform_(aString);
  835. }, function($ctx2) {$ctx2.fillBlock({m:m},$ctx1,1)})}));
  836. return self}, function($ctx1) {$ctx1.fill(self,"modifyTargetByPerforming:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  837. args: ["aString"],
  838. source: "modifyTargetByPerforming: aString\x0a\x09self target modify: [ :m | m perform: aString ]",
  839. messageSends: ["modify:", "target", "perform:"],
  840. referencedClasses: []
  841. }),
  842. smalltalk.TrappedDataCarrier);
  843. smalltalk.addMethod(
  844. smalltalk.method({
  845. selector: "primitive:",
  846. category: '*Trapped-Processors',
  847. fn: function (anObject){
  848. var self=this;
  849. return smalltalk.withContext(function($ctx1) {
  850. return anObject === nil ? null : anObject.valueOf();
  851. return self}, function($ctx1) {$ctx1.fill(self,"primitive:",{anObject:anObject},smalltalk.TrappedDataCarrier)})},
  852. args: ["anObject"],
  853. source: "primitive: anObject\x0a\x09<return anObject === nil ? null : anObject.valueOf()>",
  854. messageSends: [],
  855. referencedClasses: []
  856. }),
  857. smalltalk.TrappedDataCarrier);
  858. smalltalk.addMethod(
  859. smalltalk.method({
  860. selector: "toTargetAttr:",
  861. category: '*Trapped-Processors',
  862. fn: function (aString){
  863. var self=this;
  864. return smalltalk.withContext(function($ctx1) {
  865. var $1,$2,$3,$5,$4;
  866. $1=self._falseAsNilValue();
  867. if(($receiver = $1) == nil || $receiver == null){
  868. $2=self._target();
  869. $ctx1.sendIdx["target"]=1;
  870. _st($2)._removeAt_(aString);
  871. } else {
  872. var value,bvalue;
  873. bvalue=$receiver;
  874. value=self._primitive_(bvalue);
  875. value;
  876. $3=self._target();
  877. $5=_st(value).__eq(true);
  878. if(smalltalk.assert($5)){
  879. $4=aString;
  880. } else {
  881. $4=value;
  882. };
  883. _st($3)._at_put_(aString,$4);
  884. };
  885. return self}, function($ctx1) {$ctx1.fill(self,"toTargetAttr:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  886. args: ["aString"],
  887. source: "toTargetAttr: aString\x0a\x09self falseAsNilValue\x0a\x09\x09ifNil: [ self target removeAt: aString ]\x0a\x09\x09ifNotNil: [ :bvalue |\x0a\x09\x09\x09| value |\x0a\x09\x09\x09value := self primitive: bvalue.\x0a\x09\x09\x09self target at: aString put: (value = true ifTrue: [ aString ] ifFalse: [ value ]) ]",
  888. messageSends: ["ifNil:ifNotNil:", "falseAsNilValue", "removeAt:", "target", "primitive:", "at:put:", "ifTrue:ifFalse:", "="],
  889. referencedClasses: []
  890. }),
  891. smalltalk.TrappedDataCarrier);
  892. smalltalk.addMethod(
  893. smalltalk.method({
  894. selector: "toTargetContents",
  895. category: '*Trapped-Processors',
  896. fn: function (){
  897. var self=this;
  898. return smalltalk.withContext(function($ctx1) {
  899. _st(self._target())._contents_(self._primitive_(self._value()));
  900. return self}, function($ctx1) {$ctx1.fill(self,"toTargetContents",{},smalltalk.TrappedDataCarrier)})},
  901. args: [],
  902. source: "toTargetContents\x0a\x09self target contents: (self primitive: self value)",
  903. messageSends: ["contents:", "target", "primitive:", "value"],
  904. referencedClasses: []
  905. }),
  906. smalltalk.TrappedDataCarrier);
  907. smalltalk.addMethod(
  908. smalltalk.method({
  909. selector: "toTargetProp:",
  910. category: '*Trapped-Processors',
  911. fn: function (aString){
  912. var self=this;
  913. return smalltalk.withContext(function($ctx1) {
  914. _st(_st(self._target())._element())._at_put_(aString,self._primitive_(self._value()));
  915. return self}, function($ctx1) {$ctx1.fill(self,"toTargetProp:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  916. args: ["aString"],
  917. source: "toTargetProp: aString\x0a\x09self target element at: aString put: (self primitive: self value)",
  918. messageSends: ["at:put:", "element", "target", "primitive:", "value"],
  919. referencedClasses: []
  920. }),
  921. smalltalk.TrappedDataCarrier);
  922. smalltalk.addMethod(
  923. smalltalk.method({
  924. selector: "toTargetValue",
  925. category: '*Trapped-Processors',
  926. fn: function (){
  927. var self=this;
  928. return smalltalk.withContext(function($ctx1) {
  929. _st(_st(self._target())._asJQuery())._val_(self._primitive_(self._value()));
  930. return self}, function($ctx1) {$ctx1.fill(self,"toTargetValue",{},smalltalk.TrappedDataCarrier)})},
  931. args: [],
  932. source: "toTargetValue\x0a\x09self target asJQuery val: (self primitive: self value)",
  933. messageSends: ["val:", "asJQuery", "target", "primitive:", "value"],
  934. referencedClasses: []
  935. }),
  936. smalltalk.TrappedDataCarrier);
  937. smalltalk.addMethod(
  938. smalltalk.method({
  939. selector: "xontent",
  940. category: '*Trapped-Processors',
  941. fn: function (){
  942. var self=this;
  943. return smalltalk.withContext(function($ctx1) {
  944. var $1;
  945. $1=_st(_st(self._target())._asJQuery())._xontent();
  946. return $1;
  947. }, function($ctx1) {$ctx1.fill(self,"xontent",{},smalltalk.TrappedDataCarrier)})},
  948. args: [],
  949. source: "xontent\x0a\x09^self target asJQuery xontent",
  950. messageSends: ["xontent", "asJQuery", "target"],
  951. referencedClasses: []
  952. }),
  953. smalltalk.TrappedDataCarrier);
  954. smalltalk.addMethod(
  955. smalltalk.method({
  956. selector: "xontent:",
  957. category: '*Trapped-Processors',
  958. fn: function (anObject){
  959. var self=this;
  960. return smalltalk.withContext(function($ctx1) {
  961. _st(_st(self._target())._asJQuery())._xontent_data_("set",anObject);
  962. return self}, function($ctx1) {$ctx1.fill(self,"xontent:",{anObject:anObject},smalltalk.TrappedDataCarrier)})},
  963. args: ["anObject"],
  964. source: "xontent: anObject\x0a\x09self target asJQuery xontent: 'set' data: anObject",
  965. messageSends: ["xontent:data:", "asJQuery", "target"],
  966. referencedClasses: []
  967. }),
  968. smalltalk.TrappedDataCarrier);
  969. smalltalk.addMethod(
  970. smalltalk.method({
  971. selector: "attr:",
  972. category: '*Trapped-Processors',
  973. fn: function (aString){
  974. var self=this;
  975. function $TrappedProcessorAttribute(){return smalltalk.TrappedProcessorAttribute||(typeof TrappedProcessorAttribute=="undefined"?nil:TrappedProcessorAttribute)}
  976. return smalltalk.withContext(function($ctx1) {
  977. var $1;
  978. $1=_st($TrappedProcessorAttribute())._new_(aString);
  979. return $1;
  980. }, function($ctx1) {$ctx1.fill(self,"attr:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  981. args: ["aString"],
  982. source: "attr: aString\x0a\x09^TrappedProcessorAttribute new: aString",
  983. messageSends: ["new:"],
  984. referencedClasses: ["TrappedProcessorAttribute"]
  985. }),
  986. smalltalk.TrappedProcessor.klass);
  987. smalltalk.addMethod(
  988. smalltalk.method({
  989. selector: "dataToView:",
  990. category: '*Trapped-Processors',
  991. fn: function (aBlock){
  992. var self=this;
  993. function $TrappedProcessorDataAdhoc(){return smalltalk.TrappedProcessorDataAdhoc||(typeof TrappedProcessorDataAdhoc=="undefined"?nil:TrappedProcessorDataAdhoc)}
  994. return smalltalk.withContext(function($ctx1) {
  995. var $1;
  996. $1=_st($TrappedProcessorDataAdhoc())._newToView_(aBlock);
  997. return $1;
  998. }, function($ctx1) {$ctx1.fill(self,"dataToView:",{aBlock:aBlock},smalltalk.TrappedProcessor.klass)})},
  999. args: ["aBlock"],
  1000. source: "dataToView: aBlock\x0a\x09^TrappedProcessorDataAdhoc newToView: aBlock",
  1001. messageSends: ["newToView:"],
  1002. referencedClasses: ["TrappedProcessorDataAdhoc"]
  1003. }),
  1004. smalltalk.TrappedProcessor.klass);
  1005. smalltalk.addMethod(
  1006. smalltalk.method({
  1007. selector: "deuric",
  1008. category: '*Trapped-Processors',
  1009. fn: function (){
  1010. var self=this;
  1011. function $TrappedProcessorUriComponentDecode(){return smalltalk.TrappedProcessorUriComponentDecode||(typeof TrappedProcessorUriComponentDecode=="undefined"?nil:TrappedProcessorUriComponentDecode)}
  1012. return smalltalk.withContext(function($ctx1) {
  1013. var $1;
  1014. $1=_st($TrappedProcessorUriComponentDecode())._new();
  1015. return $1;
  1016. }, function($ctx1) {$ctx1.fill(self,"deuric",{},smalltalk.TrappedProcessor.klass)})},
  1017. args: [],
  1018. source: "deuric\x0a\x09^TrappedProcessorUriComponentDecode new",
  1019. messageSends: ["new"],
  1020. referencedClasses: ["TrappedProcessorUriComponentDecode"]
  1021. }),
  1022. smalltalk.TrappedProcessor.klass);
  1023. smalltalk.addMethod(
  1024. smalltalk.method({
  1025. selector: "guard:",
  1026. category: '*Trapped-Processors',
  1027. fn: function (anArray){
  1028. var self=this;
  1029. function $TrappedProcessorGuard(){return smalltalk.TrappedProcessorGuard||(typeof TrappedProcessorGuard=="undefined"?nil:TrappedProcessorGuard)}
  1030. return smalltalk.withContext(function($ctx1) {
  1031. var $1;
  1032. $1=_st($TrappedProcessorGuard())._new_(anArray);
  1033. return $1;
  1034. }, function($ctx1) {$ctx1.fill(self,"guard:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
  1035. args: ["anArray"],
  1036. source: "guard: anArray\x0a\x09^TrappedProcessorGuard new: anArray",
  1037. messageSends: ["new:"],
  1038. referencedClasses: ["TrappedProcessorGuard"]
  1039. }),
  1040. smalltalk.TrappedProcessor.klass);
  1041. smalltalk.addMethod(
  1042. smalltalk.method({
  1043. selector: "inputChecked",
  1044. category: '*Trapped-Processors',
  1045. fn: function (){
  1046. var self=this;
  1047. function $TrappedProcessorInputChecked(){return smalltalk.TrappedProcessorInputChecked||(typeof TrappedProcessorInputChecked=="undefined"?nil:TrappedProcessorInputChecked)}
  1048. return smalltalk.withContext(function($ctx1) {
  1049. var $1;
  1050. $1=_st($TrappedProcessorInputChecked())._new();
  1051. return $1;
  1052. }, function($ctx1) {$ctx1.fill(self,"inputChecked",{},smalltalk.TrappedProcessor.klass)})},
  1053. args: [],
  1054. source: "inputChecked\x0a\x09^TrappedProcessorInputChecked new",
  1055. messageSends: ["new"],
  1056. referencedClasses: ["TrappedProcessorInputChecked"]
  1057. }),
  1058. smalltalk.TrappedProcessor.klass);
  1059. smalltalk.addMethod(
  1060. smalltalk.method({
  1061. selector: "inputValue",
  1062. category: '*Trapped-Processors',
  1063. fn: function (){
  1064. var self=this;
  1065. function $TrappedProcessorInputValue(){return smalltalk.TrappedProcessorInputValue||(typeof TrappedProcessorInputValue=="undefined"?nil:TrappedProcessorInputValue)}
  1066. return smalltalk.withContext(function($ctx1) {
  1067. var $1;
  1068. $1=_st($TrappedProcessorInputValue())._new();
  1069. return $1;
  1070. }, function($ctx1) {$ctx1.fill(self,"inputValue",{},smalltalk.TrappedProcessor.klass)})},
  1071. args: [],
  1072. source: "inputValue\x0a\x09^TrappedProcessorInputValue new",
  1073. messageSends: ["new"],
  1074. referencedClasses: ["TrappedProcessorInputValue"]
  1075. }),
  1076. smalltalk.TrappedProcessor.klass);
  1077. smalltalk.addMethod(
  1078. smalltalk.method({
  1079. selector: "loopZ",
  1080. category: '*Trapped-Processors',
  1081. fn: function (){
  1082. var self=this;
  1083. function $TrappedProcessorLoopZ(){return smalltalk.TrappedProcessorLoopZ||(typeof TrappedProcessorLoopZ=="undefined"?nil:TrappedProcessorLoopZ)}
  1084. return smalltalk.withContext(function($ctx1) {
  1085. var $1;
  1086. $1=_st($TrappedProcessorLoopZ())._new();
  1087. return $1;
  1088. }, function($ctx1) {$ctx1.fill(self,"loopZ",{},smalltalk.TrappedProcessor.klass)})},
  1089. args: [],
  1090. source: "loopZ\x0a\x09^TrappedProcessorLoopZ new",
  1091. messageSends: ["new"],
  1092. referencedClasses: ["TrappedProcessorLoopZ"]
  1093. }),
  1094. smalltalk.TrappedProcessor.klass);
  1095. smalltalk.addMethod(
  1096. smalltalk.method({
  1097. selector: "optionValue",
  1098. category: '*Trapped-Processors',
  1099. fn: function (){
  1100. var self=this;
  1101. function $TrappedProcessorOptionValue(){return smalltalk.TrappedProcessorOptionValue||(typeof TrappedProcessorOptionValue=="undefined"?nil:TrappedProcessorOptionValue)}
  1102. return smalltalk.withContext(function($ctx1) {
  1103. var $1;
  1104. $1=_st($TrappedProcessorOptionValue())._new();
  1105. return $1;
  1106. }, function($ctx1) {$ctx1.fill(self,"optionValue",{},smalltalk.TrappedProcessor.klass)})},
  1107. args: [],
  1108. source: "optionValue\x0a\x09^TrappedProcessorOptionValue new",
  1109. messageSends: ["new"],
  1110. referencedClasses: ["TrappedProcessorOptionValue"]
  1111. }),
  1112. smalltalk.TrappedProcessor.klass);
  1113. smalltalk.addMethod(
  1114. smalltalk.method({
  1115. selector: "path",
  1116. category: '*Trapped-Processors',
  1117. fn: function (){
  1118. var self=this;
  1119. function $TrappedProcessorDescend(){return smalltalk.TrappedProcessorDescend||(typeof TrappedProcessorDescend=="undefined"?nil:TrappedProcessorDescend)}
  1120. return smalltalk.withContext(function($ctx1) {
  1121. var $1;
  1122. $1=_st($TrappedProcessorDescend())._new();
  1123. return $1;
  1124. }, function($ctx1) {$ctx1.fill(self,"path",{},smalltalk.TrappedProcessor.klass)})},
  1125. args: [],
  1126. source: "path\x0a\x09^TrappedProcessorDescend new",
  1127. messageSends: ["new"],
  1128. referencedClasses: ["TrappedProcessorDescend"]
  1129. }),
  1130. smalltalk.TrappedProcessor.klass);
  1131. smalltalk.addMethod(
  1132. smalltalk.method({
  1133. selector: "replace:with:",
  1134. category: '*Trapped-Processors',
  1135. fn: function (aString,anotherString){
  1136. var self=this;
  1137. function $TrappedProcessorReplace(){return smalltalk.TrappedProcessorReplace||(typeof TrappedProcessorReplace=="undefined"?nil:TrappedProcessorReplace)}
  1138. return smalltalk.withContext(function($ctx1) {
  1139. var $1;
  1140. $1=_st($TrappedProcessorReplace())._new_with_(aString,anotherString);
  1141. return $1;
  1142. }, function($ctx1) {$ctx1.fill(self,"replace:with:",{aString:aString,anotherString:anotherString},smalltalk.TrappedProcessor.klass)})},
  1143. args: ["aString", "anotherString"],
  1144. source: "replace: aString with: anotherString\x0a\x09^TrappedProcessorReplace new: aString with: anotherString",
  1145. messageSends: ["new:with:"],
  1146. referencedClasses: ["TrappedProcessorReplace"]
  1147. }),
  1148. smalltalk.TrappedProcessor.klass);
  1149. smalltalk.addMethod(
  1150. smalltalk.method({
  1151. selector: "selectValue",
  1152. category: '*Trapped-Processors',
  1153. fn: function (){
  1154. var self=this;
  1155. function $TrappedProcessorSelectValue(){return smalltalk.TrappedProcessorSelectValue||(typeof TrappedProcessorSelectValue=="undefined"?nil:TrappedProcessorSelectValue)}
  1156. return smalltalk.withContext(function($ctx1) {
  1157. var $1;
  1158. $1=_st($TrappedProcessorSelectValue())._new();
  1159. return $1;
  1160. }, function($ctx1) {$ctx1.fill(self,"selectValue",{},smalltalk.TrappedProcessor.klass)})},
  1161. args: [],
  1162. source: "selectValue\x0a\x09^TrappedProcessorSelectValue new",
  1163. messageSends: ["new"],
  1164. referencedClasses: ["TrappedProcessorSelectValue"]
  1165. }),
  1166. smalltalk.TrappedProcessor.klass);
  1167. smalltalk.addMethod(
  1168. smalltalk.method({
  1169. selector: "signal:",
  1170. category: '*Trapped-Processors',
  1171. fn: function (aString){
  1172. var self=this;
  1173. function $TrappedProcessorSignal(){return smalltalk.TrappedProcessorSignal||(typeof TrappedProcessorSignal=="undefined"?nil:TrappedProcessorSignal)}
  1174. return smalltalk.withContext(function($ctx1) {
  1175. var $1;
  1176. $1=_st($TrappedProcessorSignal())._new_(aString);
  1177. return $1;
  1178. }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  1179. args: ["aString"],
  1180. source: "signal: aString\x0a\x09^TrappedProcessorSignal new: aString",
  1181. messageSends: ["new:"],
  1182. referencedClasses: ["TrappedProcessorSignal"]
  1183. }),
  1184. smalltalk.TrappedProcessor.klass);
  1185. smalltalk.addMethod(
  1186. smalltalk.method({
  1187. selector: "toBlackboard",
  1188. category: '*Trapped-Processors',
  1189. fn: function (){
  1190. var self=this;
  1191. function $TrappedProcessorToBlackboard(){return smalltalk.TrappedProcessorToBlackboard||(typeof TrappedProcessorToBlackboard=="undefined"?nil:TrappedProcessorToBlackboard)}
  1192. return smalltalk.withContext(function($ctx1) {
  1193. var $1;
  1194. $1=_st($TrappedProcessorToBlackboard())._new();
  1195. return $1;
  1196. }, function($ctx1) {$ctx1.fill(self,"toBlackboard",{},smalltalk.TrappedProcessor.klass)})},
  1197. args: [],
  1198. source: "toBlackboard\x0a\x09^TrappedProcessorToBlackboard new",
  1199. messageSends: ["new"],
  1200. referencedClasses: ["TrappedProcessorToBlackboard"]
  1201. }),
  1202. smalltalk.TrappedProcessor.klass);
  1203. smalltalk.addMethod(
  1204. smalltalk.method({
  1205. selector: "uric",
  1206. category: '*Trapped-Processors',
  1207. fn: function (){
  1208. var self=this;
  1209. function $TrappedProcessorUriComponentEncode(){return smalltalk.TrappedProcessorUriComponentEncode||(typeof TrappedProcessorUriComponentEncode=="undefined"?nil:TrappedProcessorUriComponentEncode)}
  1210. return smalltalk.withContext(function($ctx1) {
  1211. var $1;
  1212. $1=_st($TrappedProcessorUriComponentEncode())._new();
  1213. return $1;
  1214. }, function($ctx1) {$ctx1.fill(self,"uric",{},smalltalk.TrappedProcessor.klass)})},
  1215. args: [],
  1216. source: "uric\x0a\x09^TrappedProcessorUriComponentEncode new",
  1217. messageSends: ["new"],
  1218. referencedClasses: ["TrappedProcessorUriComponentEncode"]
  1219. }),
  1220. smalltalk.TrappedProcessor.klass);
  1221. smalltalk.addMethod(
  1222. smalltalk.method({
  1223. selector: "whenClicked",
  1224. category: '*Trapped-Processors',
  1225. fn: function (){
  1226. var self=this;
  1227. function $TrappedProcessorWhenClicked(){return smalltalk.TrappedProcessorWhenClicked||(typeof TrappedProcessorWhenClicked=="undefined"?nil:TrappedProcessorWhenClicked)}
  1228. return smalltalk.withContext(function($ctx1) {
  1229. var $1;
  1230. $1=_st($TrappedProcessorWhenClicked())._new();
  1231. return $1;
  1232. }, function($ctx1) {$ctx1.fill(self,"whenClicked",{},smalltalk.TrappedProcessor.klass)})},
  1233. args: [],
  1234. source: "whenClicked\x0a\x09^TrappedProcessorWhenClicked new",
  1235. messageSends: ["new"],
  1236. referencedClasses: ["TrappedProcessorWhenClicked"]
  1237. }),
  1238. smalltalk.TrappedProcessor.klass);
  1239. smalltalk.addMethod(
  1240. smalltalk.method({
  1241. selector: "whenSubmitted",
  1242. category: '*Trapped-Processors',
  1243. fn: function (){
  1244. var self=this;
  1245. function $TrappedProcessorWhenSubmitted(){return smalltalk.TrappedProcessorWhenSubmitted||(typeof TrappedProcessorWhenSubmitted=="undefined"?nil:TrappedProcessorWhenSubmitted)}
  1246. return smalltalk.withContext(function($ctx1) {
  1247. var $1;
  1248. $1=_st($TrappedProcessorWhenSubmitted())._new();
  1249. return $1;
  1250. }, function($ctx1) {$ctx1.fill(self,"whenSubmitted",{},smalltalk.TrappedProcessor.klass)})},
  1251. args: [],
  1252. source: "whenSubmitted\x0a\x09^TrappedProcessorWhenSubmitted new",
  1253. messageSends: ["new"],
  1254. referencedClasses: ["TrappedProcessorWhenSubmitted"]
  1255. }),
  1256. smalltalk.TrappedProcessor.klass);
  1257. smalltalk.addMethod(
  1258. smalltalk.method({
  1259. selector: "widget:",
  1260. category: '*Trapped-Processors',
  1261. fn: function (aString){
  1262. var self=this;
  1263. function $TrappedProcessorWidget(){return smalltalk.TrappedProcessorWidget||(typeof TrappedProcessorWidget=="undefined"?nil:TrappedProcessorWidget)}
  1264. return smalltalk.withContext(function($ctx1) {
  1265. var $1;
  1266. $1=_st($TrappedProcessorWidget())._new_(aString);
  1267. return $1;
  1268. }, function($ctx1) {$ctx1.fill(self,"widget:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  1269. args: ["aString"],
  1270. source: "widget: aString\x0a\x09^TrappedProcessorWidget new: aString",
  1271. messageSends: ["new:"],
  1272. referencedClasses: ["TrappedProcessorWidget"]
  1273. }),
  1274. smalltalk.TrappedProcessor.klass);
  1275. smalltalk.addMethod(
  1276. smalltalk.method({
  1277. selector: "xontent",
  1278. category: '*Trapped-Processors',
  1279. fn: function (){
  1280. var self=this;
  1281. function $TrappedProcessorXontent(){return smalltalk.TrappedProcessorXontent||(typeof TrappedProcessorXontent=="undefined"?nil:TrappedProcessorXontent)}
  1282. return smalltalk.withContext(function($ctx1) {
  1283. var $1;
  1284. $1=_st($TrappedProcessorXontent())._new();
  1285. return $1;
  1286. }, function($ctx1) {$ctx1.fill(self,"xontent",{},smalltalk.TrappedProcessor.klass)})},
  1287. args: [],
  1288. source: "xontent\x0a\x09^TrappedProcessorXontent new",
  1289. messageSends: ["new"],
  1290. referencedClasses: ["TrappedProcessorXontent"]
  1291. }),
  1292. smalltalk.TrappedProcessor.klass);
  1293. });