1
0
Prechádzať zdrojové kódy

IDE/SourceArea: focus editor after >>printIt (fixes #89)

mkroehnert 12 rokov pred
rodič
commit
ac8b7fa456
3 zmenil súbory, kde vykonal 15 pridanie a 14 odobranie
  1. 5 5
      js/IDE.deploy.js
  2. 8 8
      js/IDE.js
  3. 2 1
      st/IDE.st

+ 5 - 5
js/IDE.deploy.js

@@ -547,11 +547,11 @@ smalltalk.addMethod(
 "_printIt",
 smalltalk.method({
 selector: "printIt",
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
-    return self;
-}
+fn: function (){
+var self=this;
+smalltalk.send(self,"_print_",[smalltalk.send(smalltalk.send(self,"_doIt",[]),"_printString",[])]);
+smalltalk.send(smalltalk.send(self,"_editor",[]),"_focus",[]);
+return self}
 }),
 smalltalk.SourceArea);
 

+ 8 - 8
js/IDE.js

@@ -728,14 +728,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "printIt",
 category: 'actions',
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
-    return self;
-},
-args: [],
-source: "printIt\x0a    self print: self doIt printString",
-messageSends: ["print:", "printString", "doIt"],
+fn: function (){
+var self=this;
+smalltalk.send(self,"_print_",[smalltalk.send(smalltalk.send(self,"_doIt",[]),"_printString",[])]);
+smalltalk.send(smalltalk.send(self,"_editor",[]),"_focus",[]);
+return self},
+args: [],
+source: "printIt\x0a    self print: self doIt printString.\x0a    self editor focus.",
+messageSends: ["print:", "printString", "doIt", "focus", "editor"],
 referencedClasses: []
 }),
 smalltalk.SourceArea);

+ 2 - 1
st/IDE.st

@@ -305,7 +305,8 @@ print: aString
 !
 
 printIt
-    self print: self doIt printString
+    self print: self doIt printString.
+    self editor focus.
 ! !
 
 !SourceArea methodsFor: 'events'!