--- a/ListSelectionBox.st Thu Sep 07 19:00:39 2000 +0200
+++ b/ListSelectionBox.st Thu Sep 07 19:39:31 2000 +0200
@@ -10,8 +10,10 @@
hereby transferred.
"
+"{ Package: 'stx:libwidg' }"
+
EnterBox subclass:#ListSelectionBox
- instanceVariableNames:'selectionList'
+ instanceVariableNames:'selectionList selectionChangeCallback'
classVariableNames:''
poolDictionaries:''
category:'Views-DialogBoxes'
@@ -152,6 +154,12 @@
selectionList list:aList
!
+selectionChangeCallback:aBlock
+ "allows special actions to be hooked in, whe nthe selection changes"
+
+ selectionChangeCallback := aBlock.
+!
+
selectionIndex
^ selectionList selection
@@ -330,8 +338,11 @@
"selections in list get forwarded to enterfield"
enterField notNil ifTrue:[
- enterField contents:(selectionList selectionValue)
- ]
+ enterField contents:(selectionList selectionValue)
+ ].
+ selectionChangeCallback notNil ifTrue:[
+ selectionChangeCallback value:selectionList selection
+ ].
"Modified: 26.10.1995 / 17:20:06 / cg"
! !
@@ -339,5 +350,5 @@
!ListSelectionBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ListSelectionBox.st,v 1.39 1997-07-26 14:21:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ListSelectionBox.st,v 1.40 2000-09-07 17:39:31 cg Exp $'
! !