1 USING: help.markup help.syntax kernel classes io io.styles mirrors
5 ARTICLE: "inspector" "The inspector"
6 "The inspector displays a tabular view of an object and adds navigation and editing features. Inspector words are found in the " { $vocab-link "inspector" } " vocabulary."
8 "Starting the inspector:"
9 { $subsection inspect }
10 "The inspector supports a number of commands which operate on the most recently inspected object:"
16 { $subsection &rename }
17 { $subsection &delete }
18 "A variable holding the current object:"
20 "A description of an object can be printed without starting the inspector:"
21 { $subsection describe } ;
26 { $values { "obj" object } }
27 { $description "Print a tabular overview of the object."
29 "For sequences and hashtables, this outputs the entries of the collection. For all other object types, slot names and values are shown." }
30 { $examples { $code "global describe" } } ;
33 { $var-description "If the inspector is running, this variable holds previously-inspected objects." } ;
36 { $values { "obj" object } }
37 { $description "If the inspector is running, outputs the object currently being inspected." } ;
40 { $values { "obj" object } }
41 { $description "Starts a new inspector and prints a brief help message. If an inspector is already running, this starts a nested inspector. An alternative word that reuses the current inspector instance is " { $link inspect } "." } ;
44 { $values { "obj" object } }
45 { $description "If an inspector is already running, displays the slots of the object in the current inspector. If an inspector is not running, starts a new inspector." } ;
48 { $values { "n" "a non-negative integer" } }
49 { $description "Inspects the " { $snippet "n" } "th slot of the current object. Use " { $link &back } " to return." } ;
52 { $values { "value" object } { "n" "a non-negative integer" } }
53 { $description "Sets the " { $snippet "n" } "th slot of the current object to the given value." }
54 { $errors "Throws an error if the object does not support this operation." } ;
57 { $values { "value" object } { "key" object } }
58 { $description "Adds a key/value pair to the current object." }
59 { $errors "Throws an error if the object does not support this operation." } ;
62 { $values { "n" "a non-negative integer" } }
63 { $description "Deletes the " { $snippet "n" } "th slot from the current object." }
64 { $errors "Throws an error if the object does not support this operation." } ;
67 { $values { "key" object } { "n" "a non-negative integer" } }
68 { $description "Changes the key of the " { $snippet "n" } "th slot of the current object." }
69 { $errors "Throws an error if the object does not support this operation." } ;
72 { $description "Returns to the previously-inspected object." } ;
74 { &back &at &put &add &delete } related-words
77 { $var-description "The currently inspected object." } ;