Lively Kernel Tutorial: (14) Object Inspector


Every object in the Lively Kernel can be inspected using an object inspector. An object inspector displays the attributes (JavaScript variables/fields) of the object in a panel view.
You can open an inspector for every object in the system by choosing the "inspect" operation from the popup menu of the object.

The upper left panel of the inspector shows the attribute names. When you select one of the attributes, the upper right panel shows the current value of that attribute. You can edit the value of an attribute by editing the contents of the text displayed in the upper right panel. To accept changes that you have made, choose the "accept changes" menu item from the popup menu of the upper right panel.

The lower panel is the evaluator panel. When you type JavaScript code in that panel, you can use the "evaluate as JavaScript code" menu item of the evaluator panel to execute that code in the context of the inspected object.

Notes:


Try it yourself! Try opening an inspector for the rectangle object that is shown in the display. View the various attributes of the rectangle object using the inspector.
Try modifying some of the attributes. For instance, the "fishEye" attribute is a good candidate. Remember to accept your changes using the "accept changes" menu item of the upper right panel.
Additionally, try the evaluator panel by typing the following text in the evaluator panel:

this.startStepping(100, "rotateBy", 0.1);

Use the "evaluate as JavaScript code" menu operation of the lower panel (open the popup menu by Alt-clicking the text that you just typed) to execute the code.

*** Unable to load the Lively Kernel (unsupported web browser) ***