DialogBox.st
changeset 4581 b46c4e19de57
parent 4556 8b2117cb1f7b
child 4627 57034e0b4dc3
equal deleted inserted replaced
4580:d888cfb6a97c 4581:b46c4e19de57
  4806 
  4806 
  4807 !DialogBox class methodsFor:'multiple choice dialogs'!
  4807 !DialogBox class methodsFor:'multiple choice dialogs'!
  4808 
  4808 
  4809 choose:aString fromList:list lines:maxLines 
  4809 choose:aString fromList:list lines:maxLines 
  4810     "launch a Dialog showing the message and list.
  4810     "launch a Dialog showing the message and list.
  4811      The user can select an item and click ok; in this case, the corresponding value
  4811      The user can select an item and click ok; in this case, the value
  4812      from listValues is returned (doubleclick works as well).
  4812      from list is returned (doubleclick works as well).
  4813      If cancel is pressed, the value of cancelBlock is returned.
  4813      If cancel is pressed, the value of cancelBlock is returned.
  4814      Pressing ok without a selection is treated like cancel."
  4814      Pressing ok without a selection is treated like cancel."
  4815 
  4815 
  4816     ^ self
  4816     ^ self
  4817         choose:aString 
  4817         choose:aString 
  4837     "Modified: / 02-03-2007 / 12:08:31 / cg"
  4837     "Modified: / 02-03-2007 / 12:08:31 / cg"
  4838 !
  4838 !
  4839 
  4839 
  4840 choose:aString fromList:list lines:maxLines initialSelection:initialSelection
  4840 choose:aString fromList:list lines:maxLines initialSelection:initialSelection
  4841     "launch a Dialog showing the message and list.
  4841     "launch a Dialog showing the message and list.
  4842      The user can select an item and click ok; in this case, the corresponding value
  4842      The user can select an item and click ok; in this case, the value
  4843      from listValues is returned (doubleclick works as well).
  4843      from list is returned (doubleclick works as well).
  4844      If cancel is pressed, the value of cancelBlock is returned.
  4844      If cancel is pressed, the value of cancelBlock is returned.
  4845      Pressing ok without a selection is treated like cancel."
  4845      Pressing ok without a selection is treated like cancel."
  4846 
  4846 
  4847     ^ self
  4847     ^ self
  4848         choose:aString 
  4848         choose:aString 
  4866     "Modified: 27.1.1996 / 14:17:07 / cg"
  4866     "Modified: 27.1.1996 / 14:17:07 / cg"
  4867 !
  4867 !
  4868 
  4868 
  4869 choose:aString fromList:list lines:maxLines initialSelection:initialSelection title:windowTitle
  4869 choose:aString fromList:list lines:maxLines initialSelection:initialSelection title:windowTitle
  4870     "launch a Dialog showing the message and list.
  4870     "launch a Dialog showing the message and list.
  4871      The user can select an item and click ok; in this case, the corresponding value
  4871      The user can select an item and click ok; in this case, the value
  4872      from listValues is returned (doubleclick works as well).
  4872      from list is returned (doubleclick works as well).
  4873      If cancel is pressed, the value of cancelBlock is returned.
  4873      If cancel is pressed, the value of cancelBlock is returned.
  4874      Pressing ok without a selection is treated like cancel."
  4874      Pressing ok without a selection is treated like cancel."
  4875 
  4875 
  4876     ^ self
  4876     ^ self
  4877         choose:aString 
  4877         choose:aString 
  4898     "Created: / 02-03-2007 / 12:06:39 / cg"
  4898     "Created: / 02-03-2007 / 12:06:39 / cg"
  4899 !
  4899 !
  4900 
  4900 
  4901 choose:aString fromList:list lines:maxLines title:windowTitle
  4901 choose:aString fromList:list lines:maxLines title:windowTitle
  4902     "launch a Dialog showing the message and list.
  4902     "launch a Dialog showing the message and list.
  4903      The user can select an item and click ok; in this case, the corresponding value
  4903      The user can select an item and click ok; in this case, the value
  4904      from listValues is returned (doubleclick works as well).
  4904      from list is returned (doubleclick works as well).
  4905      If cancel is pressed, the value of cancelBlock is returned.
  4905      If cancel is pressed, the value of cancelBlock is returned.
  4906      Pressing ok without a selection is treated like cancel."
  4906      Pressing ok without a selection is treated like cancel."
  4907 
  4907 
  4908     ^ self
  4908     ^ self
  4909         choose:aString 
  4909         choose:aString 
  5489         postBuildBlock:aBlockOrNil
  5489         postBuildBlock:aBlockOrNil
  5490 
  5490 
  5491     "Modified: / 02-03-2007 / 12:07:47 / cg"
  5491     "Modified: / 02-03-2007 / 12:07:47 / cg"
  5492 !
  5492 !
  5493 
  5493 
       
  5494 choose:aString fromList:list values:listValues lines:maxLines 
       
  5495     "launch a Dialog showing the message and list.
       
  5496      The user can select an item and click ok; in this case, the corresponding value
       
  5497      from listValues is returned (doubleclick works as well).
       
  5498      If cancel is pressed, the value of cancelBlock is returned.
       
  5499      Pressing ok without a selection is treated like cancel."
       
  5500 
       
  5501     ^ self
       
  5502         choose:aString 
       
  5503         fromList:(list collect:[:each| each printString]) values:listValues
       
  5504         initialSelection:nil
       
  5505         buttons:nil values:nil
       
  5506         default:nil
       
  5507         lines:maxLines
       
  5508         cancel:nil
       
  5509         multiple:false
       
  5510         title:nil
       
  5511         postBuildBlock:nil
       
  5512 
       
  5513     "
       
  5514      Transcript showCR:(
       
  5515          Dialog 
       
  5516             choose:'choose any' 
       
  5517             fromList:#('one' 'two' 'three') 
       
  5518             values:#(1 2 3) 
       
  5519             lines:4
       
  5520      )
       
  5521     "
       
  5522 
       
  5523     "Modified: / 02-03-2007 / 12:08:31 / cg"
       
  5524 !
       
  5525 
  5494 choose:aString fromList:list values:listValues lines:maxLines cancel:cancelBlock
  5526 choose:aString fromList:list values:listValues lines:maxLines cancel:cancelBlock
  5495     "launch a Dialog showing the message and list.
  5527     "launch a Dialog showing the message and list.
  5496      The user can select an item and click ok; in this case, the corresponding value
  5528      The user can select an item and click ok; in this case, the corresponding value
  5497      from listValues is returned (doubleclick works as well).
  5529      from listValues is returned (doubleclick works as well).
  5498      If cancel is pressed, the value of cancelBlock is returned.
  5530      If cancel is pressed, the value of cancelBlock is returned.
  9877 ! !
  9909 ! !
  9878 
  9910 
  9879 !DialogBox class methodsFor:'documentation'!
  9911 !DialogBox class methodsFor:'documentation'!
  9880 
  9912 
  9881 version
  9913 version
  9882     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.335 2013-04-03 19:53:14 cg Exp $'
  9914     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.336 2013-04-27 08:51:39 cg Exp $'
  9883 !
  9915 !
  9884 
  9916 
  9885 version_CVS
  9917 version_CVS
  9886     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.335 2013-04-03 19:53:14 cg Exp $'
  9918     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.336 2013-04-27 08:51:39 cg Exp $'
  9887 ! !
  9919 ! !
  9888 
  9920 
  9889 
  9921 
  9890 DialogBox initialize!
  9922 DialogBox initialize!