Application Development with Harbour/Understanding Workareas

From Wikibooks, open books for an open world
Jump to navigation Jump to search

What is a workarea in the Clipper/Harbour language?[edit | edit source]

Let us for a moment think back at the old times when commonly used computers had no mouse and GUI. Nevertheless, if we wanted to use several tables for a task, we had to use some way to tell the computer which tables he should consider. Let us take for example a library. Oversimplifying, we need to use at least three tables to manage it (one for the books, one for the customers and one for the loans).

We might issue these commands:

       SELECT 1
       USE Books
       SELECT 2
       USE Customers
       SELECT 3
       USE Loans
       SELECT Books

We might visualize the result as the three windows in the picture below:

3 workareas.png

Here the command SELECT works like clicking on a window to activate it, and the workareas themselves look like windows having a number (the workarea number) and a name (the workarea alias).

Why should you want to use workareas?[edit | edit source]

An example of a workarea[edit | edit source]