Before you start reading this tutorial, you should be familiar with the Gadgets system and its components and you should have knowledge about the concept of attributes. To learn more about the gadgets refer to Using Gadgets. A very important thing to know is the use of RefGadgets. A description of the gadget and its use is at the end of the
Before you start manipulating public libraries, you should be familiar with the concept of libraries used in the Oberon System 3.
Estimated time: 30 minutes.
Columbus is a very versatile intrument that can be applied to any gadget (visual or model) for an inspection of its identity, attributes, links and properties. When applied to a specific gadget, the tool immediately adjusts its shape, so to represent an attribute form for this gadget. Note that this form is a document created by program, however. The tool can also be used to manage public libaries and their content.
In practice, Columbus presents itself in two different "variable geometry" documents (they however always fit in the system track). One of them is used to inspect and configure the state of objects and is called "Objects.Panel". The other one, called "Libraries2.Panel", is used for manipulating public libraries. Parts of the "Libraries2.Panel" are integrated in the object inspector. The "Objects.Panel" can directly be opened from the library editor.
The command is used here without parameter, but later on, you will learn that the name of an object may also be specified after the command. The command tries to locate a gadget to inspect: it can be either a marked (*) or a selected visual gadget. If no gadget can be found, as is the case now, a minimal empty panel document "Objects.Panel" is opened.
It contains only just the Columbus logo and a button captioned with a magnifying glass. This button is the inspect button and is used to inspect an object. We shall refer to it as [Inspect] button.
Move the panel to the system track of your display or to the side of your desktop, depending on your mode of operation. Now, select this panel -> and click on the inspect button. What you see now is the attribute view of the panel being inspected; this is evidenced by the little red LED in the button. But several other views can be accessed using the other buttons in the row. They will be presented and described in a subsequent section. The obj1 panel's attributes are presented with their values.
Select this button -> and click on the inspect button again. As you can see a new button appeared on the right of the inspect button. This button is used to go back one step in the panel's history. Click on the button and you return to the information of the previously selected panel.
In the top right corner you can see a visual reference, which represents the currently inspected object.
The characteristics and the function of this gadget are presented now.
A visual reference can be changed either by dropping a visual gadget into its frame or by copying over a selected visual gadget. Alternatively, a reference from another reference can be dropped or copied over with the same effect. When a reference is changed by such a user interaction, it will execute a consume command if so specified. To remove (or clear) the reference use a right-left interclick inside the reference. Like most other visual gadgets, a reference may execute a command when clicked on.
We may now proceed with a few exercises in order to verify what has just been presented.
To clear the Columbus panel right-left click inside the Current Object reference. The panel returns to a minimal size. Press the [back] button to return to 'obj1'. Now, set a new reference by dropping a gadget into the reference. Middle-right click on the border of any gadget you would like to inspect. The mouse pointer changes to a flat hand. Release the mouse buttons on top of the reference. The Columbus panel now shows information about the dropped gadget. The other way to set a new object is to copy over (left-middle click) a selected gadget into the reference. Now, close the Columbus panel and click on the following command.
In conclusion, this visual reference can be used to clear the panel or to set a new object to inspect.
A new Columbus panel opens again (move it to the right side of your screen). The inspected object is a public object named 'Playground' obtained from the "Columbus.Lib". Now open a new
Note that depending on the object this list of available views can differ. Again select this check box -> and inspect the object with the inspect button or drop it into the reference. There are less views you can choose from. Press the [ <= ] button to return to the object "Playground".
We shall now describe in detail all the possible views of an object.
[Attr] - attribute view
This view displays the attributes of the inspected object with their values in the Attributes section. It is the preferred view which is always presented first when a new object is inspected (but for a library the library view is presented first, of course). You can change the attribute values and apply them to the object by clicking the [Apply] button on the right side of the inspector panel.
Try this: change the attribute 'Color' to 1 and press the [Apply] button. The previously inserted panel in the document changes its color to red.
The New Attribute section is used for adding an attribute to the current object. It features two text fields: in the first one enter the new attribute's name, in the second one its value. To add the attribute click on the [Add] button. An added attribute can be removed with a click on the [Del] button. Enter the name of the attribute to delete in the Attr. Name field.
Try this: enter a name (e.g. 'New1') and a value (e.g. 'Value1') and press the [Add] button. The attribute is immediately added to the object's attribute list. Try another one, with 'Name2' and value 'Yes'.
This view is the starting point for an inspection tour of the current object with excursions to other related objects or libraries. Every step is recorded in a history stack, making it possible to regress step by step by clicking the button. However, if any other view (among those described below) is presented, clicking on the Current Object reference at the top right, will project this view again.
[Link] - link view
This view shows the links of the inspected object in the Links section. You can change the object links and apply them to the object by clicking the [Apply] button on the right side of the inspector panel.
The New Link section is used for adding a link to the current object. It features a text field for specifying the new link's name, and an empty visual reference where to drop the object to link. To add the link click on the [Add] button. An added link can be removed with a click on the [Del] button. Enter the name of the link to delete in the Link Name field.
To check out, how this works, drag-and-drop the object of this reference -> into the link 'Picture' on the inspector panel (use middle-right interclick). Press the [Apply] button and see the panel in the text (nice ?!).
[Coords] - coordinates view
This button is present only when a visual gadget is being inspected. This view shows the coordinates of a visual gadget. This view is not available for models (see the panel with 'Columbus.Background').
Try this: Change the 'W' to 190 and 'H' to 130 and press the [Apply] button. Feel free to play with the panel and its content, but don't forget to return here to take the rest of the tour.
[Comp] - component view
This button is present only when a container gadget is being inspected. This view lists the components the container gadget with their generator procedure and visual reference. You may inspect each reference - with middle mouse click, but you can not change them. Inspect some of them, but before you continue, make sure you're back in this view (back button).
- call Watson
Columbus gives you the opportunity to see additional descriptions of the inspected object. These are tutorials, definition files or module files. This button calls Watson.ShowObj with the object's generator name as parameter. Click on the button and the text 'Panels.Def' (or 'Panels.Mod' if exists) opens.
[Lib] - library view
This button is present only when the object inspected is bound to a public or a private library. Obviously enough, when a library is inspected, the library view is the preferred view which is always presented first. The views lists the objects contained in the library. The generator procedure, the reference number, and in the case of a public library, the name in the index are displayed for each object, together with a visual reference (see component view above). Use the reference to inspect a particular object in the library. The name of the inspected public library is displayed in the top right corner. In the case of a private library, the text is simply "(Private)". The object which was being inspected when the library view was called is easily spotted: look for the blue text line. If there is no current object, no line is highlighted.
[Editor] - library editor
This button is present only when the object inpected is bound to a public library. The library editor more or less the same as the library panel, described in the next section. With it you can remove a library from memory, store a library on disk, retrieve objects, free objects or install objects in a library.
You reached the end of this tour. Close all panels and text, you opened during this course and step to the next section about the library panel.
The panel is divided into three parts. The top part contains the button [Directory], two check boxes and a list. The list shows the library names. You can choose the kind of libraries you want to see. To view the list of libraries stored on disk, select "Disk". To view the list of libraries currently loaded in memory, select "Memory". Click on the button [Directory] to see the list of your choice.
Select a library in the list with a click. The text field Library is updated: it shows the library which will become the target of the library management operations controlled by the buttons in the middle part.
Select an object in the list with a click on its Name button. The text field Object is updated: it shows the object which will become the target of the operations controlled by the buttons in the bottom part.
Columbus.Inspect ~ (without parameter!) attempts to locate a marked (*) or a selected (the most recently selected one) visual gadget, or also the object cited in the most recent selection. The latter case, which takes precedence over the others, is described below. If successful, the attribute view of the gadget is presented. Otherwise, a minimal panel is opened. The star-shaped (*) mark allows a finer grain selection of an object. As you may suspect, this command is hidden in the Cmd attribute of the [Inspect] button.
To see the difference, try inspecting the caption "obj1" in the two ways. If you select the panel, you have to access the components view and to click on the TextsFields.NewCaption reference to reach the same view as you would by setting a mark.
Columbus.Inspect LibName [.ObjName] | [^] ~ presents inspection information on the named public library or on the object in a public library, according to the following rules: