LispWorks IDE User Guide > 17 The Inspector

NextPrevUpTopContentsIndex

17.8 Creating new inspection formats

There is a default inspection format for each Lisp object.

The Inspector tool can be customized by adding new inspection formats. To do this, you need to define new methods on the generic function get-inspector-values . See the LispWorks User Guide and Reference Manual for a full description.

get-inspector-values takes two arguments: object and mode , and returns 5 values: names , values , getter , setter and type .

object

The object to be inspected.

mode

This argument should be either nil or eql to some other symbol. The default format for inspecting any object is its nil format. The nil format is defined for all Lisp objects, but it might not be sufficiently informative for your classes and it may be overridden.

names

The slot-names of object .

values

The values of the slots corresponding to names . The Inspector displays the names and values in two columns in the scrollable pane.

getter

This is currently ignored. Use nil .

setter

This is a function that takes four arguments: an object (of the same class as object ), a slot-name, an index (the position of the slot-name in names , counting from 0), and finally a new-value. (It is usual to ignore either the slot-name or the index.) This function should be able to change the value of the appropriate slot of the given object to the new-value.

type

This is the message to be displayed in the message area of the Inspector. This is typically either mode or--if mode is nil--then the name of the class of object .

17.8.1 Example


LispWorks IDE User Guide (Windows version) - 22 Dec 2009

NextPrevUpTopContentsIndex