[GOODIE] Inspector

Brian T Rice water at tunes.org
Tue Aug 12 17:48:46 PDT 2003


I've added a basic and full inspector for Slate, which is a kind of object
browser you can send commands to. The basic one is in ~slate/inspect.slate
and doesn't require anything else to be loaded to work.

The main inspector is in src/inspect.slate, and is loaded with the
standard libraries and build-libs script now.

The abbreviated manual (there aren't many commands anyway) is:

inspect: someObject - this can be called implicitly on the lobby to
inspect any object, including a temporary result.

Once you've called inspect:, the lobby is "enhanced" with commands for
traversing it, by an Inspector object that tracks the current position and
the history. (This is done with a delegate slot ;)

"it" or "here" - What you're looking at. You can refer to it this way.
"last" - Shows the last object browsed.
"slots" - Shows the slot names here.
"parents" - Shows the parent slots here.
"go:" - Takes the symbol naming a slot and travels there. (The inspector
won't travel to Nil, though.)
"back" - Backs up one step, adjusting the history, too.
"backToStart" - Backs up to the first thing inspected.
"close" - Closes the inspector and cuts off any connections between it and
other objects, including the lobby.

... The rest is in the short files for these. I'm open to suggestions for
more commands or bug-fixes.

This is pretty fun to play with even for me, so I'm sure this will help
out the newcomers and lurkers who haven't gotten their feet wet.

-- 
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/



More information about the Slate mailing list