I don't know if anyone's ever asked this...but is there a way to change the file extension a project is saved in?

Offline
There obviously is, but I don't know how...
Offline
There was a post like this not so long ago, maybe you should use the magical search bar up in the cornner to see if you can find it.
Offline
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"
I think that's everything, I just quickly look for 5 minutes. It should at least save and open correctly with the new extension
Offline
wcfs96 wrote:
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"I think that's everything, I just quickly look for 5 minutes. It should at least save and open correctly with the new extension
![]()
Can you tell me the first thing? Like blah >> ScratchFrameMorph?
Offline
wcfs96 wrote:
You mean the category? ScratchFrameMorph is in Scratch-UI-Panes and ScratchFileChooserDialog is in Scratch-UI-Dialogs. You can also do ctrl/alt - f to look for a class.
Oh. (Wrong account. Who cares?)
Offline
wcfs96 wrote:
You mean the category? ScratchFrameMorph is in Scratch-UI-Panes and ScratchFileChooserDialog is in Scratch-UI-Dialogs. You can also do ctrl/alt - f to look for a class.
Another thing, for the last thing, what am I supposed to add/change?
Offline
wcfs96 wrote:
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"I think that's everything, I just quickly look for 5 minutes. It should at least save and open correctly with the new extension
![]()
For the last code, will that just make it .sR (That is my ending.)
Offline