|
@@ -514,8 +514,8 @@ $1=$recv(each)._isFlagged();
|
|
|
if($core.assert($1)){
|
|
|
$recv(each)._run();
|
|
|
}
|
|
|
-$2=$recv(each)._isEnabled();
|
|
|
-if(!$core.assert($2)){
|
|
|
+$2=$recv(each)._isClosed();
|
|
|
+if($core.assert($2)){
|
|
|
needsClean=true;
|
|
|
return needsClean;
|
|
|
}
|
|
@@ -546,10 +546,10 @@ return self;
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
args: [],
|
|
|
-source: "run\x0a\x09[\x0a\x09\x09| needsClean |\x0a\x09 needsClean := false.\x0a\x09\x09self do: [ :each |\x0a\x09\x09\x09each isFlagged ifTrue: [ each run ].\x0a\x09 each isEnabled ifFalse: [ needsClean := true ]\x0a\x09\x09].\x0a \x09needsClean ifTrue: [ self clean ]\x0a\x09] on: Error do: [ self dirty: true ]",
|
|
|
+source: "run\x0a\x09[\x0a\x09\x09| needsClean |\x0a\x09 needsClean := false.\x0a\x09\x09self do: [ :each |\x0a\x09\x09\x09each isFlagged ifTrue: [ each run ].\x0a\x09 each isClosed ifTrue: [ needsClean := true ]\x0a\x09\x09].\x0a \x09needsClean ifTrue: [ self clean ]\x0a\x09] on: Error do: [ self dirty: true ]",
|
|
|
referencedClasses: ["Error"],
|
|
|
//>>excludeEnd("ide");
|
|
|
-messageSends: ["on:do:", "do:", "ifTrue:", "isFlagged", "run", "ifFalse:", "isEnabled", "clean", "dirty:"]
|
|
|
+messageSends: ["on:do:", "do:", "ifTrue:", "isFlagged", "run", "isClosed", "clean", "dirty:"]
|
|
|
}),
|
|
|
$globals.Axon);
|
|
|
|
|
@@ -649,11 +649,11 @@ var self=this,$self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-$self["@queue"]=$recv($self["@queue"])._select_((function(each){
|
|
|
+$self["@queue"]=$recv($self["@queue"])._reject_((function(each){
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
return $core.withContext(function($ctx2) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-return $recv(each)._isEnabled();
|
|
|
+return $recv(each)._isClosed();
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
|
|
|
//>>excludeEnd("ctx");
|
|
@@ -665,10 +665,10 @@ return self;
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
args: [],
|
|
|
-source: "clean\x0a\x09queue := queue select: [ :each | each isEnabled ]",
|
|
|
+source: "clean\x0a\x09queue := queue reject: [ :each | each isClosed ]",
|
|
|
referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
-messageSends: ["select:", "isEnabled"]
|
|
|
+messageSends: ["reject:", "isClosed"]
|
|
|
}),
|
|
|
$globals.SimpleAxon);
|
|
|
|
|
@@ -730,7 +730,7 @@ $globals.SimpleAxon);
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass("AxonInterest", $globals.Object, ["aspect", "actionBlock", "flagged"], "Axxord");
|
|
|
+$core.addClass("AxonInterest", $globals.Object, ["flagged"], "Axxord");
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "accepts:",
|
|
@@ -757,21 +757,49 @@ $globals.AxonInterest);
|
|
|
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
-selector: "aspect:block:",
|
|
|
-protocol: "accessing",
|
|
|
-fn: function (anAspect,aBlock){
|
|
|
+selector: "close",
|
|
|
+protocol: "action",
|
|
|
+fn: function (){
|
|
|
var self=this,$self=this;
|
|
|
-$self["@aspect"]=anAspect;
|
|
|
-$self["@actionBlock"]=aBlock;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+$self._subclassResponsibility();
|
|
|
return self;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"close",{},$globals.AxonInterest)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+},
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
+args: [],
|
|
|
+source: "close\x0a\x09self subclassResponsibility",
|
|
|
+referencedClasses: [],
|
|
|
+//>>excludeEnd("ide");
|
|
|
+messageSends: ["subclassResponsibility"]
|
|
|
+}),
|
|
|
+$globals.AxonInterest);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "enact",
|
|
|
+protocol: "action",
|
|
|
+fn: function (){
|
|
|
+var self=this,$self=this;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+$self._subclassResponsibility();
|
|
|
+return self;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"enact",{},$globals.AxonInterest)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
-args: ["anAspect", "aBlock"],
|
|
|
-source: "aspect: anAspect block: aBlock\x0a\x09aspect := anAspect.\x0a actionBlock := aBlock",
|
|
|
+args: [],
|
|
|
+source: "enact\x0a\x09self subclassResponsibility",
|
|
|
referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
-messageSends: []
|
|
|
+messageSends: ["subclassResponsibility"]
|
|
|
}),
|
|
|
$globals.AxonInterest);
|
|
|
|
|
@@ -811,8 +839,6 @@ $ctx1.supercall = true,
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
$ctx1.supercall = false;
|
|
|
//>>excludeEnd("ctx");;
|
|
|
-$self["@aspect"]=nil;
|
|
|
-$self["@actionBlock"]=nil;
|
|
|
$self["@flagged"]=false;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -821,7 +847,7 @@ return self;
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
args: [],
|
|
|
-source: "initialize\x0a\x09super initialize.\x0a aspect := nil.\x0a actionBlock := nil.\x0a flagged := false.",
|
|
|
+source: "initialize\x0a\x09super initialize.\x0a flagged := false.",
|
|
|
referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["initialize"]
|
|
@@ -830,24 +856,25 @@ $globals.AxonInterest);
|
|
|
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
-selector: "isEnabled",
|
|
|
+selector: "isClosed",
|
|
|
protocol: "testing",
|
|
|
fn: function (){
|
|
|
var self=this,$self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-return $recv($self["@actionBlock"])._notNil();
|
|
|
+$self._subclassResponsibility();
|
|
|
+return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"isEnabled",{},$globals.AxonInterest)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"isClosed",{},$globals.AxonInterest)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
args: [],
|
|
|
-source: "isEnabled\x0a\x09^actionBlock notNil",
|
|
|
+source: "isClosed\x0a\x09self subclassResponsibility",
|
|
|
referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
-messageSends: ["notNil"]
|
|
|
+messageSends: ["subclassResponsibility"]
|
|
|
}),
|
|
|
$globals.AxonInterest);
|
|
|
|
|
@@ -884,14 +911,18 @@ return $core.withContext(function($ctx2) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
$self["@flagged"]=false;
|
|
|
$self["@flagged"];
|
|
|
-return $recv($self["@actionBlock"])._value();
|
|
|
+return $self._enact();
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
}))._on_do_($globals.AxonOff,(function(){
|
|
|
-$self["@actionBlock"]=nil;
|
|
|
-return $self["@actionBlock"];
|
|
|
-
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+return $self._close();
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
}));
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -900,16 +931,138 @@ return self;
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
args: [],
|
|
|
-source: "run\x0a\x09[ flagged := false. actionBlock value ]\x0a on: AxonOff do: [ actionBlock := nil ]",
|
|
|
+source: "run\x0a\x09[ flagged := false. self enact ]\x0a on: AxonOff do: [ self close ]",
|
|
|
referencedClasses: ["AxonOff"],
|
|
|
//>>excludeEnd("ide");
|
|
|
-messageSends: ["on:do:", "value"]
|
|
|
+messageSends: ["on:do:", "enact", "close"]
|
|
|
}),
|
|
|
$globals.AxonInterest);
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass("InterestedInEqual", $globals.AxonInterest, [], "Axxord");
|
|
|
+$core.addClass("ConstantAspectPluggableEnactInterest", $globals.AxonInterest, ["aspect", "actionBlock"], "Axxord");
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "aspect:block:",
|
|
|
+protocol: "accessing",
|
|
|
+fn: function (anAspect,aBlock){
|
|
|
+var self=this,$self=this;
|
|
|
+$self["@aspect"]=anAspect;
|
|
|
+$self["@actionBlock"]=aBlock;
|
|
|
+return self;
|
|
|
+
|
|
|
+},
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
+args: ["anAspect", "aBlock"],
|
|
|
+source: "aspect: anAspect block: aBlock\x0a\x09aspect := anAspect.\x0a actionBlock := aBlock",
|
|
|
+referencedClasses: [],
|
|
|
+//>>excludeEnd("ide");
|
|
|
+messageSends: []
|
|
|
+}),
|
|
|
+$globals.ConstantAspectPluggableEnactInterest);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "close",
|
|
|
+protocol: "action",
|
|
|
+fn: function (){
|
|
|
+var self=this,$self=this;
|
|
|
+$self["@actionBlock"]=nil;
|
|
|
+return self;
|
|
|
+
|
|
|
+},
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
+args: [],
|
|
|
+source: "close\x0a\x09actionBlock := nil",
|
|
|
+referencedClasses: [],
|
|
|
+//>>excludeEnd("ide");
|
|
|
+messageSends: []
|
|
|
+}),
|
|
|
+$globals.ConstantAspectPluggableEnactInterest);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "enact",
|
|
|
+protocol: "action",
|
|
|
+fn: function (){
|
|
|
+var self=this,$self=this;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+$recv($self["@actionBlock"])._value();
|
|
|
+return self;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"enact",{},$globals.ConstantAspectPluggableEnactInterest)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+},
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
+args: [],
|
|
|
+source: "enact\x0a\x09actionBlock value",
|
|
|
+referencedClasses: [],
|
|
|
+//>>excludeEnd("ide");
|
|
|
+messageSends: ["value"]
|
|
|
+}),
|
|
|
+$globals.ConstantAspectPluggableEnactInterest);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "initialize",
|
|
|
+protocol: "initialization",
|
|
|
+fn: function (){
|
|
|
+var self=this,$self=this;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+(
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+$ctx1.supercall = true,
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+($globals.ConstantAspectPluggableEnactInterest.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+$ctx1.supercall = false;
|
|
|
+//>>excludeEnd("ctx");;
|
|
|
+$self["@aspect"]=nil;
|
|
|
+$self["@actionBlock"]=nil;
|
|
|
+return self;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ConstantAspectPluggableEnactInterest)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+},
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
+args: [],
|
|
|
+source: "initialize\x0a\x09super initialize.\x0a aspect := nil.\x0a actionBlock := nil.",
|
|
|
+referencedClasses: [],
|
|
|
+//>>excludeEnd("ide");
|
|
|
+messageSends: ["initialize"]
|
|
|
+}),
|
|
|
+$globals.ConstantAspectPluggableEnactInterest);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "isClosed",
|
|
|
+protocol: "testing",
|
|
|
+fn: function (){
|
|
|
+var self=this,$self=this;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+return $recv($self["@actionBlock"])._isNil();
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"isClosed",{},$globals.ConstantAspectPluggableEnactInterest)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+},
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
+args: [],
|
|
|
+source: "isClosed\x0a\x09^actionBlock isNil",
|
|
|
+referencedClasses: [],
|
|
|
+//>>excludeEnd("ide");
|
|
|
+messageSends: ["isNil"]
|
|
|
+}),
|
|
|
+$globals.ConstantAspectPluggableEnactInterest);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+$core.addClass("InterestedInEqual", $globals.ConstantAspectPluggableEnactInterest, [], "Axxord");
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "accepts:",
|
|
@@ -935,7 +1088,7 @@ $globals.InterestedInEqual);
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass("InterestedThruAxes", $globals.AxonInterest, [], "Axxord");
|
|
|
+$core.addClass("InterestedThruAxes", $globals.ConstantAspectPluggableEnactInterest, [], "Axxord");
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "accepts:",
|
|
@@ -987,7 +1140,7 @@ $globals.InterestedThruAxes);
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass("InterestedUpToAxes", $globals.AxonInterest, [], "Axxord");
|
|
|
+$core.addClass("InterestedUpToAxes", $globals.ConstantAspectPluggableEnactInterest, [], "Axxord");
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "accepts:",
|