When you press the cross on scratch it closes, wheres the code. I know it has code as when you dont save the image it says quit? and so on.
Offline
well it depends.
first of all you need the UnicodePlugin i tihnk.
then the code scratch uses is in the frameMorph, called quitScratch or quyitScratchNoDialog.
but that doesn't work in presentation mode. the simplest and most direct way of closing scratch without saving is
Smalltalk snapshot: false andQuite: true
Offline
I want to save the image as I quit scratch thats all.
Offline
oh. then it's sveImageForEndUser
Offline
Ok Ive changed a way of doing it but I still need to use your posts
Offline
test
Last edited by LS97 (2010-08-12 06:29:00)
Offline
that was supposed to be caps. wierd
test 2:
Offline
Im making it so games can save data in my new mod, I just needed to know where to find the quit scratch meathod. I found it before then lost it again!
Offline
ok
*vomits on 60s rule*
T530OT5Y4FI20Z_JYET.0IREHYV
Offline
saveImage | t1 | t1 _ self ownerThatIsA: ScratchFrameMorph. t1 saveImageForEndUser
Last edited by Billybob-Mario (2010-08-12 09:51:59)
Offline
no. more simply
saveImage
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 saveImageForEndUser
Offline
LS97 wrote:
no. more simply
saveImage
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 saveImageForEndUser
I used the wrong method. I'll fix it.
Offline
LS97 wrote:
no. more simply
saveImage
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 saveImageForEndUser
I think that won't work in presentation mode, try this:
saveImage
| t1 |
(t1 _ self ownerThatIsA: ScratchFrameMorph) ifNil: [(t1 _ (self ownerThatIsA: OffscreenWorldMorph) frame) ifNil: [^ self]].
t1 saveImageForEndUser
Offline