care for interrupts while adding/removing dependents
authorClaus Gittinger <cg@exept.de>
Tue, 20 Feb 1996 19:24:36 +0100
changeset 163 80f4fe3bcc71
parent 162 cbbd2f3422a3
child 164 682dcd575c9a
care for interrupts while adding/removing dependents
Model.st
--- a/Model.st	Sat Feb 10 14:11:10 1996 +0100
+++ b/Model.st	Tue Feb 20 19:24:36 1996 +0100
@@ -11,10 +11,10 @@
 "
 
 Object subclass:#Model
-	 instanceVariableNames:'dependents'
-	 classVariableNames:''
-	 poolDictionaries:''
-	 category:'Interface-Support-Models'
+	instanceVariableNames:'dependents'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Support-Models'
 !
 
 !Model class methodsFor:'documentation'!
@@ -66,16 +66,20 @@
 
     |deps|
 
-    deps := dependents.
-    (deps isNil and:[anObject isCollection not]) ifTrue:[
-	dependents := anObject
-    ] ifFalse:[
-	deps isCollection ifTrue:[
-	    deps add:anObject
-	] ifFalse:[
-	    dependents := IdentitySet with:dependents with:anObject
-	]
-    ]
+    [
+        deps := dependents.
+        (deps isNil and:[anObject isCollection not]) ifTrue:[
+            dependents := anObject
+        ] ifFalse:[
+            deps isCollection ifTrue:[
+                deps add:anObject
+            ] ifFalse:[
+                dependents := IdentitySet with:dependents with:anObject
+            ]
+        ]
+    ] valueUninterruptably
+
+    "Modified: 20.2.1996 / 19:22:53 / cg"
 !
 
 dependents
@@ -114,17 +118,21 @@
 
     |deps sz|
 
-    deps := dependents.
-    deps notNil ifTrue:[
-	deps isCollection ifTrue:[
-	    deps remove:anObject ifAbsent:[].
-	    (sz := deps size) == 0 ifTrue:[
-		dependents := nil
-	    ]
-	] ifFalse:[
-	    dependents := nil
-	]
-    ]
+    [
+        deps := dependents.
+        deps notNil ifTrue:[
+            deps isCollection ifTrue:[
+                deps remove:anObject ifAbsent:[].
+                (sz := deps size) == 0 ifTrue:[
+                    dependents := nil
+                ]
+            ] ifFalse:[
+                dependents := nil
+            ]
+        ]
+    ] valueUninterruptably
+
+    "Modified: 20.2.1996 / 19:23:26 / cg"
 ! !
 
 !Model methodsFor:'drawing'!
@@ -144,5 +152,5 @@
 !Model class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Model.st,v 1.18 1996-01-15 17:37:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Model.st,v 1.19 1996-02-20 18:24:36 cg Exp $'
 ! !