|
@@ -416,23 +416,27 @@ smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "category:",
|
|
selector: "category:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
-fn: function (aString) {
|
|
|
|
- var self = this;
|
|
|
|
- var $1;
|
|
|
|
- var oldCategory;
|
|
|
|
- oldCategory = smalltalk.send(self, "_category", []);
|
|
|
|
- smalltalk.send(self, "_basicAt_put_", ["category", aString]);
|
|
|
|
- $1 = smalltalk.send(self, "_methodClass", []);
|
|
|
|
- if (($receiver = $1) == nil || $receiver == undefined) {
|
|
|
|
- } else {
|
|
|
|
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodClass", []), "_organizer", []), "_addElement_", [aString]);
|
|
|
|
- smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodClass", []), "_methods", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [oldCategory]);}]), "_ifEmpty_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodClass", []), "_organizer", []), "_removeElement_", [oldCategory]);}]);
|
|
|
|
- }
|
|
|
|
- return self;
|
|
|
|
-},
|
|
|
|
|
|
+fn: function (aString){
|
|
|
|
+var self=this;
|
|
|
|
+var $1;
|
|
|
|
+var oldCategory;
|
|
|
|
+oldCategory=smalltalk.send(self,"_category",[]);
|
|
|
|
+smalltalk.send(self,"_basicAt_put_",["category",aString]);
|
|
|
|
+$1=smalltalk.send(self,"_methodClass",[]);
|
|
|
|
+if(($receiver = $1) == nil || $receiver == undefined){
|
|
|
|
+$1;
|
|
|
|
+} else {
|
|
|
|
+smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodClass",[]),"_organization",[]),"_addElement_",[aString]);
|
|
|
|
+smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodClass",[]),"_methods",[]),"_select_",[(function(each){
|
|
|
|
+return smalltalk.send(smalltalk.send(each,"_category",[]),"__eq",[oldCategory]);
|
|
|
|
+})]),"_ifEmpty_",[(function(){
|
|
|
|
+return smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodClass",[]),"_organization",[]),"_removeElement_",[oldCategory]);
|
|
|
|
+})]);
|
|
|
|
+};
|
|
|
|
+return self},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "category: aString\x0a\x09| oldCategory |\x0a oldCategory := self category.\x0a\x09self basicAt: 'category' put: aString.\x0a \x0a self methodClass ifNotNil: [\x0a \x09self methodClass organizer addElement: aString.\x0a \x0a\x09\x09(self methodClass methods \x0a \x09\x09select: [ :each | each category = oldCategory ])\x0a \x09ifEmpty: [ self methodClass organizer removeElement: oldCategory ] ]",
|
|
|
|
-messageSends: ["category", "basicAt:put:", "ifNotNil:", "addElement:", "organizer", "methodClass", "ifEmpty:", "removeElement:", "select:", "=", "methods"],
|
|
|
|
|
|
+source: "category: aString\x0a\x09| oldCategory |\x0a oldCategory := self category.\x0a\x09self basicAt: 'category' put: aString.\x0a \x0a self methodClass ifNotNil: [\x0a \x09self methodClass organization addElement: aString.\x0a \x0a\x09\x09(self methodClass methods \x0a \x09\x09select: [ :each | each category = oldCategory ])\x0a \x09ifEmpty: [ self methodClass organization removeElement: oldCategory ] ]",
|
|
|
|
+messageSends: ["category", "basicAt:put:", "ifNotNil:", "addElement:", "organization", "methodClass", "ifEmpty:", "removeElement:", "select:", "=", "methods"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.CompiledMethod);
|
|
smalltalk.CompiledMethod);
|
|
@@ -786,6 +790,33 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.MethodContext);
|
|
smalltalk.MethodContext);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+"_inspectOn_",
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "inspectOn:",
|
|
|
|
+category: '',
|
|
|
|
+fn: function (anInspector) {
|
|
|
|
+ var self = this;
|
|
|
|
+ var $1;
|
|
|
|
+ var variables;
|
|
|
|
+ variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
|
|
|
|
+ smalltalk.send(variables, "_at_put_", ["#self", self]);
|
|
|
|
+ smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]);
|
|
|
|
+ smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]);
|
|
|
|
+ smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]);
|
|
|
|
+ smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]);
|
|
|
|
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
|
|
|
|
+ smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
|
|
|
|
+ $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
|
|
|
|
+ return self;
|
|
|
|
+},
|
|
|
|
+args: [object Object],
|
|
|
|
+source: "",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.MethodContext);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
"_pc",
|
|
"_pc",
|
|
smalltalk.method({
|
|
smalltalk.method({
|