'From Squeak 2.4b of April 23, 1999 on 3 May 1999 at 11:26:47 pm'! "Change Set: SaveAsFixes-dew Date: 3 May 1999 Author: Doug Way Fixes a bug with the image 'save as...' command. This prevents an error if the Cancel button is pressed in Morphic, or if someone enters an empty name in MVC/Morphic (equivalent to cancelling). Also, the default image name used in the 'save as...' prompter is now the current image name, instead of 'NewImageName', which allows for easier name editing (and is more standard)."! !SystemDictionary methodsFor: 'snapshot and quit' stamp: 'dew 4/30/1999 02:50'! saveAs | dir newName newImageName newChangesName | dir _ FileDirectory default. newName _ FillInTheBlank request: 'New File Name?' initialAnswer: (FileDirectory localNameFor: self imageName). newName = '' ifTrue: [^self]. newName _ FileDirectory baseNameFor: newName asFileName. newImageName _ newName, FileDirectory dot, FileDirectory imageSuffix. newChangesName _ newName, FileDirectory dot, FileDirectory changeSuffix. ((dir includesKey: newImageName) or: [dir includesKey: newChangesName]) ifTrue: [ ^ self notify: newName, ' is already in use. Please choose another name.']. dir copyFileNamed: self changesName toFileNamed: newChangesName. self logChange: '----SAVEAS ', newName, '----', Date dateAndTimeNow printString. self imageName: (dir fullNameFor: newImageName). LastImageName _ self imageName. self closeSourceFiles; openSourceFiles. "so SNAPSHOT appears in new changes file" self snapshot: true andQuit: false. ! !