Trapped-Processors.js 53 KB

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