|
@@ -8,7 +8,8 @@ selector: "getBlock:",
|
|
|
category: 'accessing',
|
|
|
fn: function (aBlock){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
self["@getBlock"]=aBlock;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+self["@getBlock"]=aBlock;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"getBlock:",{aBlock:aBlock},smalltalk.EavModel)})},
|
|
|
args: ["aBlock"],
|
|
|
source: "getBlock: aBlock\x0a\x0agetBlock := aBlock",
|
|
@@ -24,12 +25,15 @@ selector: "initialize",
|
|
|
category: 'initialization',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
|
|
|
self["@getBlock"]=(function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
return _st(self)._error_("No getter block.");
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(self)._error_("No getter block.");
|
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
|
|
self["@putBlock"]=(function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
return _st(self)._error_("No putter block.");
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(self)._error_("No putter block.");
|
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.EavModel)})},
|
|
|
args: [],
|
|
@@ -46,7 +50,8 @@ selector: "on:",
|
|
|
category: 'accessing',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+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)})},
|
|
@@ -64,7 +69,8 @@ selector: "on:put:",
|
|
|
category: 'accessing',
|
|
|
fn: function (anObject,anObject2){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+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)})},
|
|
@@ -82,7 +88,8 @@ selector: "putBlock:",
|
|
|
category: 'accessing',
|
|
|
fn: function (aBlock){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
self["@putBlock"]=aBlock;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+self["@putBlock"]=aBlock;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"putBlock:",{aBlock:aBlock},smalltalk.EavModel)})},
|
|
|
args: ["aBlock"],
|
|
|
source: "putBlock: aBlock\x0a\x0aputBlock := aBlock",
|
|
@@ -102,7 +109,8 @@ category: 'action',
|
|
|
fn: function (anEavModel,aBlock){
|
|
|
var self=this;
|
|
|
var newValue;
|
|
|
-return smalltalk.withContext(function($ctx1) {
newValue=_st(aBlock)._value_(_st(anEavModel)._on_(self));
|
|
|
+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)})},
|
|
|
args: ["anEavModel", "aBlock"],
|
|
@@ -119,7 +127,8 @@ selector: "model:read:",
|
|
|
category: 'action',
|
|
|
fn: function (anEavModel,aBlock){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
_st(aBlock)._value_(_st(_st(anEavModel)._on_(self))._deepCopy());
|
|
|
+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)})},
|
|
|
args: ["anEavModel", "aBlock"],
|
|
|
source: "model: anEavModel read: aBlock\x0a\x0aaBlock value: (anEavModel on: self) deepCopy",
|
|
@@ -135,7 +144,8 @@ selector: "root",
|
|
|
category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
$1=self["@root"];
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"root",{},smalltalk.Isolator)})},
|
|
@@ -153,7 +163,8 @@ selector: "root:",
|
|
|
category: 'accessing',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
self["@root"]=anObject;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+self["@root"]=anObject;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"root:",{anObject:anObject},smalltalk.Isolator)})},
|
|
|
args: ["anObject"],
|
|
|
source: "root: anObject\x0a\x0aroot := anObject",
|
|
@@ -170,7 +181,8 @@ selector: "on:",
|
|
|
category: 'instance creation',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
$1=_st(_st(self)._new())._root_(anObject);
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Isolator.klass)})},
|
|
@@ -192,10 +204,12 @@ category: 'action',
|
|
|
fn: function (key){
|
|
|
var self=this;
|
|
|
var needsToRun;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
needsToRun=false;
|
|
|
_st(self)._do_((function(each){
|
|
|
-return smalltalk.withContext(function($ctx2) {
$1=_st(each)._accepts_(key);
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+$1=_st(each)._accepts_(key);
|
|
|
if(smalltalk.assert($1)){
|
|
|
_st(each)._flag();
|
|
|
needsToRun=true;
|
|
@@ -218,11 +232,13 @@ selector: "dirty:",
|
|
|
category: 'action',
|
|
|
fn: function (aBoolean){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
$1=aBoolean;
|
|
|
if(smalltalk.assert($1)){
|
|
|
_st((function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
return _st(self)._run();
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(self)._run();
|
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._fork();
|
|
|
};
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean},smalltalk.KeyedPubSubBase)})},
|
|
@@ -240,7 +256,8 @@ selector: "on:hook:",
|
|
|
category: 'action',
|
|
|
fn: function (key,aBlock){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
_st(self)._add_(_st(_st(self["@factory"])._value_value_(key,aBlock))._flag());
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+_st(self)._add_(_st(_st(self["@factory"])._value_value_(key,aBlock))._flag());
|
|
|
_st(self)._dirty_(true);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"on:hook:",{key:key,aBlock:aBlock},smalltalk.KeyedPubSubBase)})},
|
|
|
args: ["key", "aBlock"],
|
|
@@ -258,10 +275,12 @@ category: 'action',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
var needsClean;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1,$2,$3;
|
|
|
needsClean=false;
|
|
|
_st(self)._do_((function(each){
|
|
|
-return smalltalk.withContext(function($ctx2) {
$1=_st(each)._isFlagged();
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+$1=_st(each)._isFlagged();
|
|
|
if(smalltalk.assert($1)){
|
|
|
_st(each)._run();
|
|
|
$2=_st(each)._isEnabled();
|
|
@@ -290,7 +309,8 @@ selector: "subscriptionFactory:",
|
|
|
category: 'action',
|
|
|
fn: function (aBlock){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
self["@factory"]=aBlock;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+self["@factory"]=aBlock;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"subscriptionFactory:",{aBlock:aBlock},smalltalk.KeyedPubSubBase)})},
|
|
|
args: ["aBlock"],
|
|
|
source: "subscriptionFactory: aBlock\x0a factory := aBlock",
|
|
@@ -309,7 +329,8 @@ selector: "add:",
|
|
|
category: 'accessing',
|
|
|
fn: function (aSubscription){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
_st(self["@queue"])._add_(aSubscription);
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+_st(self["@queue"])._add_(aSubscription);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"add:",{aSubscription:aSubscription},smalltalk.SimpleKeyedPubSub)})},
|
|
|
args: ["aSubscription"],
|
|
|
source: "add: aSubscription\x0a\x09queue add: aSubscription.\x0a",
|
|
@@ -325,8 +346,10 @@ selector: "clean",
|
|
|
category: 'bookkeeping',
|
|
|
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();
|
|
|
+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)})},
|
|
|
args: [],
|
|
@@ -343,7 +366,8 @@ selector: "do:",
|
|
|
category: 'enumeration',
|
|
|
fn: function (aBlock){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
_st(self["@queue"])._do_(aBlock);
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+_st(self["@queue"])._do_(aBlock);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.SimpleKeyedPubSub)})},
|
|
|
args: ["aBlock"],
|
|
|
source: "do: aBlock\x0a\x09queue do: aBlock",
|
|
@@ -359,7 +383,8 @@ selector: "initialize",
|
|
|
category: 'initialization',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
smalltalk.KeyedPubSubBase.fn.prototype._initialize.apply(_st(self), []);
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+smalltalk.KeyedPubSubBase.fn.prototype._initialize.apply(_st(self), []);
|
|
|
self["@queue"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.SimpleKeyedPubSub)})},
|
|
|
args: [],
|
|
@@ -383,7 +408,8 @@ selector: "accepts:",
|
|
|
category: 'testing',
|
|
|
fn: function (aKey){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
_st(self)._subclassResponsibility();
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+_st(self)._subclassResponsibility();
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey},smalltalk.KeyedSubscriptionBase)})},
|
|
|
args: ["aKey"],
|
|
|
source: "accepts: aKey\x0a \x22Should return true if change for aKey is relevant for this subscription\x22\x0a self subclassResponsibility",
|
|
@@ -399,7 +425,8 @@ selector: "flag",
|
|
|
category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
self["@flagged"]=true;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+self["@flagged"]=true;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"flag",{},smalltalk.KeyedSubscriptionBase)})},
|
|
|
args: [],
|
|
|
source: "flag\x0a\x09flagged := true",
|
|
@@ -415,7 +442,8 @@ selector: "initialize",
|
|
|
category: 'initialization',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
|
|
|
self["@key"]=nil;
|
|
|
self["@actionBlock"]=nil;
|
|
|
self["@flagged"]=false;
|
|
@@ -434,7 +462,8 @@ selector: "isEnabled",
|
|
|
category: 'testing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
$1=_st(self["@actionBlock"])._notNil();
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"isEnabled",{},smalltalk.KeyedSubscriptionBase)})},
|
|
@@ -452,7 +481,8 @@ selector: "isFlagged",
|
|
|
category: 'testing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
$1=self["@flagged"];
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"isFlagged",{},smalltalk.KeyedSubscriptionBase)})},
|
|
@@ -470,7 +500,8 @@ selector: "key:block:",
|
|
|
category: 'accessing',
|
|
|
fn: function (anObject,aBlock){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
self["@key"]=anObject;
|
|
|
+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)})},
|
|
|
args: ["anObject", "aBlock"],
|
|
@@ -487,15 +518,20 @@ selector: "run",
|
|
|
category: 'action',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-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();
|
|
|
+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({},$ctx1)})}))._ensure_((function(){
|
|
|
-return smalltalk.withContext(function($ctx3) {
self["@flagged"]=false;
|
|
|
+return smalltalk.withContext(function($ctx3) {
|
|
|
+self["@flagged"]=false;
|
|
|
return self["@flagged"];
|
|
|
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),(function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
self["@actionBlock"]=nil;
|
|
|
+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)})},
|
|
@@ -516,9 +552,11 @@ selector: "accepts:",
|
|
|
category: 'testing',
|
|
|
fn: function (aKey){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+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()));
|
|
|
+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)})},
|
|
@@ -540,7 +578,8 @@ selector: "dispatcher",
|
|
|
category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
$1=self["@dispatcher"];
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"dispatcher",{},smalltalk.ListKeyedEntity)})},
|
|
@@ -558,10 +597,12 @@ selector: "dispatcher:",
|
|
|
category: 'accessing',
|
|
|
fn: function (aDispatcher){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
|
+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((smalltalk.ListKeyedSubscription || ListKeyedSubscription))._new();
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+$2=_st((smalltalk.ListKeyedSubscription || ListKeyedSubscription))._new();
|
|
|
_st($2)._key_block_(key,block);
|
|
|
$3=_st($2)._yourself();
|
|
|
return $3;
|
|
@@ -583,7 +624,8 @@ selector: "model:",
|
|
|
category: 'accessing',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
self["@payload"]=anObject;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+self["@payload"]=anObject;
|
|
|
_st(_st(self)._dispatcher())._changed_([]);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject},smalltalk.ListKeyedEntity)})},
|
|
|
args: ["anObject"],
|
|
@@ -600,8 +642,10 @@ selector: "watch:do:",
|
|
|
category: 'action',
|
|
|
fn: function (path,aBlock){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
_st(_st(self)._dispatcher())._on_hook_(path,(function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
return _st(self)._read_do_(path,aBlock);
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+_st(_st(self)._dispatcher())._on_hook_(path,(function(){
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(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)})},
|
|
|
args: ["path", "aBlock"],
|
|
@@ -623,12 +667,15 @@ category: 'action',
|
|
|
fn: function (path,aBlock){
|
|
|
var self=this;
|
|
|
var newValue,eavModel;
|
|
|
-return smalltalk.withContext(function($ctx1) {
eavModel=_st(path)._asEavModel();
|
|
|
+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);
|
|
|
+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(_st(self)._dispatcher())._changed_(path);
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(_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)})},
|
|
|
args: ["path", "aBlock"],
|
|
@@ -646,7 +693,8 @@ category: 'action',
|
|
|
fn: function (path,aBlock){
|
|
|
var self=this;
|
|
|
var eavModel;
|
|
|
-return smalltalk.withContext(function($ctx1) {
eavModel=_st(path)._asEavModel();
|
|
|
+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)})},
|
|
|
args: ["path", "aBlock"],
|
|
@@ -667,7 +715,8 @@ selector: "model:",
|
|
|
category: 'accessing',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
smalltalk.ListKeyedEntity.fn.prototype._model_.apply(_st(self), [_st((smalltalk.Isolator || Isolator))._on_(anObject)]);
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+smalltalk.ListKeyedEntity.fn.prototype._model_.apply(_st(self), [_st((smalltalk.Isolator || Isolator))._on_(anObject)]);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject},smalltalk.ListKeyedIsolatedEntity)})},
|
|
|
args: ["anObject"],
|
|
|
source: "model: anObject\x0a\x09super model: (Isolator on: anObject)",
|
|
@@ -684,15 +733,18 @@ category: 'action',
|
|
|
fn: function (path,aBlock){
|
|
|
var self=this;
|
|
|
var eavModel;
|
|
|
-return smalltalk.withContext(function($ctx1) {
eavModel=_st(_st([smalltalk.symbolFor("root")]).__comma(path))._asEavModel();
|
|
|
+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);
|
|
|
+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(_st(self)._dispatcher())._changed_(path);
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(_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)})},
|
|
|
args: ["path", "aBlock"],
|
|
|
-source: "modify: path do: aBlock\x0a | eavModel |\x0a eavModel := ({#root},path) asEavModel.\x0a [ payload model: eavModel modify: aBlock ] ensure: [ self dispatcher changed: path ]\x0a",
|
|
|
+source: "modify: path do: aBlock\x0a | eavModel |\x0a eavModel := ({{#root}},path) asEavModel.\x0a [ payload model: eavModel modify: aBlock ] ensure: [ self dispatcher changed: path ]",
|
|
|
messageSends: ["asEavModel", ",", "ensure:", "changed:", "dispatcher", "model:modify:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -706,11 +758,12 @@ category: 'action',
|
|
|
fn: function (path,aBlock){
|
|
|
var self=this;
|
|
|
var eavModel;
|
|
|
-return smalltalk.withContext(function($ctx1) {
eavModel=_st(_st([smalltalk.symbolFor("root")]).__comma(path))._asEavModel();
|
|
|
+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)})},
|
|
|
args: ["path", "aBlock"],
|
|
|
-source: "read: path do: aBlock\x0a | eavModel |\x0a eavModel := ({#root},path) asEavModel.\x0a payload model: eavModel read: aBlock\x0a",
|
|
|
+source: "read: path do: aBlock\x0a | eavModel |\x0a eavModel := ({{#root}},path) asEavModel.\x0a payload model: eavModel read: aBlock",
|
|
|
messageSends: ["asEavModel", ",", "model:read:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -725,7 +778,8 @@ selector: "reverseTrapAt:",
|
|
|
category: '*Trapped-Backend',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
return nil;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+return nil;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Object)})},
|
|
|
args: ["anObject"],
|
|
|
source: "reverseTrapAt: anObject\x0a\x09^nil",
|
|
@@ -741,7 +795,8 @@ selector: "reverseTrapAt:put:",
|
|
|
category: '*Trapped-Backend',
|
|
|
fn: function (anObject,value){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
_st(self)._error_(_st(_st("Trapped cannot put at ").__comma(_st(_st(self)._class())._name())).__comma(" type key."));
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+_st(self)._error_(_st(_st("Trapped cannot put at ").__comma(_st(_st(self)._class())._name())).__comma(" type key."));
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Object)})},
|
|
|
args: ["anObject", "value"],
|
|
|
source: "reverseTrapAt: anObject put: value\x0a\x09self error: 'Trapped cannot put at ', self class name, ' type key.'",
|
|
@@ -758,14 +813,17 @@ category: '*Trapped-Backend',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
var model;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$6,$5,$2,$7,$9,$11,$12,$14,$13,$10,$8,$15;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1,$3,$4,$6,$5,$2,$7,$9,$11,$12,$14,$13,$10,$8,$15;
|
|
|
model=_st((smalltalk.EavModel || EavModel))._new();
|
|
|
$1=model;
|
|
|
$2=(function(anObject){
|
|
|
-return smalltalk.withContext(function($ctx2) {
$3=self;
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+$3=self;
|
|
|
$4=anObject;
|
|
|
$5=(function(soFar,segment){
|
|
|
-return smalltalk.withContext(function($ctx3) {
$6=soFar;
|
|
|
+return smalltalk.withContext(function($ctx3) {
|
|
|
+$6=soFar;
|
|
|
if(($receiver = $6) == nil || $receiver == undefined){
|
|
|
return $6;
|
|
|
} else {
|
|
@@ -777,13 +835,16 @@ return _st($3)._inject_into_($4,$5);
|
|
|
_st($1)._getBlock_($2);
|
|
|
$7=_st(self)._isEmpty();
|
|
|
$8=(function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
$9=model;
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+$9=model;
|
|
|
$10=(function(anObject,value){
|
|
|
var penultimate;
|
|
|
-return smalltalk.withContext(function($ctx3) {
$11=_st(self)._allButLast();
|
|
|
+return smalltalk.withContext(function($ctx3) {
|
|
|
+$11=_st(self)._allButLast();
|
|
|
$12=anObject;
|
|
|
$13=(function(soFar,segment){
|
|
|
-return smalltalk.withContext(function($ctx4) {
$14=soFar;
|
|
|
+return smalltalk.withContext(function($ctx4) {
|
|
|
+$14=soFar;
|
|
|
if(($receiver = $14) == nil || $receiver == undefined){
|
|
|
return $14;
|
|
|
} else {
|
|
@@ -814,18 +875,28 @@ selector: "reverseTrapAt:",
|
|
|
category: '*Trapped-Backend',
|
|
|
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 $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_(_st(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;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.String)})},
|
|
|
+}
|
|
|
+catch(e) {if(e===$early)return e[0]; throw e}
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject},smalltalk.Array)})},
|
|
|
args: ["anObject"],
|
|
|
-source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
|
|
|
-messageSends: ["at:ifAbsent:"],
|
|
|
-referencedClasses: []
|
|
|
+source: "reverseTrapAt: anObject\x0a\x09^[anObject perform: self first] on: MessageNotUnderstood do: [^nil]",
|
|
|
+messageSends: ["on:do:", "perform:", "first"],
|
|
|
+referencedClasses: ["MessageNotUnderstood"]
|
|
|
}),
|
|
|
-smalltalk.String);
|
|
|
+smalltalk.Array);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
"_reverseTrapAt_put_",
|
|
@@ -834,16 +905,17 @@ selector: "reverseTrapAt:put:",
|
|
|
category: '*Trapped-Backend',
|
|
|
fn: function (anObject,value){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
-$1=_st(anObject)._at_put_(self,value);
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
+$1=_st(anObject)._perform_withArguments_(_st(_st(_st(self)._first()).__comma(":"))._asSymbol(),[value]);
|
|
|
return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.String)})},
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value},smalltalk.Array)})},
|
|
|
args: ["anObject", "value"],
|
|
|
-source: "reverseTrapAt: anObject put: value\x0a\x09^anObject at: self put: value",
|
|
|
-messageSends: ["at:put:"],
|
|
|
+source: "reverseTrapAt: anObject put: value\x0a ^anObject perform: (self first, ':') asSymbol withArguments: { value }",
|
|
|
+messageSends: ["perform:withArguments:", "asSymbol", ",", "first"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.String);
|
|
|
+smalltalk.Array);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
"_reverseTrapAt_",
|
|
@@ -852,24 +924,20 @@ selector: "reverseTrapAt:",
|
|
|
category: '*Trapped-Backend',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
-var $early={};
|
|
|
-try {
|
|
|
-$1=_st((function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
return _st(anObject)._perform_(self);
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.MessageNotUnderstood || MessageNotUnderstood),(function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
throw $early=[nil];
|
|
|
+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;
|
|
|
-}
|
|
|
-catch(e) {if(e===$early)return e[0]; throw e}
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Symbol)})},
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.String)})},
|
|
|
args: ["anObject"],
|
|
|
-source: "reverseTrapAt: anObject\x0a\x09^[anObject perform: self] on: MessageNotUnderstood do: [^nil]",
|
|
|
-messageSends: ["on:do:", "perform:"],
|
|
|
-referencedClasses: ["MessageNotUnderstood"]
|
|
|
+source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
|
|
|
+messageSends: ["at:ifAbsent:"],
|
|
|
+referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.Symbol);
|
|
|
+smalltalk.String);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
"_reverseTrapAt_put_",
|
|
@@ -878,16 +946,17 @@ selector: "reverseTrapAt:put:",
|
|
|
category: '*Trapped-Backend',
|
|
|
fn: function (anObject,value){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
-$1=_st(anObject)._perform_withArguments_(_st(_st(self).__comma(":"))._asSymbol(),[value]);
|
|
|
+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.Symbol)})},
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.String)})},
|
|
|
args: ["anObject", "value"],
|
|
|
-source: "reverseTrapAt: anObject put: value\x0a ^anObject perform: (self, ':') asSymbol withArguments: { value }",
|
|
|
-messageSends: ["perform:withArguments:", "asSymbol", ","],
|
|
|
+source: "reverseTrapAt: anObject put: value\x0a\x09^anObject at: self put: value",
|
|
|
+messageSends: ["at:put:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.Symbol);
|
|
|
+smalltalk.String);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
"_reverseTrapAt_",
|
|
@@ -896,9 +965,11 @@ selector: "reverseTrapAt:",
|
|
|
category: '*Trapped-Backend',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
$1=_st(anObject)._at_ifAbsent_(self,(function(){
|
|
|
-return smalltalk.withContext(function($ctx2) {
return nil;
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return nil;
|
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Number)})},
|
|
@@ -916,7 +987,8 @@ selector: "reverseTrapAt:put:",
|
|
|
category: '*Trapped-Backend',
|
|
|
fn: function (anObject,value){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+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)})},
|