SelectionInListView.st
branchjv
changeset 5853 4f7a9587dcfa
parent 5828 990b7b5c4a94
parent 5852 9543b58b0e6c
child 5867 ae5f44ecba6e
equal deleted inserted replaced
5851:4826a8e601e7 5853:4f7a9587dcfa
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 1989 by Claus Gittinger
     2  COPYRIGHT (c) 1989 by Claus Gittinger
     5 	      All Rights Reserved
     3 	      All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
  4194     ].
  4192     ].
  4195 
  4193 
  4196     items notNil ifTrue:[
  4194     items notNil ifTrue:[
  4197         lineNo := items findFirst:[:el | anObject = el]
  4195         lineNo := items findFirst:[:el | anObject = el]
  4198     ] ifFalse:[
  4196     ] ifFalse:[
  4199         s := anObject string.
  4197         lineNo := list indexOf:anObject ifAbsent:[nil].
  4200         lineNo := list findFirst:[:el | s = el string]
  4198         lineNo isNil ifTrue:[
       
  4199             s := anObject string.
       
  4200             lineNo := list findFirst:[:el | s = el string]
       
  4201         ].
  4201     ].
  4202     ].
  4202     lineNo ~~ 0 ifTrue:[
  4203     lineNo ~~ 0 ifTrue:[
  4203         self setSelection:lineNo
  4204         self setSelection:lineNo
  4204     ]
  4205     ]
  4205 !
  4206 !