PROCEDURE setsets
c:\covprofileaddin\922version\covperfaddin.scx
form1.setsets
.sct
THISFORM.oldescape=SET("Escape")
setsets
THISFORM.nolddecimals=SET("Decimals")
thisform.oldexact=SET("Exact")
thisform.oldmemowidth=SET("Memowidth")
SET ESCAPE ON
SET DECIMALS TO 6
SET MEMOWIDTH TO 255
PROCEDURE Load
form1.Load
THISFORM.setsets()
Load
THISFORM.WIDTH=_SCREEN.WIDTH-10
THISFORM.HEIGHT=_SCREEN.HEIGHT-80
THIS.TOP=2
THISFORM.AUTOCENTER=.T.
PROCEDURE Init
form1.Init
THISFORM.ocovobj=covobj  &&store reference to CP
Init
THISFORM.ocovobjtype=VARTYPE(THISFORM.ocovobj)
thisform.classlib=JUSTPATH(SYS(1271,thisform))+'\covaddin.prg'
IF !FILE(thisform.classlib)
SET PROCEDURE TO (this.classlib)
IF USED('covperf')
IF TYPE("_ocoverage ")="O"  AND !THISFORM.ocovobjtype="O"  &&Coverage profiler is open&&Coverage profiler is open but this was not started as addin
IF THISFORM.ocovobjtype="C"  &&passed logfile or saved dbf file
IF EMPTY(THISFORM.logdbf)  &&wasn't passed a dbf
IF !THISFORM.ocovobjtype="O"  && not called as addin
IF EMPTY(THISFORM.tcfile)
THISFORM.tcfile=GETFILE('log,txt',"Open Coverage Log","Open",1,"Select a coverage log")
tlUnattended=.T.
tcAddIn=""
ON ERROR * && bug:bug try catch with VFP8+
THISFORM.tcfile, tlUnattended, tcAddIn)
SET SYSMENU TO
c:\covprofileaddin\922version\demoproject\demo.mpr
.mpx
SET SYSMENU AUTOMATIC
MESSAGE "Creates, opens, saves, prints files or quits Visual FoxPro"
MESSAGE "Edits text or current selection"
MESSAGE "Changes display options"
MESSAGE "Sets options, runs Wizards and other tools"
MESSAGE "Runs, debugs, compiles, and suspends programs"
MESSAGE "Manipulates windows, displays Command and Data Session windows"
MESSAGE "Displays Help on Visual FoxPro"
ON PAD _msm_file OF _MSYSMENU ACTIVATE POPUP _mfile
ON PAD _msm_edit OF _MSYSMENU ACTIVATE POPUP _medit
ON PAD _msm_view OF _MSYSMENU ACTIVATE POPUP _mview
ON PAD _msm_tools OF _MSYSMENU ACTIVATE POPUP _mtools
ON PAD _msm_prog OF _MSYSMENU ACTIVATE POPUP _mprog
ON PAD _msm_windo OF _MSYSMENU ACTIVATE POPUP _mwindow
ON PAD _msm_systm OF _MSYSMENU ACTIVATE POPUP _msystem
DEFINE POPUP _mfile MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Creates a new file"
MESSAGE "Opens an existing file"
MESSAGE "Closes the current file"
MESSAGE "Closes all windows"
PICTRES _mfi_sp100
MESSAGE "Saves changes to the current file"
MESSAGE "Saves changes to the current file with a new name"
MESSAGE "Saves the current file as HTML"
MESSAGE "Reverts the current file to the last saved version"
PICTRES _mfi_sp200
MESSAGE "Imports a Visual FoxPro file or a file from another application"
MESSAGE "Exports a Visual FoxPro file to another application's file"
PICTRES _mfi_sp300
MESSAGE "Changes the page layout and printer settings"
MESSAGE "Displays full pages as they will be printed"
MESSAGE "Prints a text file, report, label, contents of the Command window, or contents of the Clipboard"
MESSAGE "Displays Mail window for sending e-mail"
PICTRES _mfi_sp400
MESSAGE "Quits Visual FoxPro"
DEFINE POPUP _medit MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Undoes the last command or action"
MESSAGE "Repeats the last command or action"
PICTRES _med_sp100
MESSAGE "Removes the selection and places it onto the Clipboard"
MESSAGE "Copies the selection onto the Clipboard"
MESSAGE "Pastes the contents of the Clipboard"
MESSAGE "Pastes the Clipboard contents as a linked object, embedded object, or other object type"
MESSAGE "Removes the selection and does not place it onto the Clipboard"
PICTRES _med_sp200
MESSAGE "Selects all text or items in the current window"
PICTRES _med_sp300
MESSAGE "Searches for specified text"
MESSAGE "Replaces specified text with different text"
PICTRES _med_sp400
MESSAGE "List members of the selected object"
MESSAGE "Quick information on the selected object"
PICTRES _med_sp500
MESSAGE "Bookmark options"
DEFINE BAR 19 OF _medit PROMPT "\-"
MESSAGE "Embeds an object in a General field type"
MESSAGE "Edits the selected object"
MESSAGE "Opens linked files or changes links"
DEFINE BAR 23 OF _medit PROMPT "\-"
MESSAGE "Set editor properties"
ON BAR 18 OF _medit ACTIVATE POPUP _med_bkmks
DEFINE POPUP _med_bkmks MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Adds a Shortcut for current line"
MESSAGE "Toggles bookmark for current line"
MESSAGE "Go to the next bookmark or shortcut in the file"
MESSAGE "Go to the previous bookmark or shortcut in the file"
DEFINE POPUP _mview MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Shows, hides, or customizes toolbars"
DEFINE POPUP _mtools MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Runs the selected wizard"
PICTRES _mtl_sp100
MESSAGE "Creates, deletes, or revises a keyboard macro"
MESSAGE "Runs the Class Browser"
MESSAGE "Runs the Component Gallery"
MESSAGE "Browse installed OLE objects"
MESSAGE "Runs the IntelliSense Manager"
MESSAGE "Runs the Task Pane application"
MESSAGE "Displays the toolbox to assist in application development"
PICTRES _mtl_sp200
MESSAGE "Beautify a program"
MESSAGE "Displays the Task List window"
MESSAGE "Displays the Document View window"
MESSAGE "Runs the Code References application"
PICTRES _mtl_sp300
MESSAGE "Runs the Coverage Profiler"
MESSAGE "Display the Breakpoints dialog"
MESSAGE "Displays the debugger"
PICTRES _mtl_sp400
MESSAGE "Changes various categories for Visual FoxPro options"
ON BAR 1 OF _mtools ACTIVATE POPUP _mwizards
DEFINE POPUP _mwizards MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Runs the Table Wizard"
MESSAGE "Runs the Query, Cross-Tab, Graph, Local View, and Remote View Wizards"
MESSAGE "Runs the Form and One-to-Many Form Wizards"
MESSAGE "Runs the Report and One-to-Many Report Wizards"
MESSAGE "Runs the Label Wizard"
MESSAGE "Runs the Mail Merge Wizard"
MESSAGE "Runs the PivotTable Wizard"
MESSAGE "Runs the Import Wizard"
MESSAGE "Runs the Documenting Wizard"
MESSAGE "Runs the Upsizing Wizard"
MESSAGE "Runs the Application Wizard"
MESSAGE "Runs the Database Wizard"
MESSAGE "Runs the Web Publishing Wizard"
MESSAGE "Runs the Web Services Wizard"
MESSAGE "Displays a list of all wizards"
DEFINE POPUP _mprog MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Runs a program, application, form, report, query, or menu"
MESSAGE "Stops running the current program"
MESSAGE "Resumes running the current suspended program"
MESSAGE "Suspends the currently running program"
PICTRES _mpr_sp100
MESSAGE "Compiles the current or selected program"
DEFINE POPUP _mwindow MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Arranges windows as cascading tiles"
MESSAGE "Arranges windows as non-overlapping tiles"
PICTRES _mwi_sp100
MESSAGE "Enable docking of this window"
MESSAGE "Hides the active window"
MESSAGE "Hides all windows"
MESSAGE "Shows all hidden windows"
PICTRES _mwi_sp200
MESSAGE "Clears text from the application workspace or the current output window"
MESSAGE "Cycles through all open windows"
MESSAGE "Displays the Command window"
MESSAGE "Displays the Data Session window"
MESSAGE "Display the Properties window"
DEFINE POPUP _msystem MARGIN RELATIVE SHADOW COLOR SCHEME 4
MESSAGE "Locates Help topics based on keywords you enter"
MESSAGE "Provides access to MSDN Search tab."
PICTRES _mst_sp100
MESSAGE "Provides information on how to obtain additional technical help"
MESSAGE "Launches your web browser to go to Visual FoxPro's Web sites"
PICTRES _mst_sp300
MESSAGE "Displays version and copyright information about Visual FoxPro"
CD JUSTPATH(SYS(16))
c:\covprofileaddin\922version\demoproject\demo.prg
.fxp
olderror=ON("error")
x=1
y=1
USE demo IN 0
USE demochild IN 0
ON ERROR errh()
insert into demochild values("12","12")
insert into demochild values("1","1")
oform=NEWOBJECT('frmotherlib',"demo2.vcx")
KEYBOARD '{ESC}'
REPORT FORM report1 preview
doevents
DO demo.mpr
SET SYSMENU TO default
DO demoquery.qpr
c:\covprofileaddin\922version\demoproject\demo.vcx
frmsameclasslib.Init
frmsameclasslib
.vct
DODEFAULT()
x=100
y=111
FOR zz=1 TO y
x=x+1
ENDFOR
WHERE  Demo.f1 = "1"
c:\covprofileaddin\922version\demoproject\demoquery.qpr
.qpx
PROCEDURE BeforeOpenTables
c:\covprofileaddin\922version\demoproject\report1.frx
dataenvironment.BeforeOpenTables
.frt
WAIT WINDOW "BeforeOpenTables" TIMEOUT 1
BeforeOpenTables