home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TIPS AND SUGGESTIONS
-
- NOTE: Argument designations are those used in the
- documentation - WIND_REZ.DOC.
-
-
- 1. Pulldown and scroll windows require a dummy array to hold
- the info-line data when the info-line is not used. All
- modules and calls to SCRLWIND and PULLDOWN may use the
- same dummy array.
-
- Place this in the main module:
-
- COMMON SHARED /DUMMYDATA/ DUMMY$()
- DIM DUMMY$(0)
-
- Place this in any other module using routines PULLDOWN or
- SCRLWIND not using the info-line.
-
- COMMON SHARED /DUMMYDATA/ DUMMY$()
-
- Use DUMMY$() to represent the info-line ( when it is not
- used ) in calls to SCRLWIND and PULLDOWN.
-
-
- 2. QuickBASIC 4.5 can be very unpredictable when using ON
- ERROR GO TO .. in a sub program or function unless the
- sub program or routine is STATIC.
-
- The following is OK.
-
- SUB TEST ( A%, B% ) STATIC
-
- ON ERROR GOTO LABEL ' LABEL MUST BE AT MODULE LEVEL
-
- END SUB
-
- The following can cause a STRING SPACE CORRUPT error, a
- crash, or the program may bind. It may work fine in the
- QB environment, but may cause problems in the executable
- program.
-
- SUB TEST ( A%, B% ) ' No STATIC
-
- ON ERROR GOTO LABEL ' LABEL MUST BE AT MODULE LEVEL
-
- END SUB
-
- If the ON ERROR and LABEL are both in the main module the
- problem does not occur.
-
-
- 3. It is important to know if an active PULLDOWN or INPUT
- window exits. If either unknowingly exists the following
- will occur on entry to the routines.
-
- - Routine INPTWIND will place a field without a window in
- the location it would occupy based on the coordinates of
- the active input window. The coordinates in the call to
- INPTWIND are ignored.
-
- - Routine PULLDOWN is re-entered in the active pulldown
- window at same location it was at when it was exited. If
- the active input window is not intact it is not re-
- displayed. The entries in the active pulldown window
- are re-printed without the window.
-
-
- 4. Routine MULTINPT is ALWAYS exited when the cursor leaves a
- "FIXED CHOICE" field. Use argument RKEY% to determine if
- the SPACE BAR or MOUSE exited MULTINPT. Remember, even if
- the SPACE BAR or MOUSE is not pressed a FIXED CHOICE field
- will be exited any time the cursor leaves it, or an exit
- key is pressed.
-
- If field 5 ( FROMFLD% = 5 on exit ) is a FIXED CHOICE
- field, on exit from routine MULTINPT the following will
- determine why field 5 caused the exit.
-
- 'RKEY% represents the exit key.
-
- IF FROMFLD% = 5 THEN ' Exit was from field 5.
-
- SELECT CASE RKEY%
-
- CASE 32
-
- ' SPACE BAR caused the exit
-
- CASE 100
-
- IF TOFLD% = 5
- ' LEFT MOUSE BUTTON release with mouse cursor
- ' in field 5
- ELSE
- ' Last active field was field 5 and LEFT MOUSE
- ' BUTTON released in another field ( TOFLD% )
- END IF
-
- CASE 200
-
- ' LEFT MOUSE BUTTON pressed with cursor out of
- ' field 5 and not in any other field. This can
- ' only occur if routine SETINPT specified exit
- ' with LEFT MOUSE BUTTON pressed out of a field.
-
- CASE 300
-
- ' LEFT MOUSE BUTTON moved active field to another
- ' field but the LEFT MOUSE BUTTON was released
- ' with the mouse cursor out of the new active
- ' field. This can not occur if routine SETINPT
- ' specified exit if LEFT MOUSE BUTTON pressed out
- ' of a field.
-
- CASE ELSE
-
- ' Cursor leaving field 5 or an exit key ( F1, F2,
- ' etc. ) caused the exit. If exit was not by the
- ' SPACE BAR or MOUSE the program will ALWAYS proceed
- ' here as a FIXED CHOICE field is ALWAYS an auto-exit
- ' field and MULTINPT is ALWAYS exited. It may be
- ' appropriate to do nothing and simply re-enter
- ' MULTINPT in this case.
-
- END SELECT
-
- END IF
-
-
- 5. If several small windows are placed entirely within a
- larger window it may not be necessary to restore the
- display area under each window. If the display area under
- the larger window is to be restored it may only be
- necessary to delete the smaller windows via routine
- DELWIND and restore the display area under the larger
- window with routine RSTRWIND. This is faster and more
- memory efficient than restoring all of the windows.
-
- 6. If partial windows remain on the screen the most likely
- cause is windows were restored out of order. The top
- window must be restored first if it is not entirely
- inside the bottom window.
-
-
- 7. If a title for a virtual scroll window is defined in the
- call to MAKEWIND for the scroll window, the title will
- not scroll left and right. The title for virtual scroll
- windows must be set by the argument for the top line in
- routine SCRLWIND. ( TL$ )
-
- 8. The argument for the key character color in virtual
- scroll windows must equal zero or an error 24 will be
- reported. ( STRING WON'T FIT )
-
- 9. If all fields in a call to MULTINPT are not updated on
- entry the cause is argument FROMFLD% does not equal
- zero. FROMFLD% sets single field update if not zero.
-
- 10. It may appear the input routines are not working if the
- text is the same color as the fields.
-
- 11. Functions MUST be declared in all modules using them.
-
- 12. If routine B4SCRL is used to set up a call to SCRLWIND
- use it immediately before the call to SCRLWIND. Do not
- allow anything to change the program flow between the
- calls to B4SCRL and SCRLWIND. Doing so may result in a
- different scroll window assuming the options specified by
- the call to B4SCRL.
-
- 13. If routine B4INPT is used to set up a call to INPTWIND
- use it immediately before the call to INPTWIND. Do not
- allow anything to change the program flow between the
- calls to B4INPT and INPTWIND. Doing so may result in a
- different input window assuming the options specified by
- the call to B4INPT.