Trapped-Processors.js 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399
  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())._injectToJQuery_(_st(_st(_st(aDataCarrier)._target())._asJQuery())._children());
  119. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorDescend)})},
  120. args: ["aDataCarrier"],
  121. source: "toView: aDataCarrier\x0a\x09Trapped current injectToJQuery: aDataCarrier target asJQuery children",
  122. messageSends: ["injectToJQuery:", "current", "children", "asJQuery", "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('TrappedProcessorGuardContents', smalltalk.TrappedProcessorGuardBase, [], 'Trapped-Processors');
  193. 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.";
  194. smalltalk.addMethod(
  195. smalltalk.method({
  196. selector: "toView:",
  197. category: 'data transformation',
  198. fn: function (aDataCarrier){
  199. var self=this;
  200. var frozen,contents;
  201. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  202. return smalltalk.withContext(function($ctx1) {
  203. frozen=_st(aDataCarrier)._copy();
  204. contents=_st(frozen)._contents();
  205. _st(_st(frozen)._target())._trapGuard_contents_(self["@guardPath"],(function(html){
  206. return smalltalk.withContext(function($ctx2) {
  207. return _st(_st($Trapped())._current())._cloneAndInject_inPlaceOf_(contents,_st(html)._del());
  208. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  209. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,contents:contents},smalltalk.TrappedProcessorGuardContents)})},
  210. args: ["aDataCarrier"],
  211. source: "toView: aDataCarrier\x0a\x09| frozen contents |\x0a\x09frozen := aDataCarrier copy.\x0a\x09contents := frozen contents.\x0a\x09frozen target trapGuard: guardPath contents: [ :html |\x0a\x09\x09Trapped current cloneAndInject: contents inPlaceOf: html del ]",
  212. messageSends: ["copy", "contents", "trapGuard:contents:", "target", "cloneAndInject:inPlaceOf:", "current", "del"],
  213. referencedClasses: ["Trapped"]
  214. }),
  215. smalltalk.TrappedProcessorGuardContents);
  216. smalltalk.addClass('TrappedProcessorGuardProc', smalltalk.TrappedProcessorGuardBase, [], 'Trapped-Processors');
  217. 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,";
  218. smalltalk.addMethod(
  219. smalltalk.method({
  220. selector: "toView:",
  221. category: 'data transformation',
  222. fn: function (aDataCarrier){
  223. var self=this;
  224. var frozen;
  225. return smalltalk.withContext(function($ctx1) {
  226. frozen=_st(aDataCarrier)._copy();
  227. $ctx1.sendIdx["copy"]=1;
  228. _st(_st(frozen)._target())._trapGuard_contents_(self["@guardPath"],(function(){
  229. return smalltalk.withContext(function($ctx2) {
  230. return _st(_st(frozen)._copy())._proceed();
  231. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  232. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen},smalltalk.TrappedProcessorGuardProc)})},
  233. args: ["aDataCarrier"],
  234. source: "toView: aDataCarrier\x0a\x09| frozen |\x0a\x09frozen := aDataCarrier copy.\x0a\x09frozen target trapGuard: guardPath contents: [ frozen copy proceed ]",
  235. messageSends: ["copy", "trapGuard:contents:", "target", "proceed"],
  236. referencedClasses: []
  237. }),
  238. smalltalk.TrappedProcessorGuardProc);
  239. smalltalk.addClass('TrappedProcessorInputChecked', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  240. smalltalk.TrappedProcessorInputChecked.comment="I bind to checkbox checked attribute.";
  241. smalltalk.addMethod(
  242. smalltalk.method({
  243. selector: "installToView:toModel:",
  244. category: 'installation',
  245. fn: function (aDataCarrier,anotherDataCarrier){
  246. var self=this;
  247. var brush;
  248. return smalltalk.withContext(function($ctx1) {
  249. var $1,$2;
  250. brush=_st(aDataCarrier)._target();
  251. _st(brush)._onChange_((function(){
  252. return smalltalk.withContext(function($ctx2) {
  253. $1=_st(anotherDataCarrier)._copy();
  254. _st($1)._value_(_st(_st(_st(brush)._asJQuery())._attr_("checked"))._notNil());
  255. $2=_st($1)._proceed();
  256. return $2;
  257. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  258. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier,brush:brush},smalltalk.TrappedProcessorInputChecked)})},
  259. args: ["aDataCarrier", "anotherDataCarrier"],
  260. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09| brush |\x0a\x09brush := aDataCarrier target.\x0a\x09brush onChange: [ anotherDataCarrier copy value: (brush asJQuery attr: 'checked') notNil; proceed ]",
  261. messageSends: ["target", "onChange:", "value:", "copy", "notNil", "attr:", "asJQuery", "proceed"],
  262. referencedClasses: []
  263. }),
  264. smalltalk.TrappedProcessorInputChecked);
  265. smalltalk.addMethod(
  266. smalltalk.method({
  267. selector: "toView:",
  268. category: 'data transformation',
  269. fn: function (aDataCarrier){
  270. var self=this;
  271. return smalltalk.withContext(function($ctx1) {
  272. _st(aDataCarrier)._toTargetAttr_("checked");
  273. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorInputChecked)})},
  274. args: ["aDataCarrier"],
  275. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetAttr: 'checked'",
  276. messageSends: ["toTargetAttr:"],
  277. referencedClasses: []
  278. }),
  279. smalltalk.TrappedProcessorInputChecked);
  280. smalltalk.addClass('TrappedProcessorInputValue', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  281. smalltalk.TrappedProcessorInputValue.comment="I bind to input value.";
  282. smalltalk.addMethod(
  283. smalltalk.method({
  284. selector: "installToView:toModel:",
  285. category: 'installation',
  286. fn: function (aDataCarrier,anotherDataCarrier){
  287. var self=this;
  288. var brush;
  289. return smalltalk.withContext(function($ctx1) {
  290. var $1,$2;
  291. brush=_st(aDataCarrier)._target();
  292. _st(brush)._onChange_((function(){
  293. return smalltalk.withContext(function($ctx2) {
  294. $1=_st(anotherDataCarrier)._copy();
  295. _st($1)._value_(_st(_st(brush)._asJQuery())._val());
  296. $2=_st($1)._proceed();
  297. return $2;
  298. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  299. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier,brush:brush},smalltalk.TrappedProcessorInputValue)})},
  300. args: ["aDataCarrier", "anotherDataCarrier"],
  301. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09| brush |\x0a\x09brush := aDataCarrier target.\x0a\x09brush onChange: [ anotherDataCarrier copy value: brush asJQuery val; proceed ]",
  302. messageSends: ["target", "onChange:", "value:", "copy", "val", "asJQuery", "proceed"],
  303. referencedClasses: []
  304. }),
  305. smalltalk.TrappedProcessorInputValue);
  306. smalltalk.addMethod(
  307. smalltalk.method({
  308. selector: "toView:",
  309. category: 'data transformation',
  310. fn: function (aDataCarrier){
  311. var self=this;
  312. return smalltalk.withContext(function($ctx1) {
  313. _st(aDataCarrier)._toTargetValue();
  314. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorInputValue)})},
  315. args: ["aDataCarrier"],
  316. source: "toView: aDataCarrier\x0a\x09aDataCarrier toTargetValue",
  317. messageSends: ["toTargetValue"],
  318. referencedClasses: []
  319. }),
  320. smalltalk.TrappedProcessorInputValue);
  321. smalltalk.addClass('TrappedProcessorLoopBase', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  322. 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.";
  323. smalltalk.addMethod(
  324. smalltalk.method({
  325. selector: "toModel:",
  326. category: 'data transformation',
  327. fn: function (aDataCarrier){
  328. var self=this;
  329. return smalltalk.withContext(function($ctx1) {
  330. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorLoopBase)})},
  331. args: ["aDataCarrier"],
  332. source: "toModel: aDataCarrier\x0a\x09\x22stop\x22",
  333. messageSends: [],
  334. referencedClasses: []
  335. }),
  336. smalltalk.TrappedProcessorLoopBase);
  337. smalltalk.addMethod(
  338. smalltalk.method({
  339. selector: "toView:",
  340. category: 'data transformation',
  341. fn: function (aDataCarrier){
  342. var self=this;
  343. return smalltalk.withContext(function($ctx1) {
  344. self._subclassResponsibility();
  345. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorLoopBase)})},
  346. args: ["aDataCarrier"],
  347. source: "toView: aDataCarrier\x0a\x09self subclassResponsibility",
  348. messageSends: ["subclassResponsibility"],
  349. referencedClasses: []
  350. }),
  351. smalltalk.TrappedProcessorLoopBase);
  352. smalltalk.addClass('TrappedProcessorLoopContents', smalltalk.TrappedProcessorLoopBase, [], 'Trapped-Processors');
  353. 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).";
  354. smalltalk.addMethod(
  355. smalltalk.method({
  356. selector: "toView:",
  357. category: 'data transformation',
  358. fn: function (aDataCarrier){
  359. var self=this;
  360. var frozen,contents;
  361. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  362. return smalltalk.withContext(function($ctx1) {
  363. frozen=_st(aDataCarrier)._copy();
  364. contents=_st(frozen)._contents();
  365. _st(_st(frozen)._target())._trapIter_after_([],(function(html){
  366. return smalltalk.withContext(function($ctx2) {
  367. return _st(_st($Trapped())._current())._cloneAndInject_inPlaceOf_(contents,_st(html)._del());
  368. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  369. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen,contents:contents},smalltalk.TrappedProcessorLoopContents)})},
  370. args: ["aDataCarrier"],
  371. source: "toView: aDataCarrier\x0a\x09| frozen contents |\x0a\x09frozen := aDataCarrier copy.\x0a\x09contents := frozen contents.\x0a\x09frozen target trapIter: #() after: [ :html |\x0a\x09\x09Trapped current cloneAndInject: contents inPlaceOf: html del ]",
  372. messageSends: ["copy", "contents", "trapIter:after:", "target", "cloneAndInject:inPlaceOf:", "current", "del"],
  373. referencedClasses: ["Trapped"]
  374. }),
  375. smalltalk.TrappedProcessorLoopContents);
  376. smalltalk.addClass('TrappedProcessorLoopProc', smalltalk.TrappedProcessorLoopBase, [], 'Trapped-Processors');
  377. 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).";
  378. smalltalk.addMethod(
  379. smalltalk.method({
  380. selector: "toView:",
  381. category: 'data transformation',
  382. fn: function (aDataCarrier){
  383. var self=this;
  384. var frozen;
  385. return smalltalk.withContext(function($ctx1) {
  386. var $1,$2;
  387. frozen=_st(aDataCarrier)._copy();
  388. $ctx1.sendIdx["copy"]=1;
  389. _st(_st(frozen)._target())._trapIter_after_([],(function(html){
  390. return smalltalk.withContext(function($ctx2) {
  391. $1=_st(frozen)._copy();
  392. _st($1)._target_(_st(html)._root());
  393. $2=_st($1)._proceed();
  394. return $2;
  395. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  396. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,frozen:frozen},smalltalk.TrappedProcessorLoopProc)})},
  397. args: ["aDataCarrier"],
  398. source: "toView: aDataCarrier\x0a\x09| frozen |\x0a\x09frozen := aDataCarrier copy.\x0a\x09frozen target trapIter: #() after: [ :html | frozen copy target: html root; proceed ]",
  399. messageSends: ["copy", "trapIter:after:", "target", "target:", "root", "proceed"],
  400. referencedClasses: []
  401. }),
  402. smalltalk.TrappedProcessorLoopProc);
  403. smalltalk.addClass('TrappedProcessorReplace', smalltalk.TrappedProcessor, ['left', 'right'], 'Trapped-Processors');
  404. 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";
  405. smalltalk.addMethod(
  406. smalltalk.method({
  407. selector: "left:",
  408. category: 'accessing',
  409. fn: function (aString){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) {
  412. self["@left"]=aString;
  413. return self}, function($ctx1) {$ctx1.fill(self,"left:",{aString:aString},smalltalk.TrappedProcessorReplace)})},
  414. args: ["aString"],
  415. source: "left: aString\x0a\x09left := aString",
  416. messageSends: [],
  417. referencedClasses: []
  418. }),
  419. smalltalk.TrappedProcessorReplace);
  420. smalltalk.addMethod(
  421. smalltalk.method({
  422. selector: "right:",
  423. category: 'accessing',
  424. fn: function (aString){
  425. var self=this;
  426. return smalltalk.withContext(function($ctx1) {
  427. self["@right"]=aString;
  428. return self}, function($ctx1) {$ctx1.fill(self,"right:",{aString:aString},smalltalk.TrappedProcessorReplace)})},
  429. args: ["aString"],
  430. source: "right: aString\x0a\x09right := aString",
  431. messageSends: [],
  432. referencedClasses: []
  433. }),
  434. smalltalk.TrappedProcessorReplace);
  435. smalltalk.addMethod(
  436. smalltalk.method({
  437. selector: "toModel:",
  438. category: 'data transformation',
  439. fn: function (aDataCarrier){
  440. var self=this;
  441. var replacement,old;
  442. return smalltalk.withContext(function($ctx1) {
  443. var $1,$2;
  444. $1=_st(self["@left"])._replace_with_("^\x5c^","");
  445. $ctx1.sendIdx["replace:with:"]=2;
  446. replacement=_st($1)._replace_with_("\x5c$$","");
  447. $ctx1.sendIdx["replace:with:"]=1;
  448. old=_st(_st(aDataCarrier)._value())._asString();
  449. _st(aDataCarrier)._value_whenDifferentFrom_(_st(old)._replace_with_(self["@right"],replacement),old);
  450. $2=_st(aDataCarrier)._proceed();
  451. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier,replacement:replacement,old:old},smalltalk.TrappedProcessorReplace)})},
  452. args: ["aDataCarrier"],
  453. 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",
  454. messageSends: ["replace:with:", "asString", "value", "value:whenDifferentFrom:", "proceed"],
  455. referencedClasses: []
  456. }),
  457. smalltalk.TrappedProcessorReplace);
  458. smalltalk.addMethod(
  459. smalltalk.method({
  460. selector: "toView:",
  461. category: 'data transformation',
  462. fn: function (aDataCarrier){
  463. var self=this;
  464. var replacement,old;
  465. return smalltalk.withContext(function($ctx1) {
  466. var $1,$2;
  467. $1=_st(self["@right"])._replace_with_("^\x5c^","");
  468. $ctx1.sendIdx["replace:with:"]=2;
  469. replacement=_st($1)._replace_with_("\x5c$$","");
  470. $ctx1.sendIdx["replace:with:"]=1;
  471. old=_st(_st(aDataCarrier)._value())._asString();
  472. _st(aDataCarrier)._value_whenDifferentFrom_(_st(old)._replace_with_(self["@left"],replacement),old);
  473. $2=_st(aDataCarrier)._proceed();
  474. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier,replacement:replacement,old:old},smalltalk.TrappedProcessorReplace)})},
  475. args: ["aDataCarrier"],
  476. 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",
  477. messageSends: ["replace:with:", "asString", "value", "value:whenDifferentFrom:", "proceed"],
  478. referencedClasses: []
  479. }),
  480. smalltalk.TrappedProcessorReplace);
  481. smalltalk.addMethod(
  482. smalltalk.method({
  483. selector: "new:with:",
  484. category: 'instance creation',
  485. fn: function (aString,anotherString){
  486. var self=this;
  487. return smalltalk.withContext(function($ctx1) {
  488. var $2,$3,$4,$5,$1;
  489. $2=self._new();
  490. $3=$2;
  491. $4=_st(aString)._asString();
  492. $ctx1.sendIdx["asString"]=1;
  493. _st($3)._left_($4);
  494. _st($2)._right_(_st(anotherString)._asString());
  495. $5=_st($2)._yourself();
  496. $1=$5;
  497. return $1;
  498. }, function($ctx1) {$ctx1.fill(self,"new:with:",{aString:aString,anotherString:anotherString},smalltalk.TrappedProcessorReplace.klass)})},
  499. args: ["aString", "anotherString"],
  500. source: "new: aString with: anotherString\x0a\x09^ self new\x0a\x09\x09left: aString asString;\x0a\x09\x09right: anotherString asString;\x0a\x09\x09yourself",
  501. messageSends: ["left:", "new", "asString", "right:", "yourself"],
  502. referencedClasses: []
  503. }),
  504. smalltalk.TrappedProcessorReplace.klass);
  505. smalltalk.addClass('TrappedProcessorSignal', smalltalk.TrappedProcessor, ['selector'], 'Trapped-Processors');
  506. smalltalk.TrappedProcessorSignal.comment="Instead of writing data directly to model,\x0aI instead modify it by sending a message specified when instantiating me.";
  507. smalltalk.addMethod(
  508. smalltalk.method({
  509. selector: "selector:",
  510. category: 'accessing',
  511. fn: function (aString){
  512. var self=this;
  513. return smalltalk.withContext(function($ctx1) {
  514. self["@selector"]=aString;
  515. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.TrappedProcessorSignal)})},
  516. args: ["aString"],
  517. source: "selector: aString\x0a\x09selector := aString",
  518. messageSends: [],
  519. referencedClasses: []
  520. }),
  521. smalltalk.TrappedProcessorSignal);
  522. smalltalk.addMethod(
  523. smalltalk.method({
  524. selector: "toModel:",
  525. category: 'data transformation',
  526. fn: function (aDataCarrier){
  527. var self=this;
  528. return smalltalk.withContext(function($ctx1) {
  529. _st(aDataCarrier)._modifyTargetByPerforming_(self["@selector"]);
  530. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorSignal)})},
  531. args: ["aDataCarrier"],
  532. source: "toModel: aDataCarrier\x0a\x09aDataCarrier modifyTargetByPerforming: selector",
  533. messageSends: ["modifyTargetByPerforming:"],
  534. referencedClasses: []
  535. }),
  536. smalltalk.TrappedProcessorSignal);
  537. smalltalk.addMethod(
  538. smalltalk.method({
  539. selector: "toView:",
  540. category: 'data transformation',
  541. fn: function (aDataCarrier){
  542. var self=this;
  543. return smalltalk.withContext(function($ctx1) {
  544. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorSignal)})},
  545. args: ["aDataCarrier"],
  546. source: "toView: aDataCarrier\x0a\x09\x22stop\x22",
  547. messageSends: [],
  548. referencedClasses: []
  549. }),
  550. smalltalk.TrappedProcessorSignal);
  551. smalltalk.addMethod(
  552. smalltalk.method({
  553. selector: "new:",
  554. category: 'instance creation',
  555. fn: function (aString){
  556. var self=this;
  557. return smalltalk.withContext(function($ctx1) {
  558. var $2,$3,$1;
  559. $2=self._new();
  560. _st($2)._selector_(aString);
  561. $3=_st($2)._yourself();
  562. $1=$3;
  563. return $1;
  564. }, function($ctx1) {$ctx1.fill(self,"new:",{aString:aString},smalltalk.TrappedProcessorSignal.klass)})},
  565. args: ["aString"],
  566. source: "new: aString\x0a\x09^self new\x0a\x09\x09selector: aString;\x0a\x09\x09yourself",
  567. messageSends: ["selector:", "new", "yourself"],
  568. referencedClasses: []
  569. }),
  570. smalltalk.TrappedProcessorSignal.klass);
  571. smalltalk.addClass('TrappedProcessorToBlackboard', smalltalk.TrappedDataExpectingProcessor, [], 'Trapped-Processors');
  572. smalltalk.TrappedProcessorToBlackboard.comment="I save the data to blackboard in toModel:, to position specified by path.";
  573. smalltalk.addMethod(
  574. smalltalk.method({
  575. selector: "toModel:",
  576. category: 'data transformation',
  577. fn: function (aDataCarrier){
  578. var self=this;
  579. return smalltalk.withContext(function($ctx1) {
  580. _st(_st(aDataCarrier)._target())._modify_((function(){
  581. return smalltalk.withContext(function($ctx2) {
  582. return _st(aDataCarrier)._value();
  583. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  584. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorToBlackboard)})},
  585. args: ["aDataCarrier"],
  586. source: "toModel: aDataCarrier\x0a\x09aDataCarrier target modify: [ aDataCarrier value ]",
  587. messageSends: ["modify:", "target", "value"],
  588. referencedClasses: []
  589. }),
  590. smalltalk.TrappedProcessorToBlackboard);
  591. smalltalk.addClass('TrappedProcessorUriComponentDecode', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  592. smalltalk.TrappedProcessorUriComponentDecode.comment="I uriComponentDecode in toView:\x0aand encode in toModel:";
  593. smalltalk.addMethod(
  594. smalltalk.method({
  595. selector: "toModel:",
  596. category: 'data transformation',
  597. fn: function (aDataCarrier){
  598. var self=this;
  599. return smalltalk.withContext(function($ctx1) {
  600. var $1;
  601. _st(aDataCarrier)._value_(_st(_st(aDataCarrier)._value())._uriComponentEncoded());
  602. $1=_st(aDataCarrier)._proceed();
  603. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorUriComponentDecode)})},
  604. args: ["aDataCarrier"],
  605. source: "toModel: aDataCarrier\x0a\x09aDataCarrier\x0a\x09\x09value: aDataCarrier value uriComponentEncoded;\x0a\x09\x09proceed",
  606. messageSends: ["value:", "uriComponentEncoded", "value", "proceed"],
  607. referencedClasses: []
  608. }),
  609. smalltalk.TrappedProcessorUriComponentDecode);
  610. smalltalk.addMethod(
  611. smalltalk.method({
  612. selector: "toView:",
  613. category: 'data transformation',
  614. fn: function (aDataCarrier){
  615. var self=this;
  616. return smalltalk.withContext(function($ctx1) {
  617. var $1;
  618. _st(aDataCarrier)._value_(_st(_st(aDataCarrier)._value())._uriComponentDecoded());
  619. $1=_st(aDataCarrier)._proceed();
  620. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorUriComponentDecode)})},
  621. args: ["aDataCarrier"],
  622. source: "toView: aDataCarrier\x0a\x09aDataCarrier\x0a\x09\x09value: aDataCarrier value uriComponentDecoded;\x0a\x09\x09proceed",
  623. messageSends: ["value:", "uriComponentDecoded", "value", "proceed"],
  624. referencedClasses: []
  625. }),
  626. smalltalk.TrappedProcessorUriComponentDecode);
  627. smalltalk.addClass('TrappedProcessorUriComponentEncode', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  628. smalltalk.TrappedProcessorUriComponentEncode.comment="I uriComponentEncode in toView:\x0aand decode in toModel:";
  629. smalltalk.addMethod(
  630. smalltalk.method({
  631. selector: "toModel:",
  632. category: 'data transformation',
  633. fn: function (aDataCarrier){
  634. var self=this;
  635. return smalltalk.withContext(function($ctx1) {
  636. var $1;
  637. _st(aDataCarrier)._value_(_st(_st(aDataCarrier)._value())._uriComponentDecoded());
  638. $1=_st(aDataCarrier)._proceed();
  639. return self}, function($ctx1) {$ctx1.fill(self,"toModel:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorUriComponentEncode)})},
  640. args: ["aDataCarrier"],
  641. source: "toModel: aDataCarrier\x0a\x09aDataCarrier\x0a\x09\x09value: aDataCarrier value uriComponentDecoded;\x0a\x09\x09proceed",
  642. messageSends: ["value:", "uriComponentDecoded", "value", "proceed"],
  643. referencedClasses: []
  644. }),
  645. smalltalk.TrappedProcessorUriComponentEncode);
  646. smalltalk.addMethod(
  647. smalltalk.method({
  648. selector: "toView:",
  649. category: 'data transformation',
  650. fn: function (aDataCarrier){
  651. var self=this;
  652. return smalltalk.withContext(function($ctx1) {
  653. var $1;
  654. _st(aDataCarrier)._value_(_st(_st(aDataCarrier)._value())._uriComponentEncoded());
  655. $1=_st(aDataCarrier)._proceed();
  656. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorUriComponentEncode)})},
  657. args: ["aDataCarrier"],
  658. source: "toView: aDataCarrier\x0a\x09aDataCarrier\x0a\x09\x09value: aDataCarrier value uriComponentEncoded;\x0a\x09\x09proceed",
  659. messageSends: ["value:", "uriComponentEncoded", "value", "proceed"],
  660. referencedClasses: []
  661. }),
  662. smalltalk.TrappedProcessorUriComponentEncode);
  663. smalltalk.addClass('TrappedProcessorWhenClicked', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  664. smalltalk.TrappedProcessorWhenClicked.comment="I bind to an element and send true to blackboard when clicked.";
  665. smalltalk.addMethod(
  666. smalltalk.method({
  667. selector: "installToView:toModel:",
  668. category: 'installation',
  669. fn: function (aDataCarrier,anotherDataCarrier){
  670. var self=this;
  671. return smalltalk.withContext(function($ctx1) {
  672. _st(_st(aDataCarrier)._target())._onClick_((function(){
  673. return smalltalk.withContext(function($ctx2) {
  674. _st(_st(anotherDataCarrier)._copy())._proceed();
  675. return false;
  676. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  677. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier},smalltalk.TrappedProcessorWhenClicked)})},
  678. args: ["aDataCarrier", "anotherDataCarrier"],
  679. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09aDataCarrier target onClick: [ anotherDataCarrier copy proceed. false ]",
  680. messageSends: ["onClick:", "target", "proceed", "copy"],
  681. referencedClasses: []
  682. }),
  683. smalltalk.TrappedProcessorWhenClicked);
  684. smalltalk.addClass('TrappedProcessorWhenSubmitted', smalltalk.TrappedProcessor, [], 'Trapped-Processors');
  685. smalltalk.TrappedProcessorWhenSubmitted.comment="I bind to a form and send true to blackboard when submitted.";
  686. smalltalk.addMethod(
  687. smalltalk.method({
  688. selector: "installToView:toModel:",
  689. category: 'installation',
  690. fn: function (aDataCarrier,anotherDataCarrier){
  691. var self=this;
  692. return smalltalk.withContext(function($ctx1) {
  693. _st(_st(aDataCarrier)._target())._onSubmit_((function(){
  694. return smalltalk.withContext(function($ctx2) {
  695. _st(_st(anotherDataCarrier)._copy())._proceed();
  696. return false;
  697. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  698. return self}, function($ctx1) {$ctx1.fill(self,"installToView:toModel:",{aDataCarrier:aDataCarrier,anotherDataCarrier:anotherDataCarrier},smalltalk.TrappedProcessorWhenSubmitted)})},
  699. args: ["aDataCarrier", "anotherDataCarrier"],
  700. source: "installToView: aDataCarrier toModel: anotherDataCarrier\x0a\x09aDataCarrier target onSubmit: [ anotherDataCarrier copy proceed. false ]",
  701. messageSends: ["onSubmit:", "target", "proceed", "copy"],
  702. referencedClasses: []
  703. }),
  704. smalltalk.TrappedProcessorWhenSubmitted);
  705. smalltalk.addClass('TrappedProcessorWidget', smalltalk.TrappedProcessor, ['viewName'], 'Trapped-Processors');
  706. smalltalk.TrappedProcessorWidget.comment="I insert a widget instance of the class specified when creating me.";
  707. smalltalk.addMethod(
  708. smalltalk.method({
  709. selector: "toView:",
  710. category: 'data transformation',
  711. fn: function (aDataCarrier){
  712. var self=this;
  713. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  714. return smalltalk.withContext(function($ctx1) {
  715. _st(_st(aDataCarrier)._target())._with_(_st(_st(_st($Smalltalk())._current())._at_(self["@viewName"]))._new());
  716. return self}, function($ctx1) {$ctx1.fill(self,"toView:",{aDataCarrier:aDataCarrier},smalltalk.TrappedProcessorWidget)})},
  717. args: ["aDataCarrier"],
  718. source: "toView: aDataCarrier\x0a\x09aDataCarrier target with: (Smalltalk current at: viewName) new",
  719. messageSends: ["with:", "target", "new", "at:", "current"],
  720. referencedClasses: ["Smalltalk"]
  721. }),
  722. smalltalk.TrappedProcessorWidget);
  723. smalltalk.addMethod(
  724. smalltalk.method({
  725. selector: "viewName:",
  726. category: 'accessing',
  727. fn: function (aString){
  728. var self=this;
  729. return smalltalk.withContext(function($ctx1) {
  730. self["@viewName"]=aString;
  731. return self}, function($ctx1) {$ctx1.fill(self,"viewName:",{aString:aString},smalltalk.TrappedProcessorWidget)})},
  732. args: ["aString"],
  733. source: "viewName: aString\x0a\x09viewName := aString",
  734. messageSends: [],
  735. referencedClasses: []
  736. }),
  737. smalltalk.TrappedProcessorWidget);
  738. smalltalk.addMethod(
  739. smalltalk.method({
  740. selector: "new:",
  741. category: 'instance creation',
  742. fn: function (aString){
  743. var self=this;
  744. return smalltalk.withContext(function($ctx1) {
  745. var $2,$3,$1;
  746. $2=self._new();
  747. _st($2)._viewName_(aString);
  748. $3=_st($2)._yourself();
  749. $1=$3;
  750. return $1;
  751. }, function($ctx1) {$ctx1.fill(self,"new:",{aString:aString},smalltalk.TrappedProcessorWidget.klass)})},
  752. args: ["aString"],
  753. source: "new: aString\x0a\x09^self new\x0a\x09\x09viewName: aString;\x0a\x09\x09yourself",
  754. messageSends: ["viewName:", "new", "yourself"],
  755. referencedClasses: []
  756. }),
  757. smalltalk.TrappedProcessorWidget.klass);
  758. smalltalk.addMethod(
  759. smalltalk.method({
  760. selector: "cleanedJQuery:",
  761. category: '*Trapped-Processors',
  762. fn: function (aJQuery){
  763. var self=this;
  764. var result;
  765. return smalltalk.withContext(function($ctx1) {
  766. var $1,$2;
  767. result=_st(_st(aJQuery)._remove())._clone();
  768. _st(aJQuery)._empty();
  769. _st(aJQuery)._removeAttr_("data-trap");
  770. $ctx1.sendIdx["removeAttr:"]=1;
  771. $1=_st(aJQuery)._removeAttr_("data-tramplate");
  772. $2=result;
  773. return $2;
  774. }, function($ctx1) {$ctx1.fill(self,"cleanedJQuery:",{aJQuery:aJQuery,result:result},smalltalk.TrappedDataCarrier)})},
  775. args: ["aJQuery"],
  776. source: "cleanedJQuery: aJQuery\x0a\x09| result |\x0a\x09result := aJQuery remove clone.\x0a\x09aJQuery empty; removeAttr: 'data-trap'; removeAttr: 'data-tramplate'.\x0a\x09^result",
  777. messageSends: ["clone", "remove", "empty", "removeAttr:"],
  778. referencedClasses: []
  779. }),
  780. smalltalk.TrappedDataCarrier);
  781. smalltalk.addMethod(
  782. smalltalk.method({
  783. selector: "contents",
  784. category: '*Trapped-Processors',
  785. fn: function (){
  786. var self=this;
  787. return smalltalk.withContext(function($ctx1) {
  788. var $1;
  789. $1=self._contentsOf_(_st(self._target())._asJQuery());
  790. return $1;
  791. }, function($ctx1) {$ctx1.fill(self,"contents",{},smalltalk.TrappedDataCarrier)})},
  792. args: [],
  793. source: "contents\x0a\x09^self contentsOf: self target asJQuery",
  794. messageSends: ["contentsOf:", "asJQuery", "target"],
  795. referencedClasses: []
  796. }),
  797. smalltalk.TrappedDataCarrier);
  798. smalltalk.addMethod(
  799. smalltalk.method({
  800. selector: "contentsOf:",
  801. category: '*Trapped-Processors',
  802. fn: function (holder){
  803. var self=this;
  804. var tag,tramplate;
  805. return smalltalk.withContext(function($ctx1) {
  806. var $1,$2,$5,$4,$3,$6,$9,$10,$11,$8,$7,$12,$13,$14,$15,$16;
  807. $1=_st(holder)._attr_("data-tramplate");
  808. if(($receiver = $1) == nil || $receiver == null){
  809. tramplate="";
  810. } else {
  811. tramplate=$1;
  812. };
  813. $2=_st(tramplate)._matchesOf_("^see (.*)$");
  814. $ctx1.sendIdx["matchesOf:"]=1;
  815. if(($receiver = $2) == nil || $receiver == null){
  816. $2;
  817. } else {
  818. var seeMatch;
  819. seeMatch=$receiver;
  820. $5=_st(seeMatch)._second();
  821. $ctx1.sendIdx["second"]=1;
  822. $4=_st($5)._asJQuery();
  823. $ctx1.sendIdx["asJQuery"]=1;
  824. $3=self._contentsOf_($4);
  825. return $3;
  826. };
  827. $6=_st(tramplate)._matchesOf_("^until (.*)$");
  828. if(($receiver = $6) == nil || $receiver == null){
  829. $6;
  830. } else {
  831. var parentContents,start,end,untilMatch;
  832. untilMatch=$receiver;
  833. parentContents=_st(_st(holder)._parent())._contents();
  834. $ctx1.sendIdx["contents"]=1;
  835. parentContents;
  836. start=_st(parentContents)._index_(holder);
  837. $ctx1.sendIdx["index:"]=1;
  838. start;
  839. end=_st(parentContents)._index_(_st(holder)._nextAll_(_st(untilMatch)._second()));
  840. end;
  841. $9=_st(end).__eq((-1));
  842. $ctx1.sendIdx["="]=1;
  843. if(smalltalk.assert($9)){
  844. $10=parentContents;
  845. $11=_st(start).__plus((1));
  846. $ctx1.sendIdx["+"]=1;
  847. $8=_st($10)._slice_($11);
  848. } else {
  849. $8=_st(parentContents)._slice_until_(_st(start).__plus((1)),end);
  850. };
  851. $7=self._cleanedJQuery_($8);
  852. $ctx1.sendIdx["cleanedJQuery:"]=1;
  853. return $7;
  854. };
  855. $12=_st(holder)._prop_("tagName");
  856. $ctx1.sendIdx["prop:"]=1;
  857. tag=_st($12)._asLowercase();
  858. $13=_st(tag).__eq("template");
  859. if(smalltalk.assert($13)){
  860. $14=_st(holder)._prop_("content");
  861. if(($receiver = $14) == nil || $receiver == null){
  862. $14;
  863. } else {
  864. var content;
  865. content=$receiver;
  866. $15=_st(content)._asJQuery();
  867. return $15;
  868. };
  869. };
  870. $16=self._cleanedJQuery_(_st(holder)._contents());
  871. return $16;
  872. }, function($ctx1) {$ctx1.fill(self,"contentsOf:",{holder:holder,tag:tag,tramplate:tramplate},smalltalk.TrappedDataCarrier)})},
  873. args: ["holder"],
  874. source: "contentsOf: holder\x0a\x09| tag tramplate |\x0a\x09tramplate := (holder attr: 'data-tramplate') ifNil: [ '' ].\x0a\x09(tramplate matchesOf: '^see (.*)$') ifNotNil: [ :seeMatch | ^self contentsOf: seeMatch second asJQuery ].\x0a\x09(tramplate matchesOf: '^until (.*)$') ifNotNil: [ :untilMatch |\x0a\x09\x09| parentContents start end |\x0a\x09\x09parentContents := holder parent contents.\x0a\x09\x09start := parentContents index: holder.\x0a\x09\x09end := parentContents index: (holder nextAll: untilMatch second).\x0a\x09\x09^self cleanedJQuery: (end = -1 ifTrue: [ parentContents slice: start + 1 ] ifFalse: [ parentContents slice: start + 1 until: end ]) ].\x0a\x09tag := (holder prop: 'tagName') asLowercase.\x0a\x09tag = 'template' ifTrue: [ (holder prop: 'content') ifNotNil: [ :content | ^content asJQuery ] ].\x0a\x09^self cleanedJQuery: holder contents",
  875. messageSends: ["ifNil:", "attr:", "ifNotNil:", "matchesOf:", "contentsOf:", "asJQuery", "second", "contents", "parent", "index:", "nextAll:", "cleanedJQuery:", "ifTrue:ifFalse:", "=", "slice:", "+", "slice:until:", "asLowercase", "prop:", "ifTrue:"],
  876. referencedClasses: []
  877. }),
  878. smalltalk.TrappedDataCarrier);
  879. smalltalk.addMethod(
  880. smalltalk.method({
  881. selector: "modifyTarget",
  882. category: '*Trapped-Processors',
  883. fn: function (){
  884. var self=this;
  885. return smalltalk.withContext(function($ctx1) {
  886. _st(self._target())._modify_((function(){
  887. return smalltalk.withContext(function($ctx2) {
  888. return self._value();
  889. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  890. return self}, function($ctx1) {$ctx1.fill(self,"modifyTarget",{},smalltalk.TrappedDataCarrier)})},
  891. args: [],
  892. source: "modifyTarget\x0a\x09self target modify: [ self value ]",
  893. messageSends: ["modify:", "target", "value"],
  894. referencedClasses: []
  895. }),
  896. smalltalk.TrappedDataCarrier);
  897. smalltalk.addMethod(
  898. smalltalk.method({
  899. selector: "modifyTargetByPerforming:",
  900. category: '*Trapped-Processors',
  901. fn: function (aString){
  902. var self=this;
  903. return smalltalk.withContext(function($ctx1) {
  904. _st(self._target())._modify_((function(m){
  905. return smalltalk.withContext(function($ctx2) {
  906. return _st(m)._perform_(aString);
  907. }, function($ctx2) {$ctx2.fillBlock({m:m},$ctx1,1)})}));
  908. return self}, function($ctx1) {$ctx1.fill(self,"modifyTargetByPerforming:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  909. args: ["aString"],
  910. source: "modifyTargetByPerforming: aString\x0a\x09self target modify: [ :m | m perform: aString ]",
  911. messageSends: ["modify:", "target", "perform:"],
  912. referencedClasses: []
  913. }),
  914. smalltalk.TrappedDataCarrier);
  915. smalltalk.addMethod(
  916. smalltalk.method({
  917. selector: "toTargetAttr:",
  918. category: '*Trapped-Processors',
  919. fn: function (aString){
  920. var self=this;
  921. return smalltalk.withContext(function($ctx1) {
  922. var $1,$2,$3,$5,$4;
  923. $1=self._falseAsNilValue();
  924. if(($receiver = $1) == nil || $receiver == null){
  925. $2=self._target();
  926. $ctx1.sendIdx["target"]=1;
  927. _st($2)._removeAt_(aString);
  928. } else {
  929. var value;
  930. value=$receiver;
  931. $3=self._target();
  932. $5=_st(value).__eq(true);
  933. if(smalltalk.assert($5)){
  934. $4=aString;
  935. } else {
  936. $4=value;
  937. };
  938. _st($3)._at_put_(aString,$4);
  939. };
  940. return self}, function($ctx1) {$ctx1.fill(self,"toTargetAttr:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  941. args: ["aString"],
  942. source: "toTargetAttr: aString\x0a\x09self falseAsNilValue\x0a\x09\x09ifNil: [ self target removeAt: aString ]\x0a\x09\x09ifNotNil: [ :value | self target at: aString put: (value = true ifTrue: [ aString ] ifFalse: [ value ]) ]",
  943. messageSends: ["ifNil:ifNotNil:", "falseAsNilValue", "removeAt:", "target", "at:put:", "ifTrue:ifFalse:", "="],
  944. referencedClasses: []
  945. }),
  946. smalltalk.TrappedDataCarrier);
  947. smalltalk.addMethod(
  948. smalltalk.method({
  949. selector: "toTargetContents",
  950. category: '*Trapped-Processors',
  951. fn: function (){
  952. var self=this;
  953. return smalltalk.withContext(function($ctx1) {
  954. _st(self._target())._contents_(self._value());
  955. return self}, function($ctx1) {$ctx1.fill(self,"toTargetContents",{},smalltalk.TrappedDataCarrier)})},
  956. args: [],
  957. source: "toTargetContents\x0a\x09self target contents: self value",
  958. messageSends: ["contents:", "target", "value"],
  959. referencedClasses: []
  960. }),
  961. smalltalk.TrappedDataCarrier);
  962. smalltalk.addMethod(
  963. smalltalk.method({
  964. selector: "toTargetValue",
  965. category: '*Trapped-Processors',
  966. fn: function (){
  967. var self=this;
  968. return smalltalk.withContext(function($ctx1) {
  969. var $1,$3,$2;
  970. $1=_st(self._target())._asJQuery();
  971. $3=self._value();
  972. $ctx1.sendIdx["value"]=1;
  973. if(($receiver = $3) == nil || $receiver == null){
  974. $2=(function(){
  975. return smalltalk.withContext(function($ctx2) {
  976. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})});
  977. } else {
  978. var o;
  979. o=$receiver;
  980. $2=_st(o)._value();
  981. };
  982. _st($1)._val_($2);
  983. return self}, function($ctx1) {$ctx1.fill(self,"toTargetValue",{},smalltalk.TrappedDataCarrier)})},
  984. args: [],
  985. source: "toTargetValue\x0a\x09self target asJQuery val: (self value ifNotNil: [ :o | o value ] ifNil: [[]])",
  986. messageSends: ["val:", "asJQuery", "target", "ifNotNil:ifNil:", "value"],
  987. referencedClasses: []
  988. }),
  989. smalltalk.TrappedDataCarrier);
  990. smalltalk.addMethod(
  991. smalltalk.method({
  992. selector: "attr:",
  993. category: '*Trapped-Processors',
  994. fn: function (aString){
  995. var self=this;
  996. function $TrappedProcessorAttribute(){return smalltalk.TrappedProcessorAttribute||(typeof TrappedProcessorAttribute=="undefined"?nil:TrappedProcessorAttribute)}
  997. return smalltalk.withContext(function($ctx1) {
  998. var $1;
  999. $1=_st($TrappedProcessorAttribute())._new_(aString);
  1000. return $1;
  1001. }, function($ctx1) {$ctx1.fill(self,"attr:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  1002. args: ["aString"],
  1003. source: "attr: aString\x0a\x09^TrappedProcessorAttribute new: aString",
  1004. messageSends: ["new:"],
  1005. referencedClasses: ["TrappedProcessorAttribute"]
  1006. }),
  1007. smalltalk.TrappedProcessor.klass);
  1008. smalltalk.addMethod(
  1009. smalltalk.method({
  1010. selector: "dataToView:",
  1011. category: '*Trapped-Processors',
  1012. fn: function (aBlock){
  1013. var self=this;
  1014. function $TrappedProcessorDataAdhoc(){return smalltalk.TrappedProcessorDataAdhoc||(typeof TrappedProcessorDataAdhoc=="undefined"?nil:TrappedProcessorDataAdhoc)}
  1015. return smalltalk.withContext(function($ctx1) {
  1016. var $1;
  1017. $1=_st($TrappedProcessorDataAdhoc())._newToView_(aBlock);
  1018. return $1;
  1019. }, function($ctx1) {$ctx1.fill(self,"dataToView:",{aBlock:aBlock},smalltalk.TrappedProcessor.klass)})},
  1020. args: ["aBlock"],
  1021. source: "dataToView: aBlock\x0a\x09^TrappedProcessorDataAdhoc newToView: aBlock",
  1022. messageSends: ["newToView:"],
  1023. referencedClasses: ["TrappedProcessorDataAdhoc"]
  1024. }),
  1025. smalltalk.TrappedProcessor.klass);
  1026. smalltalk.addMethod(
  1027. smalltalk.method({
  1028. selector: "deuric",
  1029. category: '*Trapped-Processors',
  1030. fn: function (){
  1031. var self=this;
  1032. function $TrappedProcessorUriComponentDecoded(){return smalltalk.TrappedProcessorUriComponentDecoded||(typeof TrappedProcessorUriComponentDecoded=="undefined"?nil:TrappedProcessorUriComponentDecoded)}
  1033. return smalltalk.withContext(function($ctx1) {
  1034. var $1;
  1035. $1=_st($TrappedProcessorUriComponentDecoded())._new();
  1036. return $1;
  1037. }, function($ctx1) {$ctx1.fill(self,"deuric",{},smalltalk.TrappedProcessor.klass)})},
  1038. args: [],
  1039. source: "deuric\x0a\x09^TrappedProcessorUriComponentDecoded new",
  1040. messageSends: ["new"],
  1041. referencedClasses: ["TrappedProcessorUriComponentDecoded"]
  1042. }),
  1043. smalltalk.TrappedProcessor.klass);
  1044. smalltalk.addMethod(
  1045. smalltalk.method({
  1046. selector: "guardContents:",
  1047. category: '*Trapped-Processors',
  1048. fn: function (anArray){
  1049. var self=this;
  1050. function $TrappedProcessorGuardContents(){return smalltalk.TrappedProcessorGuardContents||(typeof TrappedProcessorGuardContents=="undefined"?nil:TrappedProcessorGuardContents)}
  1051. return smalltalk.withContext(function($ctx1) {
  1052. var $1;
  1053. $1=_st($TrappedProcessorGuardContents())._new_(anArray);
  1054. return $1;
  1055. }, function($ctx1) {$ctx1.fill(self,"guardContents:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
  1056. args: ["anArray"],
  1057. source: "guardContents: anArray\x0a\x09^TrappedProcessorGuardContents new: anArray",
  1058. messageSends: ["new:"],
  1059. referencedClasses: ["TrappedProcessorGuardContents"]
  1060. }),
  1061. smalltalk.TrappedProcessor.klass);
  1062. smalltalk.addMethod(
  1063. smalltalk.method({
  1064. selector: "guardProc:",
  1065. category: '*Trapped-Processors',
  1066. fn: function (anArray){
  1067. var self=this;
  1068. function $TrappedProcessorGuardProc(){return smalltalk.TrappedProcessorGuardProc||(typeof TrappedProcessorGuardProc=="undefined"?nil:TrappedProcessorGuardProc)}
  1069. return smalltalk.withContext(function($ctx1) {
  1070. var $1;
  1071. $1=_st($TrappedProcessorGuardProc())._new_(anArray);
  1072. return $1;
  1073. }, function($ctx1) {$ctx1.fill(self,"guardProc:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
  1074. args: ["anArray"],
  1075. source: "guardProc: anArray\x0a\x09^TrappedProcessorGuardProc new: anArray",
  1076. messageSends: ["new:"],
  1077. referencedClasses: ["TrappedProcessorGuardProc"]
  1078. }),
  1079. smalltalk.TrappedProcessor.klass);
  1080. smalltalk.addMethod(
  1081. smalltalk.method({
  1082. selector: "inputChecked",
  1083. category: '*Trapped-Processors',
  1084. fn: function (){
  1085. var self=this;
  1086. function $TrappedProcessorInputChecked(){return smalltalk.TrappedProcessorInputChecked||(typeof TrappedProcessorInputChecked=="undefined"?nil:TrappedProcessorInputChecked)}
  1087. return smalltalk.withContext(function($ctx1) {
  1088. var $1;
  1089. $1=_st($TrappedProcessorInputChecked())._new();
  1090. return $1;
  1091. }, function($ctx1) {$ctx1.fill(self,"inputChecked",{},smalltalk.TrappedProcessor.klass)})},
  1092. args: [],
  1093. source: "inputChecked\x0a\x09^TrappedProcessorInputChecked new",
  1094. messageSends: ["new"],
  1095. referencedClasses: ["TrappedProcessorInputChecked"]
  1096. }),
  1097. smalltalk.TrappedProcessor.klass);
  1098. smalltalk.addMethod(
  1099. smalltalk.method({
  1100. selector: "inputValue",
  1101. category: '*Trapped-Processors',
  1102. fn: function (){
  1103. var self=this;
  1104. function $TrappedProcessorInputValue(){return smalltalk.TrappedProcessorInputValue||(typeof TrappedProcessorInputValue=="undefined"?nil:TrappedProcessorInputValue)}
  1105. return smalltalk.withContext(function($ctx1) {
  1106. var $1;
  1107. $1=_st($TrappedProcessorInputValue())._new();
  1108. return $1;
  1109. }, function($ctx1) {$ctx1.fill(self,"inputValue",{},smalltalk.TrappedProcessor.klass)})},
  1110. args: [],
  1111. source: "inputValue\x0a\x09^TrappedProcessorInputValue new",
  1112. messageSends: ["new"],
  1113. referencedClasses: ["TrappedProcessorInputValue"]
  1114. }),
  1115. smalltalk.TrappedProcessor.klass);
  1116. smalltalk.addMethod(
  1117. smalltalk.method({
  1118. selector: "loopContents",
  1119. category: '*Trapped-Processors',
  1120. fn: function (){
  1121. var self=this;
  1122. function $TrappedProcessorLoopContents(){return smalltalk.TrappedProcessorLoopContents||(typeof TrappedProcessorLoopContents=="undefined"?nil:TrappedProcessorLoopContents)}
  1123. return smalltalk.withContext(function($ctx1) {
  1124. var $1;
  1125. $1=_st($TrappedProcessorLoopContents())._new();
  1126. return $1;
  1127. }, function($ctx1) {$ctx1.fill(self,"loopContents",{},smalltalk.TrappedProcessor.klass)})},
  1128. args: [],
  1129. source: "loopContents\x0a\x09^TrappedProcessorLoopContents new",
  1130. messageSends: ["new"],
  1131. referencedClasses: ["TrappedProcessorLoopContents"]
  1132. }),
  1133. smalltalk.TrappedProcessor.klass);
  1134. smalltalk.addMethod(
  1135. smalltalk.method({
  1136. selector: "loopProc",
  1137. category: '*Trapped-Processors',
  1138. fn: function (){
  1139. var self=this;
  1140. function $TrappedProcessorLoopProc(){return smalltalk.TrappedProcessorLoopProc||(typeof TrappedProcessorLoopProc=="undefined"?nil:TrappedProcessorLoopProc)}
  1141. return smalltalk.withContext(function($ctx1) {
  1142. var $1;
  1143. $1=_st($TrappedProcessorLoopProc())._new();
  1144. return $1;
  1145. }, function($ctx1) {$ctx1.fill(self,"loopProc",{},smalltalk.TrappedProcessor.klass)})},
  1146. args: [],
  1147. source: "loopProc\x0a\x09^TrappedProcessorLoopProc new",
  1148. messageSends: ["new"],
  1149. referencedClasses: ["TrappedProcessorLoopProc"]
  1150. }),
  1151. smalltalk.TrappedProcessor.klass);
  1152. smalltalk.addMethod(
  1153. smalltalk.method({
  1154. selector: "path",
  1155. category: '*Trapped-Processors',
  1156. fn: function (){
  1157. var self=this;
  1158. function $TrappedProcessorDescend(){return smalltalk.TrappedProcessorDescend||(typeof TrappedProcessorDescend=="undefined"?nil:TrappedProcessorDescend)}
  1159. return smalltalk.withContext(function($ctx1) {
  1160. var $1;
  1161. $1=_st($TrappedProcessorDescend())._new();
  1162. return $1;
  1163. }, function($ctx1) {$ctx1.fill(self,"path",{},smalltalk.TrappedProcessor.klass)})},
  1164. args: [],
  1165. source: "path\x0a\x09^TrappedProcessorDescend new",
  1166. messageSends: ["new"],
  1167. referencedClasses: ["TrappedProcessorDescend"]
  1168. }),
  1169. smalltalk.TrappedProcessor.klass);
  1170. smalltalk.addMethod(
  1171. smalltalk.method({
  1172. selector: "replace:with:",
  1173. category: '*Trapped-Processors',
  1174. fn: function (aString,anotherString){
  1175. var self=this;
  1176. function $TrappedProcessorReplace(){return smalltalk.TrappedProcessorReplace||(typeof TrappedProcessorReplace=="undefined"?nil:TrappedProcessorReplace)}
  1177. return smalltalk.withContext(function($ctx1) {
  1178. var $1;
  1179. $1=_st($TrappedProcessorReplace())._new_with_(aString,anotherString);
  1180. return $1;
  1181. }, function($ctx1) {$ctx1.fill(self,"replace:with:",{aString:aString,anotherString:anotherString},smalltalk.TrappedProcessor.klass)})},
  1182. args: ["aString", "anotherString"],
  1183. source: "replace: aString with: anotherString\x0a\x09^TrappedProcessorReplace new: aString with: anotherString",
  1184. messageSends: ["new:with:"],
  1185. referencedClasses: ["TrappedProcessorReplace"]
  1186. }),
  1187. smalltalk.TrappedProcessor.klass);
  1188. smalltalk.addMethod(
  1189. smalltalk.method({
  1190. selector: "signal:",
  1191. category: '*Trapped-Processors',
  1192. fn: function (aString){
  1193. var self=this;
  1194. function $TrappedProcessorSignal(){return smalltalk.TrappedProcessorSignal||(typeof TrappedProcessorSignal=="undefined"?nil:TrappedProcessorSignal)}
  1195. return smalltalk.withContext(function($ctx1) {
  1196. var $1;
  1197. $1=_st($TrappedProcessorSignal())._new_(aString);
  1198. return $1;
  1199. }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  1200. args: ["aString"],
  1201. source: "signal: aString\x0a\x09^TrappedProcessorSignal new: aString",
  1202. messageSends: ["new:"],
  1203. referencedClasses: ["TrappedProcessorSignal"]
  1204. }),
  1205. smalltalk.TrappedProcessor.klass);
  1206. smalltalk.addMethod(
  1207. smalltalk.method({
  1208. selector: "toBlackboard",
  1209. category: '*Trapped-Processors',
  1210. fn: function (){
  1211. var self=this;
  1212. function $TrappedProcessorToBlackboard(){return smalltalk.TrappedProcessorToBlackboard||(typeof TrappedProcessorToBlackboard=="undefined"?nil:TrappedProcessorToBlackboard)}
  1213. return smalltalk.withContext(function($ctx1) {
  1214. var $1;
  1215. $1=_st($TrappedProcessorToBlackboard())._new();
  1216. return $1;
  1217. }, function($ctx1) {$ctx1.fill(self,"toBlackboard",{},smalltalk.TrappedProcessor.klass)})},
  1218. args: [],
  1219. source: "toBlackboard\x0a\x09^TrappedProcessorToBlackboard new",
  1220. messageSends: ["new"],
  1221. referencedClasses: ["TrappedProcessorToBlackboard"]
  1222. }),
  1223. smalltalk.TrappedProcessor.klass);
  1224. smalltalk.addMethod(
  1225. smalltalk.method({
  1226. selector: "uric",
  1227. category: '*Trapped-Processors',
  1228. fn: function (){
  1229. var self=this;
  1230. function $TrappedProcessorUriComponentEncoded(){return smalltalk.TrappedProcessorUriComponentEncoded||(typeof TrappedProcessorUriComponentEncoded=="undefined"?nil:TrappedProcessorUriComponentEncoded)}
  1231. return smalltalk.withContext(function($ctx1) {
  1232. var $1;
  1233. $1=_st($TrappedProcessorUriComponentEncoded())._new();
  1234. return $1;
  1235. }, function($ctx1) {$ctx1.fill(self,"uric",{},smalltalk.TrappedProcessor.klass)})},
  1236. args: [],
  1237. source: "uric\x0a\x09^TrappedProcessorUriComponentEncoded new",
  1238. messageSends: ["new"],
  1239. referencedClasses: ["TrappedProcessorUriComponentEncoded"]
  1240. }),
  1241. smalltalk.TrappedProcessor.klass);
  1242. smalltalk.addMethod(
  1243. smalltalk.method({
  1244. selector: "whenClicked",
  1245. category: '*Trapped-Processors',
  1246. fn: function (){
  1247. var self=this;
  1248. function $TrappedProcessorWhenClicked(){return smalltalk.TrappedProcessorWhenClicked||(typeof TrappedProcessorWhenClicked=="undefined"?nil:TrappedProcessorWhenClicked)}
  1249. return smalltalk.withContext(function($ctx1) {
  1250. var $1;
  1251. $1=_st($TrappedProcessorWhenClicked())._new();
  1252. return $1;
  1253. }, function($ctx1) {$ctx1.fill(self,"whenClicked",{},smalltalk.TrappedProcessor.klass)})},
  1254. args: [],
  1255. source: "whenClicked\x0a\x09^TrappedProcessorWhenClicked new",
  1256. messageSends: ["new"],
  1257. referencedClasses: ["TrappedProcessorWhenClicked"]
  1258. }),
  1259. smalltalk.TrappedProcessor.klass);
  1260. smalltalk.addMethod(
  1261. smalltalk.method({
  1262. selector: "whenSubmitted",
  1263. category: '*Trapped-Processors',
  1264. fn: function (){
  1265. var self=this;
  1266. function $TrappedProcessorWhenSubmitted(){return smalltalk.TrappedProcessorWhenSubmitted||(typeof TrappedProcessorWhenSubmitted=="undefined"?nil:TrappedProcessorWhenSubmitted)}
  1267. return smalltalk.withContext(function($ctx1) {
  1268. var $1;
  1269. $1=_st($TrappedProcessorWhenSubmitted())._new();
  1270. return $1;
  1271. }, function($ctx1) {$ctx1.fill(self,"whenSubmitted",{},smalltalk.TrappedProcessor.klass)})},
  1272. args: [],
  1273. source: "whenSubmitted\x0a\x09^TrappedProcessorWhenSubmitted new",
  1274. messageSends: ["new"],
  1275. referencedClasses: ["TrappedProcessorWhenSubmitted"]
  1276. }),
  1277. smalltalk.TrappedProcessor.klass);
  1278. smalltalk.addMethod(
  1279. smalltalk.method({
  1280. selector: "widget:",
  1281. category: '*Trapped-Processors',
  1282. fn: function (aString){
  1283. var self=this;
  1284. function $TrappedProcessorWidget(){return smalltalk.TrappedProcessorWidget||(typeof TrappedProcessorWidget=="undefined"?nil:TrappedProcessorWidget)}
  1285. return smalltalk.withContext(function($ctx1) {
  1286. var $1;
  1287. $1=_st($TrappedProcessorWidget())._new_(aString);
  1288. return $1;
  1289. }, function($ctx1) {$ctx1.fill(self,"widget:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  1290. args: ["aString"],
  1291. source: "widget: aString\x0a\x09^TrappedProcessorWidget new: aString",
  1292. messageSends: ["new:"],
  1293. referencedClasses: ["TrappedProcessorWidget"]
  1294. }),
  1295. smalltalk.TrappedProcessor.klass);
  1296. });