Pages: 1
Topic closed
^^I need to change the .sb extension to .kn.
Could someone point me to a class/method?
Offline
It's somewhere in ScratchFrameMorph, Instance, file read write I think.
Last edited by SJRCS_011 (2012-01-20 18:20:24)
Offline
SJRCS_011 wrote:
It's somewhere in ScratchFrameMorph, Instance, file i/o I think.
I've looked in most of those, which method exactly?
Offline
Scratch-UI-Panes --> ScratchFrameMorph --> Instance --> file read/write -->
importScratchProject: add you filename in
extensions: #(scratch sb )
nameFromFileName: fileName: add line
(s asLowercase endsWith: '.whatever' ifTrue: [s _ s copyFrom: 1 to s size - 3].
saveScratchProject: change
fName _ (self nameFromFileName: fName), '.sb'.
to
fName _ (self nameFromFileName: fName), '.whatever'.
saveScratchrojectNoDialog: change '.sb' on line 9 and 15 to '.whatever'
Offline
SJRCS_011 wrote:
Scratch-UI-Panes --> ScratchFrameMorph --> Instance --> file read/write -->
importScratchProject: add you filename inCode:
extensions: #(scratch sb )nameFromFileName: fileName: add line
Code:
(s asLowercase endsWith: '.whatever' ifTrue: [s _ s copyFrom: 1 to s size - 3].saveScratchProject: change
Code:
fName _ (self nameFromFileName: fName), '.sb'.to
Code:
fName _ (self nameFromFileName: fName), '.whatever'.saveScratchrojectNoDialog: change '.sb' on line 9 and 15 to '.whatever'
Thanks! I was just missing the last one!
Oh wait, now I need to now how to open .kn files.
Last edited by nickbrickmaster (2012-01-20 18:41:09)
Offline
I got it!
Mods, close this topic.
Offline
Right. I knew that.
Offline
Topic closed
Pages: 1