The Present Structure

  • Freeform is only an "umbrella" class
  • The editor object is the important one
  • The parser object is embedded inside the editor ("code")
  • The GUI methods are mixed into the editor
  • EditorConstants is also mixed in
<< >>



Comments. As mentioned before, Freeform may be turned into a module if it doesn't evolve any instance data. The name, incidentally, is relatively meaningless: By analogy with FreeRIDE and Freebase, I wanted something that started with the word free.

The bulk of the code is the Freeform::Editor class. The parser object is embedded inside this as a member called code. The GUI methods are mixed in from Freeform::GUI, and the module Freeform::EditorConstants is also mixed in.

The overall result is that in an editor script, everything is referenced as though it were at the top level. An editor script is currently wrapped inside an essentially anonymous method, so it's not possible at present to define classes and methods within such a script.