oops - forgot to add the new valueHolder to the bindings
authorClaus Gittinger <cg@exept.de>
Thu, 21 May 1998 03:45:09 +0200
changeset 937 b4a2ba99d791
parent 936 d3d50ac7cdd0
child 938 dfa1b1666cfa
oops - forgot to add the new valueHolder to the bindings in #valueHolderFor:initialValue:changeMessage:
AppModel.st
ApplicationModel.st
--- a/AppModel.st	Thu May 21 03:41:53 1998 +0200
+++ b/AppModel.st	Thu May 21 03:45:09 1998 +0200
@@ -1054,19 +1054,26 @@
 
 !
 
-valueHolderFor:aSelector initialValue:anObject changeMessage:aSelectorOrArray
-    "Return a ValueHolder on anObject.  aSelectorOrArray is the change information 
+valueHolderFor:aSelector initialValue:anObject changeMessage:aSelectorOrArrayOrNil
+    "Return a ValueHolder on anObject.  aSelectorOrArrayOrNil is the change information 
      for the ValueHolder.  This argument is either a Symbol or an Array of two elements.  
      If it is a Symbol, then it is the change message and the interested object is understood
      to be the reciever.  If it is an Array, then the first element is the change message and 
      the second element is the interested object. " 
 
+    |holder|
+
     (builder bindings includesKey:aSelector) ifFalse:[
-        ^ self registerInterestIn:(ValueHolder with:anObject) using:aSelectorOrArray
+        holder := ValueHolder with:anObject.
+        builder aspectAt:aSelector put:holder.
+        aSelectorOrArrayOrNil notNil ifTrue:[
+            ^ self registerInterestIn:holder using:aSelectorOrArrayOrNil
+        ].
+        ^ holder
     ].
     ^ builder aspectAt:aSelector
 
-    "Modified: / 31.10.1997 / 18:20:31 / cg"
+    "Modified: / 21.5.1998 / 03:31:28 / cg"
 ! !
 
 !ApplicationModel methodsFor:'initialization'!
@@ -1720,6 +1727,6 @@
 !ApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Attic/AppModel.st,v 1.81 1998-05-20 19:55:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Attic/AppModel.st,v 1.82 1998-05-21 01:45:09 cg Exp $'
 ! !
 ApplicationModel initialize!
--- a/ApplicationModel.st	Thu May 21 03:41:53 1998 +0200
+++ b/ApplicationModel.st	Thu May 21 03:45:09 1998 +0200
@@ -1054,19 +1054,26 @@
 
 !
 
-valueHolderFor:aSelector initialValue:anObject changeMessage:aSelectorOrArray
-    "Return a ValueHolder on anObject.  aSelectorOrArray is the change information 
+valueHolderFor:aSelector initialValue:anObject changeMessage:aSelectorOrArrayOrNil
+    "Return a ValueHolder on anObject.  aSelectorOrArrayOrNil is the change information 
      for the ValueHolder.  This argument is either a Symbol or an Array of two elements.  
      If it is a Symbol, then it is the change message and the interested object is understood
      to be the reciever.  If it is an Array, then the first element is the change message and 
      the second element is the interested object. " 
 
+    |holder|
+
     (builder bindings includesKey:aSelector) ifFalse:[
-        ^ self registerInterestIn:(ValueHolder with:anObject) using:aSelectorOrArray
+        holder := ValueHolder with:anObject.
+        builder aspectAt:aSelector put:holder.
+        aSelectorOrArrayOrNil notNil ifTrue:[
+            ^ self registerInterestIn:holder using:aSelectorOrArrayOrNil
+        ].
+        ^ holder
     ].
     ^ builder aspectAt:aSelector
 
-    "Modified: / 31.10.1997 / 18:20:31 / cg"
+    "Modified: / 21.5.1998 / 03:31:28 / cg"
 ! !
 
 !ApplicationModel methodsFor:'initialization'!
@@ -1720,6 +1727,6 @@
 !ApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.81 1998-05-20 19:55:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.82 1998-05-21 01:45:09 cg Exp $'
 ! !
 ApplicationModel initialize!