Browse Source

use includesKey: and includesSelector:

Herbert Vojčík 10 years ago
parent
commit
e379b09d18
4 changed files with 8 additions and 8 deletions
  1. 3 3
      js/Helios-Inspector.js
  2. 3 3
      js/Kernel-Classes.js
  3. 1 1
      st/Helios-Inspector.st
  4. 1 1
      st/Kernel-Classes.st

+ 3 - 3
js/Helios-Inspector.js

@@ -63,7 +63,7 @@ var selection;
 return smalltalk.withContext(function($ctx1) { 
 var $2,$1;
 selection=_st(self["@model"])._selection();
-$2=_st(_st(_st(self["@model"])._variables())._keys())._includes_(selection);
+$2=_st(_st(self["@model"])._variables())._includesKey_(selection);
 if(smalltalk.assert($2)){
 $1=_st(_st(self["@model"])._instVarObjectAt_(selection))._printString();
 } else {
@@ -72,8 +72,8 @@ $1="";
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selectionDisplayString",{selection:selection},smalltalk.HLInspectorDisplayWidget)})},
 args: [],
-source: "selectionDisplayString\x0a\x09|selection|\x0a\x09selection := model selection.\x0a    ^ (model variables keys includes: selection)\x0a    \x09ifTrue:[ (model instVarObjectAt: selection) printString ]\x0a      \x09ifFalse:[ '' ]",
-messageSends: ["selection", "ifTrue:ifFalse:", "includes:", "keys", "variables", "printString", "instVarObjectAt:"],
+source: "selectionDisplayString\x0a\x09|selection|\x0a\x09selection := model selection.\x0a    ^ (model variables includesKey: selection)\x0a    \x09ifTrue:[ (model instVarObjectAt: selection) printString ]\x0a      \x09ifFalse:[ '' ]",
+messageSends: ["selection", "ifTrue:ifFalse:", "includesKey:", "variables", "printString", "instVarObjectAt:"],
 referencedClasses: []
 }),
 smalltalk.HLInspectorDisplayWidget);

+ 3 - 3
js/Kernel-Classes.js

@@ -282,7 +282,7 @@ fn: function (aSelector){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $3,$2,$1;
-$1=_st(_st(_st(self._methodDictionary())._keys())._includes_(_st(aSelector)._asString()))._or_((function(){
+$1=_st(self._includesSelector_(_st(aSelector)._asString()))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 $3=self._superclass();
 $ctx2.sendIdx["superclass"]=1;
@@ -295,8 +295,8 @@ return _st(self._superclass())._canUnderstand_(aSelector);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"canUnderstand:",{aSelector:aSelector},smalltalk.Behavior)})},
 args: ["aSelector"],
-source: "canUnderstand: aSelector\x0a\x09^ (self methodDictionary keys includes: aSelector asString) or: [\x0a\x09\x09self superclass notNil and: [ self superclass canUnderstand: aSelector ]]",
-messageSends: ["or:", "includes:", "keys", "methodDictionary", "asString", "and:", "notNil", "superclass", "canUnderstand:"],
+source: "canUnderstand: aSelector\x0a\x09^ (self includesSelector: aSelector asString) or: [\x0a\x09\x09self superclass notNil and: [ self superclass canUnderstand: aSelector ]]",
+messageSends: ["or:", "includesSelector:", "asString", "and:", "notNil", "superclass", "canUnderstand:"],
 referencedClasses: []
 }),
 smalltalk.Behavior);

+ 1 - 1
st/Helios-Inspector.st

@@ -25,7 +25,7 @@ renderContentOn: html
 selectionDisplayString
 	|selection|
 	selection := model selection.
-    ^ (model variables keys includes: selection)
+    ^ (model variables includesKey: selection)
     	ifTrue:[ (model instVarObjectAt: selection) printString ]
       	ifFalse:[ '' ]
 ! !

+ 1 - 1
st/Kernel-Classes.st

@@ -312,7 +312,7 @@ basicRemoveCompiledMethod: aMethod
 !Behavior methodsFor: 'testing'!
 
 canUnderstand: aSelector
-	^ (self methodDictionary keys includes: aSelector asString) or: [
+	^ (self includesSelector: aSelector asString) or: [
 		self superclass notNil and: [ self superclass canUnderstand: aSelector ]]
 !