ScratchPatchXML

Release name: ScratchPatchXML
Release summary: export / import Scratch 1.1 block stacks to and from xml
Automatic version: 1
Manual version: alpha
Published by: Jens Moenig (jens)
Created: 4 September 2007 7:06:23 pm
Last updated: 6 September 2007 10:16:56 am
Categories:
Release note:

This change set enables Scratch 1.1 to export scripts (block stacks) into an xml format, and to import scripts from xml files.

Once this change set is filed in, you will get an additional menu entry in the right button blocks menu (for export), and in the right button editor menu (for import).

Now you can use Scratch to edit your own external code, and create Scratch code in other applications. Any Scratch projects created this way will also run online.

how to install:

1. download the file 'xml for Scratch.1.cs' from SqueakMap, and copy it into the Scratch directory.

2. bring up a Smalltalk walkback
a. open Scratch
b. save the empty project as 'dummy' to your disc
c. in the Scratch window press 'new'
d. in the Scratch window press 'open'
e. select 'dummy' and keep it selected
f. delete file 'dummy.sb' on your disc
g. in the Scratch file-open dialog press ok

3. delete the text in the walkback
4. copy the following script into the walkback (using alt-v):

(FileDirectory default fileNamed: 'xml for Scratch.1.cs') fileIn.
World submorphs do: [:m |
((m isKindOf: ScratchFrameMorph)
or: [ m isKindOf: SystemWindow])
ifTrue: [m delete]].
f := ScratchFrameMorph open fillScreenOn.
Smalltalk snapshot: true andQuit: true.
f startup

5. select this script and press 'alt-d' (confirm f as local variable)

after restarting Scratch you now can use the xml features.

have fun!
Jens


Release homepage:
Download: http://map.squeak.org/accountbyid/9c9c23db-68a3-429b-b78c-dd76c31aac29/files/xml for Scratch.1.cs
SHA checksum: 42235137911137683374827429271978855695157227839

Back