4.2 Examining values: the inspector

4.2.3 Value and Type fields

The inspector has Value and Type fields which show a text representation of the current object. This is not necessarily the whole object being inspected, but the component selected in the graph window. Single-clicking selects an element without expanding or collapsing the subtree below that element.

If you select a component which is a function, the Value field does not give the ML code for the function. For instance, try evaluating and inspecting the function ilist itself. The Type window gives the type of the function, but the Value window says only that it is a function. It can be made more informative using the View > Value Printer dialog. The dialog is in general the same as described in Section 1.14 on page 24 for the listener, except that its effects are confined to printing in the inspector.

On this dialog, check the Show function details box and click Apply. Now re-select ilist on the graph by clicking. The inspector's Value field now reads

fn[ilist[<listener #1>:1,5 to 1,44]]

It gives the name of the function (ilist), and where it was defined: in this case, in the listener. If it had been defined in a file, and if debugging mode had been on when that file was read in, you could now use Action > Edit to open the file in your preferred editor at the definition of ilist. For details of defining a preferred editor, see Section 1.9, "Editing ML files". Debugging mode is switched on using Preferences > Mode from the MLWorks podium.


MLWorks User Guide (UNIX version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker