Trapped-Frontend.js 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067
  1. smalltalk.addPackage('Trapped-Frontend', {});
  2. smalltalk.addClass('TrappedBinder', smalltalk.Object, ['brush'], 'Trapped-Frontend');
  3. smalltalk.addMethod(
  4. "_brush_",
  5. smalltalk.method({
  6. selector: "brush:",
  7. category: 'accessing',
  8. fn: function (aTagBrush){
  9. var self=this;
  10. self["@brush"]=aTagBrush;
  11. return self},
  12. args: ["aTagBrush"],
  13. source: "brush: aTagBrush\x0a\x09brush := aTagBrush",
  14. messageSends: [],
  15. referencedClasses: []
  16. }),
  17. smalltalk.TrappedBinder);
  18. smalltalk.addMethod(
  19. "_installFor_",
  20. smalltalk.method({
  21. selector: "installFor:",
  22. category: 'action',
  23. fn: function (path){
  24. var self=this;
  25. smalltalk.send(self["@brush"],"_trap_read_",[path,smalltalk.send(self,"_showBlock",[])]);
  26. return self},
  27. args: ["path"],
  28. source: "installFor: path\x0a\x09brush trap: path read: self showBlock",
  29. messageSends: ["trap:read:", "showBlock"],
  30. referencedClasses: []
  31. }),
  32. smalltalk.TrappedBinder);
  33. smalltalk.addMethod(
  34. "_prim_",
  35. smalltalk.method({
  36. selector: "prim:",
  37. category: 'converting',
  38. fn: function (anObject){
  39. var self=this;
  40. return anObject.valueOf();
  41. ;
  42. return self},
  43. args: ["anObject"],
  44. source: "prim: anObject\x0a\x09<return anObject.valueOf()>",
  45. messageSends: [],
  46. referencedClasses: []
  47. }),
  48. smalltalk.TrappedBinder);
  49. smalltalk.addMethod(
  50. "_showBlock",
  51. smalltalk.method({
  52. selector: "showBlock",
  53. category: 'action',
  54. fn: function (){
  55. var self=this;
  56. var $3,$2,$1;
  57. $1=(function(model){
  58. smalltalk.send(self["@brush"],"_empty",[]);
  59. if(($receiver = model) == nil || $receiver == undefined){
  60. $3=(function(){
  61. });
  62. } else {
  63. $3=model;
  64. };
  65. $2=smalltalk.send(self["@brush"],"_with_",[$3]);
  66. return $2;
  67. });
  68. return $1;
  69. },
  70. args: [],
  71. source: "showBlock\x0a\x09^[ :model | brush empty; with: (model ifNil: [[]]) ]",
  72. messageSends: ["empty", "with:", "ifNil:"],
  73. referencedClasses: []
  74. }),
  75. smalltalk.TrappedBinder);
  76. smalltalk.addClass('TrappedCheckedBinder', smalltalk.TrappedBinder, [], 'Trapped-Frontend');
  77. smalltalk.addMethod(
  78. "_installFor_",
  79. smalltalk.method({
  80. selector: "installFor:",
  81. category: 'action',
  82. fn: function (path){
  83. var self=this;
  84. smalltalk.send(self,"_installFor_",[path],smalltalk.TrappedBinder);
  85. smalltalk.send(path,"_trapDescend_",[(function(snap){
  86. return smalltalk.send(self["@brush"],"_onChange_",[(function(){
  87. return smalltalk.send(snap,"_modify_",[(function(){
  88. return smalltalk.send(smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_attr_",["checked"]),"_notNil",[]);
  89. })]);
  90. })]);
  91. })]);
  92. return self},
  93. args: ["path"],
  94. source: "installFor: path\x0a\x09super installFor: path.\x0a path trapDescend: [ :snap |\x0a\x09 brush onChange: [ snap modify: [\x0a (brush asJQuery attr: 'checked') notNil\x0a ]]\x0a ]",
  95. messageSends: ["installFor:", "trapDescend:", "onChange:", "modify:", "notNil", "attr:", "asJQuery"],
  96. referencedClasses: []
  97. }),
  98. smalltalk.TrappedCheckedBinder);
  99. smalltalk.addMethod(
  100. "_showBlock",
  101. smalltalk.method({
  102. selector: "showBlock",
  103. category: 'action',
  104. fn: function (){
  105. var self=this;
  106. var $1;
  107. $1=(function(model){
  108. return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_attr_put_",["checked",smalltalk.send(model,"_ifNotNil_ifNil_",[(function(){
  109. return smalltalk.send(self,"_prim_",[model]);
  110. }),(function(){
  111. return false;
  112. })])]);
  113. });
  114. return $1;
  115. },
  116. args: [],
  117. source: "showBlock\x0a\x09^[ :model | brush asJQuery attr: 'checked' put: (model ifNotNil: [ self prim: model ] ifNil: [ false ]) ]",
  118. messageSends: ["attr:put:", "ifNotNil:ifNil:", "prim:", "asJQuery"],
  119. referencedClasses: []
  120. }),
  121. smalltalk.TrappedCheckedBinder);
  122. smalltalk.addClass('TrappedValBinder', smalltalk.TrappedBinder, [], 'Trapped-Frontend');
  123. smalltalk.addMethod(
  124. "_installFor_",
  125. smalltalk.method({
  126. selector: "installFor:",
  127. category: 'action',
  128. fn: function (path){
  129. var self=this;
  130. smalltalk.send(self,"_installFor_",[path],smalltalk.TrappedBinder);
  131. smalltalk.send(path,"_trapDescend_",[(function(snap){
  132. return smalltalk.send(self["@brush"],"_onChange_",[(function(){
  133. return smalltalk.send(snap,"_modify_",[(function(){
  134. return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_val",[]);
  135. })]);
  136. })]);
  137. })]);
  138. return self},
  139. args: ["path"],
  140. source: "installFor: path\x0a\x09super installFor: path.\x0a path trapDescend: [ :snap |\x0a\x09 brush onChange: [ snap modify: [\x0a brush asJQuery val\x0a ]]\x0a ]",
  141. messageSends: ["installFor:", "trapDescend:", "onChange:", "modify:", "val", "asJQuery"],
  142. referencedClasses: []
  143. }),
  144. smalltalk.TrappedValBinder);
  145. smalltalk.addMethod(
  146. "_showBlock",
  147. smalltalk.method({
  148. selector: "showBlock",
  149. category: 'action',
  150. fn: function (){
  151. var self=this;
  152. var $1;
  153. $1=(function(model){
  154. return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_val_",[smalltalk.send(model,"_ifNotNil_ifNil_",[(function(){
  155. return smalltalk.send(self,"_prim_",[model]);
  156. }),(function(){
  157. return (function(){
  158. });
  159. })])]);
  160. });
  161. return $1;
  162. },
  163. args: [],
  164. source: "showBlock\x0a\x09^[ :model | brush asJQuery val: (model ifNotNil: [self prim: model] ifNil: [[]]) ]",
  165. messageSends: ["val:", "ifNotNil:ifNil:", "prim:", "asJQuery"],
  166. referencedClasses: []
  167. }),
  168. smalltalk.TrappedValBinder);
  169. smalltalk.addClass('TrappedDispatcher', smalltalk.KeyedPubSubBase, [], 'Trapped-Frontend');
  170. smalltalk.TrappedDispatcher.comment="I am base class for change event dispatchers.\x0aI manage changed path - action block subscriptions.\x0aThese subscription are instances of TrappedSubscription\x0a\x0aMy subclasses need to provide implementation for:\x0a\x09add:\x0a do:\x0a clean\x0a (optionally) run\x0a"
  171. smalltalk.addMethod(
  172. "_subscriptionKey_block_",
  173. smalltalk.method({
  174. selector: "subscriptionKey:block:",
  175. category: 'action',
  176. fn: function (key,aBlock){
  177. var self=this;
  178. var $2,$3,$1;
  179. $2=smalltalk.send((smalltalk.TrappedSubscription || TrappedSubscription),"_new",[]);
  180. smalltalk.send($2,"_key_block_",[key,aBlock]);
  181. $3=smalltalk.send($2,"_yourself",[]);
  182. $1=$3;
  183. return $1;
  184. },
  185. args: ["key", "aBlock"],
  186. source: "subscriptionKey: key block: aBlock\x0a\x09^TrappedSubscription new key: key block: aBlock; yourself\x0a",
  187. messageSends: ["key:block:", "new", "yourself"],
  188. referencedClasses: ["TrappedSubscription"]
  189. }),
  190. smalltalk.TrappedDispatcher);
  191. smalltalk.addClass('TrappedDumbView', smalltalk.Widget, [], 'Trapped-Frontend');
  192. smalltalk.TrappedDumbView.comment="I just read and show an actual path."
  193. smalltalk.addMethod(
  194. "_renderOn_",
  195. smalltalk.method({
  196. selector: "renderOn:",
  197. category: 'rendering',
  198. fn: function (html){
  199. var self=this;
  200. smalltalk.send(smalltalk.send(html,"_root",[]),"_trap_",[[]]);
  201. return self},
  202. args: ["html"],
  203. source: "renderOn: html\x0a\x09html root trap: #()",
  204. messageSends: ["trap:", "root"],
  205. referencedClasses: []
  206. }),
  207. smalltalk.TrappedDumbView);
  208. smalltalk.addClass('TrappedModelWrapper', smalltalk.Object, ['dispatcher', 'payload'], 'Trapped-Frontend');
  209. smalltalk.TrappedModelWrapper.comment="I am base class for model wrappers.\x0aI wrap a model which can be any object.\x0a\x0aMy subclasses need to provide implementation for:\x0a\x09read:do:\x0a modify:do:\x0a\x09(optionally) name\x0a\x0aand must issue these call when initializing:\x0a\x09model:\x0a\x09dispatcher: (with a subclass of TrappedDispatcher)\x0a"
  210. smalltalk.addMethod(
  211. "_dispatcher",
  212. smalltalk.method({
  213. selector: "dispatcher",
  214. category: 'accessing',
  215. fn: function (){
  216. var self=this;
  217. return self["@dispatcher"];
  218. },
  219. args: [],
  220. source: "dispatcher\x0a\x09^dispatcher",
  221. messageSends: [],
  222. referencedClasses: []
  223. }),
  224. smalltalk.TrappedModelWrapper);
  225. smalltalk.addMethod(
  226. "_dispatcher_",
  227. smalltalk.method({
  228. selector: "dispatcher:",
  229. category: 'accessing',
  230. fn: function (aDispatcher){
  231. var self=this;
  232. self["@dispatcher"]=aDispatcher;
  233. return self},
  234. args: ["aDispatcher"],
  235. source: "dispatcher: aDispatcher\x0a\x09dispatcher := aDispatcher",
  236. messageSends: [],
  237. referencedClasses: []
  238. }),
  239. smalltalk.TrappedModelWrapper);
  240. smalltalk.addMethod(
  241. "_model_",
  242. smalltalk.method({
  243. selector: "model:",
  244. category: 'accessing',
  245. fn: function (anObject){
  246. var self=this;
  247. self["@payload"]=anObject;
  248. smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[[]]);
  249. return self},
  250. args: ["anObject"],
  251. source: "model: anObject\x0a\x09payload := anObject.\x0a self dispatcher changed: #()",
  252. messageSends: ["changed:", "dispatcher"],
  253. referencedClasses: []
  254. }),
  255. smalltalk.TrappedModelWrapper);
  256. smalltalk.addMethod(
  257. "_name",
  258. smalltalk.method({
  259. selector: "name",
  260. category: 'accessing',
  261. fn: function (){
  262. var self=this;
  263. var $1;
  264. $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_name",[]);
  265. return $1;
  266. },
  267. args: [],
  268. source: "name\x0a\x09^ self class name",
  269. messageSends: ["name", "class"],
  270. referencedClasses: []
  271. }),
  272. smalltalk.TrappedModelWrapper);
  273. smalltalk.addMethod(
  274. "_start",
  275. smalltalk.method({
  276. selector: "start",
  277. category: 'action',
  278. fn: function (){
  279. var self=this;
  280. smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_register_name_",[self,smalltalk.send(self,"_name",[])]);
  281. return self},
  282. args: [],
  283. source: "start\x0a\x09Trapped current register: self name: self name",
  284. messageSends: ["register:name:", "name", "current"],
  285. referencedClasses: ["Trapped"]
  286. }),
  287. smalltalk.TrappedModelWrapper);
  288. smalltalk.addMethod(
  289. "_watch_do_",
  290. smalltalk.method({
  291. selector: "watch:do:",
  292. category: 'action',
  293. fn: function (path,aBlock){
  294. var self=this;
  295. smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_on_hook_",[path,(function(){
  296. return smalltalk.send(self,"_read_do_",[path,aBlock]);
  297. })]);
  298. return self},
  299. args: ["path", "aBlock"],
  300. source: "watch: path do: aBlock\x0a\x09self dispatcher on: path hook: [ self read: path do: aBlock ]\x0a",
  301. messageSends: ["on:hook:", "read:do:", "dispatcher"],
  302. referencedClasses: []
  303. }),
  304. smalltalk.TrappedModelWrapper);
  305. smalltalk.addMethod(
  306. "_start",
  307. smalltalk.method({
  308. selector: "start",
  309. category: 'action',
  310. fn: function (){
  311. var self=this;
  312. var $2,$3,$1;
  313. $2=smalltalk.send(self,"_new",[]);
  314. smalltalk.send($2,"_start",[]);
  315. $3=smalltalk.send($2,"_yourself",[]);
  316. $1=$3;
  317. return $1;
  318. },
  319. args: [],
  320. source: "start\x0a\x09^self new start; yourself",
  321. messageSends: ["start", "new", "yourself"],
  322. referencedClasses: []
  323. }),
  324. smalltalk.TrappedModelWrapper.klass);
  325. smalltalk.addClass('TrappedMWDirect', smalltalk.TrappedModelWrapper, [], 'Trapped-Frontend');
  326. smalltalk.TrappedMWDirect.comment="I am TrappedModelWrapper that directly manipulate\x0athe object passed to model:"
  327. smalltalk.addMethod(
  328. "_modify_do_",
  329. smalltalk.method({
  330. selector: "modify:do:",
  331. category: 'action',
  332. fn: function (path,aBlock){
  333. var self=this;
  334. var newValue;
  335. var eavModel;
  336. eavModel=smalltalk.send(path,"_asEavModel",[]);
  337. newValue=smalltalk.send(aBlock,"_value_",[smalltalk.send(eavModel,"_on_",[self["@payload"]])]);
  338. smalltalk.send((function(){
  339. return smalltalk.send(eavModel,"_on_put_",[self["@payload"],newValue]);
  340. }),"_ensure_",[(function(){
  341. return smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[path]);
  342. })]);
  343. return self},
  344. args: ["path", "aBlock"],
  345. source: "modify: path do: aBlock\x0a | newValue eavModel |\x0a eavModel := path asEavModel.\x0a newValue := aBlock value: (eavModel on: payload).\x0a [ eavModel on: payload put: newValue ] ensure: [ self dispatcher changed: path ]\x0a",
  346. messageSends: ["asEavModel", "value:", "on:", "ensure:", "changed:", "dispatcher", "on:put:"],
  347. referencedClasses: []
  348. }),
  349. smalltalk.TrappedMWDirect);
  350. smalltalk.addMethod(
  351. "_read_do_",
  352. smalltalk.method({
  353. selector: "read:do:",
  354. category: 'action',
  355. fn: function (path,aBlock){
  356. var self=this;
  357. var eavModel;
  358. eavModel=smalltalk.send(path,"_asEavModel",[]);
  359. smalltalk.send(aBlock,"_value_",[smalltalk.send(eavModel,"_on_",[self["@payload"]])]);
  360. return self},
  361. args: ["path", "aBlock"],
  362. source: "read: path do: aBlock\x0a | eavModel |\x0a eavModel := path asEavModel.\x0a aBlock value: (eavModel on: payload)\x0a",
  363. messageSends: ["asEavModel", "value:", "on:"],
  364. referencedClasses: []
  365. }),
  366. smalltalk.TrappedMWDirect);
  367. smalltalk.addClass('TrappedMWIsolated', smalltalk.TrappedModelWrapper, [], 'Trapped-Frontend');
  368. smalltalk.TrappedMWIsolated.comment="I am TrappedModelWrapper than wrap access\x0ato an object passed to model: via Isolator."
  369. smalltalk.addMethod(
  370. "_model_",
  371. smalltalk.method({
  372. selector: "model:",
  373. category: 'accessing',
  374. fn: function (anObject){
  375. var self=this;
  376. smalltalk.send(self,"_model_",[smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[anObject])],smalltalk.TrappedModelWrapper);
  377. return self},
  378. args: ["anObject"],
  379. source: "model: anObject\x0a\x09super model: (Isolator on: anObject)",
  380. messageSends: ["model:", "on:"],
  381. referencedClasses: ["Isolator"]
  382. }),
  383. smalltalk.TrappedMWIsolated);
  384. smalltalk.addMethod(
  385. "_modify_do_",
  386. smalltalk.method({
  387. selector: "modify:do:",
  388. category: 'action',
  389. fn: function (path,aBlock){
  390. var self=this;
  391. var eavModel;
  392. eavModel=smalltalk.send(smalltalk.send([smalltalk.symbolFor("root")],"__comma",[path]),"_asEavModel",[]);
  393. smalltalk.send((function(){
  394. return smalltalk.send(self["@payload"],"_model_modify_",[eavModel,aBlock]);
  395. }),"_ensure_",[(function(){
  396. return smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[path]);
  397. })]);
  398. return self},
  399. args: ["path", "aBlock"],
  400. source: "modify: path do: aBlock\x0a | eavModel |\x0a eavModel := ({#root},path) asEavModel.\x0a [ payload model: eavModel modify: aBlock ] ensure: [ self dispatcher changed: path ]\x0a",
  401. messageSends: ["asEavModel", ",", "ensure:", "changed:", "dispatcher", "model:modify:"],
  402. referencedClasses: []
  403. }),
  404. smalltalk.TrappedMWIsolated);
  405. smalltalk.addMethod(
  406. "_read_do_",
  407. smalltalk.method({
  408. selector: "read:do:",
  409. category: 'action',
  410. fn: function (path,aBlock){
  411. var self=this;
  412. var eavModel;
  413. eavModel=smalltalk.send(smalltalk.send([smalltalk.symbolFor("root")],"__comma",[path]),"_asEavModel",[]);
  414. smalltalk.send(self["@payload"],"_model_read_",[eavModel,aBlock]);
  415. return self},
  416. args: ["path", "aBlock"],
  417. source: "read: path do: aBlock\x0a | eavModel |\x0a eavModel := ({#root},path) asEavModel.\x0a payload model: eavModel read: aBlock\x0a",
  418. messageSends: ["asEavModel", ",", "model:read:"],
  419. referencedClasses: []
  420. }),
  421. smalltalk.TrappedMWIsolated);
  422. smalltalk.addClass('TrappedSingleton', smalltalk.Object, [], 'Trapped-Frontend');
  423. smalltalk.addMethod(
  424. "_start",
  425. smalltalk.method({
  426. selector: "start",
  427. category: 'action',
  428. fn: function (){
  429. var self=this;
  430. var $1;
  431. $1=smalltalk.send(self,"_subclassResponsibility",[]);
  432. return $1;
  433. },
  434. args: [],
  435. source: "start\x0a\x09^ self subclassResponsibility",
  436. messageSends: ["subclassResponsibility"],
  437. referencedClasses: []
  438. }),
  439. smalltalk.TrappedSingleton);
  440. smalltalk.TrappedSingleton.klass.iVarNames = ['current'];
  441. smalltalk.addMethod(
  442. "_current",
  443. smalltalk.method({
  444. selector: "current",
  445. category: 'accessing',
  446. fn: function (){
  447. var self=this;
  448. var $1;
  449. if(($receiver = self["@current"]) == nil || $receiver == undefined){
  450. self["@current"]=smalltalk.send(self,"_new",[]);
  451. $1=self["@current"];
  452. } else {
  453. $1=self["@current"];
  454. };
  455. return $1;
  456. },
  457. args: [],
  458. source: "current\x0a\x09^ current ifNil: [ current := self new ]",
  459. messageSends: ["ifNil:", "new"],
  460. referencedClasses: []
  461. }),
  462. smalltalk.TrappedSingleton.klass);
  463. smalltalk.addMethod(
  464. "_start",
  465. smalltalk.method({
  466. selector: "start",
  467. category: 'action',
  468. fn: function (){
  469. var self=this;
  470. smalltalk.send(smalltalk.send(self,"_current",[]),"_start",[]);
  471. return self},
  472. args: [],
  473. source: "start\x0a\x09self current start",
  474. messageSends: ["start", "current"],
  475. referencedClasses: []
  476. }),
  477. smalltalk.TrappedSingleton.klass);
  478. smalltalk.addClass('Trapped', smalltalk.TrappedSingleton, ['registry'], 'Trapped-Frontend');
  479. smalltalk.addMethod(
  480. "_binder_",
  481. smalltalk.method({
  482. selector: "binder:",
  483. category: 'binders',
  484. fn: function (aTagBrush){
  485. var self=this;
  486. var $1,$2,$3,$5,$4;
  487. var binder;
  488. var tag;
  489. tag=smalltalk.send(smalltalk.send(aTagBrush,"_element",[]),"_nodeName",[]);
  490. $1=smalltalk.send(tag,"__eq",["INPUT"]);
  491. if(smalltalk.assert($1)){
  492. var type;
  493. type=smalltalk.send(smalltalk.send(aTagBrush,"_asJQuery",[]),"_attr_",["type"]);
  494. type;
  495. $2=smalltalk.send(type,"__eq",["checkbox"]);
  496. if(smalltalk.assert($2)){
  497. binder=smalltalk.send((smalltalk.TrappedCheckedBinder || TrappedCheckedBinder),"_new",[]);
  498. binder;
  499. };
  500. $3=smalltalk.send(type,"__eq",["text"]);
  501. if(smalltalk.assert($3)){
  502. binder=smalltalk.send((smalltalk.TrappedValBinder || TrappedValBinder),"_new",[]);
  503. binder;
  504. };
  505. };
  506. if(($receiver = binder) == nil || $receiver == undefined){
  507. binder=smalltalk.send((smalltalk.TrappedBinder || TrappedBinder),"_new",[]);
  508. binder;
  509. } else {
  510. binder;
  511. };
  512. smalltalk.send(binder,"_brush_",[aTagBrush]);
  513. $5=smalltalk.send(binder,"_yourself",[]);
  514. $4=$5;
  515. return $4;
  516. },
  517. args: ["aTagBrush"],
  518. source: "binder: aTagBrush\x0a \x22Prototype; will select based on tag etc.\x22\x0a | binder tag |\x0a tag := aTagBrush element nodeName.\x0a tag = 'INPUT' ifTrue: [\x0a | type |\x0a type := aTagBrush asJQuery attr: 'type'.\x0a type = 'checkbox' ifTrue: [ binder := TrappedCheckedBinder new ].\x0a type = 'text' ifTrue: [ binder := TrappedValBinder new ]\x0a ].\x0a binder ifNil: [ binder := TrappedBinder new ].\x0a ^ binder brush: aTagBrush; yourself",
  519. messageSends: ["nodeName", "element", "ifTrue:", "attr:", "asJQuery", "new", "=", "ifNil:", "brush:", "yourself"],
  520. referencedClasses: ["TrappedCheckedBinder", "TrappedValBinder", "TrappedBinder"]
  521. }),
  522. smalltalk.Trapped);
  523. smalltalk.addMethod(
  524. "_byName_",
  525. smalltalk.method({
  526. selector: "byName:",
  527. category: 'accessing',
  528. fn: function (aString){
  529. var self=this;
  530. var $1;
  531. $1=smalltalk.send(self["@registry"],"_at_",[aString]);
  532. return $1;
  533. },
  534. args: ["aString"],
  535. source: "byName: aString\x0a\x09^ registry at: aString",
  536. messageSends: ["at:"],
  537. referencedClasses: []
  538. }),
  539. smalltalk.Trapped);
  540. smalltalk.addMethod(
  541. "_descend_snapshotDo_",
  542. smalltalk.method({
  543. selector: "descend:snapshotDo:",
  544. category: 'action',
  545. fn: function (anArray,aBlock){
  546. var self=this;
  547. var tpsc;
  548. tpsc=smalltalk.send((smalltalk.TrappedPathStack || TrappedPathStack),"_current",[]);
  549. smalltalk.send(tpsc,"_append_do_",[anArray,(function(){
  550. var path;
  551. var model;
  552. path=smalltalk.send(smalltalk.send(tpsc,"_elements",[]),"_copy",[]);
  553. path;
  554. model=smalltalk.send(self,"_byName_",[smalltalk.send(path,"_first",[])]);
  555. model;
  556. return smalltalk.send(aBlock,"_value_",[smalltalk.send(smalltalk.send((smalltalk.TrappedSnapshot || TrappedSnapshot),"_new",[]),"_path_model_",[path,model])]);
  557. })]);
  558. return self},
  559. args: ["anArray", "aBlock"],
  560. source: "descend: anArray snapshotDo: aBlock\x0a\x09| tpsc |\x0a tpsc := TrappedPathStack current.\x0a tpsc append: anArray do: [\x0a | path model |\x0a path := tpsc elements copy.\x0a \x09 model := self byName: path first.\x0a aBlock value: (TrappedSnapshot new path: path model: model)\x0a ]",
  561. messageSends: ["current", "append:do:", "copy", "elements", "byName:", "first", "value:", "path:model:", "new"],
  562. referencedClasses: ["TrappedPathStack", "TrappedSnapshot"]
  563. }),
  564. smalltalk.Trapped);
  565. smalltalk.addMethod(
  566. "_initialize",
  567. smalltalk.method({
  568. selector: "initialize",
  569. category: 'initialization',
  570. fn: function (){
  571. var self=this;
  572. smalltalk.send(self,"_initialize",[],smalltalk.TrappedSingleton);
  573. self["@registry"]=smalltalk.HashedCollection._fromPairs_([]);
  574. return self},
  575. args: [],
  576. source: "initialize\x0a\x09super initialize.\x0a\x09registry := #{}.",
  577. messageSends: ["initialize"],
  578. referencedClasses: []
  579. }),
  580. smalltalk.Trapped);
  581. smalltalk.addMethod(
  582. "_register_name_",
  583. smalltalk.method({
  584. selector: "register:name:",
  585. category: 'accessing',
  586. fn: function (aFly,aString){
  587. var self=this;
  588. smalltalk.send(self["@registry"],"_at_put_",[aString,aFly]);
  589. return self},
  590. args: ["aFly", "aString"],
  591. source: "register: aFly name: aString\x0a\x09registry at: aString put: aFly",
  592. messageSends: ["at:put:"],
  593. referencedClasses: []
  594. }),
  595. smalltalk.Trapped);
  596. smalltalk.addMethod(
  597. "_start",
  598. smalltalk.method({
  599. selector: "start",
  600. category: 'action',
  601. fn: function (){
  602. var self=this;
  603. var $1;
  604. smalltalk.send(smalltalk.send("[data-trap]","_asJQuery",[]),"_each_",[(function(index,elem){
  605. var trap;
  606. var jq;
  607. var viewName;
  608. var modelName;
  609. var tokens;
  610. var path;
  611. jq=smalltalk.send(elem,"_asJQuery",[]);
  612. jq;
  613. trap=smalltalk.send(jq,"_attr_",["data-trap"]);
  614. trap;
  615. tokens=smalltalk.send(trap,"_tokenize_",[":"]);
  616. tokens;
  617. $1=smalltalk.send(smalltalk.send(tokens,"_size",[]),"__eq",[(1)]);
  618. if(smalltalk.assert($1)){
  619. tokens=smalltalk.send(["TrappedDumbView"],"__comma",[tokens]);
  620. tokens;
  621. };
  622. viewName=smalltalk.send(tokens,"_first",[]);
  623. viewName;
  624. tokens=smalltalk.send(smalltalk.send(smalltalk.send(tokens,"_second",[]),"_tokenize_",[" "]),"_select_",[(function(each){
  625. return smalltalk.send(each,"_notEmpty",[]);
  626. })]);
  627. tokens;
  628. modelName=smalltalk.send(tokens,"_first",[]);
  629. modelName;
  630. path=smalltalk.send((smalltalk.Trapped || Trapped),"_parse_",[smalltalk.send(tokens,"_allButFirst",[])]);
  631. path;
  632. return smalltalk.send(smalltalk.send([modelName],"__comma",[path]),"_trapDescend_",[(function(){
  633. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_at_",[viewName]),"_new",[]),"_appendToJQuery_",[jq]);
  634. })]);
  635. })]);
  636. return self},
  637. args: [],
  638. source: "start\x0a\x09'[data-trap]' asJQuery each: [ :index :elem |\x0a \x09| trap jq viewName modelName tokens path |\x0a jq := elem asJQuery.\x0a trap := jq attr: 'data-trap'.\x0a tokens := trap tokenize: ':'.\x0a tokens size = 1 ifTrue: [ tokens := { 'TrappedDumbView' }, tokens ].\x0a viewName := tokens first.\x0a tokens := (tokens second tokenize: ' ') select: [ :each | each notEmpty ].\x0a modelName := tokens first.\x0a path := Trapped parse: tokens allButFirst.\x0a { modelName }, path trapDescend: [(Smalltalk current at: viewName) new appendToJQuery: jq].\x0a ]",
  639. messageSends: ["each:", "asJQuery", "attr:", "tokenize:", "ifTrue:", ",", "=", "size", "first", "select:", "notEmpty", "second", "parse:", "allButFirst", "trapDescend:", "appendToJQuery:", "new", "at:", "current"],
  640. referencedClasses: ["Trapped", "Smalltalk"]
  641. }),
  642. smalltalk.Trapped);
  643. smalltalk.addMethod(
  644. "_parse_",
  645. smalltalk.method({
  646. selector: "parse:",
  647. category: 'accessing',
  648. fn: function (anArray){
  649. var self=this;
  650. var $2,$3,$1;
  651. $1=smalltalk.send(anArray,"_collect_",[(function(each){
  652. var asNum;
  653. asNum = parseInt(each);
  654. ;
  655. $2=smalltalk.send(asNum,"__eq",[asNum]);
  656. if(smalltalk.assert($2)){
  657. return asNum;
  658. } else {
  659. $3=smalltalk.send(smalltalk.send(each,"_first",[]),"__eq",["#"]);
  660. if(smalltalk.assert($3)){
  661. return smalltalk.send(smalltalk.send(each,"_allButFirst",[]),"_asSymbol",[]);
  662. } else {
  663. return each;
  664. };
  665. };
  666. })]);
  667. return $1;
  668. },
  669. args: ["anArray"],
  670. source: "parse: anArray\x0a\x09^anArray collect: [ :each |\x0a \x09| asNum |\x0a \x09<asNum = parseInt(each)>.\x0a asNum = asNum ifTrue: [ asNum ] ifFalse: [\x0a\x09\x09\x09each first = '#' ifTrue: [ each allButFirst asSymbol ] ifFalse: [ each ]]]",
  671. messageSends: ["collect:", "ifTrue:ifFalse:", "asSymbol", "allButFirst", "=", "first"],
  672. referencedClasses: []
  673. }),
  674. smalltalk.Trapped.klass);
  675. smalltalk.addClass('TrappedPathStack', smalltalk.TrappedSingleton, ['elements'], 'Trapped-Frontend');
  676. smalltalk.addMethod(
  677. "_append_do_",
  678. smalltalk.method({
  679. selector: "append:do:",
  680. category: 'descending',
  681. fn: function (anArray,aBlock){
  682. var self=this;
  683. smalltalk.send(self,"_with_do_",[smalltalk.send(self["@elements"],"__comma",[anArray]),aBlock]);
  684. return self},
  685. args: ["anArray", "aBlock"],
  686. source: "append: anArray do: aBlock\x0a self with: elements, anArray do: aBlock",
  687. messageSends: ["with:do:", ","],
  688. referencedClasses: []
  689. }),
  690. smalltalk.TrappedPathStack);
  691. smalltalk.addMethod(
  692. "_elements",
  693. smalltalk.method({
  694. selector: "elements",
  695. category: 'accessing',
  696. fn: function (){
  697. var self=this;
  698. return self["@elements"];
  699. },
  700. args: [],
  701. source: "elements\x0a\x09^elements",
  702. messageSends: [],
  703. referencedClasses: []
  704. }),
  705. smalltalk.TrappedPathStack);
  706. smalltalk.addMethod(
  707. "_initialize",
  708. smalltalk.method({
  709. selector: "initialize",
  710. category: 'initialization',
  711. fn: function (){
  712. var self=this;
  713. smalltalk.send(self,"_initialize",[],smalltalk.TrappedSingleton);
  714. self["@elements"]=[];
  715. return self},
  716. args: [],
  717. source: "initialize\x0a super initialize.\x0a\x09elements := #().",
  718. messageSends: ["initialize"],
  719. referencedClasses: []
  720. }),
  721. smalltalk.TrappedPathStack);
  722. smalltalk.addMethod(
  723. "_with_do_",
  724. smalltalk.method({
  725. selector: "with:do:",
  726. category: 'descending',
  727. fn: function (anArray,aBlock){
  728. var self=this;
  729. var old;
  730. old=self["@elements"];
  731. smalltalk.send((function(){
  732. self["@elements"]=anArray;
  733. self["@elements"];
  734. return smalltalk.send(aBlock,"_value",[]);
  735. }),"_ensure_",[(function(){
  736. self["@elements"]=old;
  737. return self["@elements"];
  738. })]);
  739. return self},
  740. args: ["anArray", "aBlock"],
  741. source: "with: anArray do: aBlock\x0a\x09| old |\x0a old := elements.\x0a [ elements := anArray.\x0a\x09aBlock value ] ensure: [ elements := old ]",
  742. messageSends: ["ensure:", "value"],
  743. referencedClasses: []
  744. }),
  745. smalltalk.TrappedPathStack);
  746. smalltalk.addClass('TrappedSnapshot', smalltalk.Object, ['path', 'model'], 'Trapped-Frontend');
  747. smalltalk.addMethod(
  748. "_do_",
  749. smalltalk.method({
  750. selector: "do:",
  751. category: 'action',
  752. fn: function (aBlock){
  753. var self=this;
  754. smalltalk.send(smalltalk.send((smalltalk.TrappedPathStack || TrappedPathStack),"_current",[]),"_with_do_",[self["@path"],(function(){
  755. return smalltalk.send(aBlock,"_value_",[self["@model"]]);
  756. })]);
  757. return self},
  758. args: ["aBlock"],
  759. source: "do: aBlock\x0a\x09TrappedPathStack current with: path do: [ aBlock value: model ]",
  760. messageSends: ["with:do:", "value:", "current"],
  761. referencedClasses: ["TrappedPathStack"]
  762. }),
  763. smalltalk.TrappedSnapshot);
  764. smalltalk.addMethod(
  765. "_model",
  766. smalltalk.method({
  767. selector: "model",
  768. category: 'accessing',
  769. fn: function (){
  770. var self=this;
  771. return self["@model"];
  772. },
  773. args: [],
  774. source: "model\x0a\x09^model",
  775. messageSends: [],
  776. referencedClasses: []
  777. }),
  778. smalltalk.TrappedSnapshot);
  779. smalltalk.addMethod(
  780. "_modify_",
  781. smalltalk.method({
  782. selector: "modify:",
  783. category: 'action',
  784. fn: function (aBlock){
  785. var self=this;
  786. smalltalk.send(smalltalk.send(self,"_model",[]),"_modify_do_",[smalltalk.send(smalltalk.send(self,"_path",[]),"_allButFirst",[]),aBlock]);
  787. return self},
  788. args: ["aBlock"],
  789. source: "modify: aBlock\x0a\x09self model modify: self path allButFirst do: aBlock",
  790. messageSends: ["modify:do:", "allButFirst", "path", "model"],
  791. referencedClasses: []
  792. }),
  793. smalltalk.TrappedSnapshot);
  794. smalltalk.addMethod(
  795. "_path",
  796. smalltalk.method({
  797. selector: "path",
  798. category: 'accessing',
  799. fn: function (){
  800. var self=this;
  801. return self["@path"];
  802. },
  803. args: [],
  804. source: "path\x0a\x09^path",
  805. messageSends: [],
  806. referencedClasses: []
  807. }),
  808. smalltalk.TrappedSnapshot);
  809. smalltalk.addMethod(
  810. "_path_model_",
  811. smalltalk.method({
  812. selector: "path:model:",
  813. category: 'accessing',
  814. fn: function (anArray,aTrappedMW){
  815. var self=this;
  816. self["@path"]=anArray;
  817. self["@model"]=aTrappedMW;
  818. return self},
  819. args: ["anArray", "aTrappedMW"],
  820. source: "path: anArray model: aTrappedMW\x0a\x09path := anArray.\x0a model := aTrappedMW",
  821. messageSends: [],
  822. referencedClasses: []
  823. }),
  824. smalltalk.TrappedSnapshot);
  825. smalltalk.addClass('TrappedSubscription', smalltalk.KeyedSubscriptionBase, [], 'Trapped-Frontend');
  826. smalltalk.addMethod(
  827. "_accepts_",
  828. smalltalk.method({
  829. selector: "accepts:",
  830. category: 'testing',
  831. fn: function (aKey){
  832. var self=this;
  833. var $1;
  834. $1=smalltalk.send(smalltalk.send(smalltalk.send(aKey,"_size",[]),"__lt_eq",[smalltalk.send(self["@key"],"_size",[])]),"_and_",[(function(){
  835. return smalltalk.send(aKey,"__eq",[smalltalk.send(self["@key"],"_copyFrom_to_",[(1),smalltalk.send(aKey,"_size",[])])]);
  836. })]);
  837. return $1;
  838. },
  839. args: ["aKey"],
  840. source: "accepts: aKey\x0a ^aKey size <= key size and: [aKey = (key copyFrom: 1 to: aKey size)]",
  841. messageSends: ["and:", "=", "copyFrom:to:", "size", "<="],
  842. referencedClasses: []
  843. }),
  844. smalltalk.TrappedSubscription);
  845. smalltalk.addMethod(
  846. "_trapDescend_",
  847. smalltalk.method({
  848. selector: "trapDescend:",
  849. category: '*Trapped-Frontend',
  850. fn: function (aBlock){
  851. var self=this;
  852. smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_descend_snapshotDo_",[self,aBlock]);
  853. return self},
  854. args: ["aBlock"],
  855. source: "trapDescend: aBlock\x0a\x09Trapped current descend: self snapshotDo: aBlock",
  856. messageSends: ["descend:snapshotDo:", "current"],
  857. referencedClasses: ["Trapped"]
  858. }),
  859. smalltalk.Array);
  860. smalltalk.addMethod(
  861. "_trapDescend_",
  862. smalltalk.method({
  863. selector: "trapDescend:",
  864. category: '*Trapped-Frontend',
  865. fn: function (aBlock){
  866. var self=this;
  867. smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_descend_snapshotDo_",[self,aBlock]);
  868. return self},
  869. args: ["aBlock"],
  870. source: "trapDescend: aBlock\x0a\x09Trapped current descend: self snapshotDo: aBlock",
  871. messageSends: ["descend:snapshotDo:", "current"],
  872. referencedClasses: ["Trapped"]
  873. }),
  874. smalltalk.Array);
  875. smalltalk.addMethod(
  876. "_trap_",
  877. smalltalk.method({
  878. selector: "trap:",
  879. category: '*Trapped-Frontend',
  880. fn: function (path){
  881. var self=this;
  882. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_binder_",[self]),"_installFor_",[path]);
  883. return self},
  884. args: ["path"],
  885. source: "trap: path\x0a\x09(Trapped current binder: self) installFor: path",
  886. messageSends: ["installFor:", "binder:", "current"],
  887. referencedClasses: ["Trapped"]
  888. }),
  889. smalltalk.TagBrush);
  890. smalltalk.addMethod(
  891. "_trap_read_",
  892. smalltalk.method({
  893. selector: "trap:read:",
  894. category: '*Trapped-Frontend',
  895. fn: function (path,aBlock){
  896. var self=this;
  897. var $1;
  898. smalltalk.send(path,"_trapDescend_",[(function(snap){
  899. return smalltalk.send(smalltalk.send(snap,"_model",[]),"_watch_do_",[smalltalk.send(smalltalk.send(snap,"_path",[]),"_allButFirst",[]),(function(data){
  900. $1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_asJQuery",[]),"_closest_",["html"]),"_toArray",[]),"_isEmpty",[]);
  901. if(smalltalk.assert($1)){
  902. smalltalk.send((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),"_signal",[]);
  903. };
  904. return smalltalk.send(snap,"_do_",[(function(){
  905. return smalltalk.send(self,"_with_",[(function(html){
  906. return smalltalk.send(aBlock,"_value_value_",[data,html]);
  907. })]);
  908. })]);
  909. })]);
  910. })]);
  911. return self},
  912. args: ["path", "aBlock"],
  913. source: "trap: path read: aBlock\x0a\x09path trapDescend: [ :snap |\x0a snap model watch: snap path allButFirst do: [ :data |\x0a (self asJQuery closest: 'html') toArray isEmpty ifTrue: [ KeyedPubSubUnsubscribe signal ].\x0a \x09snap do: [ self with: [ :html | aBlock value: data value: html ] ]\x0a \x09]\x0a ]",
  914. messageSends: ["trapDescend:", "watch:do:", "allButFirst", "path", "ifTrue:", "signal", "isEmpty", "toArray", "closest:", "asJQuery", "do:", "with:", "value:value:", "model"],
  915. referencedClasses: ["KeyedPubSubUnsubscribe"]
  916. }),
  917. smalltalk.TagBrush);
  918. smalltalk.addMethod(
  919. "_trap_toggle_",
  920. smalltalk.method({
  921. selector: "trap:toggle:",
  922. category: '*Trapped-Frontend',
  923. fn: function (path,aBlock){
  924. var self=this;
  925. smalltalk.send(self,"_trap_toggle_ifNotPresent_",[path,aBlock,(function(){
  926. return smalltalk.send(smalltalk.send(self,"_asJQuery",[]),"_hide",[]);
  927. })]);
  928. return self},
  929. args: ["path", "aBlock"],
  930. source: "trap: path toggle: aBlock\x0a self trap: path toggle: aBlock ifNotPresent: [ self asJQuery hide ]",
  931. messageSends: ["trap:toggle:ifNotPresent:", "hide", "asJQuery"],
  932. referencedClasses: []
  933. }),
  934. smalltalk.TagBrush);
  935. smalltalk.addMethod(
  936. "_trap_toggle_ifNotPresent_",
  937. smalltalk.method({
  938. selector: "trap:toggle:ifNotPresent:",
  939. category: '*Trapped-Frontend',
  940. fn: function (path,aBlock,anotherBlock){
  941. var self=this;
  942. var $1,$2,$3,$4;
  943. var shown;
  944. shown=nil;
  945. smalltalk.send(self,"_trap_read_",[path,(function(data,html){
  946. $1=smalltalk.send(shown,"__eq",[smalltalk.send(data,"_notNil",[])]);
  947. if(! smalltalk.assert($1)){
  948. shown=smalltalk.send(data,"_notNil",[]);
  949. shown;
  950. $2=smalltalk.send(self,"_asJQuery",[]);
  951. smalltalk.send($2,"_empty",[]);
  952. $3=smalltalk.send($2,"_show",[]);
  953. $3;
  954. if(smalltalk.assert(shown)){
  955. $4=aBlock;
  956. } else {
  957. $4=anotherBlock;
  958. };
  959. return smalltalk.send($4,"_value_value_",[data,html]);
  960. };
  961. })]);
  962. return self},
  963. args: ["path", "aBlock", "anotherBlock"],
  964. source: "trap: path toggle: aBlock ifNotPresent: anotherBlock\x0a | shown |\x0a shown := nil.\x0a self trap: path read: [ :data : html |\x0a shown = data notNil ifFalse: [\x0a shown := data notNil.\x0a self asJQuery empty; show.\x0a (shown ifTrue: [aBlock] ifFalse: [anotherBlock]) value: data value: html.\x0a ]\x0a ]",
  965. messageSends: ["trap:read:", "ifFalse:", "notNil", "empty", "asJQuery", "show", "value:value:", "ifTrue:ifFalse:", "="],
  966. referencedClasses: []
  967. }),
  968. smalltalk.TagBrush);
  969. smalltalk.addMethod(
  970. "_trapIter_tag_do_",
  971. smalltalk.method({
  972. selector: "trapIter:tag:do:",
  973. category: '*Trapped-Frontend',
  974. fn: function (path,aSymbol,aBlock){
  975. var self=this;
  976. smalltalk.send(self,"_trap_read_",[path,(function(model,html){
  977. smalltalk.send(smalltalk.send(html,"_root",[]),"_empty",[]);
  978. if(($receiver = model) == nil || $receiver == undefined){
  979. return model;
  980. } else {
  981. return smalltalk.send(model,"_withIndexDo_",[(function(item,i){
  982. return smalltalk.send(smalltalk.send(html,"_perform_",[aSymbol]),"_trap_read_",[[i],aBlock]);
  983. })]);
  984. };
  985. })]);
  986. return self},
  987. args: ["path", "aSymbol", "aBlock"],
  988. source: "trapIter: path tag: aSymbol do: aBlock\x0a self trap: path read: [ :model :html |\x0a html root empty.\x0a model ifNotNil: [ model withIndexDo: [ :item :i |\x0a (html perform: aSymbol) trap: {i} read: aBlock\x0a ]]\x0a ]",
  989. messageSends: ["trap:read:", "empty", "root", "ifNotNil:", "withIndexDo:", "perform:"],
  990. referencedClasses: []
  991. }),
  992. smalltalk.TagBrush);