home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
fdlg.zip
/
SAS_S.CLS
< prev
next >
Wrap
Text File
|
1996-02-02
|
2KB
|
74 lines
" ---- Ronald Brill 1995, 1996 ---- "
" ---- Extended File Dialogs Version 2.1 ---- "
SaveAsDialogController SecondaryFile !
! SaveAsDialogController methods!
makeDir
| dir |
dir := (cItemDict at: #makeDirNewDir) getValue stripBlanks.
[ dir first == $\ ]
whileTrue:
[ dir := dir cdr.
].
dir isEmpty
ifTrue:
[ ^ self.
].
(dir cdr indexOf: $\) > 1
ifTrue:
[ ModalMessageBox
title: 'Error'
text: 'Can''t create subdirectorys'
icon: #StopSign
buttons: {#Ok}
action: nil
controller: self.
(cItemDict at: #makeDirNewDir) setFocus.
^ self.
].
dir := FileNameString newDriveName: drive dirName: (directory + $\ + dir) baseName: nil.
dir createDirectoryOnError:
[ ModalMessageBox
title: 'Error'
text: 'Can''t create directory' ++ dir
icon: #StopSign
buttons: {#Ok}
action: nil
controller: self.
(cItemDict at: #makeDirNewDir) setFocus.
^ self.
].
self walkTo: dir + $\.
self makeDirClose.
!"end makeDir"
makeDirClose
(cItemDict at: #vFileName) setFocus.
(formDict at: #MakeDirectory) close.
!"end makeDirClose"
makeDirOpen
(cItemDict at: #makeDirCurrentDir) put:
((FileNameString newDriveName: drive dirName: directory baseName: nil) abbreviate: 26).
(cItemDict at: #makeDirNewDir) put: String new.
(formDict at: #MakeDirectory) open.
(cItemDict at: #makeDirNewDir) setFocus.
(cItemDict at: #makeDirMakeButt) highlightOn.
!"end makeDirOpen"
openInitialization
vOk display: '~Save'.
super openInitialization.
!"end openInitialization"
!"End of methods block"