#	SID	@(#)swguide.txt	3.2 - 95/11/10

The SmartWare Survival Guide
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These mini tutorials assume that you have an understanding of the
concepts used by the individual modules, but that you are not familiar
with SmartWare.  They are intended only to get you started rather than
to describe the entire module.

The character mode version of SmartWare uses "ring" menus.  Commands
are highlighted by using the Spacebar or the Backspace key and are
selected by pressing Enter or the first letter in the command.  It is
this version that will be used as the base for the command structure.
As long as you are not using the pulldown menus in the X11 executable,
this structure will be the same. If you are, turn them off by selecting
the commands:

        Tools / Preferences / Terminate Pulldowns

For the sake of brevity, the Survival Guide will usually string together
a set of commands, each separated by slash, as shown above.  If data is
requested by SmartWare within the command set, such as a file name,
this will be placed in quotes.  To step back one command, press the
Esc key (in character mode, usually the Ctrl-C combination also works as
an escape).

Remember that F1 brings up context-sensitive help so, if you want to
expand on a command set, refer to the help system.

To move from one module to another, select the Quit command followed
by the desired module.

For a tutorial of the RAD Developer, refer to the radtut_u.txt file
in the /usr/angoss/oasys directory.





The Database Module
~~~~~~~~~~~~~~~~~~~

Creating a View
===============

The first step is to create a custom-view which is essentially a screen
that displays data contained in a database file. To do this, select:

        File / Create / "phone" / New / No-Password

The custom-view editor is displayed.  To store data, we need to
create a database file:

        Create / Data-File / "phone" / Fixed-Length / No-Password

Now, with the cursor keys, move the cursor down and to the right a few
spaces. Select:

        Create / Note / "0"

Within this space we'll place a title.  Enter the words "Phone Book"
at the top left and then press the F10 key.

Again, move the cursor down a few spaces and select:

        Create / Field / "Name" / Data-File

This produces the Field Definition screen where attributes such as the
type and width are defined.  Leave the Field type as Alpha but change
the width from 8 to 30, then press Enter followed by the F10 key.

Using the same commands, add another field called "Phone" with a width
of 14 and, perhaps some other fields for address information.

When you've finished adding fields, press F10 to save the view.

To unload this view (and any other views that are loaded), select:

        File / Unload / All

To reload, select:

        File / Load / Custom-View / "phone"

Typing the name "phone" in the above command is one way to do it.
Selecting it from the pop-up file prompter is another.


Adding and Viewing Records
==========================

A custom-view as nice as the one we've just created would be pointless
without records.  There are a number of ways to do this, but the easiest
is to press the Esc key.  This actually goes into Update mode but,
because we have no records in the file, it behaves like the command set:

        Data / Enter

To enter data, simply type the data into the field and press Enter.
This moves on to the next field and so on.  The up/down cursor keys move
the highlighter from field to field while the left/right cursor keys
move within a field.

When Enter is pressed on the last field in a record, a new record may
be created - depending on the field's attributes.  If this does not
happen, use the F6 key.

Now, add a bunch of records.  Add more than one with the name "Bill".

When you've finished that, press the Esc key.  This causes SmartWare
to exit Enter/Update mode and return to command mode.

In command mode, like Enter/Update mode, the F5 and F6 keys change the
current record.  To view the file one record per line, select:

        Data / Browse / All

To go back, use:

        Data / Browse / Off


Sorting and Querying the File
=============================

To sort the file, select:

        Order / Sort / Now / Dictionary / "sort"

Now we determine which field to sort on: move the pointer to the
"Name" field, press F10, and select Ascending.  Placing the view in
browse mode should quickly show how the records were ordered.  The
Index name, in this case "sort", appears on the second last line of
the screen.  Now select:

        Order / Change / Physical

This puts the file back in the order of entry.

To query the file for specific records, select:

        Data / Query / Now

We can enter the criteria directly into the field(s) or we can
create a query expression.  Use the Alt-Q key combination (you may
need to press Esc quickly followed by Q instead) to start the query
editor.  When that opens, press F6 and select the field called "Name".
Following this, type !"Bill".  It should look like:

        [Name]!"Bill"

This means "find all records where the field [Name] contains the
string "Bill".  Now press F10 twice.  After processing, a query
summary appears, press Esc to remove this.

Again, to go back to the original order, use:

        Order / Change / Physical


Removing a Record
=================

Make one of the records containing the string "Bill", the current
one.  Select:

        Data / Delete / Record

Notice that the record containing "Bill" is still there.  That's
not surprizing.  However, the second last line on the right side
shows a DEL status.  To remove deleted records, unload the file
and select:

        Data / Utilities / Purge / "phone"

Reload the file and check to see if the record is gone.


Reports
=======

SmartWare can print the current record or the whole file in a variety
of ways.  Instead, let's create a simple permanent report.  With the
phone view loaded, select the commands:

        Print / Report / Create / "phone" / New

The report definition view appears.  Select:

        Page

Move the pointer to the line "Is there a Table on the Page:" and
toggle the "No" setting to "Yes".  Press F10 to accept the default
values for the table size.

Now select:

        Table / Columns

At this point we can add fields to the report.  Select the Field
command followed by "[Name]" then press F10 to accept the options.
This places "Name" on the line at the top of the Field Definition
screen.  Move the cursor to the right of "Name" and repeat these
steps for the next field.

When you are done, press F10 three times. Now select:

        Print / Report / Execute / "phone" / Screen / Detail

Press Enter for both the "Start Page" and "End Page" prompts. The
report scrolls down the screen.

If you want to send the report output to a printer, select the
appropriate printer driver and options in Tools / Preferences /
Hardware first.






The Word Processor
~~~~~~~~~~~~~~~~~~

Unlike the Database module, the Word Processor defaults to Enter/Update
mode rather than Command mode.  Pressing the Esc key toggles back and
forth between these modes.

One thing to remember throughout this tutorial is that most of the
commands can be accessed with quick key combinations.  Refer to the
third and fourth last lines of the screen while in Enter/Update mode.
The F2 key cycles through these lists.


General Commands
================

Instead of typing in a document, let's import a text file.  Note
that, if you are using a Demonstration copy of SmartWare, you will
not have the ability to save this document.

To start, switch to Command mode and select:

        File / Import / "/usr/angoss/oasys/tutorial/example.doc"

        NOTE: If the SmartWare directory is not /usr/angoss,
        substitute the directory where you installed SmartWare.
        Also, if you did not install the tutorial, you will
        not be able to find this document.

The example.doc text is read in, but the right margin is a little too
narrow (in my copy anyway).  To change this, select:

        Layout / Ruler / Edit / Current

The cursor moves to a ruler along the top of the screen.  Using the
right cursor key, move the cursor to the seven inch setting and then
enter a right square bracket "]" followed by the F10 key.

Because I really like documents that begin with the words "Congratulations
on your purchase...", let's copy that first paragraph.  Move the cursor
to the "C" of "Congratulations" and select:

        Edit / Copy

Move the cursor down three lines, the text should highlighted, and then
press Enter.  We can copy this into a buffer and insert it in various
places - including another loaded document - or we can just move the
cursor to another position and press Enter.  In this case, we'll copy
it to the same location. So, press Enter right on the "C" of
"Congratulations".

To delete both paragraphs, select:

        Edit / Delete

Highlight the text and then press Enter.

To find specific text, such as ANGOSS, select:

        Document / Find / "ANGOSS"

Then enter one or more of the options listed on the second last line
of the screen.  For example, "FI" will search forward for the next
occurrence of ANGOSS regardless of case.  The F9 key, which tells
SmartWare to repeat the last command, can be used for the next search.

Replacing text is similar.  To replace ANGOSS with SmartWare, select:

        Edit / Replace / "ANGOSS" / "SmartWare" / "G"

The "G" option tells SmartWare to change all occurrences.

This moves us to the end of the document.  To move back to the start,
use the Ctrl-Home key combination (Esc / Slash / UpArrow may work
on some character terminals).


Fonts
=====

To bold text, use the commands:

        Layout / Font / Bold / Insert

Highlight the desired text and press Enter.  Underlining characters
is similar.

To change the font of a text block (and add a font at the same time),
select:

        Layout / Font / Change

Again, highlight the desired text and press Enter.  We can select an
existing font in the document or, by pressing F6, we can create a new
one.  Press F6.  This produces the Font Selector.  While on the Font
Family field, press F6, move the pointer to a font type, and then press
F10.  Change some other parameters if you like, and press F10.

NOTE: If the Font Family displayed only the Standard type, a printer
has probably not been selected.  To change this, select the appropriate
printer driver and options in Tools / Preferences / Hardware first.
If the list of printers, presented in the Hardware Preferences is not
appropriate, then you might need to add the printer driver to the
resource file.  (See the resource.txt for details).

Font information for the current cursor position is shown on the second
last line following the "FN:" status.  Since a font can be preset for
newly entered text, the "Font:" status is also shown.



Spellcheck and Thesaurus
========================

Before running these tools, select the commands:

        Tools / Preferences / Wordprocessor

Move down to the Dictionary Preferences section and enable the
Thesaurus and Spellchecker items if they are not already.  Press F10.

Select the commands:

        Document / Dictionary / Spellcheck / Screen

Highlight a block of text (or press F8 for the whole document) and
press Enter.  Select a suggested replacement or use one functions
listed on the second last line.  The spellchecker continues to
operate until all the words in the highlighted block are checked
or you cancel it with the Esc key.

To use the Thesaurus, select:

        Document / Dictionary / Thesaurus

Move to the desired word and press Enter.


File Commands
=============

The Save, load, and unload commands all fall under the File menu. If
you unload a document before saving it, SmartWare will prompt you.
Again, if you are using a Demonstration copy of SmartWare, you will
not have the ability to save.






The Spreadsheet
~~~~~~~~~~~~~~~
Like the Word Processor, the Spreadsheet module defaults to Enter/Update
mode rather than Command mode.  Pressing the Esc key toggles back and
forth between these modes.

Due to the nature of the Spreadsheet module, this section will stress
data entry as opposed to command structures.


Entering Data
=============

When starting the Spreadsheet, a blank Worksheet Window with the cell
highlighter positioned in cell r1c1 is displayed.

As you type the data, the entry appears beside the "Enter:" prompt.  Press
Enter to record the entry in the cell. Or, press one of the cursor keys
to record the entry.

Three types of data can be entered into worksheet cells: text, numeric
values, and formulas.

To enter text, the first key pressed must be a letter, or any key other
than a number, @,#, -, +, ., $, :, or ;.  If the text to be entered begins
with a number or one of these characters, start the entry with quotation
marks.

If the text you enter fills the current cell, the cell to the right is
highlighted, if empty, and the text is displayed over that empty cell.
If the cell to the right is not empty, the display of text is visually
truncated.

To enter numeric data, type a number, or precede the entry with "+", "-",
".", or "$".

To enter a formula, press the equal sign "=" first.  The result of the
formula is calculated and displayed in the current cell when you press
Enter.

The contents of formulas are generally evaluated from left to right. The
order of evaluation will vary depending upon the priority of the operators
used and the use of parentheses within the formula.  The order of priority
is:

        ^ (Exponentiation)
        * (Multiplication), / (Division)
        + (Addition), - (Subtraction)

Placing parentheses around an expression indicates that it is to be
evaluated before other expressions.

After numeric values have been entered into a worksheet, you can input
formulas to perform calculations on the value entries.  As an example,
suppose you enter a column of numbers (in column 1, rows 1 through 4)
and then want to calculate the sum of the column.  To create the formula,
first position the highlighter in the cell that is to contain the total
and press the equal "=" key.

A sum calculation can be accomplished in several different ways. You can
enter a string of specific cell references connected by the "+" operator
to obtain the result:

        r1c1+r2c1+r3c1+r4c1

You can use the SUM function which calculates:

        sum(r1c1,r2c1,r3c1,r4c1)

You can also write the formula as:

         sum(r1:4c1)

Notice that the second SUM example specifies a range of rows. If rows are
inserted or deleted in the area referenced by the range, the formula is
adjusted automatically.


Blockmarking in Formulas
========================

When building a formula using cell references, you can type the references
yourself, or you can use the "pointing technique" and let SmartWare enter
the references for you.

Build the formula as you normally would.  But instead of typing a cell
reference, use cursor movement keys to move the highlighter to the
desired cell.  If you enter an arithmetic operator, a comma, or a
parenthesis, the cell marked by the highlighter is used in the formula.
The highlighter then returns to the formula cell, permitting you to enter a
value or point to another cell. Press Enter to complete the formula
definition.

To point to and mark a block of cells rather than individual cells, move
the highlighter to the first cell in the block.  Press F2 to define a cell
as the starting point.  Move the highlighter over the block of cells.

When the entire block of cells is covered by the highlighter, enter an
arithmetic operator (or for a function, a left parenthesis) to continue
building the formula.  The highlighter returns to the formula cell,
permitting you to define the next element of your formula. Pressing Enter
at any time completes the definition.

While you are building a formula, you can press F3 to make the formula's
references absolute or relative.


Recalculating Formulas
======================

The Spreadsheet will recalculate every formula in your worksheet each time
you press Shift F5.  To speed up processing of your worksheet, you can
recalculate only the formulas that need to be recalculated by pressing F5.
If you have selected Automatic Recalculation, using Tools / Preferences /
Spreadsheet, formulas will recalculate each time you change the worksheet.

You can change recalculation mode on a worksheet-by-worksheet basis by
executing the Sheet Calc-Mode command and choosing either the Automatic
or Manual option.  You can also select the order of recalculation with
the Sheet Calc-Order command.  The options are Natural-Order (the most
common), Row-Order, or Column-Order.  The Display option of the Sheet /
Calc-Mode command shows the calculation settings for the current
worksheet.


Basic Worksheet Formatting
==========================

Worksheet data can be presented in a variety of ways using the Layout /
Format commands.  Text entries can be left-justified, right-justified,
or centered in a cell.  Numeric values can be justified or centered and
can be expressed in scientific notation or as numbers, currency,
percents, bar symbols, dates, or time.  In addition, decimal precision
and the presentation of negative numbers can be specified for numeric
value entries.


File Commands
=============

To save a worksheet, select:

        File / Save / "filename"

Although hyphens can be used in a file name, the practice is not
recommended because the name cannot be used in an external reference.
The first character should be a letter, if possible.  If you are using
a Demonstration copy of SmartWare, you will not have the ability to save.

To unload a worksheet, select:

        File / Unload

If you unload a worksheet before saving it, SmartWare will prompt you.

If you have other files active, the most recently loaded worksheet appears
on the screen. You can also type all to unload all active files.

To load a worksheet, select:

        File / Load / "filename"



