allow for subclasses to redefine character search
authorClaus Gittinger <cg@exept.de>
Mon, 08 May 2000 11:27:14 +0200
changeset 1768 04b330a75f75
parent 1767 e6325bfd4fad
child 1769 68d65f17df56
allow for subclasses to redefine character search
SelectionInListModelView.st
--- a/SelectionInListModelView.st	Fri May 05 11:27:31 2000 +0200
+++ b/SelectionInListModelView.st	Mon May 08 11:27:14 2000 +0200
@@ -962,6 +962,16 @@
     idx ~~ 0 ifTrue:[^ self selection:idx]
 !
 
+characterSearchItemStringAt:anIndex
+    |item|
+
+    item := list at:anIndex ifAbsent:nil.
+    item isNil ifTrue:[^ item]. 
+
+    ^ item perform:#string ifNotUnderstood:nil.
+
+!
+
 doubleClicked
     "handle a double click
     "
@@ -995,11 +1005,13 @@
         char  := aCharacter asUppercase.
 
         start to:stop by:aStep do:[:anIndex|
-            item := list at:anIndex ifAbsent:nil.
-            item isNil ifTrue:[^ 0].    "/ list changed
-
-            lbl := item perform:#string ifNotUnderstood:nil.
-
+            lbl := self characterSearchItemStringAt:anIndex.
+"/
+"/            item := list at:anIndex ifAbsent:nil.
+"/            item isNil ifTrue:[^ 0].    "/ list changed
+"/
+"/            lbl := item perform:#string ifNotUnderstood:nil.
+"/
             lbl notNil ifTrue:[
                 cmp := lbl string at:1 ifAbsent:nil.
 
@@ -1578,5 +1590,5 @@
 !SelectionInListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.37 2000-04-12 14:44:29 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.38 2000-05-08 09:27:14 cg Exp $'
 ! !