DialogBox.st
changeset 5866 ecd5e5b0ef88
parent 5854 5b12827d92f7
child 5876 acde20e88b75
equal deleted inserted replaced
5865:e3e40eabdebc 5866:ecd5e5b0ef88
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1994 by Claus Gittinger
     4  COPYRIGHT (c) 1994 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
  3525                     abort:nil 
  3527                     abort:nil 
  3526                     version:nil 
  3528                     version:nil 
  3527                     ifFail:nil 
  3529                     ifFail:nil 
  3528                     pattern:nil 
  3530                     pattern:nil 
  3529                     fromDirectory:directoryOrNil 
  3531                     fromDirectory:directoryOrNil 
  3530                     whenBoxCreatedEvaluate:[:box | (dialog := box) appendButtonVisibleHolder value:appendActionOrNil notNil].
  3532                     whenBoxCreatedEvaluate:[:box | 
       
  3533                         (dialog := box) appendButtonVisibleHolder value:appendActionOrNil notNil
       
  3534                     ].
  3531 
  3535 
  3532         doAppend := dialog appendWasPressed 
  3536         doAppend := dialog appendWasPressed 
  3533     ] ifFalse:[
  3537     ] ifFalse:[
  3534         fileBox := FileSaveBox
  3538         fileBox := FileSaveBox
  3535                         title:title
  3539                         title:title
  3545 
  3549 
  3546     fileName size > 0 ifTrue:[
  3550     fileName size > 0 ifTrue:[
  3547         (doAppend ifTrue:[appendActionOrNil] ifFalse:[action])
  3551         (doAppend ifTrue:[appendActionOrNil] ifFalse:[action])
  3548             value:fileName
  3552             value:fileName
  3549     ].
  3553     ].
  3550     ^ self.
  3554     ^ fileName.
  3551 
  3555 
  3552     "
  3556     "
  3553      Dialog
  3557      Dialog
  3554         requestSaveFileName:'Save dialog example with append' 
  3558         requestSaveFileName:'Save dialog example with append' 
  3555         default:'xxx.txt' 
  3559         default:'xxx.txt'