Model.st
changeset 353 e9071756b6a7
parent 337 e6642ba7cca9
child 720 b0e0977e1759
equal deleted inserted replaced
352:ba7970fbcde2 353:e9071756b6a7
    15 	classVariableNames:''
    15 	classVariableNames:''
    16 	poolDictionaries:''
    16 	poolDictionaries:''
    17 	category:'Interface-Support-Models'
    17 	category:'Interface-Support-Models'
    18 !
    18 !
    19 
    19 
    20 !Model  class methodsFor:'documentation'!
    20 !Model class methodsFor:'documentation'!
    21 
    21 
    22 copyright
    22 copyright
    23 "
    23 "
    24  COPYRIGHT (c) 1992 by Claus Gittinger
    24  COPYRIGHT (c) 1992 by Claus Gittinger
    25 	      All Rights Reserved
    25 	      All Rights Reserved
    96             "/ store more dependents in the dependents collection
    96             "/ store more dependents in the dependents collection
    97             "/
    97             "/
    98             deps isCollection ifTrue:[
    98             deps isCollection ifTrue:[
    99                 deps add:anObject
    99                 deps add:anObject
   100             ] ifFalse:[
   100             ] ifFalse:[
   101                 dependents := IdentitySet with:dependents with:anObject
   101                 deps == anObject ifFalse:[
       
   102                     dependents := (IdentitySet with:dependents with:anObject)
       
   103                 ]
   102             ]
   104             ]
   103         ]
   105         ]
   104     ] valueNowOrOnUnwindDo:[
   106     ] valueNowOrOnUnwindDo:[
   105         wasBlocked ifFalse:[
   107         wasBlocked ifFalse:[
   106             OperatingSystem unblockInterrupts
   108             OperatingSystem unblockInterrupts
   107         ]
   109         ]
   108     ]
   110     ]
   109 
   111 
   110     "Modified: 19.7.1996 / 12:39:22 / cg"
   112     "Modified: 8.1.1997 / 23:40:30 / cg"
   111 !
   113 !
   112 
   114 
   113 dependents
   115 dependents
   114     "return a Collection of dependents - nil if there is none"
   116     "return a Collection of dependents - nil if there is none"
   115 
   117 
   188                             dependents := dep
   190                             dependents := dep
   189                         ]
   191                         ]
   190                     ]
   192                     ]
   191                 ]
   193                 ]
   192             ] ifFalse:[
   194             ] ifFalse:[
   193                 dependents := nil
   195                 deps == anObject ifTrue:[
       
   196                     dependents := nil
       
   197                 ]
   194             ]
   198             ]
   195         ]
   199         ]
   196     ] valueNowOrOnUnwindDo:[
   200     ] valueNowOrOnUnwindDo:[
   197         wasBlocked ifFalse:[
   201         wasBlocked ifFalse:[
   198             OperatingSystem unblockInterrupts
   202             OperatingSystem unblockInterrupts
   199         ]
   203         ]
   200     ]
   204     ]
   201 
   205 
   202     "Modified: 19.7.1996 / 12:40:59 / cg"
   206     "Modified: 8.1.1997 / 23:41:39 / cg"
   203 ! !
   207 ! !
   204 
   208 
   205 !Model methodsFor:'dependents access (non weak)'!
   209 !Model methodsFor:'dependents access (non weak)'!
   206 
   210 
   207 addNonWeakDependent:anObject
   211 addNonWeakDependent:anObject
   243     ^ self removeDependent:anObject
   247     ^ self removeDependent:anObject
   244 
   248 
   245     "Created: 19.4.1996 / 12:19:40 / cg"
   249     "Created: 19.4.1996 / 12:19:40 / cg"
   246 ! !
   250 ! !
   247 
   251 
   248 !Model  class methodsFor:'documentation'!
   252 !Model class methodsFor:'documentation'!
   249 
   253 
   250 version
   254 version
   251     ^ '$Header: /cvs/stx/stx/libview2/Model.st,v 1.26 1996-10-14 21:26:28 stefan Exp $'
   255     ^ '$Header: /cvs/stx/stx/libview2/Model.st,v 1.27 1997-01-08 22:45:36 cg Exp $'
   252 ! !
   256 ! !