|
@@ -1,29 +1,32 @@
|
|
-define("trapped/Trapped-Backend", ["amber/boot"
|
|
|
|
|
|
+define(["amber/boot"
|
|
//>>excludeStart("imports", pragmas.excludeImports);
|
|
//>>excludeStart("imports", pragmas.excludeImports);
|
|
, "lyst/Lyst"
|
|
, "lyst/Lyst"
|
|
//>>excludeEnd("imports");
|
|
//>>excludeEnd("imports");
|
|
-, "amber_core/Kernel-Objects", "axon/Axon", "amber_core/Kernel-Collections"], function($boot
|
|
|
|
|
|
+, "amber_core/Kernel-Collections", "amber_core/Kernel-Objects", "axon/Axon"], function($boot
|
|
//>>excludeStart("imports", pragmas.excludeImports);
|
|
//>>excludeStart("imports", pragmas.excludeImports);
|
|
|
|
|
|
//>>excludeEnd("imports");
|
|
//>>excludeEnd("imports");
|
|
){"use strict";
|
|
){"use strict";
|
|
-var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
|
|
-$core.addPackage('Trapped-Backend');
|
|
|
|
|
|
+if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
|
|
|
|
+if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
|
|
|
|
+var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
|
|
+if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
|
|
|
|
+$core.addPackage("Trapped-Backend");
|
|
$core.packages["Trapped-Backend"].innerEval = function (expr) { return eval(expr); };
|
|
$core.packages["Trapped-Backend"].innerEval = function (expr) { return eval(expr); };
|
|
$core.packages["Trapped-Backend"].imports = ["lyst/Lyst"];
|
|
$core.packages["Trapped-Backend"].imports = ["lyst/Lyst"];
|
|
$core.packages["Trapped-Backend"].transport = {"type":"amd","amdNamespace":"trapped"};
|
|
$core.packages["Trapped-Backend"].transport = {"type":"amd","amdNamespace":"trapped"};
|
|
|
|
|
|
-$core.addClass('EavModel', $globals.Object, ['getBlock', 'putBlock'], 'Trapped-Backend');
|
|
|
|
|
|
+$core.addClass("EavModel", $globals.Object, ["getBlock", "putBlock"], "Trapped-Backend");
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
$globals.EavModel.comment="External actor value model.";
|
|
$globals.EavModel.comment="External actor value model.";
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "getBlock:",
|
|
selector: "getBlock:",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
-var self=this;
|
|
|
|
-self["@getBlock"]=aBlock;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+$self["@getBlock"]=aBlock;
|
|
return self;
|
|
return self;
|
|
|
|
|
|
},
|
|
},
|
|
@@ -39,25 +42,25 @@ $globals.EavModel);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "initialize",
|
|
selector: "initialize",
|
|
-protocol: 'initialization',
|
|
|
|
|
|
+protocol: "initialization",
|
|
fn: function (){
|
|
fn: function (){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
(
|
|
(
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-$ctx1.supercall = true,
|
|
|
|
|
|
+$ctx1.supercall = true,
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$globals.EavModel.superclass.fn.prototype._initialize.apply($recv(self), []));
|
|
|
|
|
|
+($globals.EavModel.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.supercall = false;
|
|
$ctx1.supercall = false;
|
|
//>>excludeEnd("ctx");;
|
|
//>>excludeEnd("ctx");;
|
|
-self["@getBlock"]=(function(){
|
|
|
|
|
|
+$self["@getBlock"]=(function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return self._error_("No getter block.");
|
|
|
|
|
|
+return $self._error_("No getter block.");
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx2.sendIdx["error:"]=1;
|
|
$ctx2.sendIdx["error:"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -65,11 +68,11 @@ $ctx2.sendIdx["error:"]=1;
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
});
|
|
});
|
|
-self["@putBlock"]=(function(){
|
|
|
|
|
|
+$self["@putBlock"]=(function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return self._error_("No putter block.");
|
|
|
|
|
|
+return $self._error_("No putter block.");
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -91,15 +94,13 @@ $globals.EavModel);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "on:",
|
|
selector: "on:",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1;
|
|
|
|
-$1=$recv(self["@getBlock"])._value_(anObject);
|
|
|
|
-return $1;
|
|
|
|
|
|
+return $recv($self["@getBlock"])._value_(anObject);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.EavModel)});
|
|
}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.EavModel)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -116,15 +117,13 @@ $globals.EavModel);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "on:put:",
|
|
selector: "on:put:",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (anObject,anObject2){
|
|
fn: function (anObject,anObject2){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1;
|
|
|
|
-$1=$recv(self["@putBlock"])._value_value_(anObject,anObject2);
|
|
|
|
-return $1;
|
|
|
|
|
|
+return $recv($self["@putBlock"])._value_value_(anObject,anObject2);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"on:put:",{anObject:anObject,anObject2:anObject2},$globals.EavModel)});
|
|
}, function($ctx1) {$ctx1.fill(self,"on:put:",{anObject:anObject,anObject2:anObject2},$globals.EavModel)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -141,10 +140,10 @@ $globals.EavModel);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "putBlock:",
|
|
selector: "putBlock:",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
-var self=this;
|
|
|
|
-self["@putBlock"]=aBlock;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+$self["@putBlock"]=aBlock;
|
|
return self;
|
|
return self;
|
|
|
|
|
|
},
|
|
},
|
|
@@ -159,36 +158,35 @@ $globals.EavModel);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass('InterestedInTrapPath', $globals.AxonInterest, [], 'Trapped-Backend');
|
|
|
|
|
|
+$core.addClass("InterestedInTrapPath", $globals.AxonInterest, [], "Trapped-Backend");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "accepts:",
|
|
selector: "accepts:",
|
|
-protocol: 'testing',
|
|
|
|
|
|
+protocol: "testing",
|
|
fn: function (anAspect){
|
|
fn: function (anAspect){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $3,$4,$2,$1;
|
|
|
|
-$3=$recv(anAspect)._size();
|
|
|
|
|
|
+var $2,$3,$1;
|
|
|
|
+$2=$recv(anAspect)._size();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.sendIdx["size"]=1;
|
|
$ctx1.sendIdx["size"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$4=$recv(self["@aspect"])._size();
|
|
|
|
|
|
+$3=$recv($self["@aspect"])._size();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.sendIdx["size"]=2;
|
|
$ctx1.sendIdx["size"]=2;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$2=$recv($3).__lt_eq($4);
|
|
|
|
-$1=$recv($2)._and_((function(){
|
|
|
|
|
|
+$1=$recv($2).__lt_eq($3);
|
|
|
|
+return $recv($1)._and_((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $recv(anAspect).__eq($recv(self["@aspect"])._copyFrom_to_((1),$recv(anAspect)._size()));
|
|
|
|
|
|
+return $recv(anAspect).__eq($recv($self["@aspect"])._copyFrom_to_((1),$recv(anAspect)._size()));
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
-return $1;
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.InterestedInTrapPath)});
|
|
}, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.InterestedInTrapPath)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -204,44 +202,43 @@ $globals.InterestedInTrapPath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass('InterestedInTrapPathSubtree', $globals.AxonInterest, [], 'Trapped-Backend');
|
|
|
|
|
|
+$core.addClass("InterestedInTrapPathSubtree", $globals.AxonInterest, [], "Trapped-Backend");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "accepts:",
|
|
selector: "accepts:",
|
|
-protocol: 'testing',
|
|
|
|
|
|
+protocol: "testing",
|
|
fn: function (anAspect){
|
|
fn: function (anAspect){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $3,$4,$2,$6,$7,$5,$1;
|
|
|
|
-$3=$recv(anAspect)._size();
|
|
|
|
|
|
+var $2,$3,$1,$5,$6,$4;
|
|
|
|
+$2=$recv(anAspect)._size();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.sendIdx["size"]=1;
|
|
$ctx1.sendIdx["size"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$4=$recv(self["@aspect"])._size();
|
|
|
|
|
|
+$3=$recv($self["@aspect"])._size();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.sendIdx["size"]=2;
|
|
$ctx1.sendIdx["size"]=2;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$2=$recv($3).__lt_eq($4);
|
|
|
|
-if($core.assert($2)){
|
|
|
|
-$6=self["@aspect"];
|
|
|
|
-$7=$recv(anAspect)._size();
|
|
|
|
|
|
+$1=$recv($2).__lt_eq($3);
|
|
|
|
+if($core.assert($1)){
|
|
|
|
+$5=$self["@aspect"];
|
|
|
|
+$6=$recv(anAspect)._size();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.sendIdx["size"]=3;
|
|
$ctx1.sendIdx["size"]=3;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$5=$recv($6)._copyFrom_to_((1),$7);
|
|
|
|
|
|
+$4=$recv($5)._copyFrom_to_((1),$6);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.sendIdx["copyFrom:to:"]=1;
|
|
$ctx1.sendIdx["copyFrom:to:"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$1=$recv(anAspect).__eq($5);
|
|
|
|
|
|
+return $recv(anAspect).__eq($4);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.sendIdx["="]=1;
|
|
$ctx1.sendIdx["="]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
} else {
|
|
} else {
|
|
-$1=$recv(self["@aspect"]).__eq($recv(anAspect)._copyFrom_to_((1),$recv(self["@aspect"])._size()));
|
|
|
|
-};
|
|
|
|
-return $1;
|
|
|
|
|
|
+return $recv($self["@aspect"]).__eq($recv(anAspect)._copyFrom_to_((1),$recv($self["@aspect"])._size()));
|
|
|
|
+}
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.InterestedInTrapPathSubtree)});
|
|
}, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.InterestedInTrapPathSubtree)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -257,13 +254,13 @@ $globals.InterestedInTrapPathSubtree);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass('Isolator', $globals.Object, ['root'], 'Trapped-Backend');
|
|
|
|
|
|
+$core.addClass("Isolator", $globals.Object, ["root"], "Trapped-Backend");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "model:modify:",
|
|
selector: "model:modify:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (anEavModel,aBlock){
|
|
fn: function (anEavModel,aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
var newValue;
|
|
var newValue;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
@@ -287,9 +284,9 @@ $globals.Isolator);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "model:read:",
|
|
selector: "model:read:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (anEavModel,aBlock){
|
|
fn: function (anEavModel,aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -311,12 +308,10 @@ $globals.Isolator);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "root",
|
|
selector: "root",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
-var self=this;
|
|
|
|
-var $1;
|
|
|
|
-$1=self["@root"];
|
|
|
|
-return $1;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+return $self["@root"];
|
|
|
|
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -331,10 +326,10 @@ $globals.Isolator);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "root:",
|
|
selector: "root:",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
-var self=this;
|
|
|
|
-self["@root"]=anObject;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+$self["@root"]=anObject;
|
|
return self;
|
|
return self;
|
|
|
|
|
|
},
|
|
},
|
|
@@ -351,17 +346,15 @@ $globals.Isolator);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "on:",
|
|
selector: "on:",
|
|
-protocol: 'instance creation',
|
|
|
|
|
|
+protocol: "instance creation",
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1;
|
|
|
|
-$1=$recv(self._new())._root_(anObject);
|
|
|
|
-return $1;
|
|
|
|
|
|
+return $recv($self._new())._root_(anObject);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.Isolator.klass)});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.Isolator.a$cls)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -371,22 +364,20 @@ referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
messageSends: ["root:", "new"]
|
|
messageSends: ["root:", "new"]
|
|
}),
|
|
}),
|
|
-$globals.Isolator.klass);
|
|
|
|
|
|
+$globals.Isolator.a$cls);
|
|
|
|
|
|
|
|
|
|
-$core.addClass('TrappedPosition', $globals.Object, ['path', 'model'], 'Trapped-Backend');
|
|
|
|
|
|
+$core.addClass("TrappedPosition", $globals.Object, ["path", "model"], "Trapped-Backend");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "interestOn:block:",
|
|
selector: "interestOn:block:",
|
|
-protocol: 'private',
|
|
|
|
|
|
+protocol: "private",
|
|
fn: function (anAspect,aBlock){
|
|
fn: function (anAspect,aBlock){
|
|
-var self=this;
|
|
|
|
-function $InterestedInTrapPathSubtree(){return $globals.InterestedInTrapPathSubtree||(typeof InterestedInTrapPathSubtree=="undefined"?nil:InterestedInTrapPathSubtree)}
|
|
|
|
-function $InterestedInTrapPath(){return $globals.InterestedInTrapPath||(typeof InterestedInTrapPath=="undefined"?nil:InterestedInTrapPath)}
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1,$3,$2,$4;
|
|
|
|
|
|
+var $1,$3,$2;
|
|
$1=$recv($recv(anAspect)._notEmpty())._and_((function(){
|
|
$1=$recv($recv(anAspect)._notEmpty())._and_((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
@@ -397,7 +388,7 @@ return $recv($recv(anAspect)._last())._isNil();
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
if($core.assert($1)){
|
|
if($core.assert($1)){
|
|
-$3=$recv($InterestedInTrapPathSubtree())._new();
|
|
|
|
|
|
+$3=$recv($globals.InterestedInTrapPathSubtree)._new();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.sendIdx["new"]=1;
|
|
$ctx1.sendIdx["new"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -407,9 +398,8 @@ $ctx1.sendIdx["aspect:block:"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
return $2;
|
|
return $2;
|
|
} else {
|
|
} else {
|
|
-$4=$recv($recv($InterestedInTrapPath())._new())._aspect_block_(anAspect,aBlock);
|
|
|
|
-return $4;
|
|
|
|
-};
|
|
|
|
|
|
+return $recv($recv($globals.InterestedInTrapPath)._new())._aspect_block_(anAspect,aBlock);
|
|
|
|
+}
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"interestOn:block:",{anAspect:anAspect,aBlock:aBlock},$globals.TrappedPosition)});
|
|
}, function($ctx1) {$ctx1.fill(self,"interestOn:block:",{anAspect:anAspect,aBlock:aBlock},$globals.TrappedPosition)});
|
|
@@ -427,12 +417,10 @@ $globals.TrappedPosition);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "model",
|
|
selector: "model",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
-var self=this;
|
|
|
|
-var $1;
|
|
|
|
-$1=self["@model"];
|
|
|
|
-return $1;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+return $self["@model"];
|
|
|
|
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -447,13 +435,13 @@ $globals.TrappedPosition);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "modify:",
|
|
selector: "modify:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$recv(self._model())._modify_do_(self._path(),aBlock);
|
|
|
|
|
|
+$recv($self._model())._modify_do_($self._path(),aBlock);
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"modify:",{aBlock:aBlock},$globals.TrappedPosition)});
|
|
}, function($ctx1) {$ctx1.fill(self,"modify:",{aBlock:aBlock},$globals.TrappedPosition)});
|
|
@@ -471,12 +459,10 @@ $globals.TrappedPosition);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "path",
|
|
selector: "path",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
-var self=this;
|
|
|
|
-var $1;
|
|
|
|
-$1=self["@path"];
|
|
|
|
-return $1;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+return $self["@path"];
|
|
|
|
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -491,11 +477,11 @@ $globals.TrappedPosition);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "path:model:",
|
|
selector: "path:model:",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (anArray,aTrappedMW){
|
|
fn: function (anArray,aTrappedMW){
|
|
-var self=this;
|
|
|
|
-self["@path"]=anArray;
|
|
|
|
-self["@model"]=aTrappedMW;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+$self["@path"]=anArray;
|
|
|
|
+$self["@model"]=aTrappedMW;
|
|
return self;
|
|
return self;
|
|
|
|
|
|
},
|
|
},
|
|
@@ -511,13 +497,13 @@ $globals.TrappedPosition);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "read:",
|
|
selector: "read:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$recv(self._model())._read_do_(self._path(),aBlock);
|
|
|
|
|
|
+$recv($self._model())._read_do_($self._path(),aBlock);
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"read:",{aBlock:aBlock},$globals.TrappedPosition)});
|
|
}, function($ctx1) {$ctx1.fill(self,"read:",{aBlock:aBlock},$globals.TrappedPosition)});
|
|
@@ -535,17 +521,17 @@ $globals.TrappedPosition);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "watch:",
|
|
selector: "watch:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$recv($recv(self._model())._axon())._addInterest_(self._interestOn_block_(self._path(),(function(){
|
|
|
|
|
|
+$recv($recv($self._model())._axon())._addInterest_($self._interestOn_block_($self._path(),(function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return self._read_(aBlock);
|
|
|
|
|
|
+return $self._read_(aBlock);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -566,21 +552,21 @@ $globals.TrappedPosition);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass('Trapper', $globals.AxonizedObject, ['payload'], 'Trapped-Backend');
|
|
|
|
|
|
+$core.addClass("Trapper", $globals.AxonizedObject, ["payload"], "Trapped-Backend");
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
-$globals.Trapper.comment="A portmanteau of 'Trapped wrapper', I am base class for model objects wrapped by Trapped.\x0a\x0aWrapped object is indexed by #('string-at-index' #selector numeric-at-index) array paths. Operations using this indexing are:\x0a\x0a - `read:do` to get the indexed content\x0a - `modify:do:` to get and modify the indexed content, and\x0a - `watch:do:` to subscribe to changes of the indexed content.\x0a\x0aThe wrapped model can be any smalltalk object.\x0a\x0aMy subclasses need to provide implementation for:\x0a\x0a - read:do:\x0a - modify:do:\x0a\x0aand must issue these calls when initializing:\x0a\x0a - axon: (with a subclass of `Axon`)\x0a - model: (with a wrapped object, after `axon:`)";
|
|
|
|
|
|
+$globals.Trapper.comment="A portmanteau of 'Trapped wrapper', I am base class for model objects wrapped by Trapped.\x0a\x0aWrapped object is indexed by #('string-at-index' #selector numeric-at-index) array paths. Operations using this indexing are:\x0a\x0a - `read:do:` to get the indexed content\x0a - `modify:do:` to get and modify the indexed content, and\x0a - (not any more) `watch:do:` to subscribe to changes of the indexed content.\x0a\x0aThe wrapped model can be any smalltalk object.\x0a\x0aMy subclasses need to provide implementation for:\x0a\x0a - read:do:\x0a - modify:do:\x0a\x0aand must issue these calls when initializing:\x0a\x0a - axon: (with a subclass of `Axon`)\x0a - model: (with a wrapped object, after `axon:`)";
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "model:",
|
|
selector: "model:",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-self["@payload"]=anObject;
|
|
|
|
-$recv(self._axon())._changedAll();
|
|
|
|
|
|
+$self["@payload"]=anObject;
|
|
|
|
+$recv($self._axon())._changedAll();
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject},$globals.Trapper)});
|
|
}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject},$globals.Trapper)});
|
|
@@ -598,13 +584,13 @@ $globals.Trapper);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "modify:do:",
|
|
selector: "modify:do:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-self._subclassResponsibility();
|
|
|
|
|
|
+$self._subclassResponsibility();
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock},$globals.Trapper)});
|
|
}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock},$globals.Trapper)});
|
|
@@ -622,13 +608,13 @@ $globals.Trapper);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "read:do:",
|
|
selector: "read:do:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-self._subclassResponsibility();
|
|
|
|
|
|
+$self._subclassResponsibility();
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock},$globals.Trapper)});
|
|
}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock},$globals.Trapper)});
|
|
@@ -645,27 +631,27 @@ $globals.Trapper);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass('DirectTrapper', $globals.Trapper, [], 'Trapped-Backend');
|
|
|
|
|
|
+$core.addClass("DirectTrapper", $globals.Trapper, [], "Trapped-Backend");
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
$globals.DirectTrapper.comment="I am Trapper that directly manipulate\x0athe wrapped model object.";
|
|
$globals.DirectTrapper.comment="I am Trapper that directly manipulate\x0athe wrapped model object.";
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "modify:do:",
|
|
selector: "modify:do:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
var newValue,eavModel;
|
|
var newValue,eavModel;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
eavModel=$recv(path)._asEavModel();
|
|
eavModel=$recv(path)._asEavModel();
|
|
-newValue=$recv(aBlock)._value_($recv(eavModel)._on_(self["@payload"]));
|
|
|
|
|
|
+newValue=$recv(aBlock)._value_($recv(eavModel)._on_($self["@payload"]));
|
|
$recv((function(){
|
|
$recv((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $recv(eavModel)._on_put_(self["@payload"],newValue);
|
|
|
|
|
|
+return $recv(eavModel)._on_put_($self["@payload"],newValue);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -673,7 +659,7 @@ return $recv(eavModel)._on_put_(self["@payload"],newValue);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return self._changed_(path);
|
|
|
|
|
|
+return $self._changed_(path);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -695,15 +681,15 @@ $globals.DirectTrapper);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "read:do:",
|
|
selector: "read:do:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
var eavModel;
|
|
var eavModel;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
eavModel=$recv(path)._asEavModel();
|
|
eavModel=$recv(path)._asEavModel();
|
|
-$recv(aBlock)._value_($recv(eavModel)._on_(self["@payload"]));
|
|
|
|
|
|
+$recv(aBlock)._value_($recv(eavModel)._on_($self["@payload"]));
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel},$globals.DirectTrapper)});
|
|
}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel},$globals.DirectTrapper)});
|
|
@@ -720,25 +706,24 @@ $globals.DirectTrapper);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass('IsolatingTrapper', $globals.Trapper, [], 'Trapped-Backend');
|
|
|
|
|
|
+$core.addClass("IsolatingTrapper", $globals.Trapper, [], "Trapped-Backend");
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
$globals.IsolatingTrapper.comment="I am Trapper that guards access\x0ato the wrapped model object via Isolator.\x0a\x0aIOW, read:do: gets always its own deep copy,\x0amodify:do: is not reentrant\x0aand upon writing the written part is deep-copied as well\x0a(so modifier does not hold the source of truth\x0aand can change it later).\x0a\x0aThis also means, a wrapped object and all its parts\x0amust understand `#deepCopy`.";
|
|
$globals.IsolatingTrapper.comment="I am Trapper that guards access\x0ato the wrapped model object via Isolator.\x0a\x0aIOW, read:do: gets always its own deep copy,\x0amodify:do: is not reentrant\x0aand upon writing the written part is deep-copied as well\x0a(so modifier does not hold the source of truth\x0aand can change it later).\x0a\x0aThis also means, a wrapped object and all its parts\x0amust understand `#deepCopy`.";
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "model:",
|
|
selector: "model:",
|
|
-protocol: 'accessing',
|
|
|
|
|
|
+protocol: "accessing",
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
-var self=this;
|
|
|
|
-function $Isolator(){return $globals.Isolator||(typeof Isolator=="undefined"?nil:Isolator)}
|
|
|
|
|
|
+var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
(
|
|
(
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-$ctx1.supercall = true,
|
|
|
|
|
|
+$ctx1.supercall = true,
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$globals.IsolatingTrapper.superclass.fn.prototype._model_.apply($recv(self), [$recv($Isolator())._on_(anObject)]));
|
|
|
|
|
|
+($globals.IsolatingTrapper.superclass||$boot.nilAsClass).fn.prototype._model_.apply($self, [$recv($globals.Isolator)._on_(anObject)]));
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.supercall = false;
|
|
$ctx1.supercall = false;
|
|
//>>excludeEnd("ctx");;
|
|
//>>excludeEnd("ctx");;
|
|
@@ -759,9 +744,9 @@ $globals.IsolatingTrapper);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "modify:do:",
|
|
selector: "modify:do:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
var eavModel;
|
|
var eavModel;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
@@ -771,7 +756,7 @@ $recv((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $recv(self["@payload"])._model_modify_(eavModel,aBlock);
|
|
|
|
|
|
+return $recv($self["@payload"])._model_modify_(eavModel,aBlock);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -779,7 +764,7 @@ return $recv(self["@payload"])._model_modify_(eavModel,aBlock);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return self._changed_(path);
|
|
|
|
|
|
+return $self._changed_(path);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -801,15 +786,15 @@ $globals.IsolatingTrapper);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "read:do:",
|
|
selector: "read:do:",
|
|
-protocol: 'action',
|
|
|
|
|
|
+protocol: "action",
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
var eavModel;
|
|
var eavModel;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
eavModel=$recv($recv([["root"]]).__comma(path))._asEavModel();
|
|
eavModel=$recv($recv([["root"]]).__comma(path))._asEavModel();
|
|
-$recv(self["@payload"])._model_read_(eavModel,aBlock);
|
|
|
|
|
|
+$recv($self["@payload"])._model_read_(eavModel,aBlock);
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel},$globals.IsolatingTrapper)});
|
|
}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel},$globals.IsolatingTrapper)});
|
|
@@ -828,16 +813,15 @@ $globals.IsolatingTrapper);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "asEavModel",
|
|
selector: "asEavModel",
|
|
-protocol: '*Trapped-Backend',
|
|
|
|
|
|
+protocol: "*Trapped-Backend",
|
|
fn: function (){
|
|
fn: function (){
|
|
-var self=this;
|
|
|
|
|
|
+var self=this,$self=this;
|
|
var model;
|
|
var model;
|
|
-function $EavModel(){return $globals.EavModel||(typeof EavModel=="undefined"?nil:EavModel)}
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1,$2;
|
|
|
|
-model=$recv($EavModel())._new();
|
|
|
|
|
|
+var $1;
|
|
|
|
+model=$recv($globals.EavModel)._new();
|
|
$recv(model)._getBlock_((function(anObject){
|
|
$recv(model)._getBlock_((function(anObject){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
@@ -850,7 +834,7 @@ return nil;
|
|
}, function($ctx2) {$ctx2.fillBlock({anObject:anObject},$ctx1,1)});
|
|
}, function($ctx2) {$ctx2.fillBlock({anObject:anObject},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
-$1=self._isEmpty();
|
|
|
|
|
|
+$1=$self._isEmpty();
|
|
if(!$core.assert($1)){
|
|
if(!$core.assert($1)){
|
|
$recv(model)._putBlock_((function(anObject,value){
|
|
$recv(model)._putBlock_((function(anObject,value){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -864,9 +848,8 @@ return nil;
|
|
}, function($ctx2) {$ctx2.fillBlock({anObject:anObject,value:value},$ctx1,4)});
|
|
}, function($ctx2) {$ctx2.fillBlock({anObject:anObject,value:value},$ctx1,4)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
-};
|
|
|
|
-$2=model;
|
|
|
|
-return $2;
|
|
|
|
|
|
+}
|
|
|
|
+return model;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"asEavModel",{model:model},$globals.SequenceableCollection)});
|
|
}, function($ctx1) {$ctx1.fill(self,"asEavModel",{model:model},$globals.SequenceableCollection)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|