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.
5. select this script and press 'alt-d' (confirm f as local variable)
after restarting Scratch you now can use the xml features.