checkin from browser
authorClaus Gittinger <cg@exept.de>
Tue, 21 Jan 1997 15:24:37 +0100
changeset 377 afe504923e5b
parent 376 545f71a185db
child 378 3924b37b0ea4
checkin from browser
Plug.st
--- a/Plug.st	Fri Jan 17 22:54:35 1997 +0100
+++ b/Plug.st	Tue Jan 21 15:24:37 1997 +0100
@@ -147,6 +147,22 @@
     ^ block valueWithArguments:(aMessage arguments)
 
     "Modified: 27.4.1996 / 16:15:34 / cg"
+!
+
+value
+    "catch this one - its so common"
+
+    ^ self doesNotUnderstand:(Message selector:#value arguments:#())
+
+    "Created: 21.1.1997 / 15:21:24 / cg"
+!
+
+value:arg
+    "catch this one - its so common"
+
+    ^ self doesNotUnderstand:(Message selector:#value: argument:arg)
+
+    "Created: 21.1.1997 / 15:21:36 / cg"
 ! !
 
 !Plug methodsFor:'protocol definition'!
@@ -182,6 +198,16 @@
      The value returned from aBlock will be the value returned from the
      message."
 
+    (self class implements:aSelector) ifFalse:[
+        (self class superclass respondsTo:aSelector) ifTrue:[
+
+            "/ sorry - this implementation is too quick of a hack.
+            "/ (must be rewritten to inherit from nil, in order 
+            "/  to be able to catch more ...)
+
+            self error:'inherited message cannot be redefined: ' , aSelector.
+        ]
+    ].
     simulatedProtocol at:aSelector put:aBlock
 
     "
@@ -195,7 +221,7 @@
      p foo:'hello'
     "
 
-    "Modified: 27.4.1996 / 16:14:19 / cg"
+    "Modified: 21.1.1997 / 15:24:31 / cg"
 ! !
 
 !Plug methodsFor:'queries'!
@@ -212,5 +238,5 @@
 !Plug class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Plug.st,v 1.14 1997-01-10 19:17:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Plug.st,v 1.15 1997-01-21 14:24:37 cg Exp $'
 ! !