InterestConverter.st
changeset 1074 e20967eee4bd
child 1098 e8543399e2a0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/InterestConverter.st	Thu Mar 07 11:09:17 1996 +0100
@@ -0,0 +1,77 @@
+Object subclass:#InterestConverter
+	instanceVariableNames:'destination selector'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Support-Models'
+!
+
+!InterestConverter class methodsFor:'documentation'!
+
+documentation
+"
+    instances convert update messages into messages as setup via
+    #onChangeSend:to.
+    This is a temporary kludge and will be replaced by a more intelligent
+    DependencyCollection class in the future.
+"
+!
+
+examples
+"
+    |p b|
+
+    b := [Transcript showCr:'--> notification: point has changed'].
+
+    p := Point new.
+    p onChangeSend:#value to:b.
+    Delay waitForSeconds:1.
+    Transcript showCr:'sending change ...'.
+    p changed.
+    p retractInterestsFor:b.
+    Delay waitForSeconds:1.
+    Transcript showCr:'sending change ...'.
+    p changed.
+"
+!
+
+history
+
+    "Created: 7.3.1996 / 10:08:55 / cg"
+    "Modified: 7.3.1996 / 10:14:38 / cg"
+! !
+
+!InterestConverter class methodsFor:'instance creation'!
+
+destination:anObject selector:aSelector
+    ^ self basicNew destination:anObject selector:aSelector
+! !
+
+!InterestConverter methodsFor:'accessing'!
+
+destination
+    ^ destination
+
+    "Created: 7.3.1996 / 10:57:01 / cg"
+!
+
+destination:dest selector:sel
+    destination := dest.
+    selector := sel
+
+    "Created: 7.3.1996 / 10:49:13 / cg"
+! !
+
+!InterestConverter methodsFor:'change & update'!
+
+update:something with:aParameter from:someObject
+    destination perform:selector
+
+    "Created: 7.3.1996 / 10:14:30 / cg"
+    "Modified: 7.3.1996 / 10:14:43 / cg"
+! !
+
+!InterestConverter class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/InterestConverter.st,v 1.1 1996-03-07 10:09:16 cg Exp $'
+! !