Trapped-Processors.js 52 KB

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