class: DialogBox
authorClaus Gittinger <cg@exept.de>
Mon, 03 Feb 2014 11:33:03 +0100
changeset 4871 fea4848d75cd
parent 4870 2714e7b0261e
child 4872 ab28da9faf17
class: DialogBox changed: #choose:fromList:values:initialSelection:buttons:values:default:lines:width:cancel:multiple:title:postBuildBlock:
DialogBox.st
--- a/DialogBox.st	Tue Jan 28 20:27:02 2014 +0100
+++ b/DialogBox.st	Mon Feb 03 11:33:03 2014 +0100
@@ -5299,6 +5299,8 @@
 
     |box listView panel sel haveDefault|
 
+    haveDefault := false.
+
     box := Dialog new.
     (box addTextLabel:aString) adjust:#left.
 
@@ -5347,7 +5349,6 @@
     buttonLabels size > 0 ifTrue:[
         panel := HorizontalPanelView new.
         panel horizontalLayout:#fitSpace.
-        haveDefault := false.
         buttonLabels keysAndValuesDo:[:index :label |
             |b|
 
@@ -5357,6 +5358,7 @@
 
                 listSelection := listView selection.
                 listSelection notNil ifTrue:[
+                    listSelection isCollection ifFalse:[ listSelection := Array with:listSelection ].
                     selectionValues := listValues isNil 
                                         ifTrue:[ listSelection ]
                                         ifFalse:[ listSelection collect:[:idx | listValues at:idx]].
@@ -10051,11 +10053,11 @@
 !DialogBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.346 2014-01-05 12:57:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.347 2014-02-03 10:33:03 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.346 2014-01-05 12:57:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.347 2014-02-03 10:33:03 cg Exp $'
 ! !