I think it's somewhere in ScratchFrameMorph. You have to edit multiple methods, I believe.
Offline
It's in multiple methods in the ScratchFileDialog and related morphs... not the ScratchFrame
Offline
Oh, I saw something about .sb in ScratchFrame. It probably was in the save method or something, or I might have just been delusional
Ahh, here's what confused me.
saveScratchProjectNoDialog
| t1 t2 |
self closeMediaEditorsAndDialogs ifFalse: [^ self].
projectName ifNil: [projectName _ ''].
t1 _ self nameFromFileName: projectName.
t2 _ ScratchFileChooserDialog getLastFolderForType: #project.
t1 size = 0 | (t2 fileExists: t1 , '.sb') not ifTrue: [^ self saveScratchProject].
ScratchFileChooserDialog lastFolderIsSampleProjectsFolder ifTrue: [^ self saveScratchProject].
self updateLastHistoryEntryIfNeeded.
projectName _ FileDirectory localNameFor: t1 , '.sb'.
projectDirectory _ t2.
self updateHistoryProjectName: projectName op: 'save'.
self writeScratchProjectLast edited by chanmanpartyman (2012-08-02 15:49:13)
Offline
Yeah! I think it's best to change that too though, I missed it.
It basically says that if the project doesn't have a path yet, it saves it with SB, and wee don't want that.
Offline
code: ScratchFrameMorph>>saveScratchProject
fName _ (self nameFromFileName: fName), '.sb'. "Change .sb to your file extension"
ScratchFrameMorph>>saveScratchProjectNoDialog
(fName size = 0 | (dir fileExists: fName , '.sb') not) ifTrue: [^ self saveScratchProject]. "Again change .sb"
projectName _ FileDirectory localNameFor: (fName, '.sb'). "Once again change .sb"
ScratchFrameMorph>>nameFromFileName:
"Add this line change .sb to your file extension also change 3 to the length of your extension"
(s asLowercase endsWith: '.sb') ifTrue: [s _ s copyFrom: 1 to: s size - 3].
ScratchFileChooserDialog>>createScratchFileChooserFor:saving:
list _ ScratchFilePicker new extensions: #(scratch sb). "Add your extension"
Offline
suneel wrote:
could u also add something that makes it into ane exe like export-exe- then people could develop software with it
maybe ask LS97 but you can use a scratch2exe it's on mediafire here;
http://www.mediafire.com/file/k9rteu5f70i0pyz/SB2EXE%20Pro.zip
Offline