Trapped-Processors.js 53 KB

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