next back

Other Tools

This page is unfinished

Transcript: the smalltalk messages window

Text to be added.

Launcher: a menu to launch applications and tools

This tool allows start of commonly used tools and utilities.

Workspace a view for expression evaluation

Workspaces allow smalltalk expression to be entered and evaluated.
You can also use them as scratchpads or notepads.

Inspector: looking into an object

Introduction

Inspectors allow looking into an object. They usually consist of 2 subviews, one showing the names (and possibly indices) of the objects instance variables, the other showing the value of the selected instance variable.

There are some specialized inspectors (for example: image inspectors), which add more subviews and/or show the object additionally in a more user friendly form.

Opening an inspector

Inspectors can be started: Beside the obvious behavior, there are some special situations to consider: Examples (select individual lines below, and perform the doIt menu function):
    #('one' #two 3.0 4) inspect

    #('one' #two 3.0 4) asOrderedCollection inspect

    #('one' #two 3.0 4) asOrderedCollection basicInspect

    ( #('one' #two 3.0 4) asOrderedCollection removeFirst; yourself ) inspect 

    ( #('one' #two 3.0 4) asOrderedCollection removeFirst; yourself ) basicInspect

    (Image fromFile:'bitmaps/SBrowser.xbm') inspect

    (Image fromFile:'bitmaps/SBrowser.xbm') basicInspect

    (Color yellow) inspect

    (Color yellow) basicInspect

    (Array new:400) inspect

Inspect vs. basicInspect

Sending #basicInspect to an object will always open a general inspector, which shows instance variables as they are physically present in the inspected object.

In contrast, #inspect is redefined in some classes to open an inspector showing the logical contents. In some collections, the physical implementation uses an extra collection to hold the contents. Try inspecting an (nonempty) instance of Dictionary to see the difference:

(select all lines below, and doIt)

	|d|
	d := Dictionary new.
	d at:#foo put:1.
	d at:#bar put:2.
	d inspect.
	d basicInspect.

Project View: aid in managing projects

Text to be added.

Process Monitor: show & manipulate smalltalk processes

This tool displays a list of active processes and their current state.

The states shown are:

The process which ran at the time of the update is marked with an (*) character. If none is marked, the scehduler was active before.

The list is updated every few seconds, so be prepared for some delayed visibility of new processes.

A popup-menu allows some operations to be performed on a selected process. The debug function found there opens an inspector-like debugger on the selected process. This may be useful if some process is waiting on a semaphore and you want to see exactly where the wait is.

Note:
Since at the time of the view update, the active process is always the process monitor itself, the distinction between run and active states is probably useless.

Memory Monitor: show memory usage

This utility displays the amount of memory used by the system.

The numbers shown are (top to bottom):

the other numbers are less of interrest to normal users, but give some info to VM developpers: the graphic displays a history of the used amount. Newspace size is shown in yellow (light grey in b&w displays), freelistspace in green (dark grey) and oldspace in white.

The history is updated twice a second. Use the key-commands 'f' (for faster) and 's' (for slower) to change the update interval.
Pressing 'r' (for reset) rescales the display.

The typical picture shown is some saw-tooth figure; memory use is usually growing until a new-space collection reduces the amount.

The memoryMonitor also provides a popup menu for common garbage collect operations:

Memory usage: show memory usage by class

This utility displays a statistic of how-much memory is allocated by which class. The display can be sorted by different criteria - use the popup-menu to change this.
Since scanning the memory is a time consuming operation, there is no automatic update of the list; use the menus update function to manually update the display.

A memoryUsageView is useful to find memory leaks. In Smalltalk, these are not caused by not freeing memory, but instead by keeping references to objects in globals or class variables.
The menu includes a function owners which opens an inspector on all objects owning references to instances of the selected class (showing the names/indices of the instance variables, which hold a reference).

Event monitor

This tool is useful when keyboard mappings are changed or tested. It outputs the incoming event-messages on the standard output (xterm-window). (comparable to the 'xev' Xwindow utility).
To try it, open an eventMonitor, place the mouse pointer into it, and press some key(s) on the keyboard. Watch the xterms output.

Copyright © Claus Gittinger Development & Consulting, all rights reserved

(cg@ssw.de)