PopUpList.st
changeset 2494 6e3fc702b1af
parent 2464 633e11a8b774
child 2495 2a9d8cd995f4
equal deleted inserted replaced
2493:eae7c4d575b6 2494:6e3fc702b1af
   544     ].
   544     ].
   545     menu isNil ifTrue:[^ self].
   545     menu isNil ifTrue:[^ self].
   546     menuLabels := menu labels.
   546     menuLabels := menu labels.
   547 
   547 
   548     (useIndex not and:[values notNil]) ifTrue:[
   548     (useIndex not and:[values notNil]) ifTrue:[
   549         index := values indexOf:indexOrString
   549         values notNil ifTrue:[
       
   550             index := values indexOf:indexOrString
       
   551         ]
   550     ] ifFalse:[
   552     ] ifFalse:[
   551         indexOrString isNumber ifTrue:[
   553         indexOrString isNumber ifTrue:[
   552             index := indexOrString
   554             index := indexOrString
   553         ] ifFalse:[
   555         ] ifFalse:[
   554             index := menuLabels indexOf:indexOrString.
   556             menuLabels notNil ifTrue:[
       
   557                 index := menuLabels indexOf:indexOrString.
       
   558             ]
   555         ].
   559         ].
   556         "/ fails if list consists of symbols ...
   560         "/ fails if list consists of symbols ...
   557         "/ index := menu indexOf:indexOrString.
   561         "/ index := menu indexOf:indexOrString.
   558     ].
   562     ].
   559     index > menuLabels size ifTrue:[
   563     (index isNil or:[index > menuLabels size]) ifTrue:[
   560         index := 0
   564         index := 0
   561     ].
   565     ].
   562 
   566 
   563     index == 0 ifTrue:[
   567     index == 0 ifTrue:[
   564         newLabel := defaultLabel
   568         newLabel := defaultLabel
  1144 ! !
  1148 ! !
  1145 
  1149 
  1146 !PopUpList class methodsFor:'documentation'!
  1150 !PopUpList class methodsFor:'documentation'!
  1147 
  1151 
  1148 version
  1152 version
  1149     ^ '$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.74 2001-11-15 16:14:28 cg Exp $'
  1153     ^ '$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.75 2001-12-08 01:51:42 cg Exp $'
  1150 ! !
  1154 ! !