--- a/SelListV.st Wed Feb 07 19:37:45 1996 +0100
+++ b/SelListV.st Wed Feb 07 19:46:19 1996 +0100
@@ -1521,14 +1521,14 @@
backSearch searchPrefix|
(key == #CursorUp) ifTrue:[
- index := self previousBeforeSelection.
- self key:key select:index x:x y:y.
- ^ self
+ index := self previousBeforeSelection.
+ self key:key select:index x:x y:y.
+ ^ self
].
(key == #CursorDown) ifTrue:[
- index := self nextAfterSelection.
- self key:key select:index x:x y:y.
- ^ self
+ index := self nextAfterSelection.
+ self key:key select:index x:x y:y.
+ ^ self
].
"/
"/ stupid: Home and End are cought in ScrollableView
@@ -1537,24 +1537,24 @@
"/ ... and implement it here)
"/
(key == #BeginOfText) ifTrue:[
- self key:key select:1 x:x y:y.
- ^ self
+ self key:key select:1 x:x y:y.
+ ^ self
].
(key == #EndOfText) ifTrue:[
- index := self size.
- self key:key select:index x:x y:y.
- ^ self
+ index := self size.
+ self key:key select:index x:x y:y.
+ ^ self
].
key == #Return ifTrue:[
- returnKeyActionStyle == #doubleClick ifTrue:[
- selection notNil ifTrue:[
- self doubleClicked
- ].
- ^ self
- ].
- returnKeyActionStyle ~~ #pass ifTrue:[
- ^ self
- ].
+ returnKeyActionStyle == #doubleClick ifTrue:[
+ selection notNil ifTrue:[
+ self doubleClicked
+ ].
+ ^ self
+ ].
+ returnKeyActionStyle ~~ #pass ifTrue:[
+ ^ self
+ ].
].
"
@@ -1564,9 +1564,9 @@
(self size > 0
and:[key isCharacter
and:[key isLetter]]) ifTrue:[
- keyActionStyle isNil ifTrue:[^ self].
- keyActionStyle == #pass ifFalse:[
- searchPrefix := key asLowercase asString.
+ keyActionStyle isNil ifTrue:[^ self].
+ keyActionStyle == #pass ifFalse:[
+ searchPrefix := key asLowercase asString.
"/ ... isISearch... ifFalse:[
"/ iSearchString := ''
@@ -1575,54 +1575,56 @@
"/ searchPrefix := iSearchString
"/ ].
- backSearch := device shiftDown.
- backSearch ifTrue:[
- selection notNil ifTrue:[
- selection size > 0 ifTrue:[
- startSearch := selection first - 1
- ] ifFalse:[
- startSearch := selection - 1
- ]
- ] ifFalse:[
- startSearch := self size
- ].
- startSearch < 1 ifTrue:[
- startSearch := self size.
- ].
- ] ifFalse:[
- selection notNil ifTrue:[
- selection size > 0 ifTrue:[
- startSearch := selection last + 1
- ] ifFalse:[
- startSearch := selection + 1
- ]
- ] ifFalse:[
- startSearch := 1
- ].
- startSearch > self size ifTrue:[
- startSearch := 1.
- ].
- ].
- searchIndex := startSearch.
- [true] whileTrue:[
- (((self at:searchIndex) asString) withoutSeparators asLowercase startsWith:searchPrefix) ifTrue:[
- searchIndex = selection ifTrue:[^ self].
- ^ self key:key select:searchIndex x:x y:y
- ].
- backSearch ifTrue:[
- searchIndex := searchIndex - 1.
- searchIndex < 1 ifTrue:[searchIndex := self size]
- ] ifFalse:[
- searchIndex := searchIndex + 1.
- searchIndex > self size ifTrue:[searchIndex := 1].
- ].
- searchIndex == startSearch ifTrue:[
- ^ self
- ]
- ]
- ].
+ backSearch := self sensor shiftDown.
+ backSearch ifTrue:[
+ selection notNil ifTrue:[
+ selection size > 0 ifTrue:[
+ startSearch := selection first - 1
+ ] ifFalse:[
+ startSearch := selection - 1
+ ]
+ ] ifFalse:[
+ startSearch := self size
+ ].
+ startSearch < 1 ifTrue:[
+ startSearch := self size.
+ ].
+ ] ifFalse:[
+ selection notNil ifTrue:[
+ selection size > 0 ifTrue:[
+ startSearch := selection last + 1
+ ] ifFalse:[
+ startSearch := selection + 1
+ ]
+ ] ifFalse:[
+ startSearch := 1
+ ].
+ startSearch > self size ifTrue:[
+ startSearch := 1.
+ ].
+ ].
+ searchIndex := startSearch.
+ [true] whileTrue:[
+ (((self at:searchIndex) asString) withoutSeparators asLowercase startsWith:searchPrefix) ifTrue:[
+ searchIndex = selection ifTrue:[^ self].
+ ^ self key:key select:searchIndex x:x y:y
+ ].
+ backSearch ifTrue:[
+ searchIndex := searchIndex - 1.
+ searchIndex < 1 ifTrue:[searchIndex := self size]
+ ] ifFalse:[
+ searchIndex := searchIndex + 1.
+ searchIndex > self size ifTrue:[searchIndex := 1].
+ ].
+ searchIndex == startSearch ifTrue:[
+ ^ self
+ ]
+ ]
+ ].
].
^ super keyPress:key x:x y:y
+
+ "Modified: 7.2.1996 / 19:20:18 / cg"
!
sizeChanged:how
@@ -2618,5 +2620,5 @@
!SelectionInListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.49 1996-02-06 16:32:15 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.50 1996-02-07 18:45:20 cg Exp $'
! !