
Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  If a menu screen contains text as well as the menu prompts,
the text vanishes after you call a maintenance/inquiry/report program.

COMMENT:  This problem was corrected in Release B.

FIX:  Two changes must be made in each of four separate files:
GENMNT.GTL, GENINQ.GTL, GENREP.GTL, and GENLABEL.GTL.

First, change:

* PAINT THE SCREEN
  private open_wins
  open_wins = not empty(wontop())
  deactivate window all

to:

* PAINT THE SCREEN
  private open_wins
  open_wins = not empty(wontop())
  hide window all
  activate screen

Second, change:

  if open_wins
    activate window all
  endif

to:

  if open_wins
    show window all
  endif

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  The List feature allows the user to delete records.

COMMENT:  This problem was corrected in Release B.

FIX:  The files GENMNT.GTL and GENINQ.GTL each contain the following
code in the function List():

   << if [database is-child?] >>
             key link_value[{j}] noappend nomodify window LIST_WIN
   << else >>
             noappend nomodify window LIST_WIN
   << endif >>

The files GENREP.GTL and GENLABEL.GTL contain similar code:

         noappend nomodify window LIST_WIN

In all four cases, you should add the word "nodelete", like so:

         noappend nodelete nomodify window LIST_WIN

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  When you Select from the filter table, your application
crashes.

COMMENT:  This occurs only if you have used an upper-case alias for your
database.  This problem was corrected in Release B.

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

  if prog_type = "M,I"     &&  maintenance or inquiry program

to:

  if prog_type $ "M,I"     &&  maintenance or inquiry program

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  Some reports crash with a syntax error in the RepBody procedure.

COMMENT:  This problem was corrected in Release B.

FIX:  In the procedure RepBody, in GENREP.GTL, change:

      done = if(recno() = last_rec, .T., done)

to:

      done = iif(recno() = last_rec, .T., done)

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  The report programs crash when you attempt to reverse the
index order.

COMMENT:  This problem was corrected in Release B.

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

      case option = "Alt+V" or option = "Reverse order"
        if index_rev
          set order to tag (order(table)) descending
        else
          set order to tag (order(table)) ascending
        endif


to:
      case option = "Alt+V" or option = "Reverse order"
        index_rev = not index_rev
        if index_rev
          set order to tag (order(alias())) descending
        else
          set order to tag (order(alias())) ascending
        endif

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  The application crashes when you try to print a report
containing a memo field.

COMMENT:  This problem was corrected in Release B.

FIX:  In the procedure MemoPrnt, in the file GENREP.GTL, change:

    @ line_no, print_col say memoline(memo_field, N)

to:

    @ line_no, print_col say mline(memo_field, N)

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

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 Go_Begin, 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 FoxPro 2.0

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

PROBLEM:  In Scrolling windows, variables don't always display the
correct values.

COMMENT:  This problem was corrected in Release B.

FIX:  In the procedure UnPaint, in both GENMNT.GTL and GENINQ.GTL,
insert the indicated lines:

      << for all fields >>
        << if [field is-memory-variable?] >>            <===
      store {[field default-value]} to {[field name]}   <===
        << endif >>                                     <===
        << if [field is-display?] >>
      @ row_no,{[field #column]} say

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  If you leave the description blank for any window within a data
screen, some of the menu selections within the corresponding maintenance
or inquiry program don't work.

COMMENT:  All windows must have a description.  This is how they are
identified on the menu.  Descriptions are NOT optional.

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  When you press the same key repeatedly in rapid succession
(such as Alt-N to advance the record pointer through the database), the
application crashes with the message "Do nesting too deep."

COMMENT:  This is a problem with the FoxPro ON KEY LABEL command;
apparently, the program "gets ahead of itself" in processing these key
strokes.  The following fix is incorporated in Release B.

FIX:  At the beginning of the procedure Main in GENMNT.GTL, GENINQ.GTL,
GENREP.GTL, and GENLABEL.GTL, change:

    aborted = .F.
    = SetKeys(.F.)

to:

    push key clear
    aborted = .F.

At the end of the procedure Main, change:

    = SetKeys(.T.)

to:

    pop key

Finally, in the function PullDown(), in G_UDF.PRG, change:

   pulled = .T.
   = SetKeys(.T.)
   do while .T.
     activate popup (pd_menu[pd_number])
     do case
       case lastkey() = K_left
         pd_number = iif(pd_number = 1, alen(pd_menu), pd_number - 1)
       case lastkey() = K_right
         pd_number = iif(pd_number = alen(pd_menu), 1, pd_number + 1)
       otherwise
         exit
     endcase
     show menu (menu_name) pad (pd_menu[pd_number])
   enddo
   pulled = .F.
   = SetKeys(.T.)

---[continued]------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[continued]------------------------------------------------------------

to:

   on key label DNARROW
   on key label UPARROW
   on key label Esc
   do while .T.
     activate popup (pd_menu[pd_number])
     do case
       case lastkey() = K_left
         pd_number = iif(pd_number = 1, alen(pd_menu), pd_number - 1)
       case lastkey() = K_right
         pd_number = iif(pd_number = alen(pd_menu), 1, pd_number + 1)
       otherwise
         exit
     endcase
     show menu (menu_name) pad (pd_menu[pd_number])
   enddo
   on key label DNARROW do Main&program_id with "DNARROW"
   on key label UPARROW do Main&program_id with "UPARROW"
   on key label Esc     do Main&program_id with "Esc"

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  When you attempt to create a new help window while Adding or
Modifying a record in a maintenance program, the application crashes.

COMMENT:  This problem was corrected in Release C.

FIX:  In the procedure InputRec, in GENMNT.GTL, insert the indicated
code:

    set cursor on
    on key label F1 do Help with "{[program name]}", varread()   <===
    read
    lastkey = lastkey()

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  If your alias contains captial letters (e.g., "CC" or "Cc"
instead of "cc"), you are not allowed to delete entries from the filter
table.  Also, if you add filters to the table from a report program,
they may not be recognized by maintenance programs which use the same
database.

COMMENT:  This problem was corrected in Release C.  The code changes are
too numerous to describe here.

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  The application seems to run properly, but after using it for
a while (entering data, generating reports, etc.), it crashes with the
message "Insufficient Memory".

COMMENT:  This problem was corrected in Release C.

FIX:  Insert the indicated code in GENMNT.GTL, GENINQ.GTL, GENREP.GTL,
and GENLABEL.GTL, immediately before the procedure Main:

  = SetKeys(.T.)
  activate menu {[program name]}
  pop key all                      <===
  = SetKeys(.F.)
  release menu {[program name]}
  release popup all
  close databases

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  When you begin to add new records (before you've entered any
data), all lookup fields have the values of the last record in the
database.

COMMENT:  This problem was corrected in Release C.

COMMENT:  Since the lookup fields are updated as you go through the data
entry fields, we didn't consider this "problem" significant.  However,
many users have complained that the lookup fields should be blank to
start with, so we developed the following "fix".

FIX:  In the procedure InputRec, in GENMNT.GTL, insert the indicated
code:

  do case
    case input_mode = "Add"
      do Go_End{[program identifier]}
    << if _Scrolling >>
      if not eof()
        do Load{[program identifier]}
        win_redraw[window] = (win_line[window] >= wrows() - 1 ;
                              .or. record_no <> recno())
        = PaintRec{[program identifier]}(.F.)
        do UnPaint{[program identifier]} with win_line[window]
        win_line[window] = win_line[window] + 1
      endif
    << endif >>
      do InitVars{[program identifier]} with .T.
      if .not. eof()                              <===
        skip                                      <===
      endif                                       <===
    case input_mode $ "Modify, Copy"

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  When you run a report after changing indexes or reversing an
index, the application crashes or the report simply does not include all
the records it should.

COMMENT:  This problem was corrected in Release C.

FIX:  In the procedure Main, GENREP.GTL and GENLABEL.GTL, insert the
indicated code:

      case option = "Alt+V" or option = "Reverse order"
        index_rev = not index_rev
        if index_rev
          set order to tag (order(alias())) descending
        else
          set order to tag (order(alias())) ascending
        endif
        first_rec = BeginRec()             <===
        last_rec  = EndRec()               <===

      case option = "Alt+R" or option = "Retrieve"
        do Retrieve{[program identifier]}

  << for all indexes >>
      case option = "{[index description]}"
        set order to tag {[index name]}
        first_rec = BeginRec()             <===
        last_rec  = EndRec()               <===

  << endfor >>

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

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

PROBLEM:  If you application has multiple zoom databases, the end user
is sometimes able to zoom to databases they shouldn't be able to zoom
to.

COMMENT:  This problem was corrected in Release D.

FIX:  In the procedure Main, in GENMNT.GTL and GENINQ.GTL, change:

      case option = "Alt+{j}" or option = "{j}. {[database description]}"
        do case
          case table == "{[database alias]}"
            * database already selected, so do nothing
          case "{[database alias]}," $ tabl_stack
            do Zoom_Out{[program identifier]} with .T.
   ===>   otherwise
            do Zoom_In{[program identifier]} with "{[database alias]}", .T.
        endcase

to:

      case option = "Alt+{j}" or option = "{j}. {[database description]}"
        do case
          case table == "{[database alias]}"
            * database already selected, so do nothing
          case "{[database alias]}," $ tabl_stack
            do Zoom_Out{[program identifier]} with .T.
          case table == "{[database lnk-alias]}"
            do Zoom_In{[program identifier]} with "{[database alias]}", .T.
        endcase

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[17]-------------------------------------------------------------------

PROBLEM:  If you don't specify a data screen to use with your report
program, selecting the "Set filter" option from the menu causes the
application to crash.

COMMENT:  This problem was corrected in Release D.

FIX:  In the procedure Main, in GENREP.GTL and GENLABEL.GTL, insert the
indicated code:

    << if _HasScreen >>                                <===
      case option = "Alt+F" or option = "Set filter"
        do FiltBuild{[program identifier]}
    << endif >>                                        <===

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[18]-------------------------------------------------------------------

PROBLEM:  When you try to Edit a filter expression in a compiled,
standalone .EXE file, you get the message "Feature not available."

COMMENT:  The FoxPro Expression Builder is not incorporated into
standalone .EXE files.  If your application requires this feature, you
must create a compact .EXE instead.

(FoxPro provides no mechanism for a program to distinguish whether it's
running as a standalone or compact .EXE.  Therefore, it's not even
possible to include alternative code which would execute only if the
application was running as a standalone.)

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[19]-------------------------------------------------------------------

PROBLEM:  When you Set a Filter in a report program, and no records
match the filter, you get an error message to that effect and then the
application crashes.

COMMENT:  This problem was corrected in Release D.

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

      else
        last_rec = EndRec()
        go first_rec
      endif
      release window

to:

      else
        last_rec = EndRec()
        go first_rec
        release window
      endif

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[20]-------------------------------------------------------------------

PROBLEM:  When printing labels to the screen, you only get one screenful.

COMMENT:  There was a fix for this problem in Release D, but the fix was
inadequate.

FIX:  Rewrite the function Warning(), in G_UDF.PRG, as follows:

function Warning
* display a warning message

  parameters mess_text
  private con_status
  con_status = set("console")
  set console on
  ?? chr(7)
  = Inform(mess_text)
  wait ''
  release window INFORM
  if con_status = "OFF"
    set console off
  endif

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[21]-------------------------------------------------------------------

PROBLEM:  The templates don't support validation against a file with
more than one key field.

COMMENT:  This is really an enhancement rather than a bug fix.

FIX:  You must make changes in three areas to support validation against
a compound key.

First, rewrite the function Val_File(), in the file G_UDF.PRG, as
follows:

function Val_File

  parameters value, val_table, udf_name
  private is_valid, old_area
  old_area = workarea()

  select (val_table)
  seek value
  is_valid = found()
  if not is_valid
    if eof()
      go top
    endif
    * call the specified function (usually LIST)
    = evaluate(udf_name)
    is_valid = (lastkey() <> K_Esc)
    if is_valid
      show gets
    else
      keyboard chr(K_Esc)
    endif
  endif
  select (old_area)

return is_valid


Second, in the procedure InputRec, in GENMNT.GTL, change:

            << case [field val-type] = "F" >>
          error '' ;
          valid val_file(m->{[field name]}, "{[field val-alias]}", "{[field val-field]}",
                ..."List{[program identifier]}('{[field val-alias]}')",
                ...{[field #length]},{[field #decimals]}) ;
            << case [field val-type] = "L" >>


---[continued]------------------------------------------------------------


Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[continued]------------------------------------------------------------


to:

            << case [field val-type] = "F" >>
              << for all databases in program >>
                << if [database name] == [field val-database] >>
          valid val_file({[database ndx-expression]},
                << endif >>
              << endfor >>
                ..."{[field val-alias]}",
                ..."List{[program identifier]}('{[field val-alias]}')") ;
            << case [field val-type] = "L" >>


Third, insert the indicated code in the function List, in GENMNT.GTL:

  release window LIST_WIN
  set cursor on
  if lastkey() = K_Esc
    go record_no
<< if [program #databases] > [program #zooms] >>                  <===
  else                                                            <===
    do case                                                       <===
  << for all databases in program >>                              <===
    << if [database is-validation?] .or. [database is-lookup?] >> <===
      case table == "{[database alias]}"                          <===
      << for all fields in dictionary >>                          <===
        << if [field is-link?] >>                                 <===
        store {[field name]} to m->{[field name]}                 <===
        << endif >>                                               <===
      << endfor >>                                                <===
    << endif >>                                                   <===
  << endfor >>                                                    <===
    endcase                                                       <===
<< endif >>                                                       <===
  endif

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[22]-------------------------------------------------------------------

PROBLEM:  When you Modify a record in a maintenance program and try to
save it, the program crashes with the message "No database is in use."

COMMENT:  This occurs only if the program contains zoom databases.

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

  if .not. empty(dbf())      <===
  do case
  << for all zoom-databases in program >>
    case table == "{[database alias]}"
    .
    .
    .
  << endfor>>
  endcase
  endif                      <===

return  

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[23]-------------------------------------------------------------------

PROBLEM:  If your maintenance/inquiry program contains a scrolling
window and your database is empty, the application crashes.

FIX:  In the function PaintRec(), in GENMNT.GTL and GENINQ.GTL, change:

  * re-paint scrolling windows
  record_no = recno()
  if not empty(alias())          <===

to:

  * re-paint scrolling windows
  record_no = recno()
  if not eof() and not empty(alias())

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[24]-------------------------------------------------------------------

PROBLEM:  When you run a maintenance program and the primary database is
empty, you're asked if you wish to add records.  If you say "Yes", but
then press [Esc] to abort entry, the application throws you back to DOS
or to the FoxPro command window.

FIX:  In the file GENMNT.GTL, shortly before the procedure Main, change:

  if eof()
    if Confirm("Database empty - add records?", .T.)
      do Main{[program identifier]} with "Add a new record"
    endif
  endif
  if eof()
    keyboard chr(K_Esc)
  endif
  = SetKeys(.T.)

to:

  if eof()
    if Confirm("Database empty - add records?", .T.)
      keyboard "EA"
    else
      keyboard "DX"
    endif
  endif
  = SetKeys(.T.)

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[25]-------------------------------------------------------------------

PROBLEM:  On a network, if you Modify a record, but press [Esc] to abort
the modification, the record remains locked.

FIX:  In the procedure InputRec, in GENMNT.GTL, add the indicated code:

  do FirstWin{[program identifier]}
  unlock                                           <===
  if record_no > 0 and record_no <= reccount()
    go record_no
  endif

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[26]-------------------------------------------------------------------

PROBLEM:  In a report with several zoom levels, if you abort printing, the
application locks up your computer.

FIX:  In the procedure RepBody, in GENREP.GTL, change:

    << if [break alias] == _primary >>
        done = (recno() = last_rec)
    << endif >>

to:

    << if [break alias] == _primary >>
        done = iif(recno() = last_rec, .T., done)
    << endif >>

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[27]-------------------------------------------------------------------

PROBLEM:  After you have added or modified a record, a small dialog
window pops ups asking if you wish to save that record.  If your data
window is large and you accidentally click the mouse outside of the
dialog window, the data window is brought to the foreground and the
dialog window appears to vanish.

FIX:  In function Confirm, in the file G_UDF.PRG, change:

  read cycle object affirm

to:

  read modal cycle object affirm

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[28]-------------------------------------------------------------------

PROBLEM:  Memo fields are always printed 50 columns wide, regardless of
where they're placed in your report layout.

FIX:  Add the indicated line of code to the procedure MemoPrnt, in
GENREP.GTL:

  parameters memo_field, print_col
  private N, no_lines
  set memowidth to {[report #max-width]} - print_col     <===
  no_lines = memlines(memo_field)
  for N = 1 to no_lines
    @ line_no, print_col say mline(memo_field, N)
    do NextLine
  next N

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[29]-------------------------------------------------------------------

PROBLEM:  If you call a report program and the primary database is
empty, you are given a message to that effect and then the application
crashes.

FIX:  Insert the indicated code in GENREP.GTL and GENLABEL.GTL:

* SET INITIAL SCOPE
  if eof()
    = Warning("Database is empty")
    close databases
    return            <===
  endif

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

Anomaly Report:  Genifer 3.0 Templates for FoxPro 2.0

---[30]-------------------------------------------------------------------

PROBLEM:  If you put lookup fields in a label, the application crashes
when you try to run the report.

FIX:  In the procedure Print, in GENLABEL.GTL, change:

  newline = newline + trim(transform({[field name]}, '{[field picture]}'))

to:

  newline = newline + ;
     trim(transform({[field alias]}->{[field name]}, '{[field picture]}'))

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

