Trapped-Processors.js 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389
  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,$7,$8,$9,$10,$11,$12;
  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. $7=self._cleanedJQuery_(_st(parentContents)._slice_until_(_st(start).__plus((1)),end));
  842. $ctx1.sendIdx["cleanedJQuery:"]=1;
  843. return $7;
  844. };
  845. $8=_st(holder)._prop_("tagName");
  846. $ctx1.sendIdx["prop:"]=1;
  847. tag=_st($8)._asLowercase();
  848. $9=_st(tag).__eq("template");
  849. if(smalltalk.assert($9)){
  850. $10=_st(holder)._prop_("content");
  851. if(($receiver = $10) == nil || $receiver == null){
  852. $10;
  853. } else {
  854. var content;
  855. content=$receiver;
  856. $11=_st(content)._asJQuery();
  857. return $11;
  858. };
  859. };
  860. $12=self._cleanedJQuery_(_st(holder)._contents());
  861. return $12;
  862. }, function($ctx1) {$ctx1.fill(self,"contentsOf:",{holder:holder,tag:tag,tramplate:tramplate},smalltalk.TrappedDataCarrier)})},
  863. args: ["holder"],
  864. 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: (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",
  865. messageSends: ["ifNil:", "attr:", "ifNotNil:", "matchesOf:", "contentsOf:", "asJQuery", "second", "contents", "parent", "index:", "nextAll:", "cleanedJQuery:", "slice:until:", "+", "asLowercase", "prop:", "ifTrue:", "="],
  866. referencedClasses: []
  867. }),
  868. smalltalk.TrappedDataCarrier);
  869. smalltalk.addMethod(
  870. smalltalk.method({
  871. selector: "modifyTarget",
  872. category: '*Trapped-Processors',
  873. fn: function (){
  874. var self=this;
  875. return smalltalk.withContext(function($ctx1) {
  876. _st(self._target())._modify_((function(){
  877. return smalltalk.withContext(function($ctx2) {
  878. return self._value();
  879. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  880. return self}, function($ctx1) {$ctx1.fill(self,"modifyTarget",{},smalltalk.TrappedDataCarrier)})},
  881. args: [],
  882. source: "modifyTarget\x0a\x09self target modify: [ self value ]",
  883. messageSends: ["modify:", "target", "value"],
  884. referencedClasses: []
  885. }),
  886. smalltalk.TrappedDataCarrier);
  887. smalltalk.addMethod(
  888. smalltalk.method({
  889. selector: "modifyTargetByPerforming:",
  890. category: '*Trapped-Processors',
  891. fn: function (aString){
  892. var self=this;
  893. return smalltalk.withContext(function($ctx1) {
  894. _st(self._target())._modify_((function(m){
  895. return smalltalk.withContext(function($ctx2) {
  896. return _st(m)._perform_(aString);
  897. }, function($ctx2) {$ctx2.fillBlock({m:m},$ctx1,1)})}));
  898. return self}, function($ctx1) {$ctx1.fill(self,"modifyTargetByPerforming:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  899. args: ["aString"],
  900. source: "modifyTargetByPerforming: aString\x0a\x09self target modify: [ :m | m perform: aString ]",
  901. messageSends: ["modify:", "target", "perform:"],
  902. referencedClasses: []
  903. }),
  904. smalltalk.TrappedDataCarrier);
  905. smalltalk.addMethod(
  906. smalltalk.method({
  907. selector: "toTargetAttr:",
  908. category: '*Trapped-Processors',
  909. fn: function (aString){
  910. var self=this;
  911. return smalltalk.withContext(function($ctx1) {
  912. var $1,$2,$3,$5,$4;
  913. $1=self._falseAsNilValue();
  914. if(($receiver = $1) == nil || $receiver == null){
  915. $2=self._target();
  916. $ctx1.sendIdx["target"]=1;
  917. _st($2)._removeAt_(aString);
  918. } else {
  919. var value;
  920. value=$receiver;
  921. $3=self._target();
  922. $5=_st(value).__eq(true);
  923. if(smalltalk.assert($5)){
  924. $4=aString;
  925. } else {
  926. $4=value;
  927. };
  928. _st($3)._at_put_(aString,$4);
  929. };
  930. return self}, function($ctx1) {$ctx1.fill(self,"toTargetAttr:",{aString:aString},smalltalk.TrappedDataCarrier)})},
  931. args: ["aString"],
  932. 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 ]) ]",
  933. messageSends: ["ifNil:ifNotNil:", "falseAsNilValue", "removeAt:", "target", "at:put:", "ifTrue:ifFalse:", "="],
  934. referencedClasses: []
  935. }),
  936. smalltalk.TrappedDataCarrier);
  937. smalltalk.addMethod(
  938. smalltalk.method({
  939. selector: "toTargetContents",
  940. category: '*Trapped-Processors',
  941. fn: function (){
  942. var self=this;
  943. return smalltalk.withContext(function($ctx1) {
  944. _st(self._target())._contents_(self._value());
  945. return self}, function($ctx1) {$ctx1.fill(self,"toTargetContents",{},smalltalk.TrappedDataCarrier)})},
  946. args: [],
  947. source: "toTargetContents\x0a\x09self target contents: self value",
  948. messageSends: ["contents:", "target", "value"],
  949. referencedClasses: []
  950. }),
  951. smalltalk.TrappedDataCarrier);
  952. smalltalk.addMethod(
  953. smalltalk.method({
  954. selector: "toTargetValue",
  955. category: '*Trapped-Processors',
  956. fn: function (){
  957. var self=this;
  958. return smalltalk.withContext(function($ctx1) {
  959. var $1,$3,$2;
  960. $1=_st(self._target())._asJQuery();
  961. $3=self._value();
  962. $ctx1.sendIdx["value"]=1;
  963. if(($receiver = $3) == nil || $receiver == null){
  964. $2=(function(){
  965. return smalltalk.withContext(function($ctx2) {
  966. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})});
  967. } else {
  968. var o;
  969. o=$receiver;
  970. $2=_st(o)._value();
  971. };
  972. _st($1)._val_($2);
  973. return self}, function($ctx1) {$ctx1.fill(self,"toTargetValue",{},smalltalk.TrappedDataCarrier)})},
  974. args: [],
  975. source: "toTargetValue\x0a\x09self target asJQuery val: (self value ifNotNil: [ :o | o value ] ifNil: [[]])",
  976. messageSends: ["val:", "asJQuery", "target", "ifNotNil:ifNil:", "value"],
  977. referencedClasses: []
  978. }),
  979. smalltalk.TrappedDataCarrier);
  980. smalltalk.addMethod(
  981. smalltalk.method({
  982. selector: "attr:",
  983. category: '*Trapped-Processors',
  984. fn: function (aString){
  985. var self=this;
  986. function $TrappedProcessorAttribute(){return smalltalk.TrappedProcessorAttribute||(typeof TrappedProcessorAttribute=="undefined"?nil:TrappedProcessorAttribute)}
  987. return smalltalk.withContext(function($ctx1) {
  988. var $1;
  989. $1=_st($TrappedProcessorAttribute())._new_(aString);
  990. return $1;
  991. }, function($ctx1) {$ctx1.fill(self,"attr:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  992. args: ["aString"],
  993. source: "attr: aString\x0a\x09^TrappedProcessorAttribute new: aString",
  994. messageSends: ["new:"],
  995. referencedClasses: ["TrappedProcessorAttribute"]
  996. }),
  997. smalltalk.TrappedProcessor.klass);
  998. smalltalk.addMethod(
  999. smalltalk.method({
  1000. selector: "dataToView:",
  1001. category: '*Trapped-Processors',
  1002. fn: function (aBlock){
  1003. var self=this;
  1004. function $TrappedProcessorDataAdhoc(){return smalltalk.TrappedProcessorDataAdhoc||(typeof TrappedProcessorDataAdhoc=="undefined"?nil:TrappedProcessorDataAdhoc)}
  1005. return smalltalk.withContext(function($ctx1) {
  1006. var $1;
  1007. $1=_st($TrappedProcessorDataAdhoc())._newToView_(aBlock);
  1008. return $1;
  1009. }, function($ctx1) {$ctx1.fill(self,"dataToView:",{aBlock:aBlock},smalltalk.TrappedProcessor.klass)})},
  1010. args: ["aBlock"],
  1011. source: "dataToView: aBlock\x0a\x09^TrappedProcessorDataAdhoc newToView: aBlock",
  1012. messageSends: ["newToView:"],
  1013. referencedClasses: ["TrappedProcessorDataAdhoc"]
  1014. }),
  1015. smalltalk.TrappedProcessor.klass);
  1016. smalltalk.addMethod(
  1017. smalltalk.method({
  1018. selector: "deuric",
  1019. category: '*Trapped-Processors',
  1020. fn: function (){
  1021. var self=this;
  1022. function $TrappedProcessorUriComponentDecoded(){return smalltalk.TrappedProcessorUriComponentDecoded||(typeof TrappedProcessorUriComponentDecoded=="undefined"?nil:TrappedProcessorUriComponentDecoded)}
  1023. return smalltalk.withContext(function($ctx1) {
  1024. var $1;
  1025. $1=_st($TrappedProcessorUriComponentDecoded())._new();
  1026. return $1;
  1027. }, function($ctx1) {$ctx1.fill(self,"deuric",{},smalltalk.TrappedProcessor.klass)})},
  1028. args: [],
  1029. source: "deuric\x0a\x09^TrappedProcessorUriComponentDecoded new",
  1030. messageSends: ["new"],
  1031. referencedClasses: ["TrappedProcessorUriComponentDecoded"]
  1032. }),
  1033. smalltalk.TrappedProcessor.klass);
  1034. smalltalk.addMethod(
  1035. smalltalk.method({
  1036. selector: "guardContents:",
  1037. category: '*Trapped-Processors',
  1038. fn: function (anArray){
  1039. var self=this;
  1040. function $TrappedProcessorGuardContents(){return smalltalk.TrappedProcessorGuardContents||(typeof TrappedProcessorGuardContents=="undefined"?nil:TrappedProcessorGuardContents)}
  1041. return smalltalk.withContext(function($ctx1) {
  1042. var $1;
  1043. $1=_st($TrappedProcessorGuardContents())._new_(anArray);
  1044. return $1;
  1045. }, function($ctx1) {$ctx1.fill(self,"guardContents:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
  1046. args: ["anArray"],
  1047. source: "guardContents: anArray\x0a\x09^TrappedProcessorGuardContents new: anArray",
  1048. messageSends: ["new:"],
  1049. referencedClasses: ["TrappedProcessorGuardContents"]
  1050. }),
  1051. smalltalk.TrappedProcessor.klass);
  1052. smalltalk.addMethod(
  1053. smalltalk.method({
  1054. selector: "guardProc:",
  1055. category: '*Trapped-Processors',
  1056. fn: function (anArray){
  1057. var self=this;
  1058. function $TrappedProcessorGuardProc(){return smalltalk.TrappedProcessorGuardProc||(typeof TrappedProcessorGuardProc=="undefined"?nil:TrappedProcessorGuardProc)}
  1059. return smalltalk.withContext(function($ctx1) {
  1060. var $1;
  1061. $1=_st($TrappedProcessorGuardProc())._new_(anArray);
  1062. return $1;
  1063. }, function($ctx1) {$ctx1.fill(self,"guardProc:",{anArray:anArray},smalltalk.TrappedProcessor.klass)})},
  1064. args: ["anArray"],
  1065. source: "guardProc: anArray\x0a\x09^TrappedProcessorGuardProc new: anArray",
  1066. messageSends: ["new:"],
  1067. referencedClasses: ["TrappedProcessorGuardProc"]
  1068. }),
  1069. smalltalk.TrappedProcessor.klass);
  1070. smalltalk.addMethod(
  1071. smalltalk.method({
  1072. selector: "inputChecked",
  1073. category: '*Trapped-Processors',
  1074. fn: function (){
  1075. var self=this;
  1076. function $TrappedProcessorInputChecked(){return smalltalk.TrappedProcessorInputChecked||(typeof TrappedProcessorInputChecked=="undefined"?nil:TrappedProcessorInputChecked)}
  1077. return smalltalk.withContext(function($ctx1) {
  1078. var $1;
  1079. $1=_st($TrappedProcessorInputChecked())._new();
  1080. return $1;
  1081. }, function($ctx1) {$ctx1.fill(self,"inputChecked",{},smalltalk.TrappedProcessor.klass)})},
  1082. args: [],
  1083. source: "inputChecked\x0a\x09^TrappedProcessorInputChecked new",
  1084. messageSends: ["new"],
  1085. referencedClasses: ["TrappedProcessorInputChecked"]
  1086. }),
  1087. smalltalk.TrappedProcessor.klass);
  1088. smalltalk.addMethod(
  1089. smalltalk.method({
  1090. selector: "inputValue",
  1091. category: '*Trapped-Processors',
  1092. fn: function (){
  1093. var self=this;
  1094. function $TrappedProcessorInputValue(){return smalltalk.TrappedProcessorInputValue||(typeof TrappedProcessorInputValue=="undefined"?nil:TrappedProcessorInputValue)}
  1095. return smalltalk.withContext(function($ctx1) {
  1096. var $1;
  1097. $1=_st($TrappedProcessorInputValue())._new();
  1098. return $1;
  1099. }, function($ctx1) {$ctx1.fill(self,"inputValue",{},smalltalk.TrappedProcessor.klass)})},
  1100. args: [],
  1101. source: "inputValue\x0a\x09^TrappedProcessorInputValue new",
  1102. messageSends: ["new"],
  1103. referencedClasses: ["TrappedProcessorInputValue"]
  1104. }),
  1105. smalltalk.TrappedProcessor.klass);
  1106. smalltalk.addMethod(
  1107. smalltalk.method({
  1108. selector: "loopContents",
  1109. category: '*Trapped-Processors',
  1110. fn: function (){
  1111. var self=this;
  1112. function $TrappedProcessorLoopContents(){return smalltalk.TrappedProcessorLoopContents||(typeof TrappedProcessorLoopContents=="undefined"?nil:TrappedProcessorLoopContents)}
  1113. return smalltalk.withContext(function($ctx1) {
  1114. var $1;
  1115. $1=_st($TrappedProcessorLoopContents())._new();
  1116. return $1;
  1117. }, function($ctx1) {$ctx1.fill(self,"loopContents",{},smalltalk.TrappedProcessor.klass)})},
  1118. args: [],
  1119. source: "loopContents\x0a\x09^TrappedProcessorLoopContents new",
  1120. messageSends: ["new"],
  1121. referencedClasses: ["TrappedProcessorLoopContents"]
  1122. }),
  1123. smalltalk.TrappedProcessor.klass);
  1124. smalltalk.addMethod(
  1125. smalltalk.method({
  1126. selector: "loopProc",
  1127. category: '*Trapped-Processors',
  1128. fn: function (){
  1129. var self=this;
  1130. function $TrappedProcessorLoopProc(){return smalltalk.TrappedProcessorLoopProc||(typeof TrappedProcessorLoopProc=="undefined"?nil:TrappedProcessorLoopProc)}
  1131. return smalltalk.withContext(function($ctx1) {
  1132. var $1;
  1133. $1=_st($TrappedProcessorLoopProc())._new();
  1134. return $1;
  1135. }, function($ctx1) {$ctx1.fill(self,"loopProc",{},smalltalk.TrappedProcessor.klass)})},
  1136. args: [],
  1137. source: "loopProc\x0a\x09^TrappedProcessorLoopProc new",
  1138. messageSends: ["new"],
  1139. referencedClasses: ["TrappedProcessorLoopProc"]
  1140. }),
  1141. smalltalk.TrappedProcessor.klass);
  1142. smalltalk.addMethod(
  1143. smalltalk.method({
  1144. selector: "path",
  1145. category: '*Trapped-Processors',
  1146. fn: function (){
  1147. var self=this;
  1148. function $TrappedProcessorDescend(){return smalltalk.TrappedProcessorDescend||(typeof TrappedProcessorDescend=="undefined"?nil:TrappedProcessorDescend)}
  1149. return smalltalk.withContext(function($ctx1) {
  1150. var $1;
  1151. $1=_st($TrappedProcessorDescend())._new();
  1152. return $1;
  1153. }, function($ctx1) {$ctx1.fill(self,"path",{},smalltalk.TrappedProcessor.klass)})},
  1154. args: [],
  1155. source: "path\x0a\x09^TrappedProcessorDescend new",
  1156. messageSends: ["new"],
  1157. referencedClasses: ["TrappedProcessorDescend"]
  1158. }),
  1159. smalltalk.TrappedProcessor.klass);
  1160. smalltalk.addMethod(
  1161. smalltalk.method({
  1162. selector: "replace:with:",
  1163. category: '*Trapped-Processors',
  1164. fn: function (aString,anotherString){
  1165. var self=this;
  1166. function $TrappedProcessorReplace(){return smalltalk.TrappedProcessorReplace||(typeof TrappedProcessorReplace=="undefined"?nil:TrappedProcessorReplace)}
  1167. return smalltalk.withContext(function($ctx1) {
  1168. var $1;
  1169. $1=_st($TrappedProcessorReplace())._new_with_(aString,anotherString);
  1170. return $1;
  1171. }, function($ctx1) {$ctx1.fill(self,"replace:with:",{aString:aString,anotherString:anotherString},smalltalk.TrappedProcessor.klass)})},
  1172. args: ["aString", "anotherString"],
  1173. source: "replace: aString with: anotherString\x0a\x09^TrappedProcessorReplace new: aString with: anotherString",
  1174. messageSends: ["new:with:"],
  1175. referencedClasses: ["TrappedProcessorReplace"]
  1176. }),
  1177. smalltalk.TrappedProcessor.klass);
  1178. smalltalk.addMethod(
  1179. smalltalk.method({
  1180. selector: "signal:",
  1181. category: '*Trapped-Processors',
  1182. fn: function (aString){
  1183. var self=this;
  1184. function $TrappedProcessorSignal(){return smalltalk.TrappedProcessorSignal||(typeof TrappedProcessorSignal=="undefined"?nil:TrappedProcessorSignal)}
  1185. return smalltalk.withContext(function($ctx1) {
  1186. var $1;
  1187. $1=_st($TrappedProcessorSignal())._new_(aString);
  1188. return $1;
  1189. }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  1190. args: ["aString"],
  1191. source: "signal: aString\x0a\x09^TrappedProcessorSignal new: aString",
  1192. messageSends: ["new:"],
  1193. referencedClasses: ["TrappedProcessorSignal"]
  1194. }),
  1195. smalltalk.TrappedProcessor.klass);
  1196. smalltalk.addMethod(
  1197. smalltalk.method({
  1198. selector: "toBlackboard",
  1199. category: '*Trapped-Processors',
  1200. fn: function (){
  1201. var self=this;
  1202. function $TrappedProcessorToBlackboard(){return smalltalk.TrappedProcessorToBlackboard||(typeof TrappedProcessorToBlackboard=="undefined"?nil:TrappedProcessorToBlackboard)}
  1203. return smalltalk.withContext(function($ctx1) {
  1204. var $1;
  1205. $1=_st($TrappedProcessorToBlackboard())._new();
  1206. return $1;
  1207. }, function($ctx1) {$ctx1.fill(self,"toBlackboard",{},smalltalk.TrappedProcessor.klass)})},
  1208. args: [],
  1209. source: "toBlackboard\x0a\x09^TrappedProcessorToBlackboard new",
  1210. messageSends: ["new"],
  1211. referencedClasses: ["TrappedProcessorToBlackboard"]
  1212. }),
  1213. smalltalk.TrappedProcessor.klass);
  1214. smalltalk.addMethod(
  1215. smalltalk.method({
  1216. selector: "uric",
  1217. category: '*Trapped-Processors',
  1218. fn: function (){
  1219. var self=this;
  1220. function $TrappedProcessorUriComponentEncoded(){return smalltalk.TrappedProcessorUriComponentEncoded||(typeof TrappedProcessorUriComponentEncoded=="undefined"?nil:TrappedProcessorUriComponentEncoded)}
  1221. return smalltalk.withContext(function($ctx1) {
  1222. var $1;
  1223. $1=_st($TrappedProcessorUriComponentEncoded())._new();
  1224. return $1;
  1225. }, function($ctx1) {$ctx1.fill(self,"uric",{},smalltalk.TrappedProcessor.klass)})},
  1226. args: [],
  1227. source: "uric\x0a\x09^TrappedProcessorUriComponentEncoded new",
  1228. messageSends: ["new"],
  1229. referencedClasses: ["TrappedProcessorUriComponentEncoded"]
  1230. }),
  1231. smalltalk.TrappedProcessor.klass);
  1232. smalltalk.addMethod(
  1233. smalltalk.method({
  1234. selector: "whenClicked",
  1235. category: '*Trapped-Processors',
  1236. fn: function (){
  1237. var self=this;
  1238. function $TrappedProcessorWhenClicked(){return smalltalk.TrappedProcessorWhenClicked||(typeof TrappedProcessorWhenClicked=="undefined"?nil:TrappedProcessorWhenClicked)}
  1239. return smalltalk.withContext(function($ctx1) {
  1240. var $1;
  1241. $1=_st($TrappedProcessorWhenClicked())._new();
  1242. return $1;
  1243. }, function($ctx1) {$ctx1.fill(self,"whenClicked",{},smalltalk.TrappedProcessor.klass)})},
  1244. args: [],
  1245. source: "whenClicked\x0a\x09^TrappedProcessorWhenClicked new",
  1246. messageSends: ["new"],
  1247. referencedClasses: ["TrappedProcessorWhenClicked"]
  1248. }),
  1249. smalltalk.TrappedProcessor.klass);
  1250. smalltalk.addMethod(
  1251. smalltalk.method({
  1252. selector: "whenSubmitted",
  1253. category: '*Trapped-Processors',
  1254. fn: function (){
  1255. var self=this;
  1256. function $TrappedProcessorWhenSubmitted(){return smalltalk.TrappedProcessorWhenSubmitted||(typeof TrappedProcessorWhenSubmitted=="undefined"?nil:TrappedProcessorWhenSubmitted)}
  1257. return smalltalk.withContext(function($ctx1) {
  1258. var $1;
  1259. $1=_st($TrappedProcessorWhenSubmitted())._new();
  1260. return $1;
  1261. }, function($ctx1) {$ctx1.fill(self,"whenSubmitted",{},smalltalk.TrappedProcessor.klass)})},
  1262. args: [],
  1263. source: "whenSubmitted\x0a\x09^TrappedProcessorWhenSubmitted new",
  1264. messageSends: ["new"],
  1265. referencedClasses: ["TrappedProcessorWhenSubmitted"]
  1266. }),
  1267. smalltalk.TrappedProcessor.klass);
  1268. smalltalk.addMethod(
  1269. smalltalk.method({
  1270. selector: "widget:",
  1271. category: '*Trapped-Processors',
  1272. fn: function (aString){
  1273. var self=this;
  1274. function $TrappedProcessorWidget(){return smalltalk.TrappedProcessorWidget||(typeof TrappedProcessorWidget=="undefined"?nil:TrappedProcessorWidget)}
  1275. return smalltalk.withContext(function($ctx1) {
  1276. var $1;
  1277. $1=_st($TrappedProcessorWidget())._new_(aString);
  1278. return $1;
  1279. }, function($ctx1) {$ctx1.fill(self,"widget:",{aString:aString},smalltalk.TrappedProcessor.klass)})},
  1280. args: ["aString"],
  1281. source: "widget: aString\x0a\x09^TrappedProcessorWidget new: aString",
  1282. messageSends: ["new:"],
  1283. referencedClasses: ["TrappedProcessorWidget"]
  1284. }),
  1285. smalltalk.TrappedProcessor.klass);
  1286. });