|
@@ -10,117 +10,6 @@ $core.addClass("BehaviorBody", $globals.Object, [], "Kernel-Classes");
|
|
|
|
|
|
$globals.BehaviorBody.comment="I am the superclass of all behaviors.\x0a\x0aMy instances hold the method dictionary.\x0a\x0aI also provides methods for compiling methods and examining the method dictionary.";
|
|
|
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "definition",
|
|
|
-protocol: "accessing",
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-self._subclassResponsibility();
|
|
|
-return self;
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"definition",{},$globals.BehaviorBody)});
|
|
|
-
|
|
|
-},
|
|
|
-
|
|
|
-args: [],
|
|
|
-source: "definition\x0a\x09self subclassResponsibility",
|
|
|
-referencedClasses: [],
|
|
|
-
|
|
|
-messageSends: ["subclassResponsibility"]
|
|
|
-}),
|
|
|
-$globals.BehaviorBody);
|
|
|
-
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "printOn:",
|
|
|
-protocol: "printing",
|
|
|
-fn: function (aStream){
|
|
|
-var self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-var $1,$receiver;
|
|
|
-$1=self._name();
|
|
|
-if(($receiver = $1) == null || $receiver.isNil){
|
|
|
-(
|
|
|
-
|
|
|
-$ctx1.supercall = true,
|
|
|
-
|
|
|
-($globals.BehaviorBody.superclass||$boot.nilAsClass).fn.prototype._printOn_.apply($recv(self), [aStream]));
|
|
|
-
|
|
|
-$ctx1.supercall = false;
|
|
|
-
|
|
|
-} else {
|
|
|
-var name;
|
|
|
-name=$receiver;
|
|
|
-$recv(aStream)._nextPutAll_(name);
|
|
|
-}
|
|
|
-return self;
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},$globals.BehaviorBody)});
|
|
|
-
|
|
|
-},
|
|
|
-
|
|
|
-args: ["aStream"],
|
|
|
-source: "printOn: aStream\x0a\x09self name\x0a\x09\x09ifNil: [ super printOn: aStream ]\x0a\x09\x09ifNotNil: [ :name | aStream nextPutAll: name ]",
|
|
|
-referencedClasses: [],
|
|
|
-
|
|
|
-messageSends: ["ifNil:ifNotNil:", "name", "printOn:", "nextPutAll:"]
|
|
|
-}),
|
|
|
-$globals.BehaviorBody);
|
|
|
-
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "theMetaClass",
|
|
|
-protocol: "accessing",
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-self._subclassResponsibility();
|
|
|
-return self;
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"theMetaClass",{},$globals.BehaviorBody)});
|
|
|
-
|
|
|
-},
|
|
|
-
|
|
|
-args: [],
|
|
|
-source: "theMetaClass\x0a\x09self subclassResponsibility",
|
|
|
-referencedClasses: [],
|
|
|
-
|
|
|
-messageSends: ["subclassResponsibility"]
|
|
|
-}),
|
|
|
-$globals.BehaviorBody);
|
|
|
-
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "theNonMetaClass",
|
|
|
-protocol: "accessing",
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-self._subclassResponsibility();
|
|
|
-return self;
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"theNonMetaClass",{},$globals.BehaviorBody)});
|
|
|
-
|
|
|
-},
|
|
|
-
|
|
|
-args: [],
|
|
|
-source: "theNonMetaClass\x0a\x09self subclassResponsibility",
|
|
|
-referencedClasses: [],
|
|
|
-
|
|
|
-messageSends: ["subclassResponsibility"]
|
|
|
-}),
|
|
|
-$globals.BehaviorBody);
|
|
|
-
|
|
|
|
|
|
|
|
|
$core.addClass("Behavior", $globals.BehaviorBody, [], "Kernel-Classes");
|
|
@@ -2764,6 +2653,63 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.TBehaviorDefaults);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "name",
|
|
|
+protocol: "accessing",
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return nil;
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: [],
|
|
|
+source: "name\x0a\x09^ nil",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+messageSends: []
|
|
|
+}),
|
|
|
+$globals.TBehaviorDefaults);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "printOn:",
|
|
|
+protocol: "printing",
|
|
|
+fn: function (aStream){
|
|
|
+var self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1,$receiver;
|
|
|
+$1=self._name();
|
|
|
+if(($receiver = $1) == null || $receiver.isNil){
|
|
|
+(
|
|
|
+
|
|
|
+$ctx1.supercall = true,
|
|
|
+
|
|
|
+($globals.TBehaviorDefaults.superclass||$boot.nilAsClass).fn.prototype._printOn_.apply($recv(self), [aStream]));
|
|
|
+
|
|
|
+$ctx1.supercall = false;
|
|
|
+
|
|
|
+} else {
|
|
|
+var name;
|
|
|
+name=$receiver;
|
|
|
+$recv(aStream)._nextPutAll_(name);
|
|
|
+}
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},$globals.TBehaviorDefaults)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["aStream"],
|
|
|
+source: "printOn: aStream\x0a\x09self name\x0a\x09\x09ifNil: [ super printOn: aStream ]\x0a\x09\x09ifNotNil: [ :name | aStream nextPutAll: name ]",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+messageSends: ["ifNil:ifNotNil:", "name", "printOn:", "nextPutAll:"]
|
|
|
+}),
|
|
|
+$globals.TBehaviorDefaults);
|
|
|
+
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "superclass",
|
|
@@ -3726,6 +3672,29 @@ messageSends: ["ifNil:ifNotNil:", "package", "name"]
|
|
|
}),
|
|
|
$globals.TMasterBehavior);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "classTag",
|
|
|
+protocol: "accessing",
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+return self._subclassResponsibility();
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"classTag",{},$globals.TMasterBehavior)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: [],
|
|
|
+source: "classTag\x0a\x09\x22Every master behavior should define a class tag.\x22\x0a\x09^ self subclassResponsibility",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+messageSends: ["subclassResponsibility"]
|
|
|
+}),
|
|
|
+$globals.TMasterBehavior);
|
|
|
+
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "comment",
|
|
@@ -3794,7 +3763,7 @@ var self=this;
|
|
|
|
|
|
return $core.withContext(function($ctx1) {
|
|
|
|
|
|
-return self.className || null;
|
|
|
+return self.className;
|
|
|
return self;
|
|
|
|
|
|
}, function($ctx1) {$ctx1.fill(self,"name",{},$globals.TMasterBehavior)});
|
|
@@ -3802,7 +3771,7 @@ return self;
|
|
|
},
|
|
|
|
|
|
args: [],
|
|
|
-source: "name\x0a\x09<inlineJS: 'return self.className || null'>",
|
|
|
+source: "name\x0a\x09<inlineJS: 'return self.className'>",
|
|
|
referencedClasses: [],
|
|
|
|
|
|
messageSends: []
|