Plug.st
changeset 1317 18aabf275ec2
parent 444 4ad5cc26ad6a
child 1554 d01ffa42ca7a
--- a/Plug.st	Mon Jan 24 21:45:03 2000 +0100
+++ b/Plug.st	Tue Jan 25 11:12:57 2000 +0100
@@ -149,6 +149,21 @@
     "Modified: 27.4.1996 / 16:15:34 / cg"
 !
 
+update:something with:aParameter from:changedObject
+    "catch unhandled messages by looking in my simulated protocol
+     definition; if there is some block for it, return its value.
+     Otherwise, fall into the real update."
+
+    |block|
+
+    block := simulatedProtocol at:#'update:with:from:' ifAbsent:[].
+    block isNil ifTrue:[
+        ^ super update:something with:aParameter from:changedObject
+    ].
+    ^ block valueWithArguments:(Array with:something with:aParameter with:changedObject)
+
+!
+
 value
     "catch this one - its so common"
 
@@ -238,5 +253,5 @@
 !Plug class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Plug.st,v 1.16 1997-02-21 19:38:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Plug.st,v 1.17 2000-01-25 10:12:57 cg Exp $'
 ! !