#REFACTORING by exept
class: FileBrowser
changed:
#doCreateFile:
#updateCurrentDirectory
#writeFile:text:encoding:
--- a/FileBrowser.st Sun Jan 05 17:28:56 2020 +0100
+++ b/FileBrowser.st Sun Jan 05 17:29:06 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
@@ -6270,7 +6272,7 @@
[
stream := (currentDirectory filenameFor:fileName) writeStream.
- ] on:FileStream openErrorSignal do:[:ex|
+ ] on:OpenError do:[:ex|
msg := (resources string:'cannot write file ''%1'' !!' with:fileName).
self showAlert:msg with:ex description.
^ self.
@@ -6330,7 +6332,7 @@
) ifFalse:[^ self].
].
- FileStream openErrorSignal handle:[:ex|
+ OpenError handle:[:ex|
^ self showAlert:(resources string:'Cannot create file ''%1'' !!' with:newName)
with:(FileStream lastErrorString)
] do:[
@@ -6907,7 +6909,7 @@
timeOfLastCheck := currentDirectory modificationTime.
[
files := currentDirectory asFilename fullDirectoryContents.
- ] on:FileStream openErrorSignal do:[:ex|
+ ] on:OpenError do:[:ex|
files := nil.
].