home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-22 | 108.8 KB | 2,781 lines |
- Screen Layout Designer - V2.01
- -------------------------------
-
-
- Chapter 1.
- ==========
-
- INTRODUCTION
- ------------
-
- The Screen Layout Designer (SLD) has been designed to create data
- entry screens for database applications, such as dBase or
- Clipper. Initially it was developed for in house use to assist in
- the design of database systems, but it has proved so useful that
- it has been enhanced further into a development tool in its own
- right.
-
- The Screen Layout Designer will take the drudgery out of
- designing data entry screens. It displays the data fields and
- field headings on your screen so that you can use the cursor keys
- or a mouse to position them wherever you want. Additionally you
- may add framed boxes and titles to smarten up your data entry
- screen. Colors for the background, data entry fields, headings,
- titles, menus and frames are selectable. SLD can read data field
- types directly from the header of dBase or Clipper ".DBF" files.
- These fields are then displayed on the screen for you to
- manoeuvre into the desired position. Alternatively SLD can read
- the fields from a text file, either created by you manually, or
- by dumping the database field definitions into the file by
- running a database field listing program, an example of which is
- given further in the text. SLD can also retrieve previously
- designed screens from a Screen Layout Definition File, with a
- ".SLF" extension.
-
- SLD can generate two types of output file. The first type is a
- text file containing dBase type "@ SAY" and "@ GET" statements,
- which may be directly pasted into your dBase or Clipper programs.
- The second type is a Screen Layout Definition File, mentioned
- above, which stores full information about fields, boxes, titles
- and colors, etc. You may use almost any programming language to
- read these files and extract the information contained in them to
- produce data entry screens for almost any database development
- language. Details of these files are given later.
- SLD supports multiple data entry screens. That is to say if
- there are more fields in your database file than can be
- accommodated on one screen then you may place them on several
- screens. SLD allows you to move freely between screens and even
- to move fields from one screen to another. You may also change
- the text of field headings.
-
- Screen Layout Designer version 2.01 has been developed by Neville
- T. Palmer of PDM Associates. This product is available for you
- to copy and pass on to other people, but the copyright remains
- the property of PDM Associates and Neville T. Palmer. You may
- use this software initially without charge, but if you intend to
- continue using it you should register the product for your use.
- This product is being developed further and there will be
- features of later versions which are not yet available in this
- one. Upon registration we will send you the latest version of
- this software. You will also be entitled to generous discounts
- on our other programs and future software. Please see appendix E
- for information on planned future enhancements, and the section
- on registration for information on how to register and to obtain
- your free software updates.
-
-
- SLD V2 System Capacities:
- -------------------------
-
- Max. no. of screens available in one session: 20
- Max. no. of DBFs from which fields may be read: 20
- Max. no. of data fields per session: 512
- Max. no. of titles and/or menu options: 254
- Max. no. of framed boxes: 254
- Max. no. of menus in one session: 80
-
- Platform:
- ---------
- IBM PC compatible 8088, 286, 386, 486 etc.
- Operating system: DOS 3 and above
- Minimum free memory: 512Kb
- Display types supported: HGA, CGA, EGA, VGA, SVGA, etc. Chapter 2.
- ==========
-
- INSTALLING SCREEN LAYOUT DESIGNER
- ---------------------------------
-
- SLD may be installed in any directory of your choice. You should
- copy the files supplied on floppy disk into this directory. If
- they are archived then you will need to unarchive them into the
- directory. Here is a full list of files you should have to use
- SLD:
-
- SLD.EXE (the main executable program)
- SLD.OVR (the overlay file)
- DBFACC.EXE (the .DBF access program)
- SCREDIT.EXE (a simple text file editor)
- SETCONV1.EXE (converts old .SET files to version 2 .SET)
- SLFCONV1.EXE (converts old .SLF files to versuion 2 SLFs)
- SETNAME.NAM (a file containing the name of the setup file
- initial default: SETUP.SET)
- SETUP.SET (a file containing the initial default
- settings)
- SCRHELP.EXE (the help program)
- SCRHELP.HLP (the help file)
- SLD.DOC (the user manual ... this file)
- *SLD.WP5 (the user manual in Wordperfect format)
- README (a list of these files and initial info)
- TUTOR.DOC (a tutorial ... also found in the manual)
- REGISTER.DOC (the software registration form for SLD)
- HISTORY.DOC (history of modifications, etc.)
-
- and sample files as follows:
-
- INPUT.TXT (a sample input text file)
- COMPANY.DBF (a sample .DBF file)
- CONTACT.DBF (ditto)
- OUTPUT.PRG (a sample screen output file in Clipper 5)
- DBASE3.PRG (a sample screen output file in dBase III)
- SCREEN.SLF (a sample screen layout file)
-
- miscellaneous files:
-
- CLIPTEST.PRG (a test program generated by SLD each time a
- Clipper program is generated)
- DBTEST.PRG (a test program generated by SLD each time a
- dBase program is generated)
- CLIPMAKE.BAT (a batch file which may be used to compile the
- generated code and test program in
- Clipper)
-
- *SLD.WP5 may not be included on BBS or Compuserve
-
- STARTING SCREEN LAYOUT DESIGNER
- -------------------------------
-
- Before running SLD it is best to ensure that no other programs
- are running on your system. To start SLD type 'SLD' at the DOS
- prompt. A pull down menu will be displayed. You will need to
- enter systems settings before you can use SLD. Dependant on the
- way you will use SLD you will also have to create certain files
- before you can use SLD to build data entry screens (please see
- further information below). The most important settings which
- you should set from the pull down menu are as follows:
-
- SETUP - select this option from the main menu to enter
- ==== system settings.
-
- This will take you to a second pulldown menu bar called the
- "System Setup Menu". The most important choices you should
- make from here are:
-
- INPUTTYPE: -menu option.
- ---------
- You have three choices, "TEXT", "DIRECT" or "SLF". If you
- want to read the data fields direct from a ".DBF" database
- file then you should select "DIRECT".
-
- If you want to read the fields from a text file then you
- should select "TEXT". Input text files can be created by
- you either using a text editor or by running a program
- from Clipper or dBase which dumps the fields to a text
- file. They are also created as an intermediate part of the
- process of reading fields from a .DBF file if you select
- "DIRECT".
-
- You may also read the screen layout which you have
- generated from a previous session. In this case you should
- select "SLF".
-
- LANGUAGE - menu option
- ---------
- There are slight differences between the dialects of dBase
- generic languages. SLD is equipped to allow for these
- differences in the output screen source code that it
- generates. You may select Clipper V.5, Clipper Summer '87,
- dBaseIII or dBaseIV. SLD will choose the most suitable
- commands for the language that you choose. However if you
- select dBaseIII, certain features of SLD are not available,
- these are:
- 1) only three box frame types are available instead of
- five (No Frame, Single or Double lined),
- 2) the 43/50 row by 80 column display mode is not
- supported.
- OTHER - menu option
- -----
-
- SETFILE: This is the name of the file which will be used to
- store the system information. You need not worry
- about this option to begin with , as a default file,
- "SETUP.SET" will already be entered here for you.
-
- EDITOR: You may edit or create the input text file or edit
- the generated screen code file, in which case you
- will require an editor. You may use an editor from
- within SLD, so you should enter the executable name
- of your editor here. The default is the simple built
- in editor "SCREDIT". If you want something more
- sophisticated then your editor should either exist in
- the SLD directory, or in a directory in the DOS path.
- Do not use a wordprocessor, as it is likely to use
- too much memory and may add unwanted control
- characters to your files.
-
- SPEED: This setting determines the speed at which messages
- are displayed on the screen. You may select "SLOW",
- "MEDIUM", "FAST" or "FLASH" here, which determines
- the speed at which messages are displayed.
-
- MOUSESPEED: This setting determines the speed of movement
- of the mouse cursor across the screen. You may select
- one of: "VERY SLOW", "SLOW", "MEDIUM", "FAST" and
- "VERY FAST". The optimum setting depends on the mouse
- you are using, the mouse driver software, the speed
- of your computer, as well as personal preference. If
- the mouse cursor moves too fast across the screen as
- you move the mouse, choose a slower setting, and vice
- versa if the cursor moves too slowly.
-
- MAXFIELDS: If you are reading input data fields direct from
- a database .DBF file, or from a text file, the fields
- will be placed on the screen automatically. You will
- need to limit the number of fields placed on any one
- screen to prevent cluttering. When you select this
- option you will be prompted for the number, between 1
- and 50. Save it by pressing the Enter key or Esc to
- quit. Note that if the screenheight is less than the
- number you enter here this value will be temporarily
- overridden and reduced to the value of the height, in
- number of rows, of the current screen. Also if you
- have entered #SCREEN commands in the input text file,
- these will temporarily override the value.
- REGISTER: This option allows you to register this program
- or check your existing registration. If you intend to
- continue using this software you should register this
- program. If you do so the first screen you see when
- entering SLD will contain your registered name and
- there will be no time delay before the program runs;
- also the exit screen when you leave SLD will no
- longer appear. See the section on Registration for
- full information on how to use this option to
- register this program.
-
- AUTHOR: When you generate the screen code a header will be
- written to the top of the file. This will
- contain the output source code file name and
- date. It will also contain the registration
- name if you have registered SLD. You may wish
- to add an Author name, and selecting this
- option will allow you to do this.
-
-
- SPLITFILE: You may select "NoSplit" or "Split".
-
- If you select NoSplit:
-
- when you generate the output screen code file
- (usually with a "PRG" file extension) all the code
- will be saved to one file, regardless of how many
- screens you have containing data fields or menus. In
- the case of an FMT file only the screen code for the
- currently active screen number will be saved to the
- FMT file.
-
- Note: the NoSplit option is best suited to Clipper
- programs where multiple screens can be accomodated in
- one program file.
-
- If you select Split:
-
- when you generate the screen code, each screen will
- be saved to a different file with a "Pxx" extension,
- where "xx" is the screen number, eg. screen one may
- be saved to a file called "OUTPUT.P1". In the case of
- FMT files each screen would be saved to a file with
- an "Fxx" extension, where "xx" again is the screen
- number. eg. screen ten may be saved to "OUTPUT.F10".
- When these files have been generated you will
- probably need to rename them to a suitable .PRG or
- .FMT filename.
-
- Notes:
-
- i) The Split option is better suited to dBase
- programs, especially since dBaseIII may find a single
- file too long to work with.
-
- ii) The filenames that are used to save the code for
- each screen to will be the name of the Code file or
- FMT file you selected from "File" and "Output" on the
- Main Menu with the new "Pxx" or "Fxx" extension added
- in place of the "PRG" or "FMT" extension.
-
- FILESPERSCREEN: you may select OneOnly or Multiple
- When SLD reads data fields from an input file or
- files you may allow it to display the fields from
- only one data file on each screen or the fields from
- more than one file per screen.
-
- If you select OneOnly:
-
- If you have setup SLD to read data fields from more
- than one data file those fields will be placed on the
- screen according to the "MaxFields" option, which is
- described above, unless you have set OneOnly here, in
- which case fields from different data files are
- placed on different screens.
-
- If you select Multiple:
-
- In this case fields from different data files may be
- placed on the same screen, and the number of fields
- displayed on one screen will only be determined by
- the "MaxFields" setting.
-
- Note: this setting depends on the intended use of the
- generated code and also which language you are using.
- If you are generating a dBase III/IV screen format
- (FMT) file, normally only fields from one data file
- need be included in one format file.
-
-
-
- DISPLAY - menu option
- -------
- You may select "COLOR" for a color display and "MONO" for a
- monochrome monitor. In "MONO" mode the display colors are
- clarified for monochrome display. Normally you should opt
- for "COLOR", even on a monochrome display, but if your
- display does not work well in color select MONO.
- From here you may also select "TYPE" so that you can select
- the display adapter type to which your monitor is attached.
- This should be one of "VGA", "EGA", "CGA" or "MDA". See
- below for a further discussion on this.
- MODE - menu option
- ----
- This option determines the size of your data entry screens
- either 80 columns by 25 rows, 80 columns by 43 rows, or 80
- columns by 50 rows (dependant on your monitor type). The
- default is "80x25". See below for further discussion.
-
- PRINTER - menu option.
- -------
- In order to print files and system setting information you
- will need to enter settings relating printer. The printer
- may have a serial or a parallel interface. If it is
- parallel it may be connected to port LPT1, 2 or 3 on your
- computer. If it is serial it may be connected to port COM1,
- 2 or 3, and you may need to enter settings relating to the
- communications speed and the size of data bits which for
- characters which will be sent to your printer. The setup
- information may be entered as follows:
-
- PORT: this is the port on your computer to which the
- printer will be attached and should be one of
- LPT1,LPT2,LPT3 for parallel, or COM1, COM2 or COM3
- for serial printer interfaces.
-
- COMMS: if you are using a printer with a serial interface
- having selected one of COM1-3, you may need to
- change the port communication speed and data
- bits to match the printer. The options from
- this submenu are:
-
- Speed - one of 9600, 4800, 2400 or 1200 bauds. This is
- the rate of data transfer to your printer.
- Data - this is the number of data bits for each
- character sent to the printer, either 7 or 8.
- Parity- this may be Even, Odd or None, depending on the
- type of data parity error checking your printer
- requires.
- Stop - this is the number of stop bits that are added
- to the end of each character sent to the
- printer, either one or two.
-
- For information on which printer settings to select you should
- consult your printer manual. If your printer has a parallel
- interface you do not need to change any of the settings available
- from the "COMMS" option, but if it has a serial interface you may
- need to. You should ensure that you have the correct cable
- attached to your printer, especially in the case of serial
- communications where you will need to ensure that correct
- handshaking takes place between the computer and printer. There
- are no facilities for changing handshaking modes from SLD at the
- moment, so ensure that you have a cable capable of dealing with
- hardware or software handshaking.
- SAVE - menu option.
- ----
- Once you have entered the settings you should save them by
- selecting this option.
-
- Now return to the Main Menu by selecting "MAINMENU" or
- pressing "ESC".
-
-
-
- FROM THE MAIN MENU:
- -------------------
-
- FILE - menu option. Select this option from the Main Menu.
- ----
-
- INPUT: If you have selected "DIRECT" from the INPUTTYPE
- option of the System Setup Menu, then you will need
- to enter the name of the .DBF file that SLD will read
- data fields from, and the name of an intermediate
- text file into which the fields will be held for use
- by SLD. In this case enter the name of the text file
- by selecting "TEXT" and then the name of the .DBF
- file by selecting "DBASE".
-
- If you have selected "TEXT" from the INPUT option on
- the System Setup Menu then you only need to enter the
- name of the text file here, in the same way.
- Remember, if you elect to do this the text file must
- already exist, having been created manually or by
- dumping fields from a .DBF file into the text file.
-
- If you have selected "SLF" from the INPUTTYPE option
- you must enter the name of a previously generated
- Screen Layout File, with an ".SLF" extension, created
- by you during a previous SLD session.
-
-
- OUTPUT: You must select "CODE" to enter the name of the
- file which will contain your dBase generic language
- screen source code. You must select "SLF" to enter
- the name of a Screen Layout File which will be used
- to store the screen layout and settings from the
- current SLD session.
- Using MonoChrome Monitors with SLD.
- -----------------------------------
- Ideally Screen Layout Designer is used to best effect on a color
- monitor, however you may be using a monochrome monitor, or simply
- wish to generate source code for mono monitors. To select
- monochrome display mode you may either select Setup/Display/Mono
- from the menu bar after starting SLD, or you may start SLD with
- the "/M" switch, ie. type the following at the DOS prompt:
- SLD /M. This will override the default colors. If you then
- change the colors when in SLD you should save them. If you do
- this you will not need to use the /M switch, which overrides all
- color settings, when you next run the program.
-
- The color palette is available for you to change colors in Mono
- mode, but they are translated into the gray scale tones
- automatically so that what you see is actually what you get when
- code is generated.
-
- Some mono monitors have been found to display well in Color
- display mode, but others display better in Mono mode.
-
-
-
-
- Selecting a Display Adapter Type:
- --------------------------------
- When you initially setup SLD you should select SETUP from the
- Main Menu. This will take you to the Setup Menu. Enter the other
- settings as normal. To change the display adapter type, select
- MODE followed by TYPE. You may select MDA for Monochrome and
- Hercules display adapters, CGA for the original Color Graphics
- Adapter, EGA for the Enhanced Graphics Adapter, or VGA for Video
- Graphics Array adapter (including SVGA, etc.). Selecting the
- correct display adapter will ensure that you do not select an
- incorrect display mode.
-
-
- Selecting Text Mode.
- --------------------
- The display mode that you select will determine the appearance of
- your data entry screen in the finished dBase/Clipper program. The
- display modes are: 25 rows x 80 columns, 43 x 80, and 50 x 80.
- There are a number of factors which determine valid display modes
- as follows:
-
- 1) your display adapter and monitor type,
- 2) which output language you will use (dBaseIII or IV, or
- Clipper V5 or S87).
- 3) the version of DOS on the program development PC.
- SLD attempts to be as flexible as possible in the above issues.
- Here is a breakdown of valid display modes:
-
- 1) The CGA display adapter generally only allows 25 x 80
- display mode. MDA and Hercules monochrome, and EGA color
- adapters generally allow only 25 x 80, and 43 x 80 display
- modes. VGA adapters generally allow 25 x80, 43 x 80 and 50
- x 80 modes, however SLD only supports 43 x 80 mode on a VGA
- adapter with DOS version 4 and above.
-
- 2) dBaseIII and Clipper 87 only support 25 x 80 mode. dBaseIV
- supports 25 x 80 and 43 x 80 modes. Clipper V5 supports 25
- x 80, 43 x 80 and 50 x 80 modes.
-
- To select a text mode select SETUP from the Main Menu to display
- the Setup Menu. From this menu select MODE. You may then select
- one of the three modes, dependant on the adapter type you have
- entered in the TYPE option on this menu. If you change mode the
- contents of the screen will be cleared and regenerated in the new
- mode.
-
-
- NOTES:
- ------
- You should change the display mode before you have allowed SLD to
- read data fields from a file and display them on the screen (by
- selecting SHOW from the Main Menu). If you do not the screen you
- were editing could be truncated, particularly if you switch from
- 50 x 80 to 25 x 80 mode, and some fields may not be displayed.
- Should this happen, switch back to the previous mode and move the
- fields to within the bounds of the new screen mode, or,
- alternatively, move the fields to another screen. eg. if you
- wish to switch from 50 x 80 to 25 x 80, then move the relevant
- field's position on the screen above the 25 row boundary, or move
- it onto the next screen.
-
- Select the best screen mode for the output language you are
- using. For instance, don't select 50 x 80 mode when your target
- language is dBaseIII. SLD is flexible; you might say that it
- gives the user enough rope to hang themselves with!
-
- Chapter 3.
- ==========
-
- USING SCREEN LAYOUT DESIGNER.
- -----------------------------
-
- Having setup the important initial settings in SETUP and FILE
- from the pulldown menu you are ready to view and edit the data
- fields on screen.
-
- To do this select "SHOW" from the main pull down menu. The pull
- down menu will disappear and the fields will be displayed with
- their headings. A second menu will appear superimposed on the
- fields; this is the Screen Edit Menu. If you are reading from a
- .DBF or text file the data fields and default headings will be
- displayed starting from top left. To start editing the screen
- select EDITSCREEN from the pulldown menu or just press "Esc".
- You are in Screen Edit Mode. NOTE: to get back to the pull down
- menu from within your editing session press "Esc" again. To
- move the cursor you may use the cursor (arrow) keys or a mouse.
-
- Note: if to return to the main menu from the Screen Edit Menu,
- select "QUIT" (or "Alt Q").
-
-
- Manoeuvring the Fields and Headings.
- -------------------------------------
- You may use the cursor keys or mouse to manoeuvre the fields and
- headings around the screen. To move a field or heading, move the
- cursor onto it with the mouse or cursor keys and press the Enter
- key or press the left mouse button. If you are using a mouse,
- keep the left button pressed and move the field to the new
- position, then release the button. If you are using the cursor
- keys, move the field to the new position and press enter again to
- place it.
-
- Other Cursor Movement Keys.
- ---------------------------
- In addition to the mouse and cursor keys (arrow keys) you may use
- other keyboard keys to move the cursor around the screen as
- follows:
- HOME - to move the cursor to the far left of the screen.
- END - to move the cursor to the far right of the screen.
- PAGE_UP - to move the cursor to the top of the screen.
- PAGE_DOWN -to move the cursor to the bottom of the screen.
-
-
- Changing Headings & the Screen On Which a Field/Heading Appears.
- ---------------------------------------------------------------
- If you move the cursor onto a field or heading with the mouse or
- cursor keys and, either press function key F2, or double click
- the mouse, a window will appear containing the following
- information on that field:
-
- Field Name: the name of the data field as it appears in the .DBF
- file.
- Type: the type of the field (C=character, N=numeric, D=date,
- M=memo, L=logical)
- Width: the width of the data field
- Decimal Places: the number of decimal places for numeric
- fields.
-
- From here you can change the heading text which corresponds to
- the data field on the screen, and the screen on which the field
- and its heading are displayed. In version 2.01 of SLD you will
- only be able to change these two items. To change the heading,
- simply type in the new text. If you do not want any heading for
- this field (eg. for ADDRESS2,3,4 fields) delete the heading,
- leaving the text blank, and the heading will not appear on the
- screen when you save the information.
-
-
- If you want the field and its heading to be displayed on another
- screen, enter the new screen number here, and when you save the
- information the field and heading will disappear from the current
- screen. The field and heading will reappear when you select the
- new screen from the menu bar. To save and exit the window, press
- Ctrl and Enter. To exit without saving the changes, press Esc.
- Or you may delete a field and its heading completely by pressing
- the F4 key. If you do so the field and heading will disappear
- from all screens. You should consider very carefully whether you
- need the field you are about to delete before actually deleting
- it. If you delete it then your program will not be able to update
- information in this field for each record in your data file, with
- the code generated in this session.
-
-
- Moving to Another Screen.
- ------------------------
- If you press "Esc" whilst in Screen Edit Mode the pulldown Screen
- Edit Menu will reappear. To change to another screen select the
- "SCREEN" option from here. You are given three choices: "NEXT"
- to move to the next screen, "PREV" to move to the previous
- screen, and "NUMBER" which will prompt you to enter a screen
- number to move to. If the screen you select is out of range you
- will be warned accordingly.
-
- You may also select a screen by number from the main menu SCREEN
- option.Adding a Blank Screen.
- ----------------------
- You may add a blank screen to the current editing session from
- the Main Menu bar or from the Screen Edit Menu by selecting
- "SCREEN", followed by "ADD". If are in Screen Edit Mode you
- should press "Alt" and "S" (or press "Esc" to return to the
- Screen Edit Menu and select "SCREEN") so that you can select
- "ADD" to append a new screen to your session.
-
-
- Adding Boxes and Titles to your Screens.
- ---------------------------------------
- To improve the presentation of your data entry screens you can
- add framed
- boxes and additional titles to them.
-
- To Add a Box:
- -------------
- You may add a box from the Screen Edit Menu by selecting "BOX".
- From here
- you may add a NEW box, EDIT or DELETE an existing one. If you are
- in Screen Edit Mode you may press "Alt" and "B" which will take
- you straight to the new box menu option on the Screen Edit Menu
- (you may also do this by pressing "Esc" and then selecting "BOX"
- from the menu). Before adding your box you may wish to change the
- type of frame you want for the box, in which case select "FRAME"
- first. The frame type you select will override the default frame
- setting. Having selected the frame you should then select "NEW".
- The pulldown menu will disappear and you will enter Screen Edit
- Mode and then Box Edit Mode. Move the cursor, using the cursor
- keys or mouse, to the position where you want the top left corner
- of the box to start, then press Enter, or click with the mouse.
- Now when you move the cursor the box will expand or contract from
- its origin. When the box is at its correct size you may move it
- around the screen by pressing F3. F3 can be used to toggle
- between moving the box or expanding/contracting it. When you are
- happy with the size and position of the box, click with the mouse
- or press Enter to save it, or to abandon the box press Esc.
-
- To edit or delete a box select "EDIT" or "DELETE" from the BOX
- option on the menu. Move the cursor to the box to edit or delete
- and either click on it with the mouse or press Enter. If you are
- deleting the box you will be asked whether you wish to go ahead
- with the deletion. If you answer "Y" the box will disappear. If
- are editing the box you will enter Box Edit mode and you should
- progress as mentioned previously when adding a box.
-
- Hotkey to Add a Box.
- --------------------
- If you are in Screen Edit Mode you may add a box without
- resorting to the pulldown menu bar. If you press F3 you will
- enter Box Edit Mode, from where you can place a box on the
- screen. Note however that you cannot use F3 to edit or delete an
- existing box.
- To Add a Title:
- --------------
- You may add a box from the Screen Edit Menu by selecting "TITLE".
- From here you may add a NEW title, EDIT or DELETE an existing
- one. If you are in Screen Edit Mode you may press "Alt" and "T"
- which will take you straight to the new title menu option on the
- Screen Edit Menu (you may also do this by pressing "Esc" and then
- selecting "TITLE" from the menu). The pulldown menu will
- disappear and a window will appear prompting you to enter the
- title text. The title text can be up to 78 characters in length.
- Leading spaces will may be used to left pad the title. To save
- the title text press Enter (to exit without saving press Esc).
- You will enter Screen Edit Mode and then Title Edit Mode. Move
- the cursor, using the cursor keys or mouse, to the position where
- you want the left side of the title to start, then press Enter,
- or click with the mouse. Now when you move the cursor the title
- will expand or contract from its origin. When the title is at its
- correct size you may move it around the screen by pressing F3.
- F3 can be used to toggle between moving the title or
- expanding/contracting it. When you are happy with the size and
- position of the title, click with the mouse or press Enter to
- save, or press Esc to abandon it.
-
- To edit or delete a box select "EDIT" or "DELETE" from the TITLE
- option on the menu. Move the cursor to the title to edit or
- delete and either click on it with the mouse or press Enter. If
- you are deleting the title you will be asked whether you wish to
- go ahead with the deletion. If you answer "Y" the title will
- disappear. If are editing the title a window will appear
- enabling you to edit the title text as previously. When you have
- changed the text save it with Enter, or press Esc to abandon the
- edit. You will then enter Title Edit mode and you should progress
- as mentioned previously when adding a Title.
-
- Hotkey to Add a Title.
- ----------------------
- If you are in Screen Edit Mode you may add a title without
- resorting to the pulldown menu bar. If you press F4 you will
- enter Title Edit Mode, from where you can place a title on the
- screen. Note however that you cannot use F4 to edit or delete an
- existing title.
-
- Adding Menu Systems and Options your Screens.
- ---------------------------------------------
- To improve the functionality of your data entry screens you can
- add menu sytems to them. To each menu system you may can add a
- number of menu options.
-
- To Add a Menu System:
- ---------------------
- From the Screen Edit Menu select "MENU" and then "ADD" . From
- here you can add a new menu system. The menu system will be added
- to the current screen on view. You should plan your menus and
- remember not to clutter your screens with too many menus.
-
-
- dBase II and IV Menus:
- ----------------------
- If the language you are using is dBase III or IV then you may use
- one of 3 slightly different menu types. When adding a new menu
- you will first of all be prompted:
- "Use Conventional dBase Menu style (Y/N)?".
- If you answer "NO" to this the menu generated will be a bounce
- bar type, and if you answer "YES" the menu will be of the
- conventional dBase type. If you do answer "YES" you will be
- prompted:
- "Use an @GET to Select menu options (Y/N)?".
- If you select "NO" to this the user's menu choice will be input
- by an INKEY() statement, but if you answer "YES" the user's
- choice will be input by an @GET and you will be prompted for the
- row and column where you wish the @GET prompt to be initially
- placed on the screen. If you answer "YES" you should save the row
- and column that you have entered by pressing the "Ctrl" and
- "Enter" keys. If you press the "Esc" key you will be returned the
- the previous "(Y?N)?" prompt. Remember that if you are adding
- more than one menu to the screen the @GET prompt should be placed
- in a different position for each menu. In any case you may move
- the prompt later by entering Menu Edit Mode.
-
- Note: if you add a conventional dBase menu system without an @GET
- to select options on this menu then you may only add a maximum of
- nine selectable options to this menu. This type of menu is
- available for efficient small menus for dBase applications.Adding Options to Menus:
- ------------------------
- Once you have created your menu system it will be of no use until
- you have added menu options to it. To add an option select
- "MENU", then "OPTION", followed by "NEW" from the Screen Edit
- Menu. NOTE: If you are in Screen Edit Mode you may get straight
- to here by pressing "Alt" and "M".
-
- You will be prompted to enter the heading text for the menu
- option you are adding and the number of the menu system on which
- it will appear. The heading may be up to 40 characters, for
- example you may have a heading of "EDIT" on your menu. If you are
- unsure of which menus are active on the screen in view, press the
- F3 key and you will be presented with a list box of available
- menu numbers active on this screen. You should use the up or down
- arrow keys to highlight a menu number and select it using the
- Enter key. To save the heading and menu number information press
- "Ctrl" and "Enter", or "Esc" to abandon the whole operation.
-
- If you save the menu heading information you will enter Screen
- Edit Mode and then Menu Edit Mode. Move the cursor, using the
- cursor keys or mouse, to the position where you want the left
- side of the menu option to start, then press Enter, or click with
- the mouse. When you move the cursor keys or mouse the menu option
- will expand or contract it from its origin. When the menu option
- is at its correct size you may move it around the screen by
- pressing F3. F3 can be used to toggle between moving the option
- or expanding/contracting it. When you are happy with the size
- and position of the menu option, click with the mouse or press
- Enter to save it.
-
-
- To edit or delete a menu option select "EDIT" or "DELETE" from
- MENU/OPTION on the menu. Move the cursor to the menu option to
- edit or delete and either click on it with the mouse or press
- Enter. If you are deleting the option you will be asked whether
- you wish to go ahead with the deletion. If you answer "Y" the
- menu option will disappear. If are editing the option a window
- will appear enabling you to edit the menu option text as
- previously. You may also attach the menu option to another menu
- system.
- When you have changed the text save it with Enter, or press Esc
- to abandon the edit. You will then enter Menu Edit mode and you
- should progress as mentionedpreviously when adding a menu option.
-
- Hotkey to Add a Menu Option.
- ---------------------------
- If you are in Screen Edit Mode you may add a menu option without
- resorting to the pulldown menu bar. If you press F5 you will
- enter Menu Edit Mode, from where you can place a menu option on
- the screen. Note however that you cannot use F5 to edit or
- delete an existing menu option.
- Adding a Standard Menu System.
- -----------------------------
- To save you the time taken in creating a standard menu system,
- you may select a Standard menu from the Screen Edit Menu. This
- standard menu has seven options already created for you, these
- are: "ADD", "EDIT", "DELETE", "NEXT", "PREV", "FIND" and "QUIT".
- These menu options are drawn on the second to last row of the
- current screen when you select "MENU", followed by "STANDARD",
- from the Screen Edit Menu. You may only add one standard menu to
- each screen. These menu options may be edited in the same way as
- previosuly described.
-
- Letter Selection of dBase Menus.
- --------------------------------
- To improve your dBaseIII/IV menus you may wish to select a menu
- option by pressing a letter, rather than using the cursor/tab key
- to highlight it and then pressing the enter key. For example: if
- you have amenu option called "EDIT" you may wish to select it by
- simply pressing the letter "E". To enable letter selection then,
- when you edit the menu option heading, insert a ^ (hat) symbol
- before the selection letter (normally the first letter). The
- ^ symbol will not appear on the finished menu system, but the
- letter selection code will be generated. (So then in our example
- we would enter the option title as "^EDIT" ). Note that when you
- select the standard menu system the ^ symbol is added before
- the first character of each option automatically.
-
-
- Notes:
-
- 1) in the case of Clipper menus it is not necessary to include
- the ^ symbol in option headings because Clipper
- automatically allows first letter selection in menus.
-
- 2) If you select Clipper for the Language setting, then
- generate a Standard Menu, and you then change the language
- to dBase, remember that the Standard Menu will have no ^
- symbols for first letter selection.
-
-
- The Expand/Contract or Move HotKey - F3
- ----------------------------------------
- It is worth emphasising that when editing Boxes, Titles or Menu
- options and moving them around the screen the F3 key toggles
- between movement of the object and expanding/contracting the size
- of the object.
- CHANGING DEFAULT COLORS FOR GENERATED SCREENS.
- ----------------------------------------------
-
- If you select "SCREENCOLORS" from Main Menu, at any time, you
- will be able to change the colors, etc, of the data entry screen
- you will generate (NOTE: this should not be confused with the
- system colors for SLD system menus and windows available from the
- Setup Menu).
-
- The settings you can change from SCREENCOLORS are as follows:
-
- BACKFILL: this option allows you to change the character that
- will be used to fill the background of your data
- entry screen. It may be a space character, or ASCII
- code.
-
- BACKGROUND: this allows you to change the background color of
- the data entry screen. The actual color and
- appearance of the background will depend on the
- combination of this setting and the BACKFILL
- character you selected.
-
- FIELD: this determines the color of text and background of
- unselected data entry fields. To assist you in
- choosing the color of the field text, an asterisk is
- displayed in the blank field.
-
- SELECTED: this determines the text and background color in
- which the currently selected data entry field will
- appear.
- HEADING: this allows you to select the text and background
- color for headings which correspond to a data entry
- field.
-
- TITLE: this option allows you to select the text and
- background color for additional titles on your data
- entry screen.
-
- MENU: this option allows you to select the text and
- background color for selected user created menu
- options. These menus should not be confused with the
- main SLD pulldown menu bar.
-
- UNSELMENU: this allows you to select the text and background
- color for unselected user created menu options.
-
- BOX: this determines the frame background and foreground
- color of boxes you add to your data entry screen.
-
- FRAME: you can select the default frame characters which
- boxes will use by default. This setting can be
- overridden temporarily when you add a new box. The
- frame you may select can be one of: No Frame, Single
- Lined Frame, Double Lined Frame, Double Lined Top and
- Single Lined Side, or Single Lined Top and Double
- Lined side.
-
- SETFRAMES: if you change the default frame type this change will
- not be reflected in the previously defined boxes
- already displayed on the screen, unless you change
- each box individually. However by selecting this
- option all boxes will be updated with the new default
- frame type at the same time.
-
- Note: if you are using the monochrome display mode the
- color palette colors will be translated to gray scale
- tones. Some colors in the palette will be displayed
- with an underline. These colors will be displayed
- with underlining in the system colors, and on
- completed data entry screens if you have selected
- Clipper for the language type. However the
- underlining will not be displayed if you select dBase
- for the language type, so bear this in mind when
- selecting colors.
- CHANGING DEFAULT SLD SYSTEM COLORS.
- -----------------------------------
- If you select "SETUP" from Main Menu, the System Setup Menu will
- appear. You may change the default system settings for Screen
- Layout Designer from here. By selecting "COLORS" you may change
- the colors for the pulldown menus, information windows/dialog
- boxes, data entry, and listboxes, etc.
-
- The settings you can change from COLORS are as follows:
-
- MENUBAR - this option allows the setting of pulldown menu colors
- -------
- UNSELECTED: this option allows you to change the color of
- currently unselected options on the pulldown menus.
-
- HIGHLIGHT: unselected menu options have a highlighted character.
- If you select "Alt" and this character, or just this
- character on its own you will select this option on
- the menu. You may change the highlight color here.
-
- SELECTED: this option allows you to change the color of the
- currently selected menu option.
-
- DISABLED: some menu options will not be valid for the state of
- the current menu. These options will disabled and
- should appear in a dimmer color than normal selected
- or unselected options. Change this color here.
-
- FRAME: this option allows you to change the frame and
- heading text color of pulldown menus.
-
- HELP: this option allows the setting of the single help
- line positioned at the bottom of the screen.
-
- WINDOWS - this option allows the setting of windows/dialog box -
- ------- colors.
-
- TEXT: this option allows you to change the color of the
- text of information and dialog boxes,as well as the
- background on which it is displayed.
-
- FRAME: this allows you to change the frame color for info.
- windows and dialog boxes.
-
- SBUTTON: some dialog boxes will present you with options
- presented as buttons responding to operator response
- (eg. 'Y' or 'N'). You to change the color of the
- currently selected push button.
-
- UBUTTON: this allows you to change the color of currently
- unselected push buttons.
-
- ENTRY - this option allows the setting of data entry box colors
- -----
- WINDOW: this option allows you to change the frame, heading
- and background colors for data entry windows
- requiring user input (eg. the name of a file for SLD
- to process).
-
- PROMPT: this option allows you to change the text and
- background color for the text prompting the user for
- data entry. (eg. Filename: ).
-
- SELECTED: this allows you to change the color of the currently
- selected item in in a data entry window.
-
- UNSELECTED: if there is more than one item in a data entry
- window the currently unselected items will be
- presented in a different color to the selected item.
- You may change this color here.
-
- LISTBOX - this option allows the setting of listbox colors.
- -------- Listboxes will present the user with multiple lines
- of information and may also allow the user to select
- a line for input into a data entry screen.
-
- FRAME: this allows you to change the color of the frame
- surrounding a list box.
-
- HIGHLIGHT: this allows you to change the color of the
- currently highlighted line in a list box.
-
- NORMAL: this allows you to change the color of all other
- non-highlighted items in a list box.
-
-
- HELP - this option allows you to change the help window
- ------ and index colors.
-
- FRAME: this allows you to change the color of the frame and
- heading colors of the help window and help index.
-
- NORMAL: this allows you to change the background and text
- color for of the help window and index.
-
- HIGHLIGHT: this allows you to change the color of higlighted
- words within the help window (ie. for important
- titles and points).
-
- INDEX: the index window highlights the currently selected
- index topic. This allows you to change the the color
- of the highlighted item.
-
- GENERATING SCREEN OUTPUT SOURCE CODE.
- -------------------------------------
-
- Once you have laid out your data entry screen(s), complete with
- any necessary boxes and titles, you are ready to generate source
- code so that the screen can be incorporated into the database
- program under development.
-
- The built in code generator will generate code in dBase or
- Clipper generic code. To generate the code you should ensure
- that you have entered a file name in the FILE/OUTPUT/CODE option
- from the pulldown menu bar, then you should select "GEN" from the
- menu bar, followed by "CODE". The source code for the screen(s)
- will be placed in the selected file. You should then paste the
- code into your program and compile it with your dBase generic
- compiler. The code will be in the form of a procedure. If your
- program will incorporate multiple data entry screens then one
- procedure will be generated for each screen. Please see Appendix
- C for information on the code generated by SLD.
-
- The default filename extension for generated Screen Code Files is
- ".PRG".
-
-
- GENERATING A SCREEN LAYOUT FILE.
- --------------------------------
-
- In addition to source code, you can store the contents and
- settings of a data entry screen you have laid out in a type of
- file unique to SLD. This file contains a header record and a
- record for each screen you have assigned in the current session.
- The Screen Layout Files have a ".SLF" extension name. Once you
- have laid out your screen(s) you can generatean SLF, first
- ensuring that you have entered a file name with the correct
- extension in the FILE/OUTPUT/SLF option from the pulldown menu
- bar. To generate the SLF select "GEN", followed by "SLF" from
- the menu bar. The full information and settings relating to the
- current screen(s) will be stored in the selected Screen Layout
- File.
-
- At any time in the future you can read from this SLF by selecting
- SETUP/INPUT/SLF from the menu bar and entering its file name when
- you select FILE/INPUT/SLF. Then when you select VIEW the
- previously stored screen will be redisplayed.
- This type of file is probably the most powerful feature of SLD
- because any third party program can be written to read its
- contents to generate screen code in almost any language. This
- feature is one being developed further.
-
- For information on the fields in the records of a Screen Layout
- File please see Appendix A.
-
- AUTOMATIC BACKUP
- ----------------
- When you change screens, exit from the Screen Edit Menu, or
- perform certain critical screen editing operations, the contents
- of the screens currently being edited are automatically saved to
- a temporary file called "BACKUP.SLF" in the current directory so
- that your data is backed up. BACKUP.SLF" can be read just the
- same as any other Screen Layout File. When SLD is backing up a
- message "Saving to BACKUP.SLF" appears briefly.
-
-
- UPDATING THE INPUT TEXT FILE.
- -----------------------------
-
- If you are reading the data fields direct from a .DBF file then
- an intermediate input text file will be created. You may also
- create your own text file containing the data fields, either
- manually with an editor (see Chapter 4), or by dumping the fields
- from a .DBF file into a text file (a program example, written in
- Clipper is given in Chapter 4). Screen Layout Designer will read
- the data fields from this text file. You may update the contents
- of this file, in a limited way, by selecting "UPDATE", followed
- by "TEXT", from the menu bar. The data fields listed in the text
- file will be saved in the order in which they appear on the
- screen you have laid out, and according to them screen number on
- which they appear. The update operation may make use of the
- #SCREEN command, unique to SLD.
-
- NOTE: beware that if you have updated the text file and you are
- reading direct from a database .DBF file, the text file will be
- overwritten when you re-run SLD or select NEW from the menu bar,
- unless you select a new text file name for input.
-
-
- EDITING A FILE.
- ----------------
-
- You may edit an input text file (default extension .TXT), an
- output Screen Code File (default extension .PRG), or a dBase FMT
- file (default extension .FMT), but you should not attempt to edit
- any other type of file used by SLD. Before you can edit a file
- you must ensure that a valid editor has been selected. The
- executable file name of your editor should be entered by
- selecting SETUP, then EDITOR from the menu bar. The default
- editor is SCREDIT.EXE, however you may want to use a more
- sophisticated editor. Do not use a wordprocessor from within
- SLD, as it is likely to use too much memory and may add unwanted
- control characters to the file being edited. If you have to use
- a wordprocessor use it outside of the SLD program and save your
- files as ASCII text, without control characters.
-
- To edit the input text file select "EDIT", followed by "INPUT"
- from the pulldown menu bar, then enter the name of the input text
- file you wish to edit. The default file extension for input text
- files is ".TXT".
-
- To edit the output Screen Code File select "EDIT", followed by
- "OUTPUT" from the menu bar, then enter the output Screen Code
- File name that you wish to edit. The default file extension for
- Screen Code files is ".PRG".
-
- To edit a dBase FMT file select "EDIT", followed by "FMT". The
- default extension for these files is ".FMT".
-
- PRINTING A FILE.
- ----------------
-
- You may print an input text file (default extension .TXT), an
- output Screen Code File (default extension .PRG), or a dBase FMT
- file (default extension .FMT), but you should not attempt to
- print any other type of file used by SLD. You may additionally
- print information about the current system settings. The
- information is sent to the printer in normal ASCII text form.
- Before printing you must ensure that you have selected the
- correct printer port for your printer. This should be LPT1, LPT2,
- LPT3, COM1, COM2 or COM3, depending on whether your printer
- interface is parallel or serial, and on how many ports your
- system has free and available. To setup the printer, run the
- Setup Menu, by selecting "SETUP" from the Main Menu, and then
- select "PRINTER". You should enter the printer port and other
- information here (see Setup).
-
- To print the input text file select "PRINT", followed by "INPUT"
- from the Main Menu bar. The file to be printed will be the input
- text file name that you have entered by selecting "File", "Input"
- and "Text" from the Main Menu.
-
-
- To print the output Screen Code File select "PRINT", followed by
- "OUTPUT" from the Main Menu. The file to be printed will be the
- output program file name that you have entered by selecting
- "File", "Output" and "Code" from the Main Menu.
-
- To edit a dBase FMT file select "PRINT", followed by "FMT". The
- file to be printed will be the input text file name that you have
- entered by selecting "File", "Output" and "FMT" from the Main
- Menu.
-
- To print information about the current system setup select
- "PRINT" followed by "SETTINGS".
-
- SELECTING A NEW INPUT FILE.
- ---------------------------
-
- You do not need to exit Screen Layout Designer to clear the
- screen and read data fields from a new file. If you select "NEW"
- from the menu bar you will be able to clear the current fields
- from the screen and either re-read the current input file, or
- read a new input file. If you have not saved the current screen
- and settings you will be prompted to save them before reading of
- the new input file commences.
-
-
- USING ONLINE HELP.
- ------------------
-
- A HELP option is available from the pulldown menu. This is
- effectively an online manual with an index of topics. If you are
- stuck at any point then pressing "Esc" will get you out of
- trouble and take you back to the menu bar, where you can select
- online help which will be of assistance to you in the task you
- are trying to perform.
-
-
- LEAVING THE PROGRAM.
- --------------------
-
- To Exit SLD from Screen Edit Mode, press "Esc" until the menu bar
- appears. From the main pulldown menu bar press "Esc" again to
- quit the program. If you have not saved your screen and settings
- you will be prompted to do so.
-
-
- Chapter 4.
- ==========
-
- CREATING AN INPUT TEXT FILE.
- ----------------------------
-
- If you opt to read data fields onto your screen by
- directlyreading from a database .DBF file then Screen Layout
- Designer will automatically create an intermediate text file for
- you. You can use the file thus created in future screen editing
- sessions without having to re-read the database file.
-
- If you do not want to read fields directly from the database file
- then you can create the text file in two ways:
-
- 1) by running a program which lists the fields from your
- database file and dumps them into the text file.
- 2) by using an editor to create the file manually yourself.
-
-
- Method 1:
- ---------
- Here is a sample program, written in Clipper, which can be used
- to read the structure of a database file, in this case MEDIA.DBF,
- and copy the field information into a text file, in this case
- INPUT.TXT:
-
- use MEDIA
- COPY STRUCTURE EXTENDED TO newlist
- USE newlist
- LIST field_name,field_type,field_len,field_dec TO FILE input.txt
-
-
- The above program is all you need to create the input text file.
- You might call this program "STRUC.PRG" and then compile it using
- the Clipper compiler. When you run the executable, STRUC.EXE,
- you will create the text file. (Note that newlist is an
- intermediate file).
-
- Method 2:
- ---------
- You can get an initial idea of how to create a text file manually
- by looking at the sample file INPUT.TXT supplied on the
- distribution disks. The text file must contain, for each field,
- the field name, field type, field length and decimal places (for
- numeric types). The field types can be one of: C (character), D
- (date), N (numeric) or M (memo). Here is an example:
-
- SHORTCODE C 10 0
- ACCNO C 10 0
- COMPANY C 30 0
- ADDRESS1 C 30 0
- ADDRESS2 C 30 0
- ADDRESS3 C 30 0
- ADDRESS4 C 30 0
- POSTCODE C 15 0
-
-
- Each line corresponding to each field can optionally be prefixed
- by a number for compatibility reasons, although SLD ignores the
- number. For example:
-
- 1 SHORTCODE C 10 0
- 2 ACCNO C 10 0
- 3 COMPANY C 30 0
- 4 ADDRESS1 C 30 0
- 5 ADDRESS2 C 30 0
- 6 ADDRESS3 C 30 0
- 7 ADDRESS4 C 30 0
- 8 POSTCODE C 15 0
-
-
- In addition the file can contain a "#SCREEN" command, unique to
- SLD, which splits a number of fields into screens. This command
- is the only "hash" command currently supported by SLD. The syntax
- is: #SCREEN <number>
- where "number" is the screen number. All data fields after the
- #SCREEN command will be placed onto the screen with the specified
- number, until another #SCREEN command is encountered. Note:
- When you do not include a #SCREEN command in the input text file
- SLD automatically splits the screens for you, but if you include
- #SCREEN commands SLD allows these to split the screens, so be
- careful that you do not try to push too many fields onto one
- screen. Example:
-
- #SCREEN 1
-
- SHORTCODE C 10 0
- ACCNO C 10 0
- COMPANY C 30 0
-
- #SCREEN 2
-
- ADDRESS1 C 30 0
- ADDRESS2 C 30 0
- ADDRESS3 C 30 0
- ADDRESS4 C 30 0
- POSTCODE C 15 0
-
- In the above example, SHORTCODE, ACCNO and COMPANY will appear on
- screen number 1 and ADDRESS1,2,3,4 and POSTCODE will appear on
- screen 2.
-
-
- Multiple Database Files.
- ------------------------
- You may enter fields from more than one databse file on you data
- entry screens. This features allows SLD to produce relational
- applications. The layout is as follows:
-
- COMPANY->SHORTCODE C 10 0
- COMPANY->ACCNO C 10 0
- COMPANY->COMPANY C 30 0
- COMPANY->ADDRESS1 C 30 0
- COMNPNY->ADDRESS2 C 30 0
- COMPANY->ADDRESS3 C 30 0
- COMPANY->ADDRESS4 C 30 0
- COMPANY->POSTCODE C 15 0
- CONTACTS->SHORTNAME C 10 0
- CONTACTS->FIRSTNAME C 30 0
- CONTACTS->SURNAME C 30 0
-
- Two data files are used in the example above, COMPANY and
- CONTACTS, so that fields from both files will appear on the same
- screen.
-
-
- As previously mentioned SLD will automatically generate an
- intermediate text file for you if you opt to read the database
- fields directly from database .DBF files. However you may wish
- to edit the input text file to suit your needs. APPENDIX A.
- ===========
- THE FORMAT OF SCREEN LAYOUT FILES.
- ----------------------------------
- The format of SLF files have changed. The older format is however
- still supported by the later releases of SLD. However SLD version
- 2 does not directly support version 1 files. If you want to read
- version 1 files from version 2 you must convert your old version
- 1 .SLF files to version 2 to by running the SLFCONV1.EXE program.
- The syntax is:
- SLFCONV1 <old SLF> <new SLF>
- or:
- SLFCONV1 ALL
- (this converts all SLF V1 files to V2 in the current directory)
-
- Screen Layout Files (SLF) contain full information about screens
- that you have built, plus other settings, including colors.
-
- The only difference between version 1 and version 2 SLFs is in
- the header record. The differences are shown below.
-
- STRUCTURE OF VERSION 1 SLFs
- ----------------------------
- Each SLF version 1 file has a 222 byte header record, followed by
- a 109 byte record for each field, box or title on all active
- screens. The information about version 1 files is only shown for
- reference. The file looks like this:
-
- byte
- pos'n
- -----
- 1 _______________
- | Header |
- 223 |---------------|
- | Field Info. |
- 332 |---------------|
- | Field Info. |
- 441 |---------------|
- | Field Info. |
- 550 |---------------|
- etc...
- The Header Record will be as follows:
-
- Byte Data
- Pos'n Type Purpose of Data
- ----- ------ -----------------------
- 1 byte Color used for background of data entry screen
- 2 byte Color used for unselected data entry fields
- 3 byte Color used for selected data entry fields
- 4 byte Color used for data entry field headings
- 5 byte Color used for additional titles
- 6 byte Color used for boxes
- 7 byte Color used for selected menu options
- 8 byte Color used for unselected menu options
- 9 char ASCII character used for background
- 10 Boolean Text mode (true=80x25, false=80x50)
- 11 byte Language type (1=Cl5, 2=Cl87, 3=DB3, 4=DB4)
- 12 Boolean Use a space after field headings.
- 13-102 array of 10 strings of length 8 bytes, containing
- .DBF filenames
- 103 Boolean Monochrome colors (true=mono, false=color)
- 104 byte Default frame type (see table)
- 105 byte Number of active data fields on the screen(s)
- 106 byte Number of boxes on the data entry screen(s)
- 107 byte Number of titles on the data entry screen(s)
- 108 byte Maximum number of screens active in this session
- 109 byte Number of menus on the data entry screen(s)
- 110-149 array of bytes (1 to max. menu number) one byte for each
- active menu containing the screen on which it appears.
- 150 byte Display type (1=MDA, 2=CGA, 3=EGA, 4=VGA)
- 151 byte Display rows (25, 43 or 50)
- 152 byte Dos version no.
- 153-168 array of bytes - Each bit of 16 bytes representing a
- screen, if the bit is set it has a standard menu on it.
- 169-208 array of bytes (1 to max menu no.) one byte for each
- active menu containing menu type.
- 209-216 byte reserved
- 217-220 byte Representing ASCII characters giving 'END$'
- 221 byte byte value for SLD file type (4 = 1.04)
- 222 byte reserved
- STRUCTURE OF VERSION 2 SLFs
- ----------------------------
- NOTE: Screen Layout Designer Version 2+ can only save and read
- the SLF file structures shown below:
- Each SLF version 2 file has a 502 byte header record, followed by
- a 109 byte record for each field (the field info. field is the
- same as version 1), box or title on all active screens. The file
- looks like this:
-
- byte
- pos'n
- -----
- 1 _______________
- | Header |
- 503 |---------------|
- | Field Info. |
- 612 |---------------|
- | Field Info. |
- 721 |---------------|
- | Field Info. |
- 830 |---------------|
- etc...
-
- The Header Record will be as follows:
-
- Byte Data
- Pos'n Type Purpose of Data
- ----- ------ -----------------------
- 1-2 byte File identification (version 2 = FFEE hex)
- 3-4 byte SLD version no. (2.01 = 201)
- 5 byte Color used for background of data entry screen
- 6 byte Color used for unselected data entry fields
- 7 byte Color used for selected data entry fields
- 8 byte Color used for data entry field headings
- 9 byte Color used for additional titles
- 10 byte Color used for boxes
- 11 byte Color used for selected menu options
- 12 byte Color used for unselected menu options
- 13 char ASCII character used for background
- 14 Boolean Text mode (true=80x25, false=80x50)
- 15 byte Language type (1=Cl5, 2=Cl87, 3=DB3, 4=DB4)
- 16 Boolean Use a space after field headings.
- 17-196 array of 20 strings of length 8 bytes (+1), containing
- .DBF filenames
- 197 Boolean Monochrome colors (true=mono, false=color)
- 198 byte Default frame type (see table)
- 199-200 byte Number of active data fields on the screen(s)
- 201 byte Number of boxes on the data entry screen(s)
- 202 byte Number of titles on the data entry screen(s)
- 203 byte Maximum number of screens active in this session
- 204 byte Number of menus on the data entry screen(s)205-284 array of bytes (1 to max. menu number) one byte for each
- active menu containing the screen on which it appears.
- 285 byte Display type (1=MDA, 2=CGA, 3=EGA, 4=VGA)
- 286 byte Display rows (25, 43 or 50)
- 287 byte Dos version no.
- 288-303 array of bytes - Each bit of 16 bytes representing a
- screen, if the bit is set it has a standard menu on it.
- 304-383 array of bytes (1 to max menu no.) one byte for each
- active menu containing menu type. (80 bytes)
- 384-433 string Contains the default working directory
- 434-497 byte reserved (64 bytes)
- 498-501 byte Representing ASCII characters giving 'END$'
- 502 byte reserved
-
-
- Version 1 and 2 SLF files both have the same field info.
- structure as shown below:
-
- The frame types are numbered. This number represents frame types
- as follows:
-
- 0 = No Frame
- 1 = Single Frame (ASCII codes 218,192,191,217,196,179)
- 2 = Double Frame (ASCII codes 201,200,187,188,205,186)
- 3 = Single Top Double Sided (ASCII 214,211,183,189,196,186)
- 4 = Double Top Single Sided (ASCII 213,212,184,190,205,179)
-
-
- Following the header, information relating to each active data
- field for the session being recorded is stored in the form of one
- record field, including its heading, as follows:
-
- Byte
- Pos'n
- From Data
- Start Type Purpose of Data
- ----- ------ ---------------------------
- 1 double byte Field reference number
- 3 byte DBF file number (this number corresponds to an
- index in the array of DBF files in the header)
- 4 string[10] Field name in the database file
- 15 string[78] Heading as it appears on screen for this field
- 94 character The data type of this field (C,N,D, or M)
- 95 byte The length of the field
- 96 byte The number of decimal places (numeric fields)
- 97 byte Left column of start of data entry field on
- screen
- 98 byte Top row of start of data entry field
- 99 byte Right column of data entry field
- 100 byte Bottom row of data entry field (same as top)
- 101 byte Left column of start of field heading on screen
- 102 byte Top row of field heading
- 103 byte Right column of field heading
- 104 byte Bottom row of field heading (same as top)105 byte The screen number on which this field appears
- 106 byte (reserved for boxes,titles and menus... see
- below)
- 107 byte Color attribute of unselected data entry fields
- 108 byte Color attribute of field headings
- 109 byte Color attribute of selected data entry fields
-
- Note: the color attributes for individual fields are not
- currently supported.
-
- After the fields have been stored, information on titles and menu
- options will be stored in the same manner, with one record per
- title or per menu option. The record format is identical to that
- used for the data entry fields, however the record fields are
- re-used. The only differences between titles and menu options
- are: (a) the title type is 'T', whereas this will be 'Y' or 'Z'
- for menus, (b) a byte is used to store the menu system number in
- the case of menu options, and this will be 0 for titles. The
- information will be stored as follows:
-
- Data
- Byte Type Purpose of Data
- ---- ------ -----------------------------------
- 1 double byte Reference number
- 3 byte unused
- 4 string[10] unused
- 15 string[78] This contains the text for this title
- 94 character The data type of this field = 'T' for a title,
- but 'Y' or 'Z' for menu options.
- 95 byte unused
- 96 byte unused
- 97 byte Left column of start of title/menu option on
- screen
- 98 byte Row of title
- 99 byte Right column of title/menu option
- 100 byte unused
- 101 byte unused
- 102 byte unused
- 103 byte unused
- 104 byte unused
- 105 byte The screen number on which this title/menu
- option appears.
- 106 byte must always be set to 0 for titles, but in the
- case of menu options this must be the menu
- system number on which this menu option
- appears.
- 107 byte Color attribute for this title or menu option.
- 108 byte unused
- 109 byte unused
-
- Note: the color attributes for individual titles or menu options
- are not currently supported.
- After the title and menu records, information relating to Boxes
- on the screen(s) will be stored in a similarly. The record
- fields are re-used as follows:
-
- Data
- Byte Type Purpose of Data
- ---- ------ -----------------------------------
- 1 double byte Reference number
- 3 byte unused
- 4 string[10] unused
- 15 string[78] unused
- 94 character The data type of this field = 'X' for boxes
- 95 byte unused
- 96 byte unused
- 97 byte Left column of start of box on screen
- 98 byte Top row of box
- 99 byte Right column of box
- 100 byte Bottom row of box
- 101 byte unused
- 102 byte unused
- 103 byte unused
- 104 byte unused
- 105 byte The screen number on which this box appears
- 106 byte The frame type number for this box (see above)
- 107 byte Color attribute for this box
- 108 byte unused
- 109 byte unused
-
- Note: the color attribute for individual boxes is not currently
- supported.
- Appendix B.
- ===========
- NEW FILES FOR OLD.
- ------------------
- Version 2 setup files, with the extension .SET, and version 2
- Screen Layout Files, with the extension .SLF, differ from their
- version 1 counterparts. Version 2 of Screen Layout Designer does
- not directly support the earlier setup and SLF files. However two
- programs are included to convert the old files to the new format,
- SETCONV1.EXE and SLFCONV1.EXE.
-
- How to convert an old setup file to the new format:
-
- SETCONV1 <old filename> <new filename>
-
- eg. SETCONV1 SETUPS.SET NEWONE.SET
-
- or
- --
-
- SETCONV1 ALL
-
- (This converts all setup files in the current directory to the
- new format)
-
-
-
- To convert an old SLF to the new format:
-
- SLFCONV1 <old filename> <new filename>
-
- eg. SLFCONV1 SCREEN.SLF NEWONE.SLF
-
- or
- --
-
- SLFCONV1 ALL
-
-
-
- Notes:
- - For both utilities, if the second (new) filename is
- omitted the first filename is converted to the new format.
- A backup of the old file is made to the same name with a
- .BAK extension.
-
- - If you try to run SLD V2 with an old setup file or read
- an old SLF an error message will appear.
- Appendix C.
- ===========
-
- THE GENERATED SCREEN CODE.
- --------------------------
-
- The Screen Layout Designer is capable of producing dBase generic
- source code directly. The source code representing the screens
- that you have laid out will be stored in a text file which may
- bepasted directly into your dBase generic program source code.
- You can then compile this code, using your dBase generic
- compiler, into an executable ".EXE" file.
-
- The default extension for files containing generated screen code
- is ".PRG".
-
- When you select dBase language generation a "MAIN.PRG" file will
- be generated for you to enable you to test the code in the
- generated .PRG file. This file may form the basis for your
- application, though you should obviously rename it if you make
- changes to it.
-
- FMT FILES
- ---------
- SLD version 2.01 is also capable of producing dBaseIII "FMT"
- files. These FMT files contain only @SAY and @GET statements
- corresponding to data entry fields and headings. Any menus, boxes
- or titles you have laid out on the screen will not be included.
- The default extension for these files is ".FMT".
-
-
- The source code will be generated as follows:
-
- Start and End of a Screen.
- --------------------------
- The contents of each screen will be placed in a procedure,
- beginning with:
-
- PROC SCREEN# ,where # is the screen number, and ending with:
- RETURN
-
-
- Colors for Screens.
- ------------------
- Colors for each screen as a whole, boxes or titles will be set by
- the following command:
-
- SET COLOR TO <expC1>,<expC2>,<expC3>,<expC4>,<expC5>
-
- where expC1 = standard color, expC2 = enhanced color, expC3 =
- border color, expC4 is left blank, expC5 = unselected color.
- For example:
-
- SET COLOR TO "GR+/R,BG+/R,W+/G,,N/W"
-
- In the case of Clipper V5 this will take the form of:
-
- SETCOLOR("GR+/R,BG+/R,W+/G,,N/W")
-
-
- Drawing Boxes.
- ---------------
- Boxes are drawn with the following command syntax for Clipper:
-
- @ <toprow>,<leftcol>,<botrow>,<rightcol> BOX <frame> COLOR
- <color>
-
- For example:
-
- @ 13,32,17,62 BOX "┌─┐│┘─" COLOR "W+/G"
-
-
- In the case of dBaseIII the box drawing is different:
- Firstly the colors are set, then the box may have a double or
- single lined frame:
-
- @ <toprow>,<leftcol> TO <botrow>,<rightcol> [DOUBLE]
-
- Note: "DOUBLE" is omitted in the case of single lined frames.
-
- Example:
-
- SET COLOR TO "W+/G"
- @ 8,36 TO 13,54 DOUBLE
- SET COLOR TO "GR+/RB,N/BG,,,N/W"
-
-
- For dBaseIV the code will be similar to this example:
-
- SET COLOR TO "W+/G"
- @ 8,36 TO 13,55 "┌─┐│┘─└│"
- SET COLOR TO "GR+/RB,N/BG,,,N/W"
-
- Titles.
- -------
- The command syntax for titles will be a simple @SAY statement,
- preceded by coloring information:
-
- @ <row>,<col> SAY "<text>"
-
- For example:
-
- @ 1,12 SAY " Sales Database "
-
-
-
- Data Entry Fields.
- ------------------
- The colors for unselected and selected data entry fields will be
- taken from the SET COLOR command immediately preceding the @GET
- commands. The data entry field code will be as follows:
-
- @ <row>,<col> GET <field_name>
-
- For example:
-
- @ 3,17 GET company
-
-
- Data Field Headings.
- --------------------
- The headings corresponding to data entry fields will be generated
- using @SAY statements as follows:
-
- @ <row>,<col> SAY <heading>
-
- For example:
-
- @ 3,5 SAY "Company Name"
-
-
- Reading Data Fields.
- --------------------
- The @GET statements in a procedure are terminated with a
- READ command.
-
-
-
- Menu Systems
- ------------
- The way in which menus are implemented in Clipper differs from
- dBase. In Clipper @PROMPT commands are used to build the menu and
- the selected menu option stored using a MENU TO MKey command. In
- the case of dBase menus the process of menu building is more
- complicated, and an example is more suitable to illustrate this.
- Each menu system is formed by a separate procedure in which the
- menu is defined and laid out on the screen. This procedure is
- called:
- PROCEDURE MENU# ,where # is the menu number.
- Another procedure contains CASE statements where appropriate
- action is taken in accordance with the selected menu option.
- This is called:
- PROCEDURE MENUCASE# ,where # is the menu number.
-
- Clipper menu syntax:
- -------------------
- The menu is defined within the MENU# procedure:
-
- To define a menu option:
-
- @ <row>,<col> PROMPT <heading> MESSAGE <message>
-
- Foe example:
-
- @ 14,20 PROMPT "QUIT" MESSAGE " "
-
- Note that the message is blank, but you may add your own help
- text.
-
- Storing the menu to a variable:
-
- MENU TO <key>
-
- For example:
-
- MENU TO MKey
-
- dBaseIII/IV Menus
- -----------------
- This is rather more complicated. Please study the sample program
- DBASE3.PRG.
-
- The last statement before RETURN in the MENU# procedure should
- be a call to the procedure containing CASE statements:
- DO MENUCASE#
- Clipper example:
-
- PROCEDURE MENU1
- LOCAL MKey
- @ 1,1 PROMPT "SAVE" MESSAGE " "
- @ 3,1 PROMPT "QUIT" MESSAGE " "
- MENU TO MKey
- DO MENUCASE1 WITH MKey
- RETURN
-
-
- To Define the Menu Case Statements:
- ----------------------------------
- As mentioned previously the final stage of the menu process is a
- separate procedure in which CASE statements perform appropriate
- action according to the selected key from the menu. The syntax
- for this procedure is as follows:
-
- PROCEDURE MENUCASE#
- PARAMETER <key>
- DO CASE
- CASE <key> = 1
- DO <procedure>
- CASE <key> = 2
- DO <procedure>
- ....
- ....
- ENDCASE
- RETURN
-
-
- For example:
-
- PROCEDURE MENUCASE1
- PARAMETER MKey
- DO CASE
- CASE MKey = 1
- DO SaveIt
- CASE MKey = 2
- RETURN
- ENDCASE
- RETURN
-
-
- Note: SLD directs the case statements to a dummy procedure with
- DO DUMMY. You should enter your own user defined procedure
- in each case statement. The DUMMY procedure is defined as:
- PROCEDURE DUMMY
- RETURN
-
- Selecting Menu Options at Runtime.
- ---------------------------------
- When you have generated the code for your menus you may, in
- addition to first letter selection, select menu options when you
- run the program as follows:
-
- dBaseIII/IV: using the tab key, or the up or down arrow
- keys.
- Clipper: using the cursor keys (arrow keys).
-
-
-
- How the Generated Source Code is Constructed.
- --------------------------------------------
- The source code is formed of several modules. Each screen has its
- own associated set of procedures, which are as follows:
-
- Procedure 1: Displays titles and framed boxes, @SAY and @GETs for
- the data field memory variables.
- Procedure 2: Declares data field memory variables corresponding
- to the open database fields. They are declared as
- PUBLIC.
- Procedure 3: Initialises the memory variables so that they do
- not contain garbage.
- Procedure 4: sets the memory variables to the contents of the
- database fields, so that editing procedures can make
- use of this.
- Procedure 5: replaces the database field values with the values
- of the corresponding memory variables.
- Procedure 6: this is a dummy procedure used by case statements
- in menus for testing purposes only.
- Procedure 7: this defines menus and the menu options, and passes
- a menu selection to the next procedure.
- Procedure 8: this is a series of case statements which act on the
- appropriate menu selection in procedure 7. The case
- statements call the dummy procedure at the moment
- -you should replace this with your own procedures.
-
-
- An Example of Generated Screen Source Code.
- --------------------------------------------
- There are sample programs supplied with .PRG file extensions.
- These will undoubtedly give you more insight into how SLD
- generates its screen code. Howeever here is a simple single
- screen example of the typical output of the Screen Layout
- Designer. It includes, boxes, a title, and data fields, with
- appropriate headings:
- PROCEDURE SCREEN1
-
- LOCAL WinStr,iRow
-
- SETMODE(25,80)
-
- WinStr=""
- SETCOLOR("B+/B")
- FOR iRow = 0 TO 25
- @ iRow,0 SAY PADC(WinStr,80,"░")
- NEXT
-
- SETCOLOR("W+/BG")
- @ 0,0,24,79 BOX "┌─┐│┘─└│"
-
- SETCOLOR("GR+/R,W/R,,,N/W")
- @ 2,25 SAY " ACME Sales Database "
-
- SETCOLOR("GR+/RB,N/BG,,,N/W")
-
- @ 4,8 SAY "Short Name "
- @ 6,11 SAY "Company "
- @ 8,11 SAY "Address "
- @ 9,20 SAY aADDRESS2 PICTURE "XXXXXXXXXX"
- @ 10,20 SAY aADDRESS3 PICTURE "XXXXXXXXXX"
- @ 11,14 SAY "City "
- @ 13,5 SAY "Zip/Post Code "
- @ 15,15 SAY "Tel "
- @ 16,15 SAY "Fax "
- @ 18,9 SAY "Sales Area "
- @ 20,9 SAY "Sales Rep. "
- @ 18,44 SAY "Credit Limit "
- @ 14,43 SAY "Business Type "
- @ 4,39 SAY "Account No. "
- @ 16,48 SAY "Turnover "
- @ 20,46 SAY "Last Order "
- DO GETSCR1
- DO MENU2
-
- RETURN
-
- PROCEDURE SCREEN2
-
- LOCAL WinStr,iRow
-
- SETMODE(25,80)
-
- WinStr=""
- SETCOLOR("B+/B")
- FOR iRow = 0 TO 25
- @ iRow,0 SAY PADC(WinStr,80,"░")
- NEXT
-
- SETCOLOR("W+/BG")
- @ 0,0,24,79 BOX "┌─┐│┘─└│"
-
- SETCOLOR("GR+/R,W/R,,,N/W")
- @ 2,25 SAY " Customer Contacts "
- @ 16,8 SAY "Received: "
-
- SETCOLOR("GR+/RB,N/BG,,,N/W")
- @ 9,49 SAY "Importance "
- @ 5,15 SAY "Short ID "
- @ 7,14 SAY "Firstname "
- @ 8,16 SAY "Surname "
- @ 10,18 SAY "Title "
- @ 12,14 SAY "Call Rate "
- @ 14,14 SAY "Interests "
- @ 16,21 SAY "Xmas Card? "
- @ 16,37 SAY "XMas Gift? "
- @ 16,53 SAY "Golf Day Invite? "
- @ 19,12 SAY "Note: "
- DO GETSCR2
- DO MENU2
-
- RETURN
-
- PROCEDURE GETSCR1
-
- @ 4,20 GET aSHORTNAM PICTURE "XXXXXXXXXX"
- @ 6,20 GET aCOMPANY PICTURE "XXXXXXXXXX"
- @ 8,20 GET aADDRESS1 PICTURE "XXXXXXXXXX"
- @ 9,20 GET aADDRESS2 PICTURE "XXXXXXXXXX"
- @ 10,20 GET aADDRESS3 PICTURE "XXXXXXXXXX"
- @ 11,20 GET aADDRESS4 PICTURE "XXXXXXXXXX"
- @ 13,20 GET aPOSTCODE PICTURE "XXXXXXXXXX"
- @ 15,20 GET aTELNO PICTURE "XXXXXXXXXX"
- @ 16,20 GET aFAXNO PICTURE "XXXXXXXXXX"
- @ 18,21 GET aSALEAREA PICTURE "XXXXXXXXXX"
- @ 20,21 GET aSALESREP PICTURE "XXXXXXXXXX"
- @ 18,58 GET aCREDIT PICTURE "XXXXXXXXXX"
- @ 14,58 GET aBUSTYPE PICTURE "XXXXXXXXXX"
- @ 4,52 GET aACCNO PICTURE "XXXXXXXXXX"
- @ 16,58 GET aTURNTARG PICTURE "XXXXXXXXXX"
- @ 20,58 GET aLASTORD PICTURE "@D"
-
- RETURN
-
- PROCEDURE GETSCR2
-
- @ 9,61 GET aIMPORT PICTURE "XXXXXXXXXX"
- @ 5,25 GET bSHORTID PICTURE "XXXXXXXXXX"
- @ 7,25 GET bFIRSTNAM PICTURE "XXXXXXXXXX"
- @ 8,25 GET bSURNAME PICTURE "XXXXXXXXXX"
- @ 10,25 GET bTITLE PICTURE "XXXXXXXXXX"
- @ 12,25 GET bCALLRATE PICTURE "XXXXXXXXXX"
- @ 14,25 GET bINTEREST PICTURE "XXXXXXXXXX"
- @ 16,33 GET bXMASCARD PICTURE "XXXXXXXXXX"
- @ 16,49 GET bXMASGIFT PICTURE "XXXXXXXXXX"
- @ 16,71 GET bGOLFDAY PICTURE "XXXXXXXXXX"
- @ 19,20 GET bNOTE PICTURE "XXXXXXXXXX"
-
- RETURN
- PROCEDURE DECVARS1
- PUBLIC aSHORTNAM
- PUBLIC aCOMPANY
- PUBLIC aADDRESS1
- PUBLIC aADDRESS2
- PUBLIC aADDRESS3
- PUBLIC aADDRESS4
- PUBLIC aPOSTCODE
- PUBLIC aTELNO
- PUBLIC aFAXNO
- PUBLIC aSALEAREA
- PUBLIC aSALESREP
- PUBLIC aCREDIT
- PUBLIC aBUSTYPE
- PUBLIC aACCNO
- PUBLIC aTURNTARG
- PUBLIC aLASTORD
- RETURN
-
-
- PROCEDURE DECVARS2
- PUBLIC aIMPORT
- PUBLIC bSHORTID
- PUBLIC bFIRSTNAM
- PUBLIC bSURNAME
- PUBLIC bTITLE
- PUBLIC bCALLRATE
- PUBLIC bINTEREST
- PUBLIC bXMASCARD
- PUBLIC bXMASGIFT
- PUBLIC bGOLFDAY
- PUBLIC bNOTE
- RETURN
-
-
- PROCEDURE INITVARS1
- aSHORTNAM = SPACE(10)
- aCOMPANY = SPACE(30)
- aADDRESS1 = SPACE(30)
- aADDRESS2 = SPACE(30)
- aADDRESS3 = SPACE(30)
- aADDRESS4 = SPACE(30)
- aPOSTCODE = SPACE(15)
- aTELNO = SPACE(15)
- aFAXNO = SPACE(15)
- aSALEAREA = SPACE(1)
- aSALESREP = SPACE(20)
- aCREDIT = SPACE(9)
- aBUSTYPE = SPACE(12)
- aACCNO = SPACE(20)
- aTURNTARG = SPACE(11)
- aLASTORD = DATE()
- RETURN
- PROCEDURE INITVARS2
- aIMPORT = SPACE(1)
- bSHORTID = SPACE(10)
- bFIRSTNAM = SPACE(20)
- bSURNAME = SPACE(20)
- bTITLE = SPACE(20)
- bCALLRATE = SPACE(10)
- bINTEREST = SPACE(40)
- bXMASCARD = SPACE(1)
- bXMASGIFT = SPACE(1)
- bGOLFDAY = SPACE(1)
- bNOTE = SPACE(50)
- RETURN
-
-
- PROCEDURE SETVARS1
- aSHORTNAM = a->SHORTNAM
- aCOMPANY = a->COMPANY
- aADDRESS1 = a->ADDRESS1
- aADDRESS2 = a->ADDRESS2
- aADDRESS3 = a->ADDRESS3
- aADDRESS4 = a->ADDRESS4
- aPOSTCODE = a->POSTCODE
- aTELNO = a->TELNO
- aFAXNO = a->FAXNO
- aSALEAREA = a->SALEAREA
- aSALESREP = a->SALESREP
- aCREDIT = a->CREDIT
- aBUSTYPE = a->BUSTYPE
- aACCNO = a->ACCNO
- aTURNTARG = a->TURNTARG
- aLASTORD = a->LASTORD
- RETURN
-
-
- PROCEDURE SETVARS2
- aIMPORT = a->IMPORT
- bSHORTID = b->SHORTID
- bFIRSTNAM = b->FIRSTNAM
- bSURNAME = b->SURNAME
- bTITLE = b->TITLE
- bCALLRATE = b->CALLRATE
- bINTEREST = b->INTEREST
- bXMASCARD = b->XMASCARD
- bXMASGIFT = b->XMASGIFT
- bGOLFDAY = b->GOLFDAY
- bNOTE = b->NOTE
- RETURN
-
- PROCEDURE REPLVARS1
- REPLACE a->SHORTNAM WITH aSHORTNAM
- REPLACE a->COMPANY WITH aCOMPANY
- REPLACE a->ADDRESS1 WITH aADDRESS1
- REPLACE a->ADDRESS2 WITH aADDRESS2
- REPLACE a->ADDRESS3 WITH aADDRESS3
- REPLACE a->ADDRESS4 WITH aADDRESS4
- REPLACE a->POSTCODE WITH aPOSTCODE
- REPLACE a->TELNO WITH aTELNO
- REPLACE a->FAXNO WITH aFAXNO
- REPLACE a->SALEAREA WITH aSALEAREA
- REPLACE a->SALESREP WITH aSALESREP
- REPLACE a->CREDIT WITH aCREDIT
- REPLACE a->BUSTYPE WITH aBUSTYPE
- REPLACE a->ACCNO WITH aACCNO
- REPLACE a->TURNTARG WITH aTURNTARG
- REPLACE a->LASTORD WITH aLASTORD
- RETURN
-
-
- PROCEDURE REPLVARS2
- REPLACE a->IMPORT WITH aIMPORT
- REPLACE b->SHORTID WITH bSHORTID
- REPLACE b->FIRSTNAM WITH bFIRSTNAM
- REPLACE b->SURNAME WITH bSURNAME
- REPLACE b->TITLE WITH bTITLE
- REPLACE b->CALLRATE WITH bCALLRATE
- REPLACE b->INTEREST WITH bINTEREST
- REPLACE b->XMASCARD WITH bXMASCARD
- REPLACE b->XMASGIFT WITH bXMASGIFT
- REPLACE b->GOLFDAY WITH bGOLFDAY
- REPLACE b->NOTE WITH bNOTE
- RETURN
-
-
- PROCEDURE RELVARS1
- RELEASE aSHORTNAM
- RELEASE aCOMPANY
- RELEASE aADDRESS1
- RELEASE aADDRESS2
- RELEASE aADDRESS3
- RELEASE aADDRESS4
- RELEASE aPOSTCODE
- RELEASE aTELNO
- RELEASE aFAXNO
- RELEASE aSALEAREA
- RELEASE aSALESREP
- RELEASE aCREDIT
- RELEASE aBUSTYPE
- RELEASE aACCNO
- RELEASE aTURNTARG
- RELEASE aLASTORD
- RETURN
- PROCEDURE RELVARS2
- RELEASE aIMPORT
- RELEASE bSHORTID
- RELEASE bFIRSTNAM
- RELEASE bSURNAME
- RELEASE bTITLE
- RELEASE bCALLRATE
- RELEASE bINTEREST
- RELEASE bXMASCARD
- RELEASE bXMASGIFT
- RELEASE bGOLFDAY
- RELEASE bNOTE
- RETURN
-
-
- PROCEDURE DUMMY
- RETURN
-
-
- PROCEDURE MENU1
- LOCAL MKey
-
- SET ESCAPE OFF
- SETCOLOR("R/W,W/R,,,N/W")
-
- @ 22,5 PROMPT " ADD " MESSAGE " "
- @ 22,14 PROMPT " EDIT " MESSAGE " "
- @ 22,23 PROMPT "DELETE" MESSAGE " "
- @ 22,32 PROMPT " NEXT " MESSAGE " "
- @ 22,41 PROMPT " PREV " MESSAGE " "
- @ 22,50 PROMPT " FIND " MESSAGE " "
- @ 22,69 PROMPT " QUIT " MESSAGE " "
- @ 22,59 PROMPT "CONTACT" MESSAGE " "
-
- MENU TO MKey
- DO MENUCASE1 WITH MKey
- RETURN
-
- PROCEDURE MENU2
- LOCAL MKey
-
- SET ESCAPE OFF
-
- SETCOLOR("R/W,W/R,,,N/W")
- @ 22,9 PROMPT " ADD " MESSAGE " "
- @ 22,18 PROMPT " EDIT " MESSAGE " "
- @ 22,27 PROMPT "DELETE" MESSAGE " "
- @ 22,36 PROMPT " NEXT " MESSAGE " "
- @ 22,45 PROMPT " PREV " MESSAGE " "
- @ 22,54 PROMPT " FIND " MESSAGE " "
- @ 22,63 PROMPT "RETURN" MESSAGE " "
- MENU TO MKey
- DO MENUCASE2 WITH MKey
- RETURN
-
-
- PROCEDURE MENUCASE1
- PARAMETER MKey
- DO CASE
-
- CASE MKey = 1
- DO Dummy
- CASE MKey = 2
- DO Dummy
- CASE MKey = 3
- DO Dummy
- CASE MKey = 4
- DO Dummy
- CASE MKey = 5
- DO Dummy
- CASE MKey = 6
- DO Dummy
- CASE MKey = 7
- DO Dummy
- CASE MKey = 8
- DO Dummy
-
- ENDCASE
- RETURN
- PROCEDURE MENUCASE2
- PARAMETER MKey
- DO CASE
-
- CASE MKey = 1
- DO Dummy
- CASE MKey = 2
- DO Dummy
- CASE MKey = 3
- DO Dummy
- CASE MKey = 4
- DO Dummy
- CASE MKey = 5
- DO Dummy
- CASE MKey = 6
- DO Dummy
- CASE MKey = 7
- DO Dummy
-
- ENDCASE
- RETURN
-
-
- Note: you may use this program by adding a few lines of code to
- it. If you place "DO SCREEN1" before the declaration of
- procedure SCREEN1 and you add "USE COMPANY" and "USE
- CONTACT" after the local variable declarations, then
- compile the program, you will be able to see the data entry
- screen as it would appear in a Clipper program. You will of
- course need to add SET RELATION or similar commands to
- relate the fields in the two database files, and if you
- intend to use the program on a network you will need to
- open your files accordingly. You will need to add the code
- to add, edit and delete records. SLD should greatly reduce
- the time taken to produce screens and menus. Our further
- planned releases will do even more for you.
-
- Test programs are also generated at the same time as you generate
- the main code .PRG. These test programs can be used to test the
- operation of the main code:
-
- For Clipper: CLIPTEST.PRG for Clipper code. Compile and link
- the generated code with the CLIPMAKE.BAT batch
- file (also generated at the SAME TIME).
-
- For dBase: DBTEST.PRG for dBase code. Run this program
- from the applications generator.
-
- How To Complete Your Application.
- ---------------------------------
- Whilst Screen Layout Designer takes care of the bulk of the task
- of generating source code you will need to open your data files,
- take care of database file relations, record locking and general
- record operations. SLD was designed to take the hit and miss
- frustration out of data entry screen layout and menu design, but
- not to replace the programmer. (Please note: future versions SLD
- will be able to open data files, take care of relational code and
- record locking, and more).
-
-
- Appendix D.
- ===========
-
- Two Tutorials.
- --------------------
- Here are two examples of how to read input from two previously
- created input files. The first example demonstrates how to get
- SLD to read directly from a database file, COMPANY.DBF, and the
- second example demonstrates how to read fields from a previously
- created Screen Layout File, SCREEN.SLF or TUTOR1.SLF. You will
- be shown how to generate the code in the form of a .PRG file and
- view it with an editor.
-
- Tutorial One: Direct from a .DBF
- ------------------------------
- Action 1: Start SLD.
- Action 2: select Setup from the Main Menu bar, followed by
- InputType.
- Action 3: select Direct (the system is set to read directly from
- a .DBF)
- Action 4: press Esc until you return to the Main Menu bar.
- Action 5: select File, followed by Input.
- Action 6: select DBase.
- Action 7: enter "COMPANY" in the box next to the DB File 1
- prompt and ensure that all other boxes are empty.
- Action 8: press Ctrl and Enter.
- Action 9: select Text.
- Action 10: enter the name of the intermediate text file, eg.
- TUTOR1.TXT
- Action 11: press Esc until you return to the Main Menu bar.
- Action 12: select SHOW (if the file TUTOR1.TXT exists you will
- be prompted to overwrite it, so enter "Y" in this
- case)
- Action 13: you will now be in the Screen Edit Menu. Select
- ScreenEdit, or alternatively press the Esc key.
- Action 14: you will now be in Screen Edit Mode, so, either use
- a mouse or the arrow keys to move the cursor onto a
- data field displayed on the screen.
- Action 15: with the cursor on a data field, or its heading, click
- with the left mouse button or press the Enter key.
- Action 16: you may now move the field around the screen.
- Action 17: when you are satisfied with the position of the field
- on the screen click with the left mouse button or
- press Enter.
- Action 18: to see information about the contents of the field,
- ensure that the cursor is over the field or its
- heading and double the left mouse button quickly or
- press F2.
- Action 19: you may edit the heading text or change the screen on
- which it will be displayed. For the moment move down
- to the Field Description prompt and change the text.
- Action 20: Press Ctrl and Enter to save the text. The field
- heading will change accordingly.Adding a box:
-
- Action 21: Press Esc to return to the Screen Edit Menu bar.
- Action 22: select Box.
- Action 23: select New. You will enter Box Edit Mode.
- Action 24: move the cursor around the screen to the position
- where you want the box to start.
- Action 25: click with the left mouse button or press enter.
- Action 26: when you move the cursor with the mouse or arrow keys
- the box will expand or contract from its origin.
- Action 27: Press F3. Now when you move the cursor the box will
- remain the same size, but will move around the
- screen.
- Action 28: press F3 again. The box will expand or contract when
- you move the cursor again.
- Action 29: When you are happy with the size and position of the
- box press the Enter key or click the left mouse
- button. You have succeeded in drawing a box!
-
- Adding a Title:
-
- Action 30: Press Esc to return to the Screen Edit Menu bar.
- Action 31: Select Title.
- Action 32: select New.
- Action 33: you will be prompted to enter some text for your
- title. Do so and press Enter. You will enter Title
- Edit Mode.
- Action 34: Move the cursor to where you want the title to begin,
- then click with the left mouse button or press Enter.
- Action 35: when you move the cursor the title will expand or
- contract.
- Action 36: press F3. Now when you move the cursor the title will
- move.
- Action 37: press F3 again. You will be able to expand/ contract
- and move the title.
- Action 38: when you are satisfied with the position and size of
- your title press Enter, or click the left mouse
- button. You have drawn a title.
-
- Adding a User defined Menu:
- Action 39: Press Esc to return to the Screen Edit Menu bar.
- Action 40: Select Menu.
- Action 41: select Add. You have now added a new menu system to
- the screen on view.
- Action 42: select New. This will add a new menu option to the new
- menu.
- Action 43: you will be prompted to enter a heading text for your
- menu option (eg. "EDIT"). Do so and press Enter. You
- will enter Menu Edit Mode.
- Action 44: Move the cursor to where you want the menu option to
- begin, then click with the left mouse button or press
- Enter.Action 45: when you move the cursor the menu option will expand
- or contract.
- Action 46: press F3. Now when you move the cursor the menu option
- will move.
- Action 47: press F3 again. You will be able to expand/ contract
- and move the menu option.
- Action 48: when you are satisfied with the position and size of
- your menu option press Enter, or click the left mouse
- button.
-
- You have drawn the first option on your new menu.(You may repeat
- steps 42 to 48 if you want to continue adding options to your new
- menu, or continue to 48).
-
-
- Generating the Code:
-
- Action 49: Press Esc to return to the Screen Edit Menu bar.
- Action 50: Select Quit. You will be returned to the Main Menu.
- Action 51: from the Main Menu select File, followed by Output,
- then Code.
- Action 52: enter the name of the source code output file, eg.
- TUTOR1.PRG
- Action 53: press Esc until you return to the top level of the
- Main Menu.
- Action 54: select Generate, followed by Code.
- Action 55: if the TUTOR1.PRG or other file exists you will be
- warned. In this case enter "Y" to overwrite it. The
- screen code will be generated.
-
- Viewing the generated Code:
-
- Action 56: select Edit, followed by Output from the Main Menu
- bar.
- Action 57: enter the name of your output code file, eg.
- TUTOR1.PRG (or press Enter if it is shown). Your
- output source code wil be displayed.
- Action 58: To exit the editor, press F4.
-
- Saving Your Work:
-
- Action 59: pres Esc to return to the top level of the Main Menu
- bar.
- Action 60: select File, followed by Output, then SLF.
- Action 61: enter the name of a Screen Layout File, eg. TUTOR1.SLF
- Action 62: Esc to the Main Menu bar.
- Action 63: select Generate, followed by SLF.
- Action 64: if the file TUTOR1.SLF, etc. exists then enter "Y" to
- the prompt to overwrite it.
-
- To exit SLD:
-
- Action 65: Select Exit (or just press Esc) from the Main Menu
- bar. You will be prompted to confirm whether you wish
- to exit, and whether to save setup and screen
- information. For the moment respond "Y" to confirm
- that you want to exit and "N" to save setup/screen
- information.
-
- Well done, you have generated your first application!
-
- Tutorial Two: Reading from an SLF:
- ----------------------------------
- Action 1: Start SLD.
- Action 2: select Setup from the Main Menu, then InputType from
- the Setup Menu.
- Action 3: select SLF (the system is set to read from a
- previously generated Screen Layout File).
- Action 4: press Esc until you return to the Main Menu bar.
- Action 5: select File, followed by Input.
- Action 6: select SLF.
- Action 7: enter the name of a previously generated SL File in
- the box, eg. TUTOR1.SLF that you generated in
- Tutorial One.
- Action 8: press Enter.
- Action 9: press Esc until you return to the Main menu bar.
- Action 10: select SHOW.
- Action 11: you will now be in the Screen Edit Menu. Select
- ScreenEdit, or alternatively press the Esc key.
- Action 12: the data fields from the SLF will be displayed and
- your screen and you will enter Screen Edit Mode.
-
- You may now proceed according to the Actions from 14 onwards in
- Tutorial 1.
- Appendix E.
- ===========
-
- FUTURE ENHANCEMENTS OF THE SCREEN LAYOUT DESIGNER.
- --------------------------------------------------
-
- Development is continuing on this software and related products
- too. Of course we would appreciate your interest and feedback.
- By listening to users of this software we can provide you with
- what you want. In addition to planned enhancements to this
- program we are developing one related program in particular:
-
- A separate program, as part of a suite of software, for creating
- .DBF files and for defining relational links between files,
- including definition of primary and foreign keys, which will be
- used by SLD to generate complete relational database
- applications, including network record and file locking for
- multi-user environments. This will reduce greatly the programming
- work required by the developer. Work on this is in progress at
- present. This will complement SLD and registered users of SLD
- will geat a generous discount on this software when available.
-
- We also intend to produce further modules for SLD so that it can
- generate screen source code in other languages.
-
- We are investigating the feasibility of a separate program
- allowing users not developing in dBase generic code to use SLD to
- generate data entry screen source code in other languages. This
- would allow users to define their own procedures or functions for
- generating an object on the screen. SLD would use the defined
- functions/procedures to generate screen source code. Appendix F.
- ===========
- TECHNICAL SUPPORT
- =================
- If you have any technical problems with Screen Layout Designer,
- or you wish to enquire about other software we are developing,
- then you should contact us at the address below, or you may
- telephone 0703-701936 in the UK or 44 703 701936 outside the UK
- (The best time is after 18:00 hrs UK time). Another number you
- may call at weekends if you are unable to contact us is 0329
- 833488 in the UK, or 44 329 833488 outside the UK.
-
- Almost certainly the best method of contacting us is via Email,
- where you can send us full information on your problem or
- enquiry, this may be via Compuserve or BBS.
-
- Our Compuserve id. is 100116,370. This is probably your most
- efficient means of contacting us.
-
- You may send mail via the "Cardboard Box" BBS in the UK on
- 0962 880278 (44 962 880278 outside UK). Modem settings: 1200 to
- 9600 baud, 8, 1, no parity. This BBS can also be contacted via
- Fidonet (the Fidonet address is 2:252/201), or via Chatnet (the
- Chatnet address is 44:1000/16). Mail should be addressed to "Nev
- Palmer".
-
- Address:
-
- Neville T. Palmer
- PDM Associates
- 17 Heathlands
- Shedfield
- Southampton
- Hants SO3 2JD
- England
-
- When you have a technical question please let us know the
- following information:
-
- 1) your name
- 2) your company (if any)
- 3) your Compuserve id. and/or telephone number
- 4) your fax number (if available)
- 5) your country and city
- 6) your model of PC
- 7) operating system version
- 8) display type (if relevant)
- 9) full details of the problem
- 10) relevant SLD system settings
- 11) any other relevant information (eg. free memory) REGISTRATION.
- =============
- If you register your copy of Screen Layout Designer we will send
- you the latest version of the software, which will include any
- enhancements. The cost of registration is US $40 or £25 Sterling.
- To register, please print and fill in the form below,
- then send it, together with the appropriate payment, made out to
- Neville T. Palmer, to this address:
-
- Neville T. Palmer
- PDM Associates
- 17 Heathlands
- Shedfield
- Southampton
- Hants SO3 2JD
- England
-
- Registration Form - Screen Layout Designer V2 Plus
- -----------------------------------------------------
-
- Name: ____________________________________
-
- Company: ____________________________________
-
- Address: ____________________________________
-
- ____________________________________
-
- City: _____________________
-
- State/County: _______________
-
- Zip/Post Code: _______________
-
- Country: _______________
-
- Telephone: __________________ Fax:__________________
-
- Compuserve: _________________
-
- IMPORTANT!! Please enter the Name that you wish to appear
- on your registration screen when running the program (14 to
- 40 alphanumeric characters; see next page for full info):
- Registered Name:
-
- ______________________________________________________
-
- Disk Size for Update(s): 5.25" [ ] 3.25" [ ]
-
- If you have a copy of SLD, version number: ___________
-
- Please enclose $40 US or £25 Sterling (or equivalent)
- HOW TO COMPLETE PROGRAM REGISTRATION:
- ------------------------------------
-
- To register you should send us the appropriate fee along with the
- name that you will register this software under. This name must
- consist of at least 14 alphamumeric characters. Valid characters
- are capital 'A' to 'Z', lower case 'a' to 'z', number '0' to '9'
- and figures &',/()- (ampersand, apostrophe, comma, forward
- slash, left bracket, right bracket and hyphen). Spaces are of
- course permitted between words, but note that there must be at
- least 11 non-space characters in the name. No other characters
- are valid. Case sensitivity is not important. When we receive the
- registration fee and name we will generate a registration number
- encoded from the name, so it is important that you send us the
- exact name you will use for registration. We will send you the
- latest version of this software. You will also be entitled to
- full support and discounts on our other programs. We will send
- you the registration number and confirmation of the name. You
- should then run SLD and go into the Setup Menu from the main
- menu, then select "OTHER", followed by "REGISTER" from this menu.
- From here enter the name and registration number. When you have
- entered them satisfactorily. Press the F2 function key to to
- complete registration. You will see a message telling you that
- registration has been successful. If you see an error message
- "invalid registration number" then check that you have entered
- the name and number correctly.
-
- The registration number and name are stored in a text file called
- 'REGISTER.SLD'. This file must be present in the directory from
- which you run SLD otherwise the registration information will not
- be picked up by the program. You can generate this file in more
- than one directory. Keep your registration number and name safe
- so that if you accidentally delete this file you can re-generate
- it.
-
- When you complete registration the delay on the message at the
- start and end of the program will be removed. You will only see
- the opening screen with your rgistered name on it and you may
- press any key or click a mouse button to continue immediately.
-
-
- RESTRICTIONS
- ------------
- Your registration entitles you to use this software on a single
- computer and make a copy for backup purposes. If you intend to
- use this software on more than one computer then you should
- register each copy.
-
- If you are reading this text at registration time then thankyou
- for your support.
- METHODS OF PAYMENT
- ------------------
- If you are a Compuserve member you may pay via the Compuserve
- shareware registration service, where the registration
- identification number of SLD is 795.
- To use this service enter GO SWREG. When you register via
- Compuserve the fee will be deducted from your account and we will
- be notified of the registration. We will despatch an update disk
- via airmail as soon as we receive notification from Compuserve.
-
- You may also send the payment direct. Suggested methods of
- payment for registrants outside the United Kingdom are as
- follows:
- 1) An International Money Transfer
- 2) An International Money Order.
-
- It is best if the amount is made out in Pounds Sterling. The
- amount should be 25 Pounds Sterling or $40 U.S., or the
- equivalent, converted to Sterling at the exchange rate in force
- at the time of registration, whichever favours you.
-
- Registrants in the United Kingdom are advised to pay by cheque or
- postal order.
-
- If you follow the above advice you will avoid delays in
- processing your registration. However other methods of payment
- acceptable to United Kingdom banks will be accepted. Payment in
- U.S. Dollars is fine, though the payment may be in any currency
- acceptable to U.K. banks as the equivalent of $40 U.S. or £25
- Sterling.
-
- Your registration includes handling fees, but we reserve the
- right to refuse registration if your method of payment is not
- acceptable to U.K. banks, or it incurs unacceptably high bank
- charges.
-
- You are advised not to send cash.
-
- WHERE YOUR MONEY GOES
- ---------------------
- This product is currently shareware. Your registration fee pays
- for postage of the update disk to you, support of the program via
- Compuserve, telephone, fax and surface mail. Your registration
- fee also enables us to pay for new hardware and software
- development tools, development of this and other programs,
- uploads of updates onto Compuserve, postage of updates to
- shareware libraries, administration, etc. etc. Your registration
- will enable us to continue providing you with useful tools.
- Please support shareware.
-
-
- SOFTWARE FOR YOU!
- =================
-
- This software has been aimed at professional and amateur software
- developers and dealers with experience ranging from novice to
- advanced. We always welcome any comments regarding our software
- so that we can write software that people want. The whole purpose
- of this software is to make life easier for you!
-
- Additionally we may be able to customise this product for your
- individual requirements. Contact us today.
-
- We are also working on other developement/database projects.
- Details upon request!
-