--- a/SelectionInListView.st Thu Sep 11 04:02:12 1997 +0200
+++ b/SelectionInListView.st Thu Sep 11 21:20:35 1997 +0200
@@ -10,6 +10,8 @@
hereby transferred.
"
+'From Smalltalk/X, Version:3.1.9 on 11-sep-1997 at 7:21:03 pm' !
+
ListView subclass:#SelectionInListView
instanceVariableNames:'selection actionBlock enabled hilightFgColor hilightBgColor
halfIntensityFgColor doubleClickActionBlock selectConditionBlock
@@ -2073,7 +2075,8 @@
|index
searchIndex "{Class: SmallInteger}"
startSearch "{Class: SmallInteger}"
- backSearch searchPrefix item|
+ backSearch searchPrefix item
+ mySize|
(key == #CursorUp) ifTrue:[
index := self previousBeforeSelection.
@@ -2112,15 +2115,18 @@
].
].
+ mySize := self size.
+
"
alphabetic keys: search for next entry
starting with keys character. If shift is pressed, search backward
"
- (self size > 0
+ (mySize > 0
and:[key isCharacter
and:[key isLetter]]) ifTrue:[
keyActionStyle isNil ifTrue:[^ self].
"/ multipleSelectOk ifTrue:[^ self].
+
keyActionStyle == #pass ifFalse:[
searchPrefix := key asLowercase asString.
@@ -2137,20 +2143,28 @@
selection size > 0 ifTrue:[
startSearch := selection first - 1
] ifFalse:[
- startSearch := selection - 1
+ selection isCollection ifTrue:[
+ startSearch := mySize
+ ] ifFalse:[
+ startSearch := selection - 1
+ ]
]
] ifFalse:[
- startSearch := self size
+ startSearch := mySize
].
startSearch < 1 ifTrue:[
- startSearch := self size.
+ startSearch := mySize.
].
] ifFalse:[
selection notNil ifTrue:[
selection size > 0 ifTrue:[
startSearch := selection last + 1
] ifFalse:[
- startSearch := selection + 1
+ selection isCollection ifTrue:[
+ startSearch := 1
+ ] ifFalse:[
+ startSearch := selection + 1
+ ]
]
] ifFalse:[
startSearch := 1
@@ -2170,10 +2184,10 @@
].
backSearch ifTrue:[
searchIndex := searchIndex - 1.
- searchIndex < 1 ifTrue:[searchIndex := self size]
+ searchIndex < 1 ifTrue:[searchIndex := mySize]
] ifFalse:[
searchIndex := searchIndex + 1.
- searchIndex > self size ifTrue:[searchIndex := 1].
+ searchIndex > mySize ifTrue:[searchIndex := 1].
].
searchIndex == startSearch ifTrue:[
^ self
@@ -2183,7 +2197,7 @@
].
^ super keyPress:key x:x y:y
- "Modified: 30.6.1997 / 16:38:42 / cg"
+ "Modified: 11.9.1997 / 19:20:00 / cg"
!
sizeChanged:how
@@ -3320,5 +3334,5 @@
!SelectionInListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.114 1997-08-26 15:32:48 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.115 1997-09-11 19:20:35 cg Exp $'
! !