Browse Source

update amber to no-deploy and remove all .deploy.js

Herbert Vojčík 11 years ago
parent
commit
f328e972fa

+ 0 - 721
lib/js/Trapped-Backend.deploy.js

@@ -1,721 +0,0 @@
-define("gh_herby_trapped/Trapped-Backend", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Objects", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Collections"], function(smalltalk,nil,_st){
-smalltalk.addPackage('Trapped-Backend');
-smalltalk.packages["Trapped-Backend"].transport = {"type":"amd","amdNamespace":"gh_herby_trapped"};
-
-smalltalk.addClass('EavModel', smalltalk.Object, ['getBlock', 'putBlock'], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "getBlock:",
-fn: function (aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@getBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"getBlock:",{aBlock:aBlock},smalltalk.EavModel)})},
-messageSends: []}),
-smalltalk.EavModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "initialize",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.EavModel.superclass.fn.prototype._initialize.apply(_st(self), []);
-self["@getBlock"]=(function(){
-return smalltalk.withContext(function($ctx2) {
-return self._error_("No getter block.");
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
-self["@putBlock"]=(function(){
-return smalltalk.withContext(function($ctx2) {
-return self._error_("No putter block.");
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.EavModel)})},
-messageSends: ["initialize", "error:"]}),
-smalltalk.EavModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "on:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self["@getBlock"])._value_(anObject);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.EavModel)})},
-messageSends: ["value:"]}),
-smalltalk.EavModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "on:put:",
-fn: function (anObject,anObject2){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self["@putBlock"])._value_value_(anObject,anObject2);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"on:put:",{anObject:anObject,anObject2:anObject2},smalltalk.EavModel)})},
-messageSends: ["value:value:"]}),
-smalltalk.EavModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "putBlock:",
-fn: function (aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@putBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"putBlock:",{aBlock:aBlock},smalltalk.EavModel)})},
-messageSends: []}),
-smalltalk.EavModel);
-
-
-
-smalltalk.addClass('Isolator', smalltalk.Object, ['root'], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "model:modify:",
-fn: function (anEavModel,aBlock){
-var self=this;
-var newValue;
-return smalltalk.withContext(function($ctx1) { 
-newValue=_st(aBlock)._value_(_st(anEavModel)._on_(self));
-_st(anEavModel)._on_put_(self,_st(newValue)._deepCopy());
-return self}, function($ctx1) {$ctx1.fill(self,"model:modify:",{anEavModel:anEavModel,aBlock:aBlock,newValue:newValue},smalltalk.Isolator)})},
-messageSends: ["value:", "on:", "on:put:", "deepCopy"]}),
-smalltalk.Isolator);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "model:read:",
-fn: function (anEavModel,aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(aBlock)._value_(_st(_st(anEavModel)._on_(self))._deepCopy());
-return self}, function($ctx1) {$ctx1.fill(self,"model:read:",{anEavModel:anEavModel,aBlock:aBlock},smalltalk.Isolator)})},
-messageSends: ["value:", "deepCopy", "on:"]}),
-smalltalk.Isolator);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "root",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@root"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"root",{},smalltalk.Isolator)})},
-messageSends: []}),
-smalltalk.Isolator);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "root:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@root"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"root:",{anObject:anObject},smalltalk.Isolator)})},
-messageSends: []}),
-smalltalk.Isolator);
-
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "on:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._new())._root_(anObject);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Isolator.klass)})},
-messageSends: ["root:", "new"]}),
-smalltalk.Isolator.klass);
-
-
-smalltalk.addClass('KeyedPubSubBase', smalltalk.Object, ['factory'], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "changed:",
-fn: function (key){
-var self=this;
-var needsToRun;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-needsToRun=false;
-self._do_((function(each){
-return smalltalk.withContext(function($ctx2) {
-$1=_st(each)._accepts_(key);
-if(smalltalk.assert($1)){
-_st(each)._flag();
-needsToRun=true;
-return needsToRun;
-};
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-self._dirty_(needsToRun);
-return self}, function($ctx1) {$ctx1.fill(self,"changed:",{key:key,needsToRun:needsToRun},smalltalk.KeyedPubSubBase)})},
-messageSends: ["do:", "ifTrue:", "flag", "accepts:", "dirty:"]}),
-smalltalk.KeyedPubSubBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "dirty:",
-fn: function (aBoolean){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=aBoolean;
-if(smalltalk.assert($1)){
-_st((function(){
-return smalltalk.withContext(function($ctx2) {
-return self._run();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._fork();
-};
-return self}, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean},smalltalk.KeyedPubSubBase)})},
-messageSends: ["ifTrue:", "fork", "run"]}),
-smalltalk.KeyedPubSubBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "on:hook:",
-fn: function (key,aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._add_(_st(_st(self["@factory"])._value_value_(key,aBlock))._flag());
-self._dirty_(true);
-return self}, function($ctx1) {$ctx1.fill(self,"on:hook:",{key:key,aBlock:aBlock},smalltalk.KeyedPubSubBase)})},
-messageSends: ["add:", "flag", "value:value:", "dirty:"]}),
-smalltalk.KeyedPubSubBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "run",
-fn: function (){
-var self=this;
-var needsClean;
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
-needsClean=false;
-self._do_((function(each){
-return smalltalk.withContext(function($ctx2) {
-$1=_st(each)._isFlagged();
-if(smalltalk.assert($1)){
-_st(each)._run();
-$2=_st(each)._isEnabled();
-if(! smalltalk.assert($2)){
-needsClean=true;
-return needsClean;
-};
-};
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-$3=needsClean;
-if(smalltalk.assert($3)){
-self._clean();
-};
-return self}, function($ctx1) {$ctx1.fill(self,"run",{needsClean:needsClean},smalltalk.KeyedPubSubBase)})},
-messageSends: ["do:", "ifTrue:", "run", "ifFalse:", "isEnabled", "isFlagged", "clean"]}),
-smalltalk.KeyedPubSubBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "subscriptionFactory:",
-fn: function (aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@factory"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"subscriptionFactory:",{aBlock:aBlock},smalltalk.KeyedPubSubBase)})},
-messageSends: []}),
-smalltalk.KeyedPubSubBase);
-
-
-
-smalltalk.addClass('SimpleKeyedPubSub', smalltalk.KeyedPubSubBase, ['queue'], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "add:",
-fn: function (aSubscription){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self["@queue"])._add_(aSubscription);
-return self}, function($ctx1) {$ctx1.fill(self,"add:",{aSubscription:aSubscription},smalltalk.SimpleKeyedPubSub)})},
-messageSends: ["add:"]}),
-smalltalk.SimpleKeyedPubSub);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "clean",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@queue"]=_st(self["@queue"])._select_((function(each){
-return smalltalk.withContext(function($ctx2) {
-return _st(each)._isEnabled();
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"clean",{},smalltalk.SimpleKeyedPubSub)})},
-messageSends: ["select:", "isEnabled"]}),
-smalltalk.SimpleKeyedPubSub);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "do:",
-fn: function (aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self["@queue"])._do_(aBlock);
-return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.SimpleKeyedPubSub)})},
-messageSends: ["do:"]}),
-smalltalk.SimpleKeyedPubSub);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "initialize",
-fn: function (){
-var self=this;
-function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.SimpleKeyedPubSub.superclass.fn.prototype._initialize.apply(_st(self), []);
-self["@queue"]=_st($OrderedCollection())._new();
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.SimpleKeyedPubSub)})},
-messageSends: ["initialize", "new"]}),
-smalltalk.SimpleKeyedPubSub);
-
-
-
-smalltalk.addClass('KeyedPubSubUnsubscribe', smalltalk.Error, [], 'Trapped-Backend');
-
-
-smalltalk.addClass('KeyedSubscriptionBase', smalltalk.Object, ['key', 'actionBlock', 'flagged'], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "accepts:",
-fn: function (aKey){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._subclassResponsibility();
-return self}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey},smalltalk.KeyedSubscriptionBase)})},
-messageSends: ["subclassResponsibility"]}),
-smalltalk.KeyedSubscriptionBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "flag",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@flagged"]=true;
-return self}, function($ctx1) {$ctx1.fill(self,"flag",{},smalltalk.KeyedSubscriptionBase)})},
-messageSends: []}),
-smalltalk.KeyedSubscriptionBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "initialize",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.KeyedSubscriptionBase.superclass.fn.prototype._initialize.apply(_st(self), []);
-self["@key"]=nil;
-self["@actionBlock"]=nil;
-self["@flagged"]=false;
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.KeyedSubscriptionBase)})},
-messageSends: ["initialize"]}),
-smalltalk.KeyedSubscriptionBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "isEnabled",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self["@actionBlock"])._notNil();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"isEnabled",{},smalltalk.KeyedSubscriptionBase)})},
-messageSends: ["notNil"]}),
-smalltalk.KeyedSubscriptionBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "isFlagged",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@flagged"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"isFlagged",{},smalltalk.KeyedSubscriptionBase)})},
-messageSends: []}),
-smalltalk.KeyedSubscriptionBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "key:block:",
-fn: function (anObject,aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@key"]=anObject;
-self["@actionBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"key:block:",{anObject:anObject,aBlock:aBlock},smalltalk.KeyedSubscriptionBase)})},
-messageSends: []}),
-smalltalk.KeyedSubscriptionBase);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "run",
-fn: function (){
-var self=this;
-function $KeyedPubSubUnsubscribe(){return smalltalk.KeyedPubSubUnsubscribe||(typeof KeyedPubSubUnsubscribe=="undefined"?nil:KeyedPubSubUnsubscribe)}
-return smalltalk.withContext(function($ctx1) { 
-_st((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st((function(){
-return smalltalk.withContext(function($ctx3) {
-return _st(self["@actionBlock"])._value();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}))._ensure_((function(){
-return smalltalk.withContext(function($ctx3) {
-self["@flagged"]=false;
-return self["@flagged"];
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($KeyedPubSubUnsubscribe(),(function(){
-return smalltalk.withContext(function($ctx2) {
-self["@actionBlock"]=nil;
-return self["@actionBlock"];
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"run",{},smalltalk.KeyedSubscriptionBase)})},
-messageSends: ["on:do:", "ensure:", "value"]}),
-smalltalk.KeyedSubscriptionBase);
-
-
-
-smalltalk.addClass('ListKeyedSubscription', smalltalk.KeyedSubscriptionBase, [], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "accepts:",
-fn: function (aKey){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(aKey)._size()).__lt_eq(_st(self["@key"])._size()))._and_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(aKey).__eq(_st(self["@key"])._copyFrom_to_((1),_st(aKey)._size()));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey},smalltalk.ListKeyedSubscription)})},
-messageSends: ["and:", "=", "copyFrom:to:", "size", "<="]}),
-smalltalk.ListKeyedSubscription);
-
-
-
-smalltalk.addClass('ListKeyedEntity', smalltalk.Object, ['dispatcher', 'payload'], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "dispatcher",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@dispatcher"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"dispatcher",{},smalltalk.ListKeyedEntity)})},
-messageSends: []}),
-smalltalk.ListKeyedEntity);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "dispatcher:",
-fn: function (aDispatcher){
-var self=this;
-function $ListKeyedSubscription(){return smalltalk.ListKeyedSubscription||(typeof ListKeyedSubscription=="undefined"?nil:ListKeyedSubscription)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
-$1=aDispatcher;
-_st($1)._subscriptionFactory_((function(key,block){
-return smalltalk.withContext(function($ctx2) {
-$2=_st($ListKeyedSubscription())._new();
-_st($2)._key_block_(key,block);
-$3=_st($2)._yourself();
-return $3;
-}, function($ctx2) {$ctx2.fillBlock({key:key,block:block},$ctx1)})}));
-$4=_st($1)._yourself();
-self["@dispatcher"]=$4;
-return self}, function($ctx1) {$ctx1.fill(self,"dispatcher:",{aDispatcher:aDispatcher},smalltalk.ListKeyedEntity)})},
-messageSends: ["subscriptionFactory:", "key:block:", "new", "yourself"]}),
-smalltalk.ListKeyedEntity);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "model:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@payload"]=anObject;
-_st(self._dispatcher())._changed_([]);
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject},smalltalk.ListKeyedEntity)})},
-messageSends: ["changed:", "dispatcher"]}),
-smalltalk.ListKeyedEntity);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "watch:do:",
-fn: function (path,aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self._dispatcher())._on_hook_(path,(function(){
-return smalltalk.withContext(function($ctx2) {
-return self._read_do_(path,aBlock);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"watch:do:",{path:path,aBlock:aBlock},smalltalk.ListKeyedEntity)})},
-messageSends: ["on:hook:", "read:do:", "dispatcher"]}),
-smalltalk.ListKeyedEntity);
-
-
-
-smalltalk.addClass('ListKeyedDirectEntity', smalltalk.ListKeyedEntity, [], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "modify:do:",
-fn: function (path,aBlock){
-var self=this;
-var newValue,eavModel;
-return smalltalk.withContext(function($ctx1) { 
-eavModel=_st(path)._asEavModel();
-newValue=_st(aBlock)._value_(_st(eavModel)._on_(self["@payload"]));
-_st((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(eavModel)._on_put_(self["@payload"],newValue);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(self._dispatcher())._changed_(path);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,newValue:newValue,eavModel:eavModel},smalltalk.ListKeyedDirectEntity)})},
-messageSends: ["asEavModel", "value:", "on:", "ensure:", "changed:", "dispatcher", "on:put:"]}),
-smalltalk.ListKeyedDirectEntity);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "read:do:",
-fn: function (path,aBlock){
-var self=this;
-var eavModel;
-return smalltalk.withContext(function($ctx1) { 
-eavModel=_st(path)._asEavModel();
-_st(aBlock)._value_(_st(eavModel)._on_(self["@payload"]));
-return self}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel},smalltalk.ListKeyedDirectEntity)})},
-messageSends: ["asEavModel", "value:", "on:"]}),
-smalltalk.ListKeyedDirectEntity);
-
-
-
-smalltalk.addClass('ListKeyedIsolatedEntity', smalltalk.ListKeyedEntity, [], 'Trapped-Backend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "model:",
-fn: function (anObject){
-var self=this;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.ListKeyedIsolatedEntity.superclass.fn.prototype._model_.apply(_st(self), [_st($Isolator())._on_(anObject)]);
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject},smalltalk.ListKeyedIsolatedEntity)})},
-messageSends: ["model:", "on:"]}),
-smalltalk.ListKeyedIsolatedEntity);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "modify:do:",
-fn: function (path,aBlock){
-var self=this;
-var eavModel;
-return smalltalk.withContext(function($ctx1) { 
-eavModel=_st(_st([["root"]]).__comma(path))._asEavModel();
-_st((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(self["@payload"])._model_modify_(eavModel,aBlock);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(self._dispatcher())._changed_(path);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,eavModel:eavModel},smalltalk.ListKeyedIsolatedEntity)})},
-messageSends: ["asEavModel", ",", "ensure:", "changed:", "dispatcher", "model:modify:"]}),
-smalltalk.ListKeyedIsolatedEntity);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "read:do:",
-fn: function (path,aBlock){
-var self=this;
-var eavModel;
-return smalltalk.withContext(function($ctx1) { 
-eavModel=_st(_st([["root"]]).__comma(path))._asEavModel();
-_st(self["@payload"])._model_read_(eavModel,aBlock);
-return self}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel},smalltalk.ListKeyedIsolatedEntity)})},
-messageSends: ["asEavModel", ",", "model:read:"]}),
-smalltalk.ListKeyedIsolatedEntity);
-
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "reverseTrapAt:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return nil;
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject},smalltalk.Object)})},
-messageSends: []}),
-smalltalk.Object);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "reverseTrapAt:put:",
-fn: function (anObject,value){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._error_(_st("Trapped cannot put at ".__comma(_st(self._class())._name())).__comma(" type key."));
-return self}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value},smalltalk.Object)})},
-messageSends: ["error:", ",", "name", "class"]}),
-smalltalk.Object);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "asEavModel",
-fn: function (){
-var self=this;
-var model;
-function $EavModel(){return smalltalk.EavModel||(typeof EavModel=="undefined"?nil:EavModel)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
-model=_st($EavModel())._new();
-_st(model)._getBlock_((function(anObject){
-return smalltalk.withContext(function($ctx2) {
-return self._inject_into_(anObject,(function(soFar,segment){
-return smalltalk.withContext(function($ctx3) {
-$1=soFar;
-if(($receiver = $1) == nil || $receiver == undefined){
-return $1;
-} else {
-return _st(segment)._reverseTrapAt_(soFar);
-};
-}, function($ctx3) {$ctx3.fillBlock({soFar:soFar,segment:segment},$ctx2)})}));
-}, function($ctx2) {$ctx2.fillBlock({anObject:anObject},$ctx1)})}));
-$2=self._isEmpty();
-if(! smalltalk.assert($2)){
-_st(model)._putBlock_((function(anObject,value){
-var penultimate;
-return smalltalk.withContext(function($ctx2) {
-penultimate=_st(self._allButLast())._inject_into_(anObject,(function(soFar,segment){
-return smalltalk.withContext(function($ctx3) {
-$3=soFar;
-if(($receiver = $3) == nil || $receiver == undefined){
-return $3;
-} else {
-return _st(segment)._reverseTrapAt_(soFar);
-};
-}, function($ctx3) {$ctx3.fillBlock({soFar:soFar,segment:segment},$ctx2)})}));
-penultimate;
-return _st(self._last())._reverseTrapAt_put_(penultimate,value);
-}, function($ctx2) {$ctx2.fillBlock({anObject:anObject,value:value,penultimate:penultimate},$ctx1)})}));
-};
-$4=model;
-return $4;
-}, function($ctx1) {$ctx1.fill(self,"asEavModel",{model:model},smalltalk.SequenceableCollection)})},
-messageSends: ["new", "getBlock:", "inject:into:", "ifNotNil:", "reverseTrapAt:", "ifFalse:", "putBlock:", "allButLast", "reverseTrapAt:put:", "last", "isEmpty"]}),
-smalltalk.SequenceableCollection);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "reverseTrapAt:",
-fn: function (anObject){
-var self=this;
-function $MessageNotUnderstood(){return smalltalk.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-var $early={};
-try {
-$1=_st((function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(anObject)._perform_(self._first());
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($MessageNotUnderstood(),(function(){
-return smalltalk.withContext(function($ctx2) {
-throw $early=[nil];
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return $1;
-}
-catch(e) {if(e===$early)return e[0]; throw e}
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject},smalltalk.Array)})},
-messageSends: ["on:do:", "perform:", "first"]}),
-smalltalk.Array);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "reverseTrapAt:put:",
-fn: function (anObject,value){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(anObject)._perform_withArguments_(_st(_st(self._first()).__comma(":"))._asSymbol(),[value]);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value},smalltalk.Array)})},
-messageSends: ["perform:withArguments:", "asSymbol", ",", "first"]}),
-smalltalk.Array);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "reverseTrapAt:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(anObject)._at_ifAbsent_(self,(function(){
-return smalltalk.withContext(function($ctx2) {
-return nil;
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject},smalltalk.String)})},
-messageSends: ["at:ifAbsent:"]}),
-smalltalk.String);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "reverseTrapAt:put:",
-fn: function (anObject,value){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(anObject)._at_put_(self,value);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value},smalltalk.String)})},
-messageSends: ["at:put:"]}),
-smalltalk.String);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "reverseTrapAt:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(anObject)._at_ifAbsent_(self,(function(){
-return smalltalk.withContext(function($ctx2) {
-return nil;
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject},smalltalk.Number)})},
-messageSends: ["at:ifAbsent:"]}),
-smalltalk.Number);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "reverseTrapAt:put:",
-fn: function (anObject,value){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(anObject)._at_put_(self,value);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value},smalltalk.Number)})},
-messageSends: ["at:put:"]}),
-smalltalk.Number);
-
-});

+ 0 - 242
lib/js/Trapped-Demo.deploy.js

@@ -1,242 +0,0 @@
-define("gh_herby_trapped/Trapped-Demo", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "gh_herby_trapped/Trapped-Backend", "amber_core/Kernel-Objects", "amber_core/Canvas"], function(smalltalk,nil,_st){
-smalltalk.addPackage('Trapped-Demo');
-smalltalk.packages["Trapped-Demo"].transport = {"type":"amd","amdNamespace":"gh_herby_trapped"};
-
-smalltalk.addClass('App', smalltalk.ListKeyedIsolatedEntity, [], 'Trapped-Demo');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "initialize",
-fn: function (){
-var self=this;
-function $SimpleKeyedPubSub(){return smalltalk.SimpleKeyedPubSub||(typeof SimpleKeyedPubSub=="undefined"?nil:SimpleKeyedPubSub)}
-function $AppModel(){return smalltalk.AppModel||(typeof AppModel=="undefined"?nil:AppModel)}
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.App.superclass.fn.prototype._initialize.apply(_st(self), []);
-self._dispatcher_(_st($SimpleKeyedPubSub())._new());
-self._model_(_st(_st($AppModel())._new())._title_("Todo"));
-_st((function(){
-return smalltalk.withContext(function($ctx2) {
-return self._modify_do_([["todos"]],(function(){
-return smalltalk.withContext(function($ctx3) {
-return [smalltalk.HashedCollection._from_(["text".__minus_gt("learn trapped"),"done".__minus_gt(true)]),smalltalk.HashedCollection._from_(["text".__minus_gt("build a trapped app"),"done".__minus_gt(false)])];
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((2000));
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.App)})},
-messageSends: ["initialize", "dispatcher:", "new", "model:", "title:", "valueWithTimeout:", "modify:do:", "->"]}),
-smalltalk.App);
-
-
-
-smalltalk.addClass('AppModel', smalltalk.Object, ['title', 'todos', 'todoText'], 'Trapped-Demo');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "addTodo",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self._todos())._add_(smalltalk.HashedCollection._from_(["text".__minus_gt(self._todoText()),"done".__minus_gt(false)]));
-self._todoText_("");
-return self}, function($ctx1) {$ctx1.fill(self,"addTodo",{},smalltalk.AppModel)})},
-messageSends: ["add:", "->", "todoText", "todos", "todoText:"]}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "archive",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._todos_(self._todosNotDone());
-return self}, function($ctx1) {$ctx1.fill(self,"archive",{},smalltalk.AppModel)})},
-messageSends: ["todos:", "todosNotDone"]}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "remaining",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._todosNotDone())._size();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"remaining",{},smalltalk.AppModel)})},
-messageSends: ["size", "todosNotDone"]}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "title",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@title"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"title",{},smalltalk.AppModel)})},
-messageSends: []}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "title:",
-fn: function (aString){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@title"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"title:",{aString:aString},smalltalk.AppModel)})},
-messageSends: []}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "todoText",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@todoText"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"todoText",{},smalltalk.AppModel)})},
-messageSends: []}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "todoText:",
-fn: function (aString){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@todoText"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"todoText:",{aString:aString},smalltalk.AppModel)})},
-messageSends: []}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "todos",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@todos"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"todos",{},smalltalk.AppModel)})},
-messageSends: []}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "todos:",
-fn: function (anArray){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@todos"]=anArray;
-return self}, function($ctx1) {$ctx1.fill(self,"todos:",{anArray:anArray},smalltalk.AppModel)})},
-messageSends: []}),
-smalltalk.AppModel);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "todosNotDone",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._todos())._reject_((function(each){
-return smalltalk.withContext(function($ctx2) {
-return _st(each)._at_("done");
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"todosNotDone",{},smalltalk.AppModel)})},
-messageSends: ["reject:", "at:", "todos"]}),
-smalltalk.AppModel);
-
-
-
-smalltalk.addClass('AppView', smalltalk.Widget, [], 'Trapped-Demo');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "renderOn:",
-fn: function (html){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$7,$9,$10,$11,$12,$8;
-[]._trapDescend_((function(snap){
-return smalltalk.withContext(function($ctx2) {
-_st(_st(html)._h2())._trap_([["title"]]);
-return _st(_st(html)._div())._trap_toggle_ifNotPresent_([["todos"]],(function(){
-return smalltalk.withContext(function($ctx3) {
-return _st(snap)._do_((function(){
-return smalltalk.withContext(function($ctx4) {
-_st(_st(html)._span())._trap_([["remaining"]]);
-_st(html)._with_(" of ");
-_st(_st(html)._span())._trap_([["todos"], ["size"]]);
-_st(html)._with_(" remaining [ ");
-$1=_st(html)._a();
-_st($1)._href_("");
-_st($1)._onClick_((function(){
-return smalltalk.withContext(function($ctx5) {
-_st(snap)._modify_((function(model){
-return smalltalk.withContext(function($ctx6) {
-return _st(model)._archive();
-}, function($ctx6) {$ctx6.fillBlock({model:model},$ctx5)})}));
-return false;
-}, function($ctx5) {$ctx5.fillBlock({},$ctx4)})}));
-$2=_st($1)._with_("archive");
-$2;
-_st(html)._with_(" ]");
-_st(_st(html)._ul())._with_((function(){
-return smalltalk.withContext(function($ctx5) {
-return _st(html)._trapIter_tag_do_([["todos"]],"li",(function(each){
-return smalltalk.withContext(function($ctx6) {
-_st(_st(html)._root())._empty();
-$3=_st(html)._input();
-_st($3)._type_("checkbox");
-$4=_st($3)._trap_(["done"]);
-$4;
-$5=_st(html)._span();
-_st($5)._trap_read_(["done"],(function(model){
-return smalltalk.withContext(function($ctx7) {
-return _st(_st(html)._root())._class_("done-".__comma(model));
-}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx6)})}));
-$6=_st($5)._trap_(["text"]);
-return $6;
-}, function($ctx6) {$ctx6.fillBlock({each:each},$ctx5)})}));
-}, function($ctx5) {$ctx5.fillBlock({},$ctx4)})}));
-$7=_st(html)._form();
-_st($7)._onSubmit_((function(){
-return smalltalk.withContext(function($ctx5) {
-_st(snap)._modify_((function(model){
-return smalltalk.withContext(function($ctx6) {
-return _st(model)._addTodo();
-}, function($ctx6) {$ctx6.fillBlock({model:model},$ctx5)})}));
-return false;
-}, function($ctx5) {$ctx5.fillBlock({},$ctx4)})}));
-$8=_st($7)._with_((function(){
-return smalltalk.withContext(function($ctx5) {
-$9=_st(html)._input();
-_st($9)._type_("text");
-_st($9)._trap_([["todoText"]]);
-_st($9)._at_put_("size",(30));
-$10=_st($9)._placeholder_("add new todo here");
-$10;
-$11=_st(html)._input();
-_st($11)._class_("btn-primary");
-_st($11)._type_("submit");
-$12=_st($11)._value_("add");
-return $12;
-}, function($ctx5) {$ctx5.fillBlock({},$ctx4)})}));
-return $8;
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3)})}));
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}),(function(){
-return smalltalk.withContext(function($ctx3) {
-return _st(html)._with_("Loading ...");
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
-}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.AppView)})},
-messageSends: ["trapDescend:", "trap:", "h2", "trap:toggle:ifNotPresent:", "do:", "span", "with:", "href:", "a", "onClick:", "modify:", "archive", "trapIter:tag:do:", "empty", "root", "type:", "input", "trap:read:", "class:", ",", "ul", "onSubmit:", "addTodo", "form", "at:put:", "placeholder:", "value:", "div"]}),
-smalltalk.AppView);
-
-
-});

+ 0 - 710
lib/js/Trapped-Frontend.deploy.js

@@ -1,710 +0,0 @@
-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){
-smalltalk.addPackage('Trapped-Frontend');
-smalltalk.packages["Trapped-Frontend"].transport = {"type":"amd","amdNamespace":"gh_herby_trapped"};
-
-smalltalk.addClass('TrappedBinder', smalltalk.Object, ['brush'], 'Trapped-Frontend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "brush:",
-fn: function (aTagBrush){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@brush"]=aTagBrush;
-return self}, function($ctx1) {$ctx1.fill(self,"brush:",{aTagBrush:aTagBrush},smalltalk.TrappedBinder)})},
-messageSends: []}),
-smalltalk.TrappedBinder);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "installFor:",
-fn: function (path){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self["@brush"])._trap_read_(path,self._showBlock());
-return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path},smalltalk.TrappedBinder)})},
-messageSends: ["trap:read:", "showBlock"]}),
-smalltalk.TrappedBinder);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "prim:",
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return anObject.valueOf();
-return self}, function($ctx1) {$ctx1.fill(self,"prim:",{anObject:anObject},smalltalk.TrappedBinder)})},
-messageSends: []}),
-smalltalk.TrappedBinder);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "showBlock",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$6,$5,$3,$1;
-$1=(function(model){
-return smalltalk.withContext(function($ctx2) {
-$2=self["@brush"];
-_st($2)._empty();
-$4=$2;
-$6=model;
-if(($receiver = $6) == nil || $receiver == undefined){
-$5=(function(){
-return smalltalk.withContext(function($ctx3) {
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})});
-} else {
-$5=$6;
-};
-$3=_st($4)._with_($5);
-return $3;
-}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"showBlock",{},smalltalk.TrappedBinder)})},
-messageSends: ["empty", "with:", "ifNil:"]}),
-smalltalk.TrappedBinder);
-
-
-
-smalltalk.addClass('TrappedCheckedBinder', smalltalk.TrappedBinder, [], 'Trapped-Frontend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "installFor:",
-fn: function (path){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.TrappedCheckedBinder.superclass.fn.prototype._installFor_.apply(_st(self), [path]);
-_st(path)._trapDescend_((function(snap){
-return smalltalk.withContext(function($ctx2) {
-return _st(self["@brush"])._onChange_((function(){
-return smalltalk.withContext(function($ctx3) {
-return _st(snap)._modify_((function(){
-return smalltalk.withContext(function($ctx4) {
-return _st(_st(_st(self["@brush"])._asJQuery())._attr_("checked"))._notNil();
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3)})}));
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
-}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path},smalltalk.TrappedCheckedBinder)})},
-messageSends: ["installFor:", "trapDescend:", "onChange:", "modify:", "notNil", "attr:", "asJQuery"]}),
-smalltalk.TrappedCheckedBinder);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "showBlock",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$1;
-$1=(function(model){
-return smalltalk.withContext(function($ctx2) {
-$2=_st(self["@brush"])._asJQuery();
-$4=model;
-if(($receiver = $4) == nil || $receiver == undefined){
-$3=false;
-} else {
-$3=self._prim_(model);
-};
-return _st($2)._attr_put_("checked",$3);
-}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"showBlock",{},smalltalk.TrappedCheckedBinder)})},
-messageSends: ["attr:put:", "ifNotNil:ifNil:", "prim:", "asJQuery"]}),
-smalltalk.TrappedCheckedBinder);
-
-
-
-smalltalk.addClass('TrappedValBinder', smalltalk.TrappedBinder, [], 'Trapped-Frontend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "installFor:",
-fn: function (path){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.TrappedValBinder.superclass.fn.prototype._installFor_.apply(_st(self), [path]);
-_st(path)._trapDescend_((function(snap){
-return smalltalk.withContext(function($ctx2) {
-return _st(self["@brush"])._onChange_((function(){
-return smalltalk.withContext(function($ctx3) {
-return _st(snap)._modify_((function(){
-return smalltalk.withContext(function($ctx4) {
-return _st(_st(self["@brush"])._asJQuery())._val();
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3)})}));
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
-}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path},smalltalk.TrappedValBinder)})},
-messageSends: ["installFor:", "trapDescend:", "onChange:", "modify:", "val", "asJQuery"]}),
-smalltalk.TrappedValBinder);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "showBlock",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$1;
-$1=(function(model){
-return smalltalk.withContext(function($ctx2) {
-$2=_st(self["@brush"])._asJQuery();
-$4=model;
-if(($receiver = $4) == nil || $receiver == undefined){
-$3=(function(){
-return smalltalk.withContext(function($ctx3) {
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})});
-} else {
-$3=self._prim_(model);
-};
-return _st($2)._val_($3);
-}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"showBlock",{},smalltalk.TrappedValBinder)})},
-messageSends: ["val:", "ifNotNil:ifNil:", "prim:", "asJQuery"]}),
-smalltalk.TrappedValBinder);
-
-
-
-smalltalk.addClass('TrappedDumbView', smalltalk.Widget, [], 'Trapped-Frontend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "renderOn:",
-fn: function (html){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(html)._root())._trap_([]);
-return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.TrappedDumbView)})},
-messageSends: ["trap:", "root"]}),
-smalltalk.TrappedDumbView);
-
-
-
-smalltalk.addClass('TrappedSingleton', smalltalk.Object, [], 'Trapped-Frontend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "start:",
-fn: function (args){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self._subclassResponsibility();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"start:",{args:args},smalltalk.TrappedSingleton)})},
-messageSends: ["subclassResponsibility"]}),
-smalltalk.TrappedSingleton);
-
-
-smalltalk.TrappedSingleton.klass.iVarNames = ['current'];
-smalltalk.addMethod(
-smalltalk.method({
-selector: "current",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self["@current"];
-if(($receiver = $2) == nil || $receiver == undefined){
-self["@current"]=self._new();
-$1=self["@current"];
-} else {
-$1=$2;
-};
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.TrappedSingleton.klass)})},
-messageSends: ["ifNil:", "new"]}),
-smalltalk.TrappedSingleton.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "start:",
-fn: function (args){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self._current())._start_(args);
-return self}, function($ctx1) {$ctx1.fill(self,"start:",{args:args},smalltalk.TrappedSingleton.klass)})},
-messageSends: ["start:", "current"]}),
-smalltalk.TrappedSingleton.klass);
-
-
-smalltalk.addClass('Trapped', smalltalk.TrappedSingleton, ['registry'], 'Trapped-Frontend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "binder:",
-fn: function (aTagBrush){
-var self=this;
-var binder,tag;
-function $TrappedCheckedBinder(){return smalltalk.TrappedCheckedBinder||(typeof TrappedCheckedBinder=="undefined"?nil:TrappedCheckedBinder)}
-function $TrappedValBinder(){return smalltalk.TrappedValBinder||(typeof TrappedValBinder=="undefined"?nil:TrappedValBinder)}
-function $TrappedBinder(){return smalltalk.TrappedBinder||(typeof TrappedBinder=="undefined"?nil:TrappedBinder)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$7,$5;
-tag=_st(_st(aTagBrush)._element())._nodeName();
-$1=_st(tag).__eq("INPUT");
-if(smalltalk.assert($1)){
-var type;
-type=_st(_st(aTagBrush)._asJQuery())._attr_("type");
-type;
-$2=_st(type).__eq("checkbox");
-if(smalltalk.assert($2)){
-binder=_st($TrappedCheckedBinder())._new();
-binder;
-};
-$3=_st(type).__eq("text");
-if(smalltalk.assert($3)){
-binder=_st($TrappedValBinder())._new();
-binder;
-};
-};
-$4=binder;
-if(($receiver = $4) == nil || $receiver == undefined){
-binder=_st($TrappedBinder())._new();
-binder;
-} else {
-$4;
-};
-$6=binder;
-_st($6)._brush_(aTagBrush);
-$7=_st($6)._yourself();
-$5=$7;
-return $5;
-}, function($ctx1) {$ctx1.fill(self,"binder:",{aTagBrush:aTagBrush,binder:binder,tag:tag},smalltalk.Trapped)})},
-messageSends: ["nodeName", "element", "ifTrue:", "attr:", "asJQuery", "new", "=", "ifNil:", "brush:", "yourself"]}),
-smalltalk.Trapped);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "byName:",
-fn: function (aString){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self["@registry"])._at_(aString);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"byName:",{aString:aString},smalltalk.Trapped)})},
-messageSends: ["at:"]}),
-smalltalk.Trapped);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "descend:snapshotDo:",
-fn: function (anArray,aBlock){
-var self=this;
-var tpsc;
-function $TrappedPathStack(){return smalltalk.TrappedPathStack||(typeof TrappedPathStack=="undefined"?nil:TrappedPathStack)}
-function $TrappedSnapshot(){return smalltalk.TrappedSnapshot||(typeof TrappedSnapshot=="undefined"?nil:TrappedSnapshot)}
-return smalltalk.withContext(function($ctx1) { 
-tpsc=_st($TrappedPathStack())._current();
-_st(tpsc)._append_do_(anArray,(function(){
-var path,model;
-return smalltalk.withContext(function($ctx2) {
-path=_st(_st(tpsc)._elements())._copy();
-path;
-model=self._byName_(_st(path)._first());
-model;
-return _st(aBlock)._value_(_st(_st($TrappedSnapshot())._new())._path_model_(path,model));
-}, function($ctx2) {$ctx2.fillBlock({path:path,model:model},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"descend:snapshotDo:",{anArray:anArray,aBlock:aBlock,tpsc:tpsc},smalltalk.Trapped)})},
-messageSends: ["current", "append:do:", "copy", "elements", "byName:", "first", "value:", "path:model:", "new"]}),
-smalltalk.Trapped);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "initialize",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.Trapped.superclass.fn.prototype._initialize.apply(_st(self), []);
-self["@registry"]=smalltalk.HashedCollection._from_([]);
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Trapped)})},
-messageSends: ["initialize"]}),
-smalltalk.Trapped);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "register:",
-fn: function (aListKeyedEntity){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._register_name_(aListKeyedEntity,_st(_st(aListKeyedEntity)._class())._name());
-return self}, function($ctx1) {$ctx1.fill(self,"register:",{aListKeyedEntity:aListKeyedEntity},smalltalk.Trapped)})},
-messageSends: ["register:name:", "name", "class"]}),
-smalltalk.Trapped);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "register:name:",
-fn: function (aListKeyedEntity,aString){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self["@registry"])._at_put_(aString,aListKeyedEntity);
-return self}, function($ctx1) {$ctx1.fill(self,"register:name:",{aListKeyedEntity:aListKeyedEntity,aString:aString},smalltalk.Trapped)})},
-messageSends: ["at:put:"]}),
-smalltalk.Trapped);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "start:",
-fn: function (args){
-var self=this;
-function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
-function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(args)._do_((function(each){
-return smalltalk.withContext(function($ctx2) {
-return self._register_(each);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-_st("[data-trap]"._asJQuery())._each_((function(index,elem){
-var trap,jq,viewName,modelName,tokens,path;
-return smalltalk.withContext(function($ctx2) {
-jq=_st(elem)._asJQuery();
-jq;
-trap=_st(jq)._attr_("data-trap");
-trap;
-tokens=_st(trap)._tokenize_(":");
-tokens;
-$1=_st(_st(tokens)._size()).__eq((1));
-if(smalltalk.assert($1)){
-tokens=_st(["TrappedDumbView"]).__comma(tokens);
-tokens;
-};
-viewName=_st(tokens)._first();
-viewName;
-tokens=_st(_st(_st(tokens)._second())._tokenize_(" "))._select_((function(each){
-return smalltalk.withContext(function($ctx3) {
-return _st(each)._notEmpty();
-}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2)})}));
-tokens;
-modelName=_st(tokens)._first();
-modelName;
-path=_st($Trapped())._parse_(_st(tokens)._allButFirst());
-path;
-return _st(_st([modelName]).__comma(path))._trapDescend_((function(){
-return smalltalk.withContext(function($ctx3) {
-return _st(_st(_st(_st($Smalltalk())._current())._at_(viewName))._new())._appendToJQuery_(jq);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
-}, function($ctx2) {$ctx2.fillBlock({index:index,elem:elem,trap:trap,jq:jq,viewName:viewName,modelName:modelName,tokens:tokens,path:path},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"start:",{args:args},smalltalk.Trapped)})},
-messageSends: ["do:", "register:", "each:", "asJQuery", "attr:", "tokenize:", "ifTrue:", ",", "=", "size", "first", "select:", "notEmpty", "second", "parse:", "allButFirst", "trapDescend:", "appendToJQuery:", "new", "at:", "current"]}),
-smalltalk.Trapped);
-
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "envelope:loop:before:tag:do:",
-fn: function (envelope,model,endjq,aSymbol,aBlock){
-var self=this;
-var envjq;
-return smalltalk.withContext(function($ctx1) { 
-envjq=_st(envelope)._asJQuery();
-_st(model)._withIndexDo_((function(item,i){
-return smalltalk.withContext(function($ctx2) {
-_st(envelope)._with_((function(html){
-return smalltalk.withContext(function($ctx3) {
-return _st(_st(html)._perform_(aSymbol))._trap_read_([i],aBlock);
-}, function($ctx3) {$ctx3.fillBlock({html:html},$ctx2)})}));
-return _st(_st(_st(envjq)._children())._detach())._insertBefore_(endjq);
-}, function($ctx2) {$ctx2.fillBlock({item:item,i:i},$ctx1)})}));
-_st(envjq)._remove();
-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)})},
-messageSends: ["asJQuery", "withIndexDo:", "with:", "trap:read:", "perform:", "insertBefore:", "detach", "children", "remove"]}),
-smalltalk.Trapped.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "loop:between:and:tag:do:",
-fn: function (model,start,end,aSymbol,aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(_st(_st(start)._asJQuery())._nextUntil_(_st(end)._element()))._remove();
-_st(start)._with_((function(html){
-return smalltalk.withContext(function($ctx2) {
-$1=model;
-if(($receiver = $1) == nil || $receiver == undefined){
-return $1;
-} else {
-return self._envelope_loop_before_tag_do_(_st(html)._div(),model,_st(end)._asJQuery(),aSymbol,aBlock);
-};
-}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
-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)})},
-messageSends: ["remove", "nextUntil:", "element", "asJQuery", "with:", "ifNotNil:", "envelope:loop:before:tag:do:", "div"]}),
-smalltalk.Trapped.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "parse:",
-fn: function (anArray){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-$1=_st(anArray)._collect_((function(each){
-var asNum;
-return smalltalk.withContext(function($ctx2) {
-asNum=_st(each)._asNumber();
-asNum;
-$2=_st(asNum).__eq(asNum);
-if(smalltalk.assert($2)){
-return asNum;
-} else {
-$3=_st(_st(each)._first()).__eq("#");
-if(smalltalk.assert($3)){
-return [_st(each)._allButFirst()];
-} else {
-return each;
-};
-};
-}, function($ctx2) {$ctx2.fillBlock({each:each,asNum:asNum},$ctx1)})}));
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"parse:",{anArray:anArray},smalltalk.Trapped.klass)})},
-messageSends: ["collect:", "asNumber", "ifTrue:ifFalse:", "allButFirst", "=", "first"]}),
-smalltalk.Trapped.klass);
-
-
-smalltalk.addClass('TrappedPathStack', smalltalk.TrappedSingleton, ['elements'], 'Trapped-Frontend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "append:do:",
-fn: function (anArray,aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._with_do_(_st(self["@elements"]).__comma(anArray),aBlock);
-return self}, function($ctx1) {$ctx1.fill(self,"append:do:",{anArray:anArray,aBlock:aBlock},smalltalk.TrappedPathStack)})},
-messageSends: ["with:do:", ","]}),
-smalltalk.TrappedPathStack);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "elements",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@elements"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.TrappedPathStack)})},
-messageSends: []}),
-smalltalk.TrappedPathStack);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "initialize",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.TrappedPathStack.superclass.fn.prototype._initialize.apply(_st(self), []);
-self["@elements"]=[];
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TrappedPathStack)})},
-messageSends: ["initialize"]}),
-smalltalk.TrappedPathStack);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "with:do:",
-fn: function (anArray,aBlock){
-var self=this;
-var old;
-return smalltalk.withContext(function($ctx1) { 
-old=self["@elements"];
-_st((function(){
-return smalltalk.withContext(function($ctx2) {
-self["@elements"]=anArray;
-self["@elements"];
-return _st(aBlock)._value();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
-return smalltalk.withContext(function($ctx2) {
-self["@elements"]=old;
-return self["@elements"];
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"with:do:",{anArray:anArray,aBlock:aBlock,old:old},smalltalk.TrappedPathStack)})},
-messageSends: ["ensure:", "value"]}),
-smalltalk.TrappedPathStack);
-
-
-
-smalltalk.addClass('TrappedSnapshot', smalltalk.Object, ['path', 'model'], 'Trapped-Frontend');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "do:",
-fn: function (aBlock){
-var self=this;
-function $TrappedPathStack(){return smalltalk.TrappedPathStack||(typeof TrappedPathStack=="undefined"?nil:TrappedPathStack)}
-return smalltalk.withContext(function($ctx1) { 
-_st(_st($TrappedPathStack())._current())._with_do_(self["@path"],(function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(aBlock)._value_(self["@model"]);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.TrappedSnapshot)})},
-messageSends: ["with:do:", "value:", "current"]}),
-smalltalk.TrappedSnapshot);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "model",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@model"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.TrappedSnapshot)})},
-messageSends: []}),
-smalltalk.TrappedSnapshot);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "modify:",
-fn: function (aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self._model())._modify_do_(_st(self._path())._allButFirst(),aBlock);
-return self}, function($ctx1) {$ctx1.fill(self,"modify:",{aBlock:aBlock},smalltalk.TrappedSnapshot)})},
-messageSends: ["modify:do:", "allButFirst", "path", "model"]}),
-smalltalk.TrappedSnapshot);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "path",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self["@path"];
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"path",{},smalltalk.TrappedSnapshot)})},
-messageSends: []}),
-smalltalk.TrappedSnapshot);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "path:model:",
-fn: function (anArray,aTrappedMW){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self["@path"]=anArray;
-self["@model"]=aTrappedMW;
-return self}, function($ctx1) {$ctx1.fill(self,"path:model:",{anArray:anArray,aTrappedMW:aTrappedMW},smalltalk.TrappedSnapshot)})},
-messageSends: []}),
-smalltalk.TrappedSnapshot);
-
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "trapDescend:",
-fn: function (aBlock){
-var self=this;
-function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
-return smalltalk.withContext(function($ctx1) { 
-_st(_st($Trapped())._current())._descend_snapshotDo_(self,aBlock);
-return self}, function($ctx1) {$ctx1.fill(self,"trapDescend:",{aBlock:aBlock},smalltalk.Array)})},
-messageSends: ["descend:snapshotDo:", "current"]}),
-smalltalk.Array);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "trapIter:tag:do:",
-fn: function (path,aSymbol,aBlock){
-var self=this;
-var start,end;
-function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
-return smalltalk.withContext(function($ctx1) { 
-self._with_((function(html){
-return smalltalk.withContext(function($ctx2) {
-start=_st(html)._script();
-start;
-end=_st(html)._script();
-return end;
-}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
-_st(start)._trap_read_(path,(function(model){
-return smalltalk.withContext(function($ctx2) {
-return _st($Trapped())._loop_between_and_tag_do_(model,start,end,aSymbol,aBlock);
-}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"trapIter:tag:do:",{path:path,aSymbol:aSymbol,aBlock:aBlock,start:start,end:end},smalltalk.HTMLCanvas)})},
-messageSends: ["with:", "script", "trap:read:", "loop:between:and:tag:do:"]}),
-smalltalk.HTMLCanvas);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "trap:",
-fn: function (path){
-var self=this;
-function $Trapped(){return smalltalk.Trapped||(typeof Trapped=="undefined"?nil:Trapped)}
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(_st($Trapped())._current())._binder_(self))._installFor_(path);
-return self}, function($ctx1) {$ctx1.fill(self,"trap:",{path:path},smalltalk.TagBrush)})},
-messageSends: ["installFor:", "binder:", "current"]}),
-smalltalk.TagBrush);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "trap:read:",
-fn: function (path,aBlock){
-var self=this;
-function $KeyedPubSubUnsubscribe(){return smalltalk.KeyedPubSubUnsubscribe||(typeof KeyedPubSubUnsubscribe=="undefined"?nil:KeyedPubSubUnsubscribe)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(path)._trapDescend_((function(snap){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(snap)._model())._watch_do_(_st(_st(snap)._path())._allButFirst(),(function(data){
-return smalltalk.withContext(function($ctx3) {
-$1=_st(_st(_st(self._asJQuery())._closest_("html"))._toArray())._isEmpty();
-if(smalltalk.assert($1)){
-_st($KeyedPubSubUnsubscribe())._signal();
-};
-return _st(snap)._do_((function(){
-return smalltalk.withContext(function($ctx4) {
-return self._with_((function(html){
-return smalltalk.withContext(function($ctx5) {
-return _st(aBlock)._value_value_(data,html);
-}, function($ctx5) {$ctx5.fillBlock({html:html},$ctx4)})}));
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3)})}));
-}, function($ctx3) {$ctx3.fillBlock({data:data},$ctx2)})}));
-}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"trap:read:",{path:path,aBlock:aBlock},smalltalk.TagBrush)})},
-messageSends: ["trapDescend:", "watch:do:", "allButFirst", "path", "ifTrue:", "signal", "isEmpty", "toArray", "closest:", "asJQuery", "do:", "with:", "value:value:", "model"]}),
-smalltalk.TagBrush);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "trap:toggle:",
-fn: function (path,aBlock){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._trap_toggle_ifNotPresent_(path,aBlock,(function(){
-return smalltalk.withContext(function($ctx2) {
-return _st(self._asJQuery())._hide();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"trap:toggle:",{path:path,aBlock:aBlock},smalltalk.TagBrush)})},
-messageSends: ["trap:toggle:ifNotPresent:", "hide", "asJQuery"]}),
-smalltalk.TagBrush);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "trap:toggle:ifNotPresent:",
-fn: function (path,aBlock,anotherBlock){
-var self=this;
-var shown;
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$4;
-shown=nil;
-self._trap_read_(path,(function(data,html){
-return smalltalk.withContext(function($ctx2) {
-$1=_st(shown).__eq(_st(data)._notNil());
-if(! smalltalk.assert($1)){
-shown=_st(data)._notNil();
-shown;
-$2=self._asJQuery();
-_st($2)._empty();
-$3=_st($2)._show();
-$3;
-$5=shown;
-if(smalltalk.assert($5)){
-$4=aBlock;
-} else {
-$4=anotherBlock;
-};
-return _st($4)._value_value_(data,html);
-};
-}, function($ctx2) {$ctx2.fillBlock({data:data,html:html},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"trap:toggle:ifNotPresent:",{path:path,aBlock:aBlock,anotherBlock:anotherBlock,shown:shown},smalltalk.TagBrush)})},
-messageSends: ["trap:read:", "ifFalse:", "notNil", "empty", "asJQuery", "show", "value:value:", "ifTrue:ifFalse:", "="]}),
-smalltalk.TagBrush);
-
-});

+ 0 - 348
lib/js/Trapped-Tests.deploy.js

@@ -1,348 +0,0 @@
-define("gh_herby_trapped/Trapped-Tests", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/SUnit"], function(smalltalk,nil,_st){
-smalltalk.addPackage('Trapped-Tests');
-smalltalk.packages["Trapped-Tests"].transport = {"type":"amd","amdNamespace":"gh_herby_trapped"};
-
-smalltalk.addClass('IsolatorTest', smalltalk.TestCase, ['rootModel'], 'Trapped-Tests');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "setUp",
-fn: function (){
-var self=this;
-function $EavModel(){return smalltalk.EavModel||(typeof EavModel=="undefined"?nil:EavModel)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st($EavModel())._new();
-_st($1)._getBlock_((function(x){
-return smalltalk.withContext(function($ctx2) {
-return _st(x)._root();
-}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
-$2=_st($1)._putBlock_((function(x,y){
-return smalltalk.withContext(function($ctx2) {
-return _st(x)._root_(y);
-}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
-self["@rootModel"]=$2;
-return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.IsolatorTest)})},
-messageSends: ["getBlock:", "root", "new", "putBlock:", "root:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testNontrivialModelGetsAppropriateValueForModification",
-fn: function (){
-var self=this;
-var isolator,model,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-function $EavModel(){return smalltalk.EavModel||(typeof EavModel=="undefined"?nil:EavModel)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-result=nil;
-isolator=_st($Isolator())._on_(smalltalk.HashedCollection._from_(["foo".__minus_gt(["bar", [(1), [(2), (5)]], "baz"]),"moo".__minus_gt("zoo")]));
-$1=_st($EavModel())._new();
-_st($1)._getBlock_((function(x){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
-}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
-$2=_st($1)._putBlock_((function(x,y){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(x)._root())._at_("foo"))._at_put_((2),y);
-}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
-model=$2;
-_st(isolator)._model_modify_(model,(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_([(1), [(2), (5)]],result);
-return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelGetsAppropriateValueForModification",{isolator:isolator,model:model,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "->", "getBlock:", "at:", "root", "new", "putBlock:", "at:put:", "model:modify:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testNontrivialModelModifiesAppropriateValue",
-fn: function (){
-var self=this;
-var isolator,model,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-function $EavModel(){return smalltalk.EavModel||(typeof EavModel=="undefined"?nil:EavModel)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-result=nil;
-isolator=_st($Isolator())._on_(smalltalk.HashedCollection._from_(["foo".__minus_gt(["bar", [(1), [(2), (3)]], "baz"]),"moo".__minus_gt("zoo")]));
-$1=_st($EavModel())._new();
-_st($1)._getBlock_((function(x){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
-}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
-$2=_st($1)._putBlock_((function(x,y){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(x)._root())._at_("foo"))._at_put_((2),y);
-}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
-model=$2;
-_st(isolator)._model_modify_(model,(function(r){
-return smalltalk.withContext(function($ctx2) {
-return "new";
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(isolator)._model_read_(model,(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_("new",result);
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_(smalltalk.HashedCollection._from_(["foo".__minus_gt(["bar", "new", "baz"]),"moo".__minus_gt("zoo")]),result);
-return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelModifiesAppropriateValue",{isolator:isolator,model:model,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "->", "getBlock:", "at:", "root", "new", "putBlock:", "at:put:", "model:modify:", "model:read:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testNontrivialModelReturnsAppropriateValue",
-fn: function (){
-var self=this;
-var isolator,model,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-function $EavModel(){return smalltalk.EavModel||(typeof EavModel=="undefined"?nil:EavModel)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_(smalltalk.HashedCollection._from_(["foo".__minus_gt(["bar", [(1), [(2), (3)]], "baz"]),"moo".__minus_gt("zoo")]));
-model=_st(_st($EavModel())._new())._getBlock_((function(x){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
-}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
-_st(isolator)._model_read_(model,(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_([(1), [(2), (3)]],result);
-return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelReturnsAppropriateValue",{isolator:isolator,model:model,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "->", "getBlock:", "at:", "root", "new", "model:read:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelExaminesThenModifiesRoot",
-fn: function (){
-var self=this;
-var isolator,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_([(1), [(2), (3)]]);
-_st(isolator)._model_modify_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-return _st(r)._second();
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_([(2), (3)],result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelExaminesThenModifiesRoot",{isolator:isolator,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "model:modify:", "second", "model:read:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelGetsRootForModification",
-fn: function (){
-var self=this;
-var isolator,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_([(2), [(1), (0)]]);
-_st(isolator)._model_modify_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_([(2), [(1), (0)]],result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelGetsRootForModification",{isolator:isolator,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "model:modify:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelModifiesAndDeeplyIsolatesInPlaceModifiedRoot",
-fn: function (){
-var self=this;
-var isolator,result,newValue;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-newValue=nil;
-isolator=_st($Isolator())._on_([(1), [(2), (3)]]);
-_st(isolator)._model_modify_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-newValue=r;
-newValue;
-_st(r)._at_put_((1),(4));
-return r;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(newValue)._at_put_((2),"bar");
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(newValue)._at_put_((2),"baz");
-self._assert_equals_([(4), [(2), (3)]],result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndDeeplyIsolatesInPlaceModifiedRoot",{isolator:isolator,result:result,newValue:newValue},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "model:modify:", "at:put:", "model:read:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelModifiesAndDeeplyIsolatesRoot",
-fn: function (){
-var self=this;
-var isolator,result,newValue;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_([(1), [(2), (3)]]);
-newValue=smalltalk.HashedCollection._from_(["foo".__minus_gt([(4), (5), (6)])]);
-_st(isolator)._model_modify_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-return newValue;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(_st(newValue)._at_("foo"))._at_put_((1),"bar");
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(_st(newValue)._at_("foo"))._at_put_((3),"baz");
-self._assert_equals_(smalltalk.HashedCollection._from_(["foo".__minus_gt([(4), (5), (6)])]),result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndDeeplyIsolatesRoot",{isolator:isolator,result:result,newValue:newValue},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "->", "model:modify:", "at:put:", "at:", "model:read:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelModifiesAndIsolatesRoot",
-fn: function (){
-var self=this;
-var isolator,result,newValue;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_([(1), [(2), (3)]]);
-newValue=smalltalk.HashedCollection._from_(["foo".__minus_gt([(4), (5), (6)])]);
-_st(isolator)._model_modify_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-return newValue;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(newValue)._at_put_("foo","bar");
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(newValue)._at_put_("foo","baz");
-self._assert_equals_(smalltalk.HashedCollection._from_(["foo".__minus_gt([(4), (5), (6)])]),result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndIsolatesRoot",{isolator:isolator,result:result,newValue:newValue},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "->", "model:modify:", "at:put:", "model:read:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelModifiesRoot",
-fn: function (){
-var self=this;
-var isolator,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_([(1), [(2), (3)]]);
-_st(isolator)._model_modify_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-return smalltalk.HashedCollection._from_(["foo".__minus_gt([(4), (5), (6)])]);
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_(smalltalk.HashedCollection._from_(["foo".__minus_gt([(4), (5), (6)])]),result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesRoot",{isolator:isolator,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "model:modify:", "->", "model:read:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelReturnsDeeplyIsolatedRoot",
-fn: function (){
-var self=this;
-var isolator,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_([(1), [(2), (3)]]);
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-return _st(_st(r)._at_((2)))._at_put_((1),(0));
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_([(1), [(2), (3)]],result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsDeeplyIsolatedRoot",{isolator:isolator,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "model:read:", "at:put:", "at:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelReturnsIsolatedRoot",
-fn: function (){
-var self=this;
-var isolator,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_([(1), [(2), (4)]]);
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-return _st(r)._at_put_((2),nil);
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_([(1), [(2), (4)]],result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsIsolatedRoot",{isolator:isolator,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "model:read:", "at:put:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "testRootModelReturnsRoot",
-fn: function (){
-var self=this;
-var isolator,result;
-function $Isolator(){return smalltalk.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
-return smalltalk.withContext(function($ctx1) { 
-result=nil;
-isolator=_st($Isolator())._on_([(1), [(2), (3)]]);
-_st(isolator)._model_read_(self["@rootModel"],(function(r){
-return smalltalk.withContext(function($ctx2) {
-result=r;
-return result;
-}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
-self._assert_equals_([(1), [(2), (3)]],result);
-return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsRoot",{isolator:isolator,result:result},smalltalk.IsolatorTest)})},
-messageSends: ["on:", "model:read:", "assert:equals:"]}),
-smalltalk.IsolatorTest);
-
-
-});

+ 1 - 1
vendor/amber

@@ -1 +1 @@
-Subproject commit 16438c7892cfae994ff3b9e81b6dc2797e23f559
+Subproject commit ba4467b42f78bfbb0ebb61ad3dc9b54d4ef774cf