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 |