send change notification if same list is assigned
authorClaus Gittinger <cg@exept.de>
Fri, 30 Jan 1998 02:40:27 +0100
changeset 1436 72e392844594
parent 1435 56de6db05972
child 1437 ab84b08a9f9c
send change notification if same list is assigned via #list: (could be, the contents has changed). This is done for VW compatibility (see Phonebook example)
SelList.st
SelectionInList.st
--- a/SelList.st	Fri Jan 30 02:08:24 1998 +0100
+++ b/SelList.st	Fri Jan 30 02:40:27 1998 +0100
@@ -241,9 +241,15 @@
 list:aCollection
     "set the list - thats the thingy held by the listHolder"
 
-    listHolder value:aCollection.
+    aCollection == listHolder value ifTrue:[
+        "/ same value set again - send change notification
+        "/ manually (valueHolder did not ...)
+        self changed:#list
+    ] ifFalse:[
+        listHolder value:aCollection.
+    ].
 
-    "Modified: 24.4.1996 / 08:54:06 / cg"
+    "Modified: / 30.1.1998 / 02:34:08 / cg"
 !
 
 selection
@@ -419,5 +425,5 @@
 !SelectionInList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelList.st,v 1.21 1998-01-14 15:16:04 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelList.st,v 1.22 1998-01-30 01:40:27 cg Exp $'
 ! !
--- a/SelectionInList.st	Fri Jan 30 02:08:24 1998 +0100
+++ b/SelectionInList.st	Fri Jan 30 02:40:27 1998 +0100
@@ -241,9 +241,15 @@
 list:aCollection
     "set the list - thats the thingy held by the listHolder"
 
-    listHolder value:aCollection.
+    aCollection == listHolder value ifTrue:[
+        "/ same value set again - send change notification
+        "/ manually (valueHolder did not ...)
+        self changed:#list
+    ] ifFalse:[
+        listHolder value:aCollection.
+    ].
 
-    "Modified: 24.4.1996 / 08:54:06 / cg"
+    "Modified: / 30.1.1998 / 02:34:08 / cg"
 !
 
 selection
@@ -419,5 +425,5 @@
 !SelectionInList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInList.st,v 1.21 1998-01-14 15:16:04 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInList.st,v 1.22 1998-01-30 01:40:27 cg Exp $'
 ! !