Trapped-Frontend.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  1. define("gh_herby_trapped/Trapped-Frontend", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Objects", "amber_core/Canvas", "amber_core/Kernel-Collections"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Trapped-Frontend');
  3. smalltalk.packages["Trapped-Frontend"].transport = {"type":"amd","amdNamespace":"gh_herby_trapped"};
  4. smalltalk.addClass('TrappedBinder', smalltalk.Object, ['brush'], 'Trapped-Frontend');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "brush:",
  8. category: 'accessing',
  9. fn: function (aTagBrush){
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) {
  12. self["@brush"]=aTagBrush;
  13. return self}, function($ctx1) {$ctx1.fill(self,"brush:",{aTagBrush:aTagBrush},smalltalk.TrappedBinder)})},
  14. args: ["aTagBrush"],
  15. source: "brush: aTagBrush\x0a\x09brush := aTagBrush",
  16. messageSends: [],
  17. referencedClasses: []
  18. }),
  19. smalltalk.TrappedBinder);
  20. smalltalk.addMethod(
  21. smalltalk.method({
  22. selector: "installFor:",
  23. category: 'action',
  24. fn: function (path){
  25. var self=this;
  26. return smalltalk.withContext(function($ctx1) {
  27. _st(self["@brush"])._trap_read_(path,self._showBlock());
  28. return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path},smalltalk.TrappedBinder)})},
  29. args: ["path"],
  30. source: "installFor: path\x0a\x09brush trap: path read: self showBlock",
  31. messageSends: ["trap:read:", "showBlock"],
  32. referencedClasses: []
  33. }),
  34. smalltalk.TrappedBinder);
  35. smalltalk.addMethod(
  36. smalltalk.method({
  37. selector: "prim:",
  38. category: 'converting',
  39. fn: function (anObject){
  40. var self=this;
  41. return smalltalk.withContext(function($ctx1) {
  42. return anObject.valueOf();
  43. return self}, function($ctx1) {$ctx1.fill(self,"prim:",{anObject:anObject},smalltalk.TrappedBinder)})},
  44. args: ["anObject"],
  45. source: "prim: anObject\x0a\x09<return anObject.valueOf()>",
  46. messageSends: [],
  47. referencedClasses: []
  48. }),
  49. smalltalk.TrappedBinder);
  50. smalltalk.addMethod(
  51. smalltalk.method({
  52. selector: "showBlock",
  53. category: 'action',
  54. fn: function (){
  55. var self=this;
  56. return smalltalk.withContext(function($ctx1) {
  57. var $2,$4,$5,$3,$1;
  58. $1=(function(model){
  59. return smalltalk.withContext(function($ctx2) {
  60. $2=self["@brush"];
  61. _st($2)._empty();
  62. $4=$2;
  63. if(($receiver = model) == nil || $receiver == null){
  64. $5=(function(){
  65. return smalltalk.withContext(function($ctx3) {
  66. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})});
  67. } else {
  68. $5=model;
  69. };
  70. $3=_st($4)._with_($5);
  71. return $3;
  72. }, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1,1)})});
  73. return $1;
  74. }, function($ctx1) {$ctx1.fill(self,"showBlock",{},smalltalk.TrappedBinder)})},
  75. args: [],
  76. source: "showBlock\x0a\x09^[ :model | brush empty; with: (model ifNil: [[]]) ]",
  77. messageSends: ["empty", "with:", "ifNil:"],
  78. referencedClasses: []
  79. }),
  80. smalltalk.TrappedBinder);
  81. smalltalk.addClass('TrappedCheckedBinder', smalltalk.TrappedBinder, [], 'Trapped-Frontend');
  82. smalltalk.addMethod(
  83. smalltalk.method({
  84. selector: "installFor:",
  85. category: 'action',
  86. fn: function (path){
  87. var self=this;
  88. return smalltalk.withContext(function($ctx1) {
  89. smalltalk.TrappedCheckedBinder.superclass.fn.prototype._installFor_.apply(_st(self), [path]);
  90. _st(path)._trapDescend_((function(snap){
  91. return smalltalk.withContext(function($ctx2) {
  92. return _st(self["@brush"])._onChange_((function(){
  93. return smalltalk.withContext(function($ctx3) {
  94. return _st(snap)._modify_((function(){
  95. return smalltalk.withContext(function($ctx4) {
  96. return _st(_st(_st(self["@brush"])._asJQuery())._attr_("checked"))._notNil();
  97. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  98. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  99. }, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1,1)})}));
  100. return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path},smalltalk.TrappedCheckedBinder)})},
  101. args: ["path"],
  102. 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 ]",
  103. messageSends: ["installFor:", "trapDescend:", "onChange:", "modify:", "notNil", "attr:", "asJQuery"],
  104. referencedClasses: []
  105. }),
  106. smalltalk.TrappedCheckedBinder);
  107. smalltalk.addMethod(
  108. smalltalk.method({
  109. selector: "showBlock",
  110. category: 'action',
  111. fn: function (){
  112. var self=this;
  113. return smalltalk.withContext(function($ctx1) {
  114. var $2,$3,$1;
  115. $1=(function(model){
  116. return smalltalk.withContext(function($ctx2) {
  117. $2=_st(self["@brush"])._asJQuery();
  118. if(($receiver = model) == nil || $receiver == null){
  119. $3=false;
  120. } else {
  121. $3=self._prim_(model);
  122. };
  123. return _st($2)._attr_put_("checked",$3);
  124. }, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1,1)})});
  125. return $1;
  126. }, function($ctx1) {$ctx1.fill(self,"showBlock",{},smalltalk.TrappedCheckedBinder)})},
  127. args: [],
  128. source: "showBlock\x0a\x09^[ :model | brush asJQuery attr: 'checked' put: (model ifNotNil: [ self prim: model ] ifNil: [ false ]) ]",
  129. messageSends: ["attr:put:", "asJQuery", "ifNotNil:ifNil:", "prim:"],
  130. referencedClasses: []
  131. }),
  132. smalltalk.TrappedCheckedBinder);
  133. smalltalk.addClass('TrappedValBinder', smalltalk.TrappedBinder, [], 'Trapped-Frontend');
  134. smalltalk.addMethod(
  135. smalltalk.method({
  136. selector: "installFor:",
  137. category: 'action',
  138. fn: function (path){
  139. var self=this;
  140. return smalltalk.withContext(function($ctx1) {
  141. smalltalk.TrappedValBinder.superclass.fn.prototype._installFor_.apply(_st(self), [path]);
  142. _st(path)._trapDescend_((function(snap){
  143. return smalltalk.withContext(function($ctx2) {
  144. return _st(self["@brush"])._onChange_((function(){
  145. return smalltalk.withContext(function($ctx3) {
  146. return _st(snap)._modify_((function(){
  147. return smalltalk.withContext(function($ctx4) {
  148. return _st(_st(self["@brush"])._asJQuery())._val();
  149. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  150. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  151. }, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1,1)})}));
  152. return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path},smalltalk.TrappedValBinder)})},
  153. args: ["path"],
  154. source: "installFor: path\x0a\x09super installFor: path.\x0a path trapDescend: [ :snap |\x0a\x09 brush onChange: [ snap modify: [\x0a brush asJQuery val\x0a ]]\x0a ]",
  155. messageSends: ["installFor:", "trapDescend:", "onChange:", "modify:", "val", "asJQuery"],
  156. referencedClasses: []
  157. }),
  158. smalltalk.TrappedValBinder);
  159. smalltalk.addMethod(
  160. smalltalk.method({
  161. selector: "showBlock",
  162. category: 'action',
  163. fn: function (){
  164. var self=this;
  165. return smalltalk.withContext(function($ctx1) {
  166. var $2,$3,$1;
  167. $1=(function(model){
  168. return smalltalk.withContext(function($ctx2) {
  169. $2=_st(self["@brush"])._asJQuery();
  170. if(($receiver = model) == nil || $receiver == null){
  171. $3=(function(){
  172. return smalltalk.withContext(function($ctx3) {
  173. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})});
  174. } else {
  175. $3=self._prim_(model);
  176. };
  177. return _st($2)._val_($3);
  178. }, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1,1)})});
  179. return $1;
  180. }, function($ctx1) {$ctx1.fill(self,"showBlock",{},smalltalk.TrappedValBinder)})},
  181. args: [],
  182. source: "showBlock\x0a\x09^[ :model | brush asJQuery val: (model ifNotNil: [self prim: model] ifNil: [[]]) ]",
  183. messageSends: ["val:", "asJQuery", "ifNotNil:ifNil:", "prim:"],
  184. referencedClasses: []
  185. }),
  186. smalltalk.TrappedValBinder);
  187. smalltalk.addClass('TrappedDumbView', smalltalk.Widget, [], 'Trapped-Frontend');
  188. smalltalk.TrappedDumbView.comment="I just read and show an actual path.";
  189. smalltalk.addMethod(
  190. smalltalk.method({
  191. selector: "renderOn:",
  192. category: 'rendering',
  193. fn: function (html){
  194. var self=this;
  195. return smalltalk.withContext(function($ctx1) {
  196. _st(_st(html)._root())._trap_([]);
  197. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.TrappedDumbView)})},
  198. args: ["html"],
  199. source: "renderOn: html\x0a\x09html root trap: #()",
  200. messageSends: ["trap:", "root"],
  201. referencedClasses: []
  202. }),
  203. smalltalk.TrappedDumbView);
  204. smalltalk.addClass('TrappedSingleton', smalltalk.Object, [], 'Trapped-Frontend');
  205. smalltalk.addMethod(
  206. smalltalk.method({
  207. selector: "start:",
  208. category: 'action',
  209. fn: function (args){
  210. var self=this;
  211. return smalltalk.withContext(function($ctx1) {
  212. var $1;
  213. $1=self._subclassResponsibility();
  214. return $1;
  215. }, function($ctx1) {$ctx1.fill(self,"start:",{args:args},smalltalk.TrappedSingleton)})},
  216. args: ["args"],
  217. source: "start: args\x0a\x09^ self subclassResponsibility",
  218. messageSends: ["subclassResponsibility"],
  219. referencedClasses: []
  220. }),
  221. smalltalk.TrappedSingleton);
  222. smalltalk.TrappedSingleton.klass.iVarNames = ['current'];
  223. smalltalk.addMethod(
  224. smalltalk.method({
  225. selector: "current",
  226. category: 'accessing',
  227. fn: function (){
  228. var self=this;
  229. return smalltalk.withContext(function($ctx1) {
  230. var $2,$1;
  231. $2=self["@current"];
  232. if(($receiver = $2) == nil || $receiver == null){
  233. self["@current"]=self._new();
  234. $1=self["@current"];
  235. } else {
  236. $1=$2;
  237. };
  238. return $1;
  239. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.TrappedSingleton.klass)})},
  240. args: [],
  241. source: "current\x0a\x09^ current ifNil: [ current := self new ]",
  242. messageSends: ["ifNil:", "new"],
  243. referencedClasses: []
  244. }),
  245. smalltalk.TrappedSingleton.klass);
  246. smalltalk.addMethod(
  247. smalltalk.method({
  248. selector: "start:",
  249. category: 'action',
  250. fn: function (args){
  251. var self=this;
  252. return smalltalk.withContext(function($ctx1) {
  253. _st(self._current())._start_(args);
  254. return self}, function($ctx1) {$ctx1.fill(self,"start:",{args:args},smalltalk.TrappedSingleton.klass)})},
  255. args: ["args"],
  256. source: "start: args\x0a\x09self current start: args",
  257. messageSends: ["start:", "current"],
  258. referencedClasses: []
  259. }),
  260. smalltalk.TrappedSingleton.klass);
  261. smalltalk.addClass('Trapped', smalltalk.TrappedSingleton, ['registry'], 'Trapped-Frontend');
  262. smalltalk.addMethod(
  263. smalltalk.method({
  264. selector: "binder:",
  265. category: 'binders',
  266. fn: function (aTagBrush){
  267. var self=this;
  268. var binder,tag;
  269. function $TrappedCheckedBinder(){return smalltalk.TrappedCheckedBinder||(typeof TrappedCheckedBinder=="undefined"?nil:TrappedCheckedBinder)}
  270. function $TrappedValBinder(){return smalltalk.TrappedValBinder||(typeof TrappedValBinder=="undefined"?nil:TrappedValBinder)}
  271. function $TrappedBinder(){return smalltalk.TrappedBinder||(typeof TrappedBinder=="undefined"?nil:TrappedBinder)}
  272. return smalltalk.withContext(function($ctx1) {
  273. var $1,$2,$3,$4,$6,$7,$5;
  274. tag=_st(_st(aTagBrush)._element())._nodeName();
  275. $1=_st(tag).__eq("INPUT");
  276. $ctx1.sendIdx["="]=1;
  277. if(smalltalk.assert($1)){
  278. var type;
  279. type=_st(_st(aTagBrush)._asJQuery())._attr_("type");
  280. type;
  281. $2=_st(type).__eq("checkbox");
  282. $ctx1.sendIdx["="]=2;
  283. if(smalltalk.assert($2)){
  284. binder=_st($TrappedCheckedBinder())._new();
  285. $ctx1.sendIdx["new"]=1;
  286. binder;
  287. };
  288. $3=_st(type).__eq("text");
  289. if(smalltalk.assert($3)){
  290. binder=_st($TrappedValBinder())._new();
  291. $ctx1.sendIdx["new"]=2;
  292. binder;
  293. };
  294. };
  295. $4=binder;
  296. if(($receiver = $4) == nil || $receiver == null){
  297. binder=_st($TrappedBinder())._new();
  298. binder;
  299. } else {
  300. $4;
  301. };
  302. $6=binder;
  303. _st($6)._brush_(aTagBrush);
  304. $7=_st($6)._yourself();
  305. $5=$7;
  306. return $5;
  307. }, function($ctx1) {$ctx1.fill(self,"binder:",{aTagBrush:aTagBrush,binder:binder,tag:tag},smalltalk.Trapped)})},
  308. args: ["aTagBrush"],
  309. 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",
  310. messageSends: ["nodeName", "element", "ifTrue:", "=", "attr:", "asJQuery", "new", "ifNil:", "brush:", "yourself"],
  311. referencedClasses: ["TrappedCheckedBinder", "TrappedValBinder", "TrappedBinder"]
  312. }),
  313. smalltalk.Trapped);
  314. smalltalk.addMethod(
  315. smalltalk.method({
  316. selector: "byName:",
  317. category: 'accessing',
  318. fn: function (aString){
  319. var self=this;
  320. return smalltalk.withContext(function($ctx1) {
  321. var $1;
  322. $1=_st(self["@registry"])._at_(aString);
  323. return $1;
  324. }, function($ctx1) {$ctx1.fill(self,"byName:",{aString:aString},smalltalk.Trapped)})},
  325. args: ["aString"],
  326. source: "byName: aString\x0a\x09^ registry at: aString",
  327. messageSends: ["at:"],
  328. referencedClasses: []
  329. }),
  330. smalltalk.Trapped);
  331. smalltalk.addMethod(
  332. smalltalk.method({
  333. selector: "descend:snapshotDo:",
  334. category: 'action',
  335. fn: function (anArray,aBlock){
  336. var self=this;
  337. var tpsc;
  338. function $TrappedPathStack(){return smalltalk.TrappedPathStack||(typeof TrappedPathStack=="undefined"?nil:TrappedPathStack)}
  339. function $TrappedSnapshot(){return smalltalk.TrappedSnapshot||(typeof TrappedSnapshot=="undefined"?nil:TrappedSnapshot)}
  340. return smalltalk.withContext(function($ctx1) {
  341. tpsc=_st($TrappedPathStack())._current();
  342. _st(tpsc)._append_do_(anArray,(function(){
  343. var path,model;
  344. return smalltalk.withContext(function($ctx2) {
  345. path=_st(_st(tpsc)._elements())._copy();
  346. path;
  347. model=self._byName_(_st(path)._first());
  348. model;
  349. return _st(aBlock)._value_(_st(_st($TrappedSnapshot())._new())._path_model_(path,model));
  350. }, function($ctx2) {$ctx2.fillBlock({path:path,model:model},$ctx1,1)})}));
  351. return self}, function($ctx1) {$ctx1.fill(self,"descend:snapshotDo:",{anArray:anArray,aBlock:aBlock,tpsc:tpsc},smalltalk.Trapped)})},
  352. args: ["anArray", "aBlock"],
  353. 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 ]",
  354. messageSends: ["current", "append:do:", "copy", "elements", "byName:", "first", "value:", "path:model:", "new"],
  355. referencedClasses: ["TrappedPathStack", "TrappedSnapshot"]
  356. }),
  357. smalltalk.Trapped);
  358. smalltalk.addMethod(
  359. smalltalk.method({
  360. selector: "initialize",
  361. category: 'initialization',
  362. fn: function (){
  363. var self=this;
  364. return smalltalk.withContext(function($ctx1) {
  365. smalltalk.Trapped.superclass.fn.prototype._initialize.apply(_st(self), []);
  366. self["@registry"]=smalltalk.HashedCollection._from_([]);
  367. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Trapped)})},
  368. args: [],
  369. source: "initialize\x0a\x09super initialize.\x0a\x09registry := #{}.",
  370. messageSends: ["initialize"],
  371. referencedClasses: []
  372. }),
  373. smalltalk.Trapped);
  374. smalltalk.addMethod(
  375. smalltalk.method({
  376. selector: "register:",
  377. category: 'accessing',
  378. fn: function (aListKeyedEntity){
  379. var self=this;
  380. return smalltalk.withContext(function($ctx1) {
  381. self._register_name_(aListKeyedEntity,_st(_st(aListKeyedEntity)._class())._name());
  382. return self}, function($ctx1) {$ctx1.fill(self,"register:",{aListKeyedEntity:aListKeyedEntity},smalltalk.Trapped)})},
  383. args: ["aListKeyedEntity"],
  384. source: "register: aListKeyedEntity\x0a\x09self register: aListKeyedEntity name: aListKeyedEntity class name",
  385. messageSends: ["register:name:", "name", "class"],
  386. referencedClasses: []
  387. }),
  388. smalltalk.Trapped);
  389. smalltalk.addMethod(
  390. smalltalk.method({
  391. selector: "register:name:",
  392. category: 'accessing',
  393. fn: function (aListKeyedEntity,aString){
  394. var self=this;
  395. return smalltalk.withContext(function($ctx1) {
  396. _st(self["@registry"])._at_put_(aString,aListKeyedEntity);
  397. return self}, function($ctx1) {$ctx1.fill(self,"register:name:",{aListKeyedEntity:aListKeyedEntity,aString:aString},smalltalk.Trapped)})},
  398. args: ["aListKeyedEntity", "aString"],
  399. source: "register: aListKeyedEntity name: aString\x0a\x09registry at: aString put: aListKeyedEntity",
  400. messageSends: ["at:put:"],
  401. referencedClasses: []
  402. }),
  403. smalltalk.Trapped);
  404. smalltalk.addMethod(
  405. smalltalk.method({
  406. selector: "start:",
  407. category: 'action',
  408. fn: function (args){
  409. var self=this;
  410. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  411. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  412. return smalltalk.withContext(function($ctx1) {
  413. var $1,$2;
  414. _st(args)._do_((function(each){
  415. return smalltalk.withContext(function($ctx2) {
  416. return self._register_(each);
  417. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  418. $1="[data-trap]"._asJQuery();
  419. $ctx1.sendIdx["asJQuery"]=1;
  420. _st($1)._each_((function(index,elem){
  421. var trap,jq,viewName,modelName,tokens,path;
  422. return smalltalk.withContext(function($ctx2) {
  423. jq=_st(elem)._asJQuery();
  424. jq;
  425. trap=_st(jq)._attr_("data-trap");
  426. trap;
  427. tokens=_st(trap)._tokenize_(":");
  428. $ctx2.sendIdx["tokenize:"]=1;
  429. tokens;
  430. $2=_st(_st(tokens)._size()).__eq((1));
  431. if(smalltalk.assert($2)){
  432. tokens=_st(["TrappedDumbView"]).__comma(tokens);
  433. $ctx2.sendIdx[","]=1;
  434. tokens;
  435. };
  436. viewName=_st(tokens)._first();
  437. $ctx2.sendIdx["first"]=1;
  438. viewName;
  439. tokens=_st(_st(_st(tokens)._second())._tokenize_(" "))._select_((function(each){
  440. return smalltalk.withContext(function($ctx3) {
  441. return _st(each)._notEmpty();
  442. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,4)})}));
  443. tokens;
  444. modelName=_st(tokens)._first();
  445. modelName;
  446. path=_st($Trapped())._parse_(_st(tokens)._allButFirst());
  447. path;
  448. return _st(_st([modelName]).__comma(path))._trapDescend_((function(){
  449. return smalltalk.withContext(function($ctx3) {
  450. return _st(_st(_st(_st($Smalltalk())._current())._at_(viewName))._new())._appendToJQuery_(jq);
  451. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  452. }, function($ctx2) {$ctx2.fillBlock({index:index,elem:elem,trap:trap,jq:jq,viewName:viewName,modelName:modelName,tokens:tokens,path:path},$ctx1,2)})}));
  453. return self}, function($ctx1) {$ctx1.fill(self,"start:",{args:args},smalltalk.Trapped)})},
  454. args: ["args"],
  455. source: "start: args\x0a args do: [ :each | self register: each ].\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 ]",
  456. messageSends: ["do:", "register:", "each:", "asJQuery", "attr:", "tokenize:", "ifTrue:", "=", "size", ",", "first", "select:", "second", "notEmpty", "parse:", "allButFirst", "trapDescend:", "appendToJQuery:", "new", "at:", "current"],
  457. referencedClasses: ["Trapped", "Smalltalk"]
  458. }),
  459. smalltalk.Trapped);
  460. smalltalk.addMethod(
  461. smalltalk.method({
  462. selector: "envelope:loop:before:tag:do:",
  463. category: 'private',
  464. fn: function (envelope,model,endjq,aSymbol,aBlock){
  465. var self=this;
  466. var envjq;
  467. return smalltalk.withContext(function($ctx1) {
  468. envjq=_st(envelope)._asJQuery();
  469. _st(model)._withIndexDo_((function(item,i){
  470. return smalltalk.withContext(function($ctx2) {
  471. _st(envelope)._with_((function(html){
  472. return smalltalk.withContext(function($ctx3) {
  473. return _st(_st(html)._perform_(aSymbol))._trap_read_([i],aBlock);
  474. }, function($ctx3) {$ctx3.fillBlock({html:html},$ctx2,2)})}));
  475. return _st(_st(_st(envjq)._children())._detach())._insertBefore_(endjq);
  476. }, function($ctx2) {$ctx2.fillBlock({item:item,i:i},$ctx1,1)})}));
  477. _st(envjq)._remove();
  478. return self}, function($ctx1) {$ctx1.fill(self,"envelope:loop:before:tag:do:",{envelope:envelope,model:model,endjq:endjq,aSymbol:aSymbol,aBlock:aBlock,envjq:envjq},smalltalk.Trapped.klass)})},
  479. args: ["envelope", "model", "endjq", "aSymbol", "aBlock"],
  480. source: "envelope: envelope loop: model before: endjq tag: aSymbol do: aBlock\x0a \x09| envjq |\x0a envjq := envelope asJQuery.\x0a model withIndexDo: [ :item :i |\x0a envelope with: [ :html | (html perform: aSymbol) trap: {i} read: aBlock ].\x0a envjq children detach insertBefore: endjq.\x0a ].\x0a envjq remove",
  481. messageSends: ["asJQuery", "withIndexDo:", "with:", "trap:read:", "perform:", "insertBefore:", "detach", "children", "remove"],
  482. referencedClasses: []
  483. }),
  484. smalltalk.Trapped.klass);
  485. smalltalk.addMethod(
  486. smalltalk.method({
  487. selector: "loop:between:and:tag:do:",
  488. category: 'private',
  489. fn: function (model,start,end,aSymbol,aBlock){
  490. var self=this;
  491. return smalltalk.withContext(function($ctx1) {
  492. var $2,$1;
  493. $2=_st(start)._asJQuery();
  494. $ctx1.sendIdx["asJQuery"]=1;
  495. $1=_st($2)._nextUntil_(_st(end)._element());
  496. _st($1)._remove();
  497. _st(start)._with_((function(html){
  498. return smalltalk.withContext(function($ctx2) {
  499. if(($receiver = model) == nil || $receiver == null){
  500. return model;
  501. } else {
  502. return self._envelope_loop_before_tag_do_(_st(html)._div(),model,_st(end)._asJQuery(),aSymbol,aBlock);
  503. };
  504. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  505. return self}, function($ctx1) {$ctx1.fill(self,"loop:between:and:tag:do:",{model:model,start:start,end:end,aSymbol:aSymbol,aBlock:aBlock},smalltalk.Trapped.klass)})},
  506. args: ["model", "start", "end", "aSymbol", "aBlock"],
  507. source: "loop: model between: start and: end tag: aSymbol do: aBlock\x0a (start asJQuery nextUntil: end element) remove.\x0a start with: [ :html | model ifNotNil: [\x0a \x09self envelope: html div loop: model before: end asJQuery tag: aSymbol do: aBlock\x0a\x09]]",
  508. messageSends: ["remove", "nextUntil:", "asJQuery", "element", "with:", "ifNotNil:", "envelope:loop:before:tag:do:", "div"],
  509. referencedClasses: []
  510. }),
  511. smalltalk.Trapped.klass);
  512. smalltalk.addMethod(
  513. smalltalk.method({
  514. selector: "parse:",
  515. category: 'accessing',
  516. fn: function (anArray){
  517. var self=this;
  518. return smalltalk.withContext(function($ctx1) {
  519. var $2,$3,$1;
  520. $1=_st(anArray)._collect_((function(each){
  521. var asNum;
  522. return smalltalk.withContext(function($ctx2) {
  523. asNum=_st(each)._asNumber();
  524. asNum;
  525. $2=_st(asNum).__eq(asNum);
  526. $ctx2.sendIdx["="]=1;
  527. if(smalltalk.assert($2)){
  528. return asNum;
  529. } else {
  530. $3=_st(_st(each)._first()).__eq("#");
  531. if(smalltalk.assert($3)){
  532. return [_st(each)._allButFirst()];
  533. } else {
  534. return each;
  535. };
  536. };
  537. }, function($ctx2) {$ctx2.fillBlock({each:each,asNum:asNum},$ctx1,1)})}));
  538. return $1;
  539. }, function($ctx1) {$ctx1.fill(self,"parse:",{anArray:anArray},smalltalk.Trapped.klass)})},
  540. args: ["anArray"],
  541. source: "parse: anArray\x0a\x09^anArray collect: [ :each |\x0a \x09| asNum |\x0a \x09asNum := each asNumber.\x0a asNum = asNum ifTrue: [ asNum ] ifFalse: [\x0a\x09\x09\x09each first = '#' ifTrue: [ { each allButFirst } ] ifFalse: [ each ]]]",
  542. messageSends: ["collect:", "asNumber", "ifTrue:ifFalse:", "=", "first", "allButFirst"],
  543. referencedClasses: []
  544. }),
  545. smalltalk.Trapped.klass);
  546. smalltalk.addClass('TrappedPathStack', smalltalk.TrappedSingleton, ['elements'], 'Trapped-Frontend');
  547. smalltalk.addMethod(
  548. smalltalk.method({
  549. selector: "append:do:",
  550. category: 'descending',
  551. fn: function (anArray,aBlock){
  552. var self=this;
  553. return smalltalk.withContext(function($ctx1) {
  554. self._with_do_(_st(self["@elements"]).__comma(anArray),aBlock);
  555. return self}, function($ctx1) {$ctx1.fill(self,"append:do:",{anArray:anArray,aBlock:aBlock},smalltalk.TrappedPathStack)})},
  556. args: ["anArray", "aBlock"],
  557. source: "append: anArray do: aBlock\x0a self with: elements, anArray do: aBlock",
  558. messageSends: ["with:do:", ","],
  559. referencedClasses: []
  560. }),
  561. smalltalk.TrappedPathStack);
  562. smalltalk.addMethod(
  563. smalltalk.method({
  564. selector: "elements",
  565. category: 'accessing',
  566. fn: function (){
  567. var self=this;
  568. return smalltalk.withContext(function($ctx1) {
  569. var $1;
  570. $1=self["@elements"];
  571. return $1;
  572. }, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.TrappedPathStack)})},
  573. args: [],
  574. source: "elements\x0a\x09^elements",
  575. messageSends: [],
  576. referencedClasses: []
  577. }),
  578. smalltalk.TrappedPathStack);
  579. smalltalk.addMethod(
  580. smalltalk.method({
  581. selector: "initialize",
  582. category: 'initialization',
  583. fn: function (){
  584. var self=this;
  585. return smalltalk.withContext(function($ctx1) {
  586. smalltalk.TrappedPathStack.superclass.fn.prototype._initialize.apply(_st(self), []);
  587. self["@elements"]=[];
  588. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TrappedPathStack)})},
  589. args: [],
  590. source: "initialize\x0a super initialize.\x0a\x09elements := #().",
  591. messageSends: ["initialize"],
  592. referencedClasses: []
  593. }),
  594. smalltalk.TrappedPathStack);
  595. smalltalk.addMethod(
  596. smalltalk.method({
  597. selector: "with:do:",
  598. category: 'descending',
  599. fn: function (anArray,aBlock){
  600. var self=this;
  601. var old;
  602. return smalltalk.withContext(function($ctx1) {
  603. old=self["@elements"];
  604. _st((function(){
  605. return smalltalk.withContext(function($ctx2) {
  606. self["@elements"]=anArray;
  607. self["@elements"];
  608. return _st(aBlock)._value();
  609. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._ensure_((function(){
  610. return smalltalk.withContext(function($ctx2) {
  611. self["@elements"]=old;
  612. return self["@elements"];
  613. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  614. return self}, function($ctx1) {$ctx1.fill(self,"with:do:",{anArray:anArray,aBlock:aBlock,old:old},smalltalk.TrappedPathStack)})},
  615. args: ["anArray", "aBlock"],
  616. source: "with: anArray do: aBlock\x0a\x09| old |\x0a old := elements.\x0a [ elements := anArray.\x0a\x09aBlock value ] ensure: [ elements := old ]",
  617. messageSends: ["ensure:", "value"],
  618. referencedClasses: []
  619. }),
  620. smalltalk.TrappedPathStack);
  621. smalltalk.addClass('TrappedSnapshot', smalltalk.Object, ['path', 'model'], 'Trapped-Frontend');
  622. smalltalk.addMethod(
  623. smalltalk.method({
  624. selector: "do:",
  625. category: 'action',
  626. fn: function (aBlock){
  627. var self=this;
  628. function $TrappedPathStack(){return smalltalk.TrappedPathStack||(typeof TrappedPathStack=="undefined"?nil:TrappedPathStack)}
  629. return smalltalk.withContext(function($ctx1) {
  630. _st(_st($TrappedPathStack())._current())._with_do_(self["@path"],(function(){
  631. return smalltalk.withContext(function($ctx2) {
  632. return _st(aBlock)._value_(self["@model"]);
  633. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  634. return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.TrappedSnapshot)})},
  635. args: ["aBlock"],
  636. source: "do: aBlock\x0a\x09TrappedPathStack current with: path do: [ aBlock value: model ]",
  637. messageSends: ["with:do:", "current", "value:"],
  638. referencedClasses: ["TrappedPathStack"]
  639. }),
  640. smalltalk.TrappedSnapshot);
  641. smalltalk.addMethod(
  642. smalltalk.method({
  643. selector: "model",
  644. category: 'accessing',
  645. fn: function (){
  646. var self=this;
  647. return smalltalk.withContext(function($ctx1) {
  648. var $1;
  649. $1=self["@model"];
  650. return $1;
  651. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.TrappedSnapshot)})},
  652. args: [],
  653. source: "model\x0a\x09^model",
  654. messageSends: [],
  655. referencedClasses: []
  656. }),
  657. smalltalk.TrappedSnapshot);
  658. smalltalk.addMethod(
  659. smalltalk.method({
  660. selector: "modify:",
  661. category: 'action',
  662. fn: function (aBlock){
  663. var self=this;
  664. return smalltalk.withContext(function($ctx1) {
  665. _st(self._model())._modify_do_(_st(self._path())._allButFirst(),aBlock);
  666. return self}, function($ctx1) {$ctx1.fill(self,"modify:",{aBlock:aBlock},smalltalk.TrappedSnapshot)})},
  667. args: ["aBlock"],
  668. source: "modify: aBlock\x0a\x09self model modify: self path allButFirst do: aBlock",
  669. messageSends: ["modify:do:", "model", "allButFirst", "path"],
  670. referencedClasses: []
  671. }),
  672. smalltalk.TrappedSnapshot);
  673. smalltalk.addMethod(
  674. smalltalk.method({
  675. selector: "path",
  676. category: 'accessing',
  677. fn: function (){
  678. var self=this;
  679. return smalltalk.withContext(function($ctx1) {
  680. var $1;
  681. $1=self["@path"];
  682. return $1;
  683. }, function($ctx1) {$ctx1.fill(self,"path",{},smalltalk.TrappedSnapshot)})},
  684. args: [],
  685. source: "path\x0a\x09^path",
  686. messageSends: [],
  687. referencedClasses: []
  688. }),
  689. smalltalk.TrappedSnapshot);
  690. smalltalk.addMethod(
  691. smalltalk.method({
  692. selector: "path:model:",
  693. category: 'accessing',
  694. fn: function (anArray,aTrappedMW){
  695. var self=this;
  696. return smalltalk.withContext(function($ctx1) {
  697. self["@path"]=anArray;
  698. self["@model"]=aTrappedMW;
  699. return self}, function($ctx1) {$ctx1.fill(self,"path:model:",{anArray:anArray,aTrappedMW:aTrappedMW},smalltalk.TrappedSnapshot)})},
  700. args: ["anArray", "aTrappedMW"],
  701. source: "path: anArray model: aTrappedMW\x0a\x09path := anArray.\x0a model := aTrappedMW",
  702. messageSends: [],
  703. referencedClasses: []
  704. }),
  705. smalltalk.TrappedSnapshot);
  706. smalltalk.addMethod(
  707. smalltalk.method({
  708. selector: "trapDescend:",
  709. category: '*Trapped-Frontend',
  710. fn: function (aBlock){
  711. var self=this;
  712. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  713. return smalltalk.withContext(function($ctx1) {
  714. _st(_st($Trapped())._current())._descend_snapshotDo_(self,aBlock);
  715. return self}, function($ctx1) {$ctx1.fill(self,"trapDescend:",{aBlock:aBlock},smalltalk.Array)})},
  716. args: ["aBlock"],
  717. source: "trapDescend: aBlock\x0a\x09Trapped current descend: self snapshotDo: aBlock",
  718. messageSends: ["descend:snapshotDo:", "current"],
  719. referencedClasses: ["Trapped"]
  720. }),
  721. smalltalk.Array);
  722. smalltalk.addMethod(
  723. smalltalk.method({
  724. selector: "trapIter:tag:do:",
  725. category: '*Trapped-Frontend',
  726. fn: function (path,aSymbol,aBlock){
  727. var self=this;
  728. var start,end;
  729. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  730. return smalltalk.withContext(function($ctx1) {
  731. self._with_((function(html){
  732. return smalltalk.withContext(function($ctx2) {
  733. start=_st(html)._script();
  734. $ctx2.sendIdx["script"]=1;
  735. start;
  736. end=_st(html)._script();
  737. return end;
  738. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  739. _st(start)._trap_read_(path,(function(model){
  740. return smalltalk.withContext(function($ctx2) {
  741. return _st($Trapped())._loop_between_and_tag_do_(model,start,end,aSymbol,aBlock);
  742. }, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1,2)})}));
  743. return self}, function($ctx1) {$ctx1.fill(self,"trapIter:tag:do:",{path:path,aSymbol:aSymbol,aBlock:aBlock,start:start,end:end},smalltalk.HTMLCanvas)})},
  744. args: ["path", "aSymbol", "aBlock"],
  745. source: "trapIter: path tag: aSymbol do: aBlock\x0a\x09| start end |\x0a self with: [ :html | start := html script. end := html script ].\x0a start trap: path read: [ :model |\x0a \x09Trapped loop: model between: start and: end tag: aSymbol do: aBlock.\x0a ]",
  746. messageSends: ["with:", "script", "trap:read:", "loop:between:and:tag:do:"],
  747. referencedClasses: ["Trapped"]
  748. }),
  749. smalltalk.HTMLCanvas);
  750. smalltalk.addMethod(
  751. smalltalk.method({
  752. selector: "trap:",
  753. category: '*Trapped-Frontend',
  754. fn: function (path){
  755. var self=this;
  756. function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
  757. return smalltalk.withContext(function($ctx1) {
  758. _st(_st(_st($Trapped())._current())._binder_(self))._installFor_(path);
  759. return self}, function($ctx1) {$ctx1.fill(self,"trap:",{path:path},smalltalk.TagBrush)})},
  760. args: ["path"],
  761. source: "trap: path\x0a\x09(Trapped current binder: self) installFor: path",
  762. messageSends: ["installFor:", "binder:", "current"],
  763. referencedClasses: ["Trapped"]
  764. }),
  765. smalltalk.TagBrush);
  766. smalltalk.addMethod(
  767. smalltalk.method({
  768. selector: "trap:read:",
  769. category: '*Trapped-Frontend',
  770. fn: function (path,aBlock){
  771. var self=this;
  772. function $KeyedPubSubUnsubscribe(){return smalltalk.KeyedPubSubUnsubscribe||(typeof KeyedPubSubUnsubscribe=="undefined"?nil:KeyedPubSubUnsubscribe)}
  773. return smalltalk.withContext(function($ctx1) {
  774. var $1;
  775. _st(path)._trapDescend_((function(snap){
  776. return smalltalk.withContext(function($ctx2) {
  777. return _st(_st(snap)._model())._watch_do_(_st(_st(snap)._path())._allButFirst(),(function(data){
  778. return smalltalk.withContext(function($ctx3) {
  779. $1=_st(_st(_st(self._asJQuery())._closest_("html"))._toArray())._isEmpty();
  780. if(smalltalk.assert($1)){
  781. _st($KeyedPubSubUnsubscribe())._signal();
  782. };
  783. return _st(snap)._do_((function(){
  784. return smalltalk.withContext(function($ctx4) {
  785. return self._with_((function(html){
  786. return smalltalk.withContext(function($ctx5) {
  787. return _st(aBlock)._value_value_(data,html);
  788. }, function($ctx5) {$ctx5.fillBlock({html:html},$ctx4,5)})}));
  789. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  790. }, function($ctx3) {$ctx3.fillBlock({data:data},$ctx2,2)})}));
  791. }, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1,1)})}));
  792. return self}, function($ctx1) {$ctx1.fill(self,"trap:read:",{path:path,aBlock:aBlock},smalltalk.TagBrush)})},
  793. args: ["path", "aBlock"],
  794. 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 ]",
  795. messageSends: ["trapDescend:", "watch:do:", "model", "allButFirst", "path", "ifTrue:", "isEmpty", "toArray", "closest:", "asJQuery", "signal", "do:", "with:", "value:value:"],
  796. referencedClasses: ["KeyedPubSubUnsubscribe"]
  797. }),
  798. smalltalk.TagBrush);
  799. smalltalk.addMethod(
  800. smalltalk.method({
  801. selector: "trapGuard:contents:",
  802. category: '*Trapped-Frontend',
  803. fn: function (anArray,aBlock){
  804. var self=this;
  805. return smalltalk.withContext(function($ctx1) {
  806. var $1,$2,$3,$4,$5;
  807. []._trapDescend_((function(snap){
  808. var shown;
  809. return smalltalk.withContext(function($ctx2) {
  810. shown=nil;
  811. shown;
  812. return self._trap_read_(anArray,(function(gdata){
  813. var sanitized;
  814. return smalltalk.withContext(function($ctx3) {
  815. if(($receiver = gdata) == nil || $receiver == null){
  816. sanitized=false;
  817. } else {
  818. sanitized=gdata;
  819. };
  820. sanitized;
  821. $1=_st(shown).__eq(sanitized);
  822. if(! smalltalk.assert($1)){
  823. shown=sanitized;
  824. shown;
  825. $2=shown;
  826. if(smalltalk.assert($2)){
  827. _st(snap)._do_((function(){
  828. return smalltalk.withContext(function($ctx4) {
  829. return self._contents_(aBlock);
  830. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  831. $3=self._asJQuery();
  832. $ctx3.sendIdx["asJQuery"]=1;
  833. return _st($3)._show();
  834. } else {
  835. $4=self._asJQuery();
  836. _st($4)._hide();
  837. $5=_st($4)._empty();
  838. return $5;
  839. };
  840. };
  841. }, function($ctx3) {$ctx3.fillBlock({gdata:gdata,sanitized:sanitized},$ctx2,2)})}));
  842. }, function($ctx2) {$ctx2.fillBlock({snap:snap,shown:shown},$ctx1,1)})}));
  843. return self}, function($ctx1) {$ctx1.fill(self,"trapGuard:contents:",{anArray:anArray,aBlock:aBlock},smalltalk.TagBrush)})},
  844. args: ["anArray", "aBlock"],
  845. source: "trapGuard: anArray contents: aBlock\x0a\x09#() trapDescend: [ :snap |\x0a\x09 | shown |\x0a \x09shown := nil.\x0a\x09 self trap: anArray read: [ :gdata |\x0a\x09\x09\x09| sanitized |\x0a\x09\x09\x09sanitized := gdata ifNil: [ false ].\x0a \x09 shown = sanitized ifFalse: [\x0a \x09 shown := sanitized.\x0a \x09shown\x0a\x09\x09\x09\x09\x09ifTrue: [ snap do: [ self contents: aBlock ]. self asJQuery show ]\x0a\x09\x09\x09\x09\x09ifFalse: [ self asJQuery hide; empty ] ] ] ]",
  846. messageSends: ["trapDescend:", "trap:read:", "ifNil:", "ifFalse:", "=", "ifTrue:ifFalse:", "do:", "contents:", "show", "asJQuery", "hide", "empty"],
  847. referencedClasses: []
  848. }),
  849. smalltalk.TagBrush);
  850. });