ETH Oberon FAQ appendix: Correspondence case study

Peter Easthope submitted (3 Dec 1999) the following case study entitled "A gadget for correspondence". It is the result of a cooperation between Douglas Danforth, Chris Glur, Pieter Muller, JosefSedlacek and Hal Weaver. Further suggestions and comments are welcome.

This is a case study of a systematic means of storing and accessing correspondence in Oberon. A few simple concepts are used. For each correspondent there is a file containing text received and sent. The name of the file is the name of the correspondent with blanks removed -- JaneSmith for example. The user finds and opens correspondence files using a gadget which displays the file names in a scrollable list. This is how the gadget is created. No programming is required; the description should be useful to novices. This recipe is portable, that is can be implemented in various ports of the ETH Oberon system.

The electronic documents which accompany Gadgets, "Gadgets Introduction" and "Oberon Companion", are beneficial.

  1. Start Oberon and use either the Textual User Interface or the Graphical User Interface. Open a file that should contain text received and sent.

  2. Set the star marker where you want to locate the upper border of the viewer to open next.

  3. Execute Desktops.OpenDoc (PanelDoc) with a MM click on "Desktops.OpenDoc". This will create a new PanelDoc viewer.

    Note: There is no way to open a viewer for a PanelDoc with the Gadgets.Panel.

  4. ML in the left side of the NamePlate in the upper left corner of the document viewer to set the insertion point. It will appear as a vertical bar. Type the name you prefer for the correspondence document, e.g. "Correspondence".

  5. ML within the new panel to establish the location of the lower left corner of the gadget created in the next step. Don't fuss over the location. The gadget can be moved later.

  6. Execute ListGadgets.InsertVScrollList ListGadget ListModel ~. This places an Organizer containing a ListGadget and Scrollbar.

    Note 1: Though a "bare" Organizer can readily be constructed using the Gadgets.Panel, you have to use the ListGadgets.InsertVScrollList command to create an Organizer containing two visual gadgets and a model gadget.

    Note 2: Oberon Companion: The Standard Gadgets Reference: ListGadget: Commands describes the command ListGadgets.InsertVScrollList ListGadget model ~. The second argument must be spelled "ModelGenerator", and you may choose among "Dag", "ListModel" or "Tree".

  7. Drag with MM on the edge of the list to position it in the Panel. Drag with MM on the lower right corner of the Panel to adjust the size.

  8. Mark the ListGadget with F1 and MM on Columbus.Inspect ~ . Columbus is described in the electronic documentation accompanying Gadgets.

    In the Cmd attribute field, type "Desktops.OpenDoc #Point". This command which will be executed when MM is applied on a name in the list of the correspondence gadget. MM on the [Apply] Button in Columbus.

  9. MM on the [Link] Button. MM on the RefGadget named "Model" to inspect the ListGadget's model (a ListModel). MM in the Checkbox named "Sorted". MM on [Apply]. Now the list will be maintained in lexicographical order.

  10. Hide or close Columbus.

  11. In any text viewer type the name of a correspondent with no blanks; "JaneSmith" for example. In GUI you can MM on the Libraries Button and release on "New Log" to open a System.Log viewer and type a name there.

    With blanks excluded from the name it is a legal Oberon file name.

  12. ML within the list to set the insertion point. Select and copy the name into the ListGadget with MR+MM.

    The list is maintained in lexicographical order regardless of the location of the insertion point. Try pasting Zebra to the beginning of the list.

  13. Add more names to the correspondence gadget at any time with steps 11 and 12. A name can be deleted with MR+ML.

    If there is a file with name matching a name in the ListGadget, deleting the name from the ListGadget will not delete the file.

  14. Always after changing the list, store the PanelDoc with MM on the [Store] Button in the menu bar.

  15. MM on any name in the gadget. A viewer for a TextDoc with familiar Oberon capabilities will open. After editing the TextDoc MM on [Store] to update the file.

  16. My Correspondence gadget in ASCII coded form is appended. MM on the command "AsciiCoder.DecodeFiles Correspondence ~" below to recreate the document or file in your system.

  17. To open the gadget, execute either of these using MM:

    Desktops.OpenDoc Correspondence
    Desktops.OpenDoc ^ ... Correspondence


AsciiCoder.DecodeFiles % Correspondence ~
OC`kO@X6FgFFfBdg>fijBWFfkBdg>64PV;O:`];dTFDYFn0XF5P7hAXLHXX[h^HF3PB>04PUP780 
2@1:`0<0ooooooK0180=7ooo`0lO7b0<5lPK05@0BPooo6hooooX42ioKWTioo?09P10:P7P4@02 
`QD0P1P3i0R92PMnoT9In?1@06P5hoogQnFg>Gj:g`VFgBgiDP`4T`4Ta4WP467JK9C1Bdb>geBg 
g2gijbW2gbjFRnfa2bA2egVFgBG@H0E0M`7l1E0180OZH;[LO[KS9<MiD7[KMYAM;MBP281:P0@0 
>01d0601H14@nooY0noo?PooookoBPcP1\0d02h1@U6FgFfYffdBGd@0H1XBO;JM;AOKI2P0408P 
7b2\9<P1P0406@0201P>H0707`oo?oGb\coG2934P0<05`oM800KI<a98Q98Q982@0JP@=\^]<W[ 
;MJI2e`j61hCUkI3[KC[N;[LW[;MJI0:d`>gd>fS6FbNfbBgijBWHBM;M;kI;[Lbdd>GjNd`Bfc0 
dXb=\]]<IJJWcVnFbFFf>GG@VVfiBG0>ea:ggbFf:f`:gij22`ooO04@#
22 Jul 2001 - Copyright © 2001 ETH Zürich. All rights reserved.
E-Mail: oberon@inf.ethz.ch
Homepage: http://www.ethoberon.ethz.ch/