Trapped-Processors.js 52 KB

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