
Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[1]--------------------------------------------------------------------

PROBLEM:  When you enter an incorrect filter expression using the Edit
option, then attempt to terminate the Edit by pressing <Esc> (rather
than by entering a correct expression and pressing <Enter>), the
application crashes.

COMMENT:  This problem was corrected in Release B.

FIX:  In the function GetExp(), in G_UDF.PRG, change:

    if lastkey() = K_Esc .or. empty(expression) ;
                         .or. type(expression) $ data_types
      exit
    endif

to:

    if lastkey() = K_Esc
      expression = ''
    endif
    if empty(expression) .or. type(expression) $ data_types
      exit
    endif

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[2]--------------------------------------------------------------------

PROBLEM:  If you delete all the zoom records for a particular primary
record, the maintenance program sometimes takes you to a non-related
record instead of bouncing you back to the primary database.

COMMENT:  This problem was corrected in Release B.

FIX:  Insert the indicated lines of code in the procedure GoBegin, in
GENMNT.GTL:

<< if _Scrolling >>
  win_redraw[WindowNo()] = .T.
<< endif >>
  set near off               <===
  do case
<< for all zoom-databases in program >>
    case table = "{[database alias]}"
  << if [database is-primary?] >>
      go top
  << else >>
      seek link_value[{j}]
  << endif >>
<< endfor >>
  endcase
  set near on                <===

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[3]--------------------------------------------------------------------

PROBLEM:  Lookup databases don't align correctly.

COMMENT:  This problem was corrected in Release B.

FIX:  In the template files GENMNT.GTL, GENINQ.GTL, GENREP.GTL, and
GENLABEL.GTL, change:

<< if [program #zooms] > 1 >>
* SET DATABASE RELATIONS
  << for all databases in program >>
    << if [database is-parent?] >>
  select {[database alias]}
  set relation to
      << store [database name] to _parent >>
      << store .T. to _firstchld >>
      << for all zoom-databases in program >>
        << if [database lnk-name] == _parent >>
          << if _firstchld >>
            ... {[database lnk-expression]} into {[database alias]}
            << store .F. to _firstchld >>
          << else >>
            ..., {[database lnk-expression]} into {[database alias]}
          << endif >>
        << endif >>
      << endfor >>
    << endif >>
  << endfor >>
<< endif >>

to:

<< if [program #databases] > 1 >>
* SET DATABASE RELATIONS
  << for all zoom-databases in program >>
    << store [database name] to _parent >>
    << store .T. to _firstchld >>
    << for all databases in program >>
      << if [database lnk-name] == _parent >>
        << if _firstchld >>
  select {[database lnk-alias]}
  set relation to {[database lnk-expression]} into {[database alias]}
          << store .F. to _firstchld >>
        << else >>
          ..., {[database lnk-expression]} into {[database alias]}
        << endif >>
      << endif >>
    << endfor >>
  << endfor >>
<< endif >>

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[4]--------------------------------------------------------------------

PROBLEM:  When you attempt to Retrieve in report programs, the
application crashes on the line SELECT 0.

COMMENT:  This problem was corrected in Release D.

FIX:  In the procedure Retreiv, in GENREP.GTL and GENLABEL.GTL, change:

  if lastkey() <> K_Esc
    select 0

to:

  if lastkey() <> K_Esc
    select (select())

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[5]--------------------------------------------------------------------

PROBLEM:  If your database contains a field called NUMBER, the application
crashes with a syntax error on the line "save screen to w_screen&w_str".

COMMENT:  This problem was corrected in Release D.

FIX:  In the function Lstr(), in G_UDF.PRG, change:

return ltrim(str(number))

to:

return ltrim(str(m->number))

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[6]--------------------------------------------------------------------

PROBLEM:  When you validate a numeric or date field against a file, the
program crashes.

COMMENT:  This problem was corrected in Release D.

FIX:  In the function Val_File(), in G_UDF, change:

  do case
    case fieldtype = "D"
      value = str(year(value),4) + str(month(value),2) + str(day(value),2)
    case fieldtype = "N"
      value = str(value, val_len, val_dec)
  endcase
  seek value

to:

  do case
    case fieldtype = "D"
      seek str(year(value),4) + str(month(value),2) + str(day(value),2)
    case fieldtype = "N"
      seek str(value, val_len, val_dec)
    otherwise
      seek value
  endcase

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[7]--------------------------------------------------------------------

PROBLEM:  If one of your databases contains multiple memo fields, the
generated maintenance or inquiry program contains syntax errors and
won't compile.

COMMENT:  This problem was corrected in Release D.

FIX:  In the procedure GetMemo, in GENMNT.GTL, change:

        define popup memos 3,46 to {4 + _memocount},75
      << for all memo-fields in dictionary >>
        define bar {j} of memos prompt "{[field description]}"
      << endfor >>
        save screen to popscreen
        dummy = WShadow(3,46 to {4 + _memocount},75)

to:

        define popup memos from 3,46 to {4 + _memocount},75    <===
      << for all memo-fields in dictionary >>
        define bar {j} of memos prompt "{[field description]}"
      << endfor >>
        save screen to popscreen
        dummy = WShadow(3,46,{4 + _memocount},75)              <===

Make the same change in the procedure ShowMem, in GENINQ.GTL

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[8]--------------------------------------------------------------------

PROBLEM:  When you attempt to delete a filter from the filter table, the
application crashes with the message "coordinates are off the screen."

COMMENT:  This is apparently a dBASE IV bug, since the following fix
shouldn't accomplish anything at all.  This additional code was
corrected in Release D.

FIX:  Insert the indicated code in the function PickFilt(), in
G_UDF.PRG.

            if RecLock()
     ==>      @ 0,0 say ''
              if Confirm("Delete this filter from the archive?", .F.)
                delete
              endif
            endif

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[9]--------------------------------------------------------------------

PROBLEM:  If you generate Inquiry programs which don't use memo fields,
the programs are missing several procedures and functions.

COMMENT:  This problem was corrected in Release D.

FIX:  Two changes should be made to the file GENINQ.GTL. Immediately
before the procedure GoBegin, remove the indicated line of code:

<< if [program is-memo-present?] >>    <===
*--- GoBegin ------------------------


Then insert the same line of code immediately before the procedure
ShowMem:


<< if [program is-memo-present?] >>    <===
*--- ShowMem ------------------------

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[10]-------------------------------------------------------------------

PROBLEM:  In a multi-user environment, if one user modifies and saves a
record while another user is viewing that record, and the second user
then modifies the same record, the first user's changes are overwritten
without ever being seen by the first user.

COMMENT:  This problem was corrected in Release D.

FIX:  Insert the indicated line of code in the procedure InptRec, in
GENMNT.GTL:

    case input_mode $ "Modify, Copy"
      if .not. RecLock()
        aborted = .T.
        return
      endif
      do OnLoad{[program identifier]}   <===
  endcase

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[11]-------------------------------------------------------------------

PROBLEM:  In a multi-user environment, if user #1 is adding a record
while user #2 deletes the record which user #1 was previously viewing,
and then user #1 aborts entry of the new record, user #1 is shown a
deleted record.

COMMENT:  This problem was corrected in Release D.

FIX:  Insert the indicated line of code in the procedure InptRec, in
GENMNT.GTL:

  if record_no > 0 .and. record_no <= reccount()
    go record_no
    if deleted()                         <===
      do GoBegin{[program identifier]}   <===
    endif                                <===
  endif

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[12]-------------------------------------------------------------------

PROBLEM:  If you press [Esc] on a field which is validated against a
file, the application crashes.

COMMENT:  This is a peculiarity of dBASE IV; it insists upon performing
the validation even if the READ has been aborted.

FIX:  Insert the indicated code in the function Val_File(), in
G_UDF.PRG:

  parameters value, val_table, val_field, udf_name, val_len, val_dec
  private is_valid, fieldtype

  if lastkey() = K_Esc            <===
    clear gets                    <===
    return .T.                    <===
  endif                           <===
  select &val_table
  fieldtype = type("value")

--------------------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[13]-------------------------------------------------------------------

PROBLEM:  If you press F1 while editing a memo field, the application
crashes.

COMMENT:  Help should not be available while editing memos.

FIX:  Add the indicated code to the function EditMemo(), in G_UDF.PRG:

  * view/edit the memo field
  on key label F1                                     <===
  dummy = WOpen("MEMOEDIT", m_top, m_left, ;
                            m_bottom, m_right, m_title, 1, m_colors)
  define window MEMOEDIT from m_top + 1, m_left + 1 to ;
                              m_bottom - 1, m_right - 1 none
  set cursor on
  if .not. allow_edit
    on key label Ctrl-Home keyboard " "
  endif
  activate window MEMOEDIT
  @ 0,0 get &memo_field open window MEMOEDIT
  read
  on key label Ctrl-Home
  on key label F1 do Help with prg_name, varread()    <===
  set cursor off
  release window MEMOEDIT
  dummy = WClose()

--------------------------------------------------------------------------

Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[14]-------------------------------------------------------------------

PROBLEM:  When Adding new records and Posting to a lookup database, the
Posting code doesn't work.

COMMENT:  At the time the Posting procedure is called, the record
pointer in the active database has been moved to a new, blank record.
SET RELATION forces the record pointer in the lookup file to EOF.  You
must therefore perform an explicit SEEK before you do your REPLACE(s),
to locate the proper record; for example:

  do case
    case table = "cr"
      select cc                      <===
      seek m->cc_cruise              <===
      do case
        case input_mode $ "Add, Copy"
          .
          .
          .
      endcase
      select cr                      <===

This additional SEEK is necessary only if you are Posting to a lookup
database.  If you are Posting from a zoom database to the primary
database (or another zoom), this problem does not exist.

--------------------------------------------------------------------------

Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[15]-------------------------------------------------------------------

PROBLEM:  If you have more than one memo field in a database, the
maintenance programs give you a popup list of all the memos, but [Esc]
doesn't break out of the popup.

FIX:  Insert the indicated code in the procedure GetMemo, in GENMNT.GTL:

        do while .T.
          on selection popup memos deactivate popup
          activate popup memos
          do case
      << for all memo-fields in dictionary >>
            case prompt() = "{[field description]}"
              dummy = EditMemo("{[field name]}",.T.,10,8,21,76, ;
                      "{[field description]}", clr_window)
      << endfor >>
            otherwise    <===
              exit       <===
          endcase
        enddo

You should make the same change in the procedure ShowMem, in GENINQ.GTL.

--------------------------------------------------------------------------

Anomaly Report:  Genifer 3.0 Templates for dBASE IV 1.1

---[16]-------------------------------------------------------------------

PROBLEM:  If you attempt to modify or zoom from a record, you get the
message "Unable to Lock Record" even though no other user on the network
has locked that particular record.

COMMENT:  dBASE is actually attempting to lock a record in a related
lookup database.  If that lookup record is shared by multiple records in
the primary (or zoom) database, the lock fails.

FIX:  To prevent the unwanted cascading record lock, all lookup
databases must be opened in "read only" mode.  To accomplish this,
insert the indicated code in GENMNT.GTL:

* OPEN FILES
  private use_error
<< for all databases in program >>
  on error do ErrorTrap with error(), "{[database name]}"
  use {[database name]} in {j} order tag {[database ndx-name]} ;
    alias {[database alias]}
  << if .not. [database is-zoom?] >>      <===
  ... noupdate                            <===
  << endif >>                             <===
<< endfor >>
  on error
  if UseError()
    return
  endif

Note that if you wish to post new values to a lookup database via the
Posting procedure, this change complicates the matter.  You must first
open the lookup database AGAIN in a new work area, without the NOUPDATE
option, and perform an explicit SEEK to find the appropriate record to
post to.

--------------------------------------------------------------------------

