INTRODUCTION

The purpose of the ProWesS SBasic (Programming!) Interface is to let your SBasic programs use ProWesS. This is achieved quite simply with some new keywords, which will be explained later.

It is important to note that this will only work with SBasic as contained in the SMSQ (/E) operating system - it will not work in normal SuperBasic. Compiled programmes will work on all machines (see the explanation on compilation for more details). Please note that on machines other than those running SMSQ(/E) YOU MUST NEVER ATTEMPT TO RUN AN UNCOMPILED BASIC PROGRAM USING THE ProWesS SBASIC INTERFACE. If you do, your machine will almost certainly crash. Any damage to you, your computer or your data will be your own fault, and neither PROGS nor myself will accept any responsibility for this.YOU HAVE BEEN WARNED!!!!!

First of all, a certain number of concepts should be set out. Even though this section might seem uninteresting if you want to get going right away, please do read it.

If you have never heard about object oriented programming, ProWesS may seem a little intimidating at first. In fact, it is dead easy. The expression "complex but not complicated" really applies here: complex, because there are many new things to learn, but not complicated, because what you learn is not difficult to learn in itself.

This manual in itself should be sufficient, but you might also want to read the main manual(s), especially that concerning the configuration -and the configuration definitions- of ProWesS. However, it might be easier to start by reading this manual. It contains another explanation of how to look upon ProWesS, which might make things a bit easier sometimes.

SOME GENERAL THOUGHTS ON ProWesS

ProWesS, like the Pointer Environment's WMAN, is a window manager. In other words, it doesn't do anything else than help setting up windows, printing them on the screen, changing their content and passing the user's action(s) to the program. You will still have to program the rest of your program yourself!

Also, programs running under ProWesS still need the Pointer Interface itself, though not the WMAN window manager since that is replaced by ProWesS. The Pointer Interface handles very low-level stuff such as determining in what window the pointer is located. The window manager, on the other hand, is there to make sure that windows can be drawn nicely.

A knowledge of QPTR, the Basic extensions for the Pointer Environment, is not necessary here. It might sometimes be an advantage, but at other times it might be a disadvantage. However, you are supposed to know sufficiently about the Pointer Environment to know what a HIT, a DO and items are...

Unlike WMAN, ProWesS is object oriented. Thus programming for ProWesS means creating objects, possibly changing them, "activating" the main object, and then removing all of the objects once they are no longer needed.

OBJECTS

The entire window itself is an object, which, in turn, contains other objects, which can contain yet other objects - and so on. You, the programmer, never really manipulate the window itself, only the objects of that window. Normally, the first object you would create would be the outline of the window - all other objects are then fitted, or poured, into that outline object. Thus, the outline object is the owner of all the other objects. The combination of the outline object together with all that it contains, is known as a system. A program can own several systems. For example, you might have one system, which corresponds to the main window. At any time, you might open (pull down in WMAN parlance, or activate in ProWesS) another window, for example to show some options. This would be another system. However, all systems are built on the same model: one outline object followed by objects within the outline.

In other words, the first thing to do is to create an (outline) object. Once this is done, you can create other objects for it. The entire suite of objects is a system. Once you have created a system, you can activate it. Activation means that the window will be drawn on the screen. Once the window is drawn on the screen, ProWesS waits for the user to hit/do objects or press certain keys. Your program is then informed what object was hit or done, so that it can react accordingly.

It may happen that you want to change an object. Let's suppose that an object contains a string which tells the user what a default directory might be. The user now changes this default directory. It would be useful to change the object, or its contents, so that it reflects the new default directory. Since it would be fastidious to remove the object, create a new one, and (possibly) activate it, it is also possible to change an object.

Likewise, sometimes it can be necessary to ask an object something about itself. Even though you created them, you don't always know everything about the objects (ha, if it ain't magic...)! So, you can query an object about itself.

When you no longer need an object, you can just remove it. It then no longer exists. It is interesting to know that, when you remove an object, you also remove all the objects that are owned by it.

KEYWORDS

Thus, again, the main operations you are going to perform on an object are: create it, change it, query it, possibly activate it, and later remove it - curiously enough, each operation also corresponds to a new keyword (magic, again). There are also some other things to do, as you can see from the list of the new keywords available:

Each operation, and the keyword corresponding to it, are explained in the relevant sections. You should read the manual in that order, if possible. There are also some other new keywords, concerning:

and an explanation concerning Parameters and strings as used by the ProWesS keywords, which you also should read!
PROGS, Professional & Graphical Software
last edited 1997 Jun 06 (wl)