class: DialogBox
added: #choose:fromList:values:lines:
comment/format in:
#choose:fromList:lines:
#choose:fromList:lines:initialSelection:
#choose:fromList:lines:initialSelection:title:
#choose:fromList:lines:title:
--- a/DialogBox.st Fri Apr 26 15:57:13 2013 +0200
+++ b/DialogBox.st Sat Apr 27 10:51:39 2013 +0200
@@ -4808,8 +4808,8 @@
choose:aString fromList:list lines:maxLines
"launch a Dialog showing the message and list.
- The user can select an item and click ok; in this case, the corresponding value
- from listValues is returned (doubleclick works as well).
+ The user can select an item and click ok; in this case, the value
+ from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel."
@@ -4839,8 +4839,8 @@
choose:aString fromList:list lines:maxLines initialSelection:initialSelection
"launch a Dialog showing the message and list.
- The user can select an item and click ok; in this case, the corresponding value
- from listValues is returned (doubleclick works as well).
+ The user can select an item and click ok; in this case, the value
+ from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel."
@@ -4868,8 +4868,8 @@
choose:aString fromList:list lines:maxLines initialSelection:initialSelection title:windowTitle
"launch a Dialog showing the message and list.
- The user can select an item and click ok; in this case, the corresponding value
- from listValues is returned (doubleclick works as well).
+ The user can select an item and click ok; in this case, the value
+ from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel."
@@ -4900,8 +4900,8 @@
choose:aString fromList:list lines:maxLines title:windowTitle
"launch a Dialog showing the message and list.
- The user can select an item and click ok; in this case, the corresponding value
- from listValues is returned (doubleclick works as well).
+ The user can select an item and click ok; in this case, the value
+ from list is returned (doubleclick works as well).
If cancel is pressed, the value of cancelBlock is returned.
Pressing ok without a selection is treated like cancel."
@@ -5491,6 +5491,38 @@
"Modified: / 02-03-2007 / 12:07:47 / cg"
!
+choose:aString fromList:list values:listValues lines:maxLines
+ "launch a Dialog showing the message and list.
+ The user can select an item and click ok; in this case, the corresponding value
+ from listValues is returned (doubleclick works as well).
+ If cancel is pressed, the value of cancelBlock is returned.
+ Pressing ok without a selection is treated like cancel."
+
+ ^ self
+ choose:aString
+ fromList:(list collect:[:each| each printString]) values:listValues
+ initialSelection:nil
+ buttons:nil values:nil
+ default:nil
+ lines:maxLines
+ cancel:nil
+ multiple:false
+ title:nil
+ postBuildBlock:nil
+
+ "
+ Transcript showCR:(
+ Dialog
+ choose:'choose any'
+ fromList:#('one' 'two' 'three')
+ values:#(1 2 3)
+ lines:4
+ )
+ "
+
+ "Modified: / 02-03-2007 / 12:08:31 / cg"
+!
+
choose:aString fromList:list values:listValues lines:maxLines cancel:cancelBlock
"launch a Dialog showing the message and list.
The user can select an item and click ok; in this case, the corresponding value
@@ -9879,11 +9911,11 @@
!DialogBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.335 2013-04-03 19:53:14 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.336 2013-04-27 08:51:39 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.335 2013-04-03 19:53:14 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.336 2013-04-27 08:51:39 cg Exp $'
! !