Procházet zdrojové kódy

Merge pull request #625 from herby/do-displaying-in-infrastructure

do:displayingProgress: is Kernel-Infrastructure extension
Nicolas Petton před 10 roky
rodič
revize
c641f3702d

+ 0 - 12
js/Kernel-Collections.deploy.js

@@ -1783,18 +1783,6 @@ return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.S
 messageSends: []}),
 smalltalk.SequenceableCollection);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "do:displayingProgress:",
-fn: function (aBlock,aString){
-var self=this;
-function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
-return smalltalk.withContext(function($ctx1) { 
-_st(_st($ProgressHandler())._current())._do_on_displaying_(aBlock,self,aString);
-return self}, function($ctx1) {$ctx1.fill(self,"do:displayingProgress:",{aBlock:aBlock,aString:aString},smalltalk.SequenceableCollection)})},
-messageSends: ["do:on:displaying:", "current"]}),
-smalltalk.SequenceableCollection);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "first",

+ 0 - 17
js/Kernel-Collections.js

@@ -2359,23 +2359,6 @@ referencedClasses: []
 }),
 smalltalk.SequenceableCollection);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "do:displayingProgress:",
-category: 'enumerating',
-fn: function (aBlock,aString){
-var self=this;
-function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
-return smalltalk.withContext(function($ctx1) { 
-_st(_st($ProgressHandler())._current())._do_on_displaying_(aBlock,self,aString);
-return self}, function($ctx1) {$ctx1.fill(self,"do:displayingProgress:",{aBlock:aBlock,aString:aString},smalltalk.SequenceableCollection)})},
-args: ["aBlock", "aString"],
-source: "do: aBlock displayingProgress: aString\x0a\x09ProgressHandler current\x0a\x09\x09do: aBlock on: self displaying: aString",
-messageSends: ["do:on:displaying:", "current"],
-referencedClasses: ["ProgressHandler"]
-}),
-smalltalk.SequenceableCollection);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "first",

+ 12 - 0
js/Kernel-Infrastructure.deploy.js

@@ -1720,6 +1720,18 @@ return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.
 messageSends: []}),
 smalltalk.Smalltalk.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "do:displayingProgress:",
+fn: function (aBlock,aString){
+var self=this;
+function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st($ProgressHandler())._current())._do_on_displaying_(aBlock,self,aString);
+return self}, function($ctx1) {$ctx1.fill(self,"do:displayingProgress:",{aBlock:aBlock,aString:aString},smalltalk.SequenceableCollection)})},
+messageSends: ["do:on:displaying:", "current"]}),
+smalltalk.SequenceableCollection);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "asJavaScriptSelector",

+ 17 - 0
js/Kernel-Infrastructure.js

@@ -2286,6 +2286,23 @@ referencedClasses: []
 }),
 smalltalk.Smalltalk.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "do:displayingProgress:",
+category: '*Kernel-Infrastructure',
+fn: function (aBlock,aString){
+var self=this;
+function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st(_st($ProgressHandler())._current())._do_on_displaying_(aBlock,self,aString);
+return self}, function($ctx1) {$ctx1.fill(self,"do:displayingProgress:",{aBlock:aBlock,aString:aString},smalltalk.SequenceableCollection)})},
+args: ["aBlock", "aString"],
+source: "do: aBlock displayingProgress: aString\x0a\x09ProgressHandler current\x0a\x09\x09do: aBlock on: self displaying: aString",
+messageSends: ["do:on:displaying:", "current"],
+referencedClasses: ["ProgressHandler"]
+}),
+smalltalk.SequenceableCollection);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "asJavaScriptSelector",

+ 0 - 5
st/Kernel-Collections.st

@@ -886,11 +886,6 @@ do: aBlock
 	<for(var i=0;i<self.length;i++){aBlock._value_(self[i]);}>
 !
 
-do: aBlock displayingProgress: aString
-	ProgressHandler current
-		do: aBlock on: self displaying: aString
-!
-
 with: anotherCollection do: aBlock
 	<for(var i=0;i<self.length;i++){aBlock._value_value_(self[i], anotherCollection[i]);}>
 !

+ 7 - 0
st/Kernel-Infrastructure.st

@@ -913,6 +913,13 @@ current
 	<return smalltalk>
 ! !
 
+!SequenceableCollection methodsFor: '*Kernel-Infrastructure'!
+
+do: aBlock displayingProgress: aString
+	ProgressHandler current
+		do: aBlock on: self displaying: aString
+! !
+
 !String methodsFor: '*Kernel-Infrastructure'!
 
 asJavaScriptSelector