AppModel.st
changeset 937 b4a2ba99d791
parent 933 36d38398b0c0
child 953 af2acca80c21
equal deleted inserted replaced
936:d3d50ac7cdd0 937:b4a2ba99d791
  1052     ^ self valueHolderFor:aSelector initialValue:anObject changeMessage:nil
  1052     ^ self valueHolderFor:aSelector initialValue:anObject changeMessage:nil
  1053 
  1053 
  1054 
  1054 
  1055 !
  1055 !
  1056 
  1056 
  1057 valueHolderFor:aSelector initialValue:anObject changeMessage:aSelectorOrArray
  1057 valueHolderFor:aSelector initialValue:anObject changeMessage:aSelectorOrArrayOrNil
  1058     "Return a ValueHolder on anObject.  aSelectorOrArray is the change information 
  1058     "Return a ValueHolder on anObject.  aSelectorOrArrayOrNil is the change information 
  1059      for the ValueHolder.  This argument is either a Symbol or an Array of two elements.  
  1059      for the ValueHolder.  This argument is either a Symbol or an Array of two elements.  
  1060      If it is a Symbol, then it is the change message and the interested object is understood
  1060      If it is a Symbol, then it is the change message and the interested object is understood
  1061      to be the reciever.  If it is an Array, then the first element is the change message and 
  1061      to be the reciever.  If it is an Array, then the first element is the change message and 
  1062      the second element is the interested object. " 
  1062      the second element is the interested object. " 
  1063 
  1063 
       
  1064     |holder|
       
  1065 
  1064     (builder bindings includesKey:aSelector) ifFalse:[
  1066     (builder bindings includesKey:aSelector) ifFalse:[
  1065         ^ self registerInterestIn:(ValueHolder with:anObject) using:aSelectorOrArray
  1067         holder := ValueHolder with:anObject.
       
  1068         builder aspectAt:aSelector put:holder.
       
  1069         aSelectorOrArrayOrNil notNil ifTrue:[
       
  1070             ^ self registerInterestIn:holder using:aSelectorOrArrayOrNil
       
  1071         ].
       
  1072         ^ holder
  1066     ].
  1073     ].
  1067     ^ builder aspectAt:aSelector
  1074     ^ builder aspectAt:aSelector
  1068 
  1075 
  1069     "Modified: / 31.10.1997 / 18:20:31 / cg"
  1076     "Modified: / 21.5.1998 / 03:31:28 / cg"
  1070 ! !
  1077 ! !
  1071 
  1078 
  1072 !ApplicationModel methodsFor:'initialization'!
  1079 !ApplicationModel methodsFor:'initialization'!
  1073 
  1080 
  1074 addTopViewsToCurrentProject
  1081 addTopViewsToCurrentProject
  1718 ! !
  1725 ! !
  1719 
  1726 
  1720 !ApplicationModel class methodsFor:'documentation'!
  1727 !ApplicationModel class methodsFor:'documentation'!
  1721 
  1728 
  1722 version
  1729 version
  1723     ^ '$Header: /cvs/stx/stx/libview2/Attic/AppModel.st,v 1.81 1998-05-20 19:55:55 cg Exp $'
  1730     ^ '$Header: /cvs/stx/stx/libview2/Attic/AppModel.st,v 1.82 1998-05-21 01:45:09 cg Exp $'
  1724 ! !
  1731 ! !
  1725 ApplicationModel initialize!
  1732 ApplicationModel initialize!