A few technical points about MockTurtle scripting:
1. The script text is compiled and run in the context of the MTurtle
instance on the island in the manner of a DoIt (the compiled code is
temporary), so any Squeak/Croquet statements or methods recognized in
that context can be used.
2. The MockTurtle Script editor (a Tweak CCodePane subclass) that
allows editing of the script text exists in the local user's world,
outside of the island.
3. Script changes must be "accepted" in the normal Tweak manner in
order to be sent to the MTurtle instance on the island. When the
changes are "accepted", a test compile is done to allow any simple
syntax errors to be corrected before the text is sent.
4. Although the MockTurtle Script editor allows immediate DoIts, this
is probably not a good idea because they will be run in the local user
Tweak world context, not in the MTurtle instance context on the
5. There is (currently) no sandbox environment for the MTurtle
instance on the island, so any run-time errors will probably come out
in the Squeak environment outside of the Croquet display.
One possible next step for this project would be to replace the
separate keystrokes and compiled scripts that MTurtle recognizes with
a new interpreted language, maybe like a mini-Logo. I am unsure how
to design the interpreter process with respect to the local and island
environments and the resulting impacts on local-to-island
communications and user interactions.
The current division of these operations is relatively simple and
clear to me as a developer, but may be confusing to a user.
Implementing a new interpreted language on this kind of infrastructure
is a(nother) potentially large project that I am not sure I want to
> Please let me know if you have any questions.
> From the package description:
> Name: dafHacks-mockTurtle-daf.36
> Author: daf
> Time: 6 November 2006, 2:59:48 pm
> UUID: fbc29604-502f-584a-8988-e66aeae66251
> Ancestors: dafHacks-mockTurtle-daf.35
> Got some actual scripting working! Hurray! Start a new turtle from
> the Tools menu. Try the 'h' or 's' keys while pointing at the turtle.
> Requires my most recent VRML package from the PublicContributions
> repository and a fairly recently updated image.
> After loading this package, click on the Croquet button in the green
> Objects catalog to refresh the choices, then drag out the
> MockTurtleDemo (Master).