--- a/EditField.st Wed Mar 04 14:38:04 1998 +0100
+++ b/EditField.st Thu Mar 05 13:36:22 1998 +0100
@@ -1780,17 +1780,26 @@
"redefined to aquire the text via the aspectMsg - not the listMsg,
and to ignore updates resulting from my own change."
+ |val|
+
"
ignore updates from my own change
"
lockUpdates ifTrue:[
- lockUpdates := false.
- ^ self
+ lockUpdates := false.
+ ^ self
].
(model notNil and:[aspectMsg notNil]) ifTrue:[
- self editValue:(model perform:aspectMsg).
+ aspectMsg == #value ifTrue:[
+ val := model value
+ ] ifFalse:[
+ val := model perform:aspectMsg
+ ].
+ self editValue:val.
]
+
+ "Modified: / 5.3.1998 / 03:42:30 / cg"
!
startAutoScrollDown:y
@@ -1965,5 +1974,5 @@
!EditField class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.100 1997-12-08 17:28:38 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.101 1998-03-05 12:36:22 cg Exp $'
! !
--- a/Toggle.st Wed Mar 04 14:38:04 1998 +0100
+++ b/Toggle.st Thu Mar 05 13:36:22 1998 +0100
@@ -499,22 +499,30 @@
!
getValueFromModel
+ "fetch my boolean value from the model (if there is a model around)
+ by sending it the aspectMessage, and update my look as required"
+
|val|
(model notNil and:[aspectMsg notNil]) ifTrue:[
- aspectMsg numArgs == 0 ifTrue:[
- val := model perform:aspectMsg
- ] ifFalse:[
- val := model perform:aspectMsg with:self
- ].
- val == true ifTrue:[ "allowing nil - treat as false"
- self turnOn
- ] ifFalse:[
- self turnOff
- ].
+ aspectMsg numArgs == 0 ifTrue:[
+ aspectMsg == #value ifTrue:[
+ val := model value
+ ] ifFalse:[
+ val := model perform:aspectMsg
+ ].
+ ] ifFalse:[
+ val := model perform:aspectMsg with:self
+ ].
+ val == true ifTrue:[ "allowing nil - treat as false"
+ self turnOn
+ ] ifFalse:[
+ self turnOff
+ ].
].
- "Created: 14.11.1995 / 21:08:43 / cg"
+ "Created: / 14.11.1995 / 21:08:43 / cg"
+ "Modified: / 5.3.1998 / 13:35:44 / cg"
!
lampImageHeight
@@ -603,5 +611,5 @@
!Toggle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.39 1997-11-03 15:25:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.40 1998-03-05 12:35:51 cg Exp $'
! !