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 { $subsections inspect }
10 "The inspector supports a number of commands which operate on the most recently inspected object:"
20 "A variable holding the current object:"
22 "A description of an object can be printed without starting the inspector:"
23 { $subsections describe } ;
28 { $values { "obj" object } }
29 { $description "Print a tabular overview of the object."
31 "For sequences and hashtables, this outputs the entries of the collection. For all other object types, slot names and values are shown." }
32 { $examples { $code "global describe" } } ;
35 { $var-description "If the inspector is running, this variable holds previously-inspected objects." } ;
38 { $values { "obj" object } }
39 { $description "If the inspector is running, outputs the object currently being inspected." } ;
42 { $values { "obj" object } }
43 { $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 } "." } ;
46 { $values { "obj" object } }
47 { $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." } ;
50 { $values { "n" "a non-negative integer" } }
51 { $description "Inspects the " { $snippet "n" } "th slot of the current object. Use " { $link &back } " to return." } ;
54 { $values { "value" object } { "n" "a non-negative integer" } }
55 { $description "Sets the " { $snippet "n" } "th slot of the current object to the given value." }
56 { $errors "Throws an error if the object does not support this operation." } ;
59 { $values { "value" object } { "key" object } }
60 { $description "Adds a key/value pair to the current object." }
61 { $errors "Throws an error if the object does not support this operation." } ;
64 { $values { "n" "a non-negative integer" } }
65 { $description "Deletes the " { $snippet "n" } "th slot from the current object." }
66 { $errors "Throws an error if the object does not support this operation." } ;
69 { $values { "key" object } { "n" "a non-negative integer" } }
70 { $description "Changes the key of the " { $snippet "n" } "th slot of the current object." }
71 { $errors "Throws an error if the object does not support this operation." } ;
74 { $description "Returns to the previously-inspected object." } ;
76 { &back &at &put &add &delete } related-words
79 { $var-description "The currently inspected object." } ;