Browse Source

NonBooleanReceiver class >> signalOn:

To shorten list of kernel-used APIs.
Herbert Vojčík 6 years ago
parent
commit
38f4e624ac
5 changed files with 38 additions and 4 deletions
  1. 2 0
      API-CHANGES.txt
  2. 1 3
      CHANGELOG
  3. 26 0
      src/Kernel-Exceptions.js
  4. 8 0
      src/Kernel-Exceptions.st
  5. 1 1
      support/kernel-runtime.js

+ 2 - 0
API-CHANGES.txt

@@ -12,6 +12,8 @@
 + MethodContext
   + stubHere
   + stubToAtMost:
++ NonBooleanReceiver class >>
+  + signalOn:
 + UndefinedObject >>
   + ==
 

+ 1 - 3
CHANGELOG

@@ -8,9 +8,7 @@
   * Dictionary class >> newFromPairs:
   * ErrorHandler class >> handleError:
   * JSObjectProxy class >> on:
-  * NonBooleanReceiver class >> new
-  * NonBooleanReceiver >> object:
-  * NonBooleanReceiver >> signal
+  * NonBooleanReceiver class >> signalOn:
 
 Commits: https://lolg.it/amber/amber/commits/0.19.1.
 

+ 26 - 0
src/Kernel-Exceptions.js

@@ -881,4 +881,30 @@ messageSends: []
 $globals.NonBooleanReceiver);
 
 
+$core.addMethod(
+$core.method({
+selector: "signalOn:",
+protocol: "instance creation",
+fn: function (anObject){
+var self=this,$self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$self._new();
+$recv($1)._object_(anObject);
+return $recv($1)._signal();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"signalOn:",{anObject:anObject},$globals.NonBooleanReceiver.a$cls)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "signalOn: anObject\x0a\x09^ self new\x0a\x09\x09object: anObject;\x0a\x09\x09signal",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["object:", "new", "signal"]
+}),
+$globals.NonBooleanReceiver.a$cls);
+
 });

+ 8 - 0
src/Kernel-Exceptions.st

@@ -236,3 +236,11 @@ object: anObject
 	object := anObject
 ! !
 
+!NonBooleanReceiver class methodsFor: 'instance creation'!
+
+signalOn: anObject
+	^ self new
+		object: anObject;
+		signal
+! !
+

+ 1 - 1
support/kernel-runtime.js

@@ -226,7 +226,7 @@ define(function () {
                 shouldBeBoolean = shouldBeBoolean.valueOf();
                 if (typeof shouldBeBoolean === "boolean") return shouldBeBoolean;
             }
-            globals.NonBooleanReceiver._new()._object_(shouldBeBoolean)._signal();
+            globals.NonBooleanReceiver._signalOn_(shouldBeBoolean);
         };
 
         // TODO remove