Developer Notes for Time Trakker 3.x
------------------------------------

Installation & Upgrading from Previous Versions
-----------------------------------------------
   If you are doing a first time installation or you don't need
to save any of your existing TIMEBILL entries, simply copy the
Time Trakker files into a directory of your choice and make sure
that you can access the files in this directory by setting
your FOXPRO path to this directory (ie. SET PATH TO \TIMETRAK).   

Importing your existing Data
----------------------------
   If you are upgrading from a version of Time Trakker of 3.0
or greater file conversion is automatic and the procedure below
is not necessary. You can simply copy your old datafiles into the
new Time Trakker directory. To be sure, though, back up your 
existing TIMEBILL.DBF and TT_CFG.DBF first before allowing the new
installation to convert your files to the current format.
   
Updating Files from Versions prior to 3.0
------------------------------------------
   Version 3.x incorporates a change in the file format of the
TIMEBILL.DBF. It is therefore necessary to import your old data
into the program by using the "Append from Backup" function in
the Utilities menu. In order to do this I recommend to install
this version of Time Trakker into a fresh directory. The shipping
version of the program does not include a copy TIMEBILL.DBF as
it will be created when the program is run for the first time.
If upgrading, DO NOT put an old TIMEBILL.DBF file in this new
Time Trakker directory or you are bound to have problems as a
new file won't be created and the old file format will be
incompatible. Once the new version is installed with a new
TIMEBILL.DBF you can use the "Append from Backup" function to
append your old data from your old TIMEBILL.DBF file into the
new version of TIMEBILL.DBF.

   If you are upgrading from Version 2.75 or earlier be sure you
follow the above procedure as it will import your data into a new
datafile with the current structure. THE DATA FORMAT HAS CHANGED 
SINCE VERSION 2.75 SO DO THIS OR YOU ARE BOUND TO HAVE SOME PROBLEMS.

   The TT_CFG.DBF file has also changed format a little. DO NOT
use the versions other than 3.x of this file in Version 3.x.
If it is an earlier version delete it and start Time Trakker without
the TT_CFG.DBF file and a new one will be created for you. You will
need to re-enter your Company information and client defaults.


Necessary Run-Time Files
------------------------
   The registered version of Time Trakker comes with all the source
code, screens, reports and the project file. Out of all those files
only a few are actually needed to run Time Trakker. These are:

 Program Files:
 --------------
    * TIMETRAK.APP  -   The actual application file
                        for both DOS and Windows
    * TIMETRAK.MPR  -   The Menu for used to attach
                        to the System menu. Note that
                        this Menu is *external* from the
                        Time Trakker project and must
                        be re-built seperately.

 Data Files:
 ----------- 
    * TIMEBILL.DBF  -   The Time Trakker data file. It will
                        be created for you the first time
                        you run TT.
    * TIMEBILL.FPT  -   The Time Trakker memo file.
    * TT_CFG.DBF    -   This file is created the first time
                        you run Time Trakker. It holds your
                        company information, bill type options
                        and Users and client preferences.                    

   All other files included on this disk are the source files and
are not required to run the actual program. The source startup
program is TTmain. It also contains most of the library calls used
within the Time Trakker modules.


GenScrnx
--------
   Time Trakker was written with the help of GENSCRNX, a public
domain utility that pre and post processes Screen code generated
by the standard GENSCRN.PRG provided with FoxPro. The main use
of GenScrnx is for visual effects using Ken Levy's Windows 3D
driver, and using my own DOS3D driver for drop shadows in DOS.
I limited use of GENSCRNX to these uses, so that the actual
functionality of the program won't be affected when generating
without GENSCRNX. However, I strongly recommend you use GENSCRNX!

   IMPORTANT: In order to maintain the 3D effects in Windows on 
re-compilation, you will need GENSCRNX. While the required files
are supplied here, if you want more information GENSCRNX, the 3D
effects and samples are public domain and available on CompuServe
with source and docs. Make sure you use the supplied CONFIG.FPW file
or set MVCOUNT=512 and _GENSCRN="GENSCRNX.PRG" in your CONFIG.FP(W)
file if you choose your own.

   GENSCRNX's 3D driver will not generate the proper Windows 3D code
under DOS. It is therefore necessary that you re-generate the Windows
screens under Windows.

   I included all the necessary GENSCRNX and GSX drivers in
order to re-generate Time Trakker in this package. The .PRG's
are available, but if you need more information on how to use
GENSCRNX you can download it from CompuServe's FOXFORUM library
10.

   The necessary GENSCRNX files are:
   
    *  GENSCRNX.PRG             -   The GENSCRNX engine
    *  3D.PRG                   -   The Windows 3D Driver
    *  3DBOX.PRG                -   Used by screens to draw 3D Boxes
 	                                gets included into project
    *  DOS3D					-   The DOS drop shadow driver
    *  GSXMOVWN                 -   Faster Screens in Windows 


Cross-Platform Info
-------------------
   Time Trakker is designed as a cross-platform application, meaning
that it can run both under DOS and Windows from the same .APP file.
This results in a rather large .APP file, since all screens generated
are generating both DOS and Windows sections of code. If you only
run under DOS or Windows, you can force the project to build only
DOS or Windows code by either selecting the appropriate boxes in 
every screen (yeah, right) or simply USE TIMETRAK.PJX and REPLACE
SAVECODE WITH .T. (this sets the DOS or Windows code only option)
and rebuild the project.

   When editing Time Trakker screens you will find the Transporter
popping up every time you try to edit a screen. This is because
there are extra items in the respective DOS and Windows screens
and reports. Some objects don't match exactly across platforms. 
For the original screens you should simply open them as is. If you
make modifications try to keep track as to which items have changed
and only transport those. Definitely don't transport items like text
and lines, since those are most likely to be contained on one plat-
form on purpose.

   Another thing to keep in mind are picture buttons. The Transporter
unfortunately doesn't recognize that picture buttons are different
from standard text buttons. In Windows most buttons are defined as
picture buttons and when opening the screen in DOS the transporter
insists on wanting to transport the button prompts to DOS, which
results in button prompt containing the bitmap filename. To avoid
this don't tranport buttons, and make code changes manually!

   Again, if you are working only under either DOS or Windows and
don't want to be bothered by the transporter you can either just
< Open as is > or turn off the transporter altogether by setting
_TRANSPORT="" in the command window or in your CONFIG.FP(W).   


Adding Time Trakker to your own Menus
-------------------------------------
   If you plan to use Time Trakker as is either in its standalone
mode or from its existing menu you don't have to worry about
parameters used by Time Trakker. However, if you want to hook
Time Trakker into another menu or hook it into your Develop menu
as a submenu it is easy to do so.

   Time Trakker is very integrated and all menu options can be
accessed directly by calling TIMETRAK.APP with the optional
keywords. For a list of all the keywords take a look at the
POP_VAL.PRG program file, which is the distribution program of
'API' calls to Time Trakker's screens and functions.
   
   There is one complication that makes building your own menus with
Time Trakker a little tricky. TimeTrakker marks the Punch Out
option if there are pending entries that can be 'Punched Out'. You
need to let Time Trakker know by way of its parameters whether you
want to update this mark and/or where that update should occur. The
code for this feature is controlled by a procedure in TIMETRAK.PRG
called MARKBAR, in case you want to change this behavior, but by
default Time Trakker will mark both it's standalone menu bar and
the TIMETRAK.MPR 'Punch Out' options, as well as any bar that you
might supply via the 2nd and 3rd parameter. The full Time Trakker
syntax is:

   DO TIMETRAK WITH <option>,<Your Menu Popup>,;
                    <Prompt of 'Punch Out' Bar>

   All parameters are optional. Just do TIMETRAK.APP to start the
program in standalone mode. 

   Example:
      *** Start Time Trakker in standalone mode
      DO TIMETRAK    
      
      *** Start Time Trakker in standalone mode forcing POPUP in Windows
      DO TIMETRAK WITH "POPUP"
  
   If you pass the first parameter TT_option Time Trakker will
bypass the standalone menu and immediately execute the option
option signified by the parameter. Take a look at POP_VAL.PRG
to see a list of the keywords and what they do.

   Example:
      *** Run Punch Out Screen directly
      DO TIMETRAK WITH "PUNCHOUT"   
   
   The TT_popname and TT_mkbar parameters are used to mark bars
when there are open time entries (ie entries you haven't punched
out yet). By default and even without parameters Time Trakker
will automatically mark the standalone popup's (TIMETRAK) and
the default external menu popup's (TT_MENU) 'Punch Out'
options if they are active. In addition to these two default
markings you can specify another popup name and option prompt
to specify where *you* would like to place a mark when there
are open entries. This is useful for building your own menus
that use different popup names. 

   Example:
      *** Run Report Window and mark 'Time Trakker' prompt on
      *** the Develop Menu
      DO TIMETRAK WITH "REPORTS","DEVELOP","Time Trakker"    

  The easiest way to build your own Time Trakker menus is to use
the same naming conventions that I used to build TimeTrak.mpr.
TT's main popup is called TT_MENU, the Utilities pad is called
TT_UTIL. Note that all menu options are calls to Time Trakker's
API. For example:

     DO TIMETRAK WITH "TIMEIN"

   Note that the popup name and bar option parameters do not need
to be passed here, because the default menu's popup name is
TT_MENU. Note that this is the same as doing:

     DO TIMETRAK WITH "TIMEIN","TT_MENU","PUNCH OUT"

   The extra parameters aren't necessary though in this case. If
you use your own menu names you *must* pass the parameters *if*
you want to mark an option when time entries are pending.           

  Note that the Popup name is not necessarily the name displayed
on the menu bar, but rather the NAME: (or popup name in the code)
of the popup. Take a look at how TIMETRAK.MNX is set up to see
how that menu is implemented and use it as a template.
The NAME: of the main TIMETRAK.MPR popup is called TT_MENU,
the NAME: of the utilities menu is called TT_UTIL. 

  There is more information on the parameters and how they work in
the header of TIMETRAK.PRG. All appropriate code of the parameter
handling is also right there at the top of this file. The check
mark control function is located in a function called MARBAR,
also in TIMETRAK.PRG.


Standard License Information
----------------------------
   As a registered user you may use Time Trakker and modify 
its source code for your own use or for inclusion in 'custom', 
compiled applications delivered to clients as long as 
significant value is added to the application by you in
addition to the functionality of Time Trakker. A 'custom'
application in this context is an application distributed to 
one individual or a single client organization. You may use
Time Trakker in this context for as many application a you
see fit.

Unlimited License Information
-----------------------------
   The unlimited distribution license allows for inclusion of 
Time Trakker code in 'vertical' compiled applications is available
for $250.00. A vertical application in this context is an application
designed to sell to a 'general' market rather than a project being 
completed for a specific client. This license allows you distribute 
as many copies of Time Trakker as necessary within your compiled 
application. With this license you have the right to use 
Time Trakker in any of your compiled vertical applications. 

Source Code
-----------
   Under no circumstances may you sell Time Trakker directly, or
distribute the source code of Time Trakker with any of your
applications under either the standard or unlimited license.

   If you distribute applications containing all or parts of Time
Trakker's source sold to a 'general market' as a commercial or
vertical product you must contact me for an agreement on its use.

   All Time Trakker code is (c) Rick Strahl, 1993,1994 no matter how 
many modifications are made to it.

