
This article is reprinted from the December 1990 edition of TechNotes/dBASE
    IV.  Due to the limitations of this media, certain graphic elements
    such as screen shots, illustrations and some tables have been omitted. 
    Where possible, reference to such items has been deleted.  As a result,
    continuity may be compromised.  

TechNotes is a monthly publication from the Ashton-Tate Software Support
    Center.  For subscription information, call 800-545-9364.

Dialogue
Questions and Answers

It's De-Fault of De-Tools

Q:      The Tools: DOS Utilities: Files menu has an option to change drive and
    directory.  I enter the desired information and the files are displayed
    accordingly.  The only problem is that when I resume my work from the
    Control Center, new files I create aren't saved there.  How do I save
    files to a new directory or drive?

A:      There's a lot of visual distraction in the DOS Utilities menu. 
    However, it always is helpful to read the fine print.  In this case,
    the message that displays at the bottom of the screen below the status
    bar that accompanies every menu option.  Notice that when you highlight
    the Change drive: directory option from the Files menu, the message
    displayed is Select another drive and/or directory from which to
    display files.  The operative word here is "display".  The purpose of
    the Files  is for display purposes.  It doesn't implement any
    redirection of files.  The option you really want is found in the DOS
    menu, the first menu in the DOS Utilities screen.  Highlight the option
    Set default drive: directory and you will clearly see the difference in
    messages.  The information at the bottom now reads

        Set DOS drive: directory.  
        
        New files will be saved to this drive: directory

Make Room for Memos

Q:      Like probably a lot of dBASE IV users, I had my own personal "bug" that
    I hoped would be exterminated when the new version was released.  I was
    disappointed to find that it's still there.  The problem is when I try
    to place a vertically stretched memo along side several stacked fields
    in a report.

        Theoretically, the name and address information should print on the
    left and the memo information constrained within its limits on the
    right, independently of each other.  What actually happens is that the
    memo prints and leaves the left-most columns blank until it is
    finished.  At which time, the other fields, which should've shared
    common lines with the memo, finally print.  So, since there wasn't a
    fix, is there perhaps a workaround?
A:      Although this problem is inconveniencing enough to have the label "bug"
    slapped on it, it's actually a functionality that's easier said than
    done.  Since the Report Generator processes information on a
    line-by-line basis, there would no doubt be a conflict in the way in
    which a vertically stretched field would take precedence over other
    information.  
        
        In order to keep the stacked fields together, you can create a
    calculated field where the name field would normally appear.  Note that
    since the name field is 5 characters shorter than the address field,
    the calculated field expression must account for that.

        Field Name  Type    Length
        NAME        C       15
        ADDRESS     C       20
        CITY        C       10
        STATE       C        2
        ZIP         C        5
        PHONE       C       12

        Here's how the expression would appear:

        NAME + SPACE(5) + ADDRESS + CITY + ", "+ STATE + " "+ZIP + PHONE

        Give this new replacement field a Vertical Stretch attribute.  After
    saving the information on this field, you will most likely have to size
    it.  In this example, we would want the size to be 20.  Do not trim the
    fields in this expression.  Size counts so make sure that the fields
    will naturally wrap within the boundaries you have set for the field. 
    Once you have done this, the two fields, both calculated and memo, will
    print comfortably along side one another.

Keyboard Mimickry

Q:      I'd like to be able to use other keys than the dBASE defaults for
    saving and abandonding changes to a record while in EDIT or BROWSE
    mode.  What is the method for redirecting Ctrl-End and Escape to
    specific function keys?

A:      Using an ON KEY LABEL interrupt routine should do the trick.  A few
    statements in your startup routine such as

        ON KEY LABEL F9 KEYBOARD CHR(27)    && Escape (Abandon and Exit)
        ON KEY LABEL F8 KEYBOARD CHR(23)    && Ctrl-End (Save and Exit)
        SET MESSAGE TO "Save and Exit: F8  Exit withouth saving: F9"

        will redirect those keys.  However, although this will mimick the
    Escape and Ctrl-End keys, if you want to disable these default keys
    from service, you will need to use an ON KEY label routine for
    Ctrl-End.  Using an ON ESCAPE statement (or SET ESCAPE OFF) to stay
    within a full-screen session such as EDIT or BROWSE does not work;
    additional programming involving the use of the READKEY() function
    would be necessary. 

Where's My Catalog?

Q:      I am attempting to use a different catalog that I've copied into my
    dBASE directory from a floppy disk along with all the files in that
    catalog.  However, when I choose that option from the Catalog menu, the
    file name doesn't appear.  What must I do?

A:      First of all, the reason that you don't have access to that catalog is
    because it is not contained within the file Catalog.cat (the file of
    all catalogs).  Although you could open Catalog.cat like any other .dbf
    file and manually add the information, there are actually two other
    methods that would be preferable to use.

        One way is to choose the <create> option when the list of available
    catalogs appears and yours isn't there.  When prompted for the name of
    the new catalog to create, enter the name of your copied catalog file
    instead.

        The other method is to simply exit to the dot prompt and explicitly
    open the catalog by issuing the command:

        SET CATALOG TO <catalog name>

Getting Past the Starting Line

Q:      I have a program created with the Applications Generator. It contains
    menus for labels, reports, editing and so forth.   The reports work
    fine but the labels generate an error when they are run and the error
    message declares there is an Unrecognized command verb on line 1.  How
    do I fix the problem?

A:      The problem stems from the value that you are passing to the LABEL FORM
    expression via macro substitution.  The entire file name, including
    extension, is being passed.  If that extension is .lbl,the dBASE IV
    compiler doesn't evaluate it correctly.

        One workaround is to prompt for files LIKE *.LBG or .LBO instead of
    *.LBL in your DEFINE POPUP statement.  Preferably, you should pass the
    file name to LISTVAL in a statement such as:

        LISTVAL = SUBSTR(LISTVAL, 1, AT(",", LISTVAL) - 1)

        After which, you can simply invoke the label program with LABEL FORM
    &LISTVAL.  

