#FEATURE by stefan
authorStefan Vogel <sv@exept.de>
Wed, 27 Jul 2016 17:12:22 +0200
changeset 20183 65d17c828c3a
parent 20182 f8625bd2a98c
child 20184 71a792aae4d5
#FEATURE by stefan class: Message added: #sendTo:usingClass: #sendTo:usingMethod:
Message.st
--- a/Message.st	Wed Jul 27 16:24:41 2016 +0200
+++ b/Message.st	Wed Jul 27 17:12:22 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -276,6 +278,18 @@
     "send the selector with argument(s) to aReceiver"
 
     ^ aReceiver perform:selector withArguments:args
+!
+
+sendTo:aReceiver usingClass:aClass
+    "send the selector with argument(s) to aReceiver using the method named by selector from aClass"
+
+    ^ (aClass compiledMethodAt:selector) valueWithReceiver:aReceiver arguments:args selector:selector
+!
+
+sendTo:aReceiver usingMethod:aMethod
+    "send the selector with argument(s) to aReceiver using compiledMethod aMethod"
+
+    ^ aMethod valueWithReceiver:aReceiver arguments:args selector:selector
 ! !
 
 !Message class methodsFor:'documentation'!