How can I reset all source code from a Squeak Smalltalk image?

I downloaded the source code for Scratch, which is written in Squeak Smalltalk . I can view the source in Squeak, but I really want a large text file. Image based on Squeak 2.8.

Im a general newbie to Squeak. While I love this, and my impression of the language and environment is that dumping all the source code in this image to a file can probably be done in about 3 lines of code if I knew my way better. Can you provide 3 lines of code?

I will not complain if it ends with 4 lines (or, more likely, 1 line).

+4
source share
1 answer

Disabled, but:

Smalltalk allClasses do: [:each | each fileOut] 

This should upload three million .st files named after each class in the system.

Welcome and happy little talking!

EDIT: It seems like this would not work in the early violins, I tested them and it looks like this to work in the Scratch source image:

 SystemOrganization categories do: [:each | SystemOrganization fileOutCategory: each] 
+6
source

All Articles