#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Tue, 02 Apr 2019 18:02:15 +0200
changeset 6040 a3296ee359af
parent 6039 121d71b79bda
child 6041 a8c62dc42ff2
#OTHER by cg class: ComboView changed: #deltaSelect: #list: (send #isOrdered instead of #isSequenceable)
ComboView.st
--- a/ComboView.st	Thu Mar 28 15:35:50 2019 +0100
+++ b/ComboView.st	Tue Apr 02 18:02:15 2019 +0200
@@ -390,14 +390,15 @@
      to be send from the outside if no model/listHolder is used."
 
     list ~~ aList ifTrue:[
-        self assert:(aList isNil or:[aList isSequenceable]).
+        self assert:(aList isNil or:[aList isOrdered "isSequenceable"]).
         currentIndex := 1.
         list := aList.
     ].
     "maybe some values have been added to / removed from list"
     self enableStateChanged.
 
-    "Modified: / 30.3.1999 / 14:17:38 / stefan"
+    "Modified: / 30-03-1999 / 14:17:38 / stefan"
+    "Modified: / 02-04-2019 / 18:01:15 / Claus Gittinger"
 ! !
 
 !ComboView methodsFor:'accessing-look'!
@@ -811,20 +812,22 @@
 deltaSelect:delta
     "change selection by delta. Wrap at start/end"
 
-    |newIndex|
+    |listSize newIndex|
 
-    list size == 0 ifTrue:[^ self].
+    (listSize := list size) == 0 ifTrue:[^ self].
 
     newIndex := currentIndex + delta.
-    newIndex > list size ifTrue:[
+    newIndex > listSize ifTrue:[
         newIndex := 1.
     ] ifFalse:[
         newIndex <= 0 ifTrue:[
-            newIndex := list size.
+            newIndex := listSize.
         ].
     ].
 
     self select:newIndex.
+
+    "Modified: / 02-04-2019 / 17:59:42 / Claus Gittinger"
 !
 
 pullMenu