--- a/ComboBoxView.st Wed Nov 19 13:13:56 2003 +0100
+++ b/ComboBoxView.st Thu Nov 20 17:15:32 2003 +0100
@@ -14,10 +14,10 @@
"{ Package: 'stx:libwidg2' }"
ComboView subclass:#ComboBoxView
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:'Views-Interactors'
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Views-Interactors'
!
!ComboBoxView class methodsFor:'documentation'!
@@ -173,6 +173,18 @@
"Modified: 28.2.1996 / 15:11:03 / cg"
! !
+!ComboBoxView methodsFor:'change & update'!
+
+update:something with:aParameter from:changedObject
+ changedObject == field model ifTrue:[
+ action notNil ifTrue:[
+ action value:(changedObject value)
+ ].
+ ^ self.
+ ].
+ super update:something with:aParameter from:changedObject
+! !
+
!ComboBoxView methodsFor:'event handling'!
hasKeyboardFocus:aBoolean
@@ -199,9 +211,12 @@
!
initializeField
+ |m|
+
field := self editFieldClass in:self.
field borderWidth:0.
- field model:(ValueHolder newString).
+ field model:(m := ValueHolder newString).
+ m addDependent:self.
field acceptOnLostFocus:true.
field acceptOnLeave:true.
field leaveAction:[:key | self fieldLeft].
@@ -276,5 +291,5 @@
!ComboBoxView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/ComboBoxView.st,v 1.26 2002-07-04 10:37:07 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/ComboBoxView.st,v 1.27 2003-11-20 16:15:32 cg Exp $'
! !