ScratchFrameMorph ›› saveScratchProjectNoDialog
| fName dir |
self closeMediaEditorsAndDialogs ifFalse: [^ self].
projectName ifNil: [projectName _ ''].
fName _ self nameFromFileName: projectName.
dir _ ScratchFileChooserDialog getLastFolderForType: #project.
(fName size = 0 | (dir fileExists: fName , '.sb') not) ifTrue: [^ self saveScratchProject].
ScratchFileChooserDialog lastFolderIsSampleProjectsFolder ifTrue: [^ self saveScratchProject].
self updateLastHistoryEntryIfNeeded.
projectName _ FileDirectory localNameFor: (fName, '.sb'). "ignore path, if any; save in the original project directory"
projectDirectory _ dir.
self updateHistoryProjectName: projectName op: 'save'.
self writeScratchProject.
Last edited by nXIII (2012-10-21 13:15:20)
Offline