Views

clog-moldable-inspector

Standard views

All standard objects (i.e. all except for GUI objects) have four standard views. They are the last views in the tab bar, and their title is dimmed.

Slots shows the slots of the object with their values.

Print shows the object's print representation, as defined by the generic function print-object.

Operations shows all generic functions in the image that have a one-argument method specialized for the object's class or one of its superclasses. The functions are grouped by package name. You can click on the function name to inspect the method for the object's class. You can also click on the triangle on the left to run the method and inspect its return value.

Playground shows a text editor in which you can enter Lisp code. When you click on the "Eval" button (top right), or press Shift-Enter on the keyboard, the top-level form on which the cursor is positioned is evaluated and its return value is inspected in a new pane. When playground text is selected, the code being evaluated is the largest subform of a top-level form that fully contains the selection.

Playground code is evaluated with * bound to the object inspected in the current pane.

The playground contents are stored as one Lisp code file per class, in the directory (hvs:playground-cache-directory)

Custom views

Custom views are defined for each class (and, implicitly, its subclasses), via a defview form. This is a thin wrapper around defgeneric/defmethod whose main role is to add the generic function to a global registry of view-generating functions. When an inspector pane is created, all known view generators are called on the object to be inspected, and those that return an instance of class (rather than ) are added to the pane, sorted by priority.

There are many views for classes that are part of the Common Lisp standard, such as numbers, strings, functions, pathnames, etc. You can add views for your own classes, but also for classes from other packages that you use.