Lively Kernel Tutorial: (13) Class Browser


The Lively Kernel has a class browser that allows the behavior of the system to be viewed and edited interactively.
The upper left panel of the browser contains the names of the Lively Kernel (JavaScript) classes in the system.
When you select one of them, the upper right panel shows all the methods (functions) of that class.
When you choose one of the methods, the lower panel shows the source code of the method.

Notes:

There are various keyboard shortcuts available to edit the methods.
(NOTE: these shortcuts do not work on all browsers. In some browsers you may have to use the "Alt Gr" key instead): Some additional comments on text editing:


Try it yourself! Try viewing the methods of class RectShape.
Try editing some of the methods to make changes to the behavior of the system itself.
For instance, if you modify the method RectShape.setFill as shown below, you change the way menus and many other objects in the system are drawn.
You have to accept the changes by pressing Alt-S or by choosing the "evaluate as JavaScript code" popup menu item of the text that you just edited.

RectShape.prototype.setFill = function(string)
{
this.setAttributeNS(null, "fill", Color.green);
}

Try opening any popup menu after completing this change.
The background color of the menu should now be green.

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