Trapped-Processors.js 52 KB

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