<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Hi Karl, hi all!<div><br></div><div>So, this is proposing to virtually turn a FileExistsException into an ignored Notification if the user cancels the request. There are only 5 users in a recent Trunk image. Those don't seem to handle the ifNil-case very well. Other debuggers could appear and obfuscate the actual issue.</div><div><br></div><div>I will move this to "treated" because it does not work.</div><div><br></div><div>(Note that there is currently no easy way to cancel the control flow without opening a debugger that would work in Morphic and MVC. Would be a nice addition to ToolSet, though.)</div><div><br></div><div>Best,</div><div>Marcel<br><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 04.06.2020 23:06:11 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">A new version of System was added to project The Inbox:<br>http://source.squeak.org/inbox/System-kfr.1161.mcz<br><br>==================== Summary ====================<br><br>Name: System-kfr.1161<br>Author: kfr<br>Time: 4 June 2020, 11:05:51.49313 pm<br>UUID: 38776d4a-508a-7044-ab72-4cb34ceaceea<br>Ancestors: System-mt.1160<br><br>Return nil instead of opening pre debugger<br><br>=============== Diff against System-mt.1160 ===============<br><br>Item was changed:<br> ----- Method: StandardFileStream class>>fileExistsUserHandling:ifDebug: (in category '*System-Files-error handling') -----<br> fileExistsUserHandling: fullFileName ifDebug: debugBlock<br> | dir localName choice newName newFullFileName |<br> dir := FileDirectory forFileName: fullFileName.<br> localName := FileDirectory localNameFor: fullFileName.<br> choice := (UIManager default <br> chooseFrom: #('overwrite that file' 'append (risky!!!!)' 'choose another name' 'debug' 'cancel')<br> title: localName, ' already exists.').<br> <br> choice = 1 ifTrue: [<br> dir deleteFileNamed: localName<br> ifAbsent: [self error: 'Could not delete the old version of that file'].<br> ^ self new open: fullFileName forWrite: true].<br> <br> choice = 2 ifTrue: [<br> ^ (self new open: fullFileName forWrite: true) setToEnd].<br> <br> choice = 3 ifTrue: [<br> newName := UIManager default request: 'Enter a new file name' initialAnswer: fullFileName.<br> newFullFileName := self fullName: newName.<br> ^ self newFileNamed: newFullFileName].<br> <br> choice = 4 ifTrue: [^ debugBlock value].<br> <br>+ choice = 5 ifTrue: [^ nil].!<br>- self error: 'Please close this to abort file opening'!<br><br><br></div></blockquote>
</div></div>