DialogBox.st
changeset 3736 9d64e4a650bb
parent 3701 3f1716fef917
child 3756 7a333fc722bd
equal deleted inserted replaced
3735:3b616f1c9f9b 3736:9d64e4a650bb
  5298         requestNameSpace:'Select a NameSpace' 
  5298         requestNameSpace:'Select a NameSpace' 
  5299         initialAnswer:nil
  5299         initialAnswer:nil
  5300     "
  5300     "
  5301 !
  5301 !
  5302 
  5302 
  5303 requestProject:title initialAnswer:initialTextOrNil suggestions:suggestions
  5303 requestProject:title from:listOfProjects initialAnswer:initialTextOrNil suggestions:suggestions
  5304     "Ask for a project (package-id)"
  5304     "Ask for a project (package-id)"
  5305 
  5305 
  5306     |allProjects newProject box|
  5306     |newProject box|
  5307 
       
  5308     allProjects := Smalltalk allProjectIDs.
       
  5309 
  5307 
  5310     box := ListSelectionBox new.
  5308     box := ListSelectionBox new.
  5311     box useComboBoxWithList:suggestions.
  5309     box useComboBoxWithList:suggestions.
  5312     box title:title.
  5310     box title:title.
  5313     box list:allProjects.
  5311     box list:listOfProjects.
  5314     box okAction:[:sel | newProject := sel].
  5312     box okAction:[:sel | newProject := sel].
  5315     box initialText:initialTextOrNil.
  5313     box initialText:initialTextOrNil.
  5316     box entryCompletionBlock:(DoWhatIMeanSupport packageNameEntryCompletionBlock).
  5314     box entryCompletionBlock:(DoWhatIMeanSupport packageNameEntryCompletionBlock).
  5317     box label:'Enter Project'.
  5315     box label:'Enter Project'.
  5318     box showAtPointer.
  5316     box showAtPointer.
  5328         initialAnswer:'stx:libbasic' 
  5326         initialAnswer:'stx:libbasic' 
  5329         suggestions:#('foo' 'bar' 'baz')
  5327         suggestions:#('foo' 'bar' 'baz')
  5330     "
  5328     "
  5331 
  5329 
  5332     "Created: / 07-09-2006 / 11:40:17 / cg"
  5330     "Created: / 07-09-2006 / 11:40:17 / cg"
       
  5331 !
       
  5332 
       
  5333 requestProject:title initialAnswer:initialTextOrNil suggestions:suggestions
       
  5334     "Ask for a project (package-id)"
       
  5335 
       
  5336     |allProjects|
       
  5337 
       
  5338     allProjects := Smalltalk allProjectIDs.
       
  5339     ^ self
       
  5340         requestProject:title 
       
  5341         from:allProjects
       
  5342         initialAnswer:initialTextOrNil 
       
  5343         suggestions:suggestions
  5333 !
  5344 !
  5334 
  5345 
  5335 requestSelector:aString initialAnswer:initial
  5346 requestSelector:aString initialAnswer:initial
  5336     "launch a Dialog, which allows user to enter a method selector.
  5347     "launch a Dialog, which allows user to enter a method selector.
  5337      Return the entered string (may be empty string) or nil (if cancel was pressed).
  5348      Return the entered string (may be empty string) or nil (if cancel was pressed).
  8732 ! !
  8743 ! !
  8733 
  8744 
  8734 !DialogBox class methodsFor:'documentation'!
  8745 !DialogBox class methodsFor:'documentation'!
  8735 
  8746 
  8736 version
  8747 version
  8737     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.274 2008-09-04 09:57:44 cg Exp $'
  8748     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.275 2008-10-18 09:50:55 cg Exp $'
  8738 ! !
  8749 ! !
  8739 
  8750 
  8740 DialogBox initialize!
  8751 DialogBox initialize!