Subject Re: Can't run reports from form
From Ruth Bromer <ruth@treklite.com>
Date Sun, 14 Jul 2019 19:21:36 -0400
Newsgroups dbase.getting-started
Attachment(s) genericMDIApp.ccsetup.prgARDF2019.wfmStart.prg

So, I never saw 'set procedure to :dUFLP:preview.wfm' in any of the
forms.  I do have the setup.prg execute it every so often.

I just did some testing.  First I got out of dBase and then back in.  I
went straight to the form, and it couldn't execute the reports.  Then I
ran the setup.prg and the reports worked.  I also tried entering the
'Set procedure' statement directly into the form without running
setup.prg and that worked as well.

From what I remember long, long ago, I think I'm supposed to run the
start.prg which I think runs the setup.prg and the menu form.

So, I just modified the start.prg to reference the 2019 project.  when I
executed it, it seemed to work but then I got the following message:

Error: Class does not exist: ARDF2019::ARDF2019
FIle: GenericMDIApp.cc
Routine: GENERICDMIAPP::OPEN
Line: 47

Line 47 is: &c.  T

That is after

    Function Open
       // set a reference to the menu
       private c
       c = 'this.rootMenu = new
'+this.MenuClassName+'(_app.framewin,"Root")'
       &c.

      // Make sure no forms are open
       close forms

       // Make sure we're not in "design mode"
       set design off

       // set the <Escape> key "off" but store the
       // current setting:
       this.OldEscape = set("ESCAPE")
       set escape off

       // Turn off the Visual dBASE shell, but
       // leave the MDI frame window:
       shell( false, true )

       // Turn off the application's speedBar and statusBar
       _app.speedbar  := false
       _app.statusBar := false

       // Set the text property for the application's framewin
       _app.framewin.oldText = _app.framewin.text
       _app.framewin.text    := this.FrameWinText

    Function close

Is something missing?  That statement looks kind of weird.

Ruth

On 7/14/2019 5:42 AM, Mervyn Bick wrote:
> On 2019-07-14 7:25 AM, Ken Mayer wrote:
>
>> Sleuthing, where is Previewform defined? Check the code for this. It
>> *sounds* like this is the preview.wfm file in the dUFLP, which makes
>> it then sound like somehow the program doesn't know where that file is.
>>
>> If that's the case:
>>
>> 1) Are you loading it properly with the set procedure statement?
>>     set procedure to :dUFLP:preview.wfm
>>
>> 2) If you are, is the dUFLP set correctly?
>>
>> 3) If this is in an executable, did you make sure the file was
>> included in the .exe when you built it?
>
> To expand a bit on this, you should have a separate dUFLP folder for
> each version of dBASE you use. The compiled *.??o files are not
> necessarily compatible with the different versions of dBASE.
>
> If you have removed dBASE 2.6 completely you can keep the same folder
> but you need to delete the *.??o files.  There is, however, one problem.
> FIXCORUP.ICO is not a compiled file, it is an icon.  Save a copy of this
> file somewhere handy.
>
> In dBASE select the Tables tab in the Navigator. Select the dUFLP
> folder.  In the command panel enter !del *.??o  The ! is telling dBASE
> to use the DOS del command.  All the *.??o files are gone and they can't
> be recovered so it's important that the .ico fie was saved.  Later you
> can replace the saved .ico file.   While you're there select the
> Programs tab and run setup.prg.
>
> If you installed a second copy of the dUFLP in a different folder select
> that folder and run setup.prg.
>
> Once you have run setup.prg the sourcealias :dUFLP: will find the
> correct folder and create a  .??o for the version of dBASE you are using.
>
> Mervyn.
>
>
>
>
>




/*
     GenericMDIApp.CC
     A simple custom class file that contains
     a "generic" MDI application object. This
     object, when used properly, is subclassed
     and the subclass has the following:

     set procedure to genericMDIApp.cc additive
     class TestMDIApp of genericMDIApp()
        this.FrameWinText = "Some Text for _app.framewin"
        this.MenuClassName = "MenuClassname"
     endclass

     A startup program for this would assume that you
     have a "SETUP" program, which opens any custom
     control files necessary (and does whatever else
     may be needed), instantiates the subclassed
     MDI application object, and then starts it
     with the 'start' method:

     app = new TestMDIApp()
     return ( app.open() )

*/
class GenericMDIApp

   // This custom property should be overwritten
   // in a subclass, or after instantiation, but
   // before the Open() method is invoked:
   this.FrameWinText = "Generic MDI application"

   // The same goes for this custom property:
   this.MenuClassName = "MyMainMenu"

   // We assume here that every MDI app will have
   // a SETUP.PRG
   do setup

   // Assign a property to _app.frameWin, which is
   // a reference to this object: "this".
   _app.framewin.app = this

   Function Open
      // set a reference to the menu
      private c
      c = 'this.rootMenu = new '+this.MenuClassName+'(_app.framewin,"Root")'
      &c.

      // Make sure no forms are open
      close forms

      // Make sure we're not in "design mode"
      set design off

      // set the <Escape> key "off" but store the
      // current setting:
      this.OldEscape = set("ESCAPE")
      set escape off

      // Turn off the Visual dBASE shell, but
      // leave the MDI frame window:
      shell( false, true )

      // Turn off the application's speedBar and statusBar
      _app.speedbar  := false
      _app.statusBar := false

      // Set the text property for the application's framewin
      _app.framewin.oldText = _app.framewin.text
      _app.framewin.text    := this.FrameWinText

   Function close

      // close any forms that might have been left open
      close forms

      // if we are in the "runtime" environment,
      // we want to "quit" (otherwise the framewin will
      // be left on screen)
      if ( "runtime" $ lower( version(0) ) )
         quit
      else
         // otherwise, let's reset some values:
         with ( _app )
            framewin.app  := null
            framewin.text := framewin.OldText
            speedBar      := true
            statusBar     := true
         endwith

         // go back to design mode:
         set design on
        
              // set escape back to whatever it's previous
         // state was:
              cEscape = this.oldEscape
         set escape &cEscape.

              // close any open procedures
         set procedure to

         // release the menu
         _app.framewin.root.release()

         // set the shell back ...
         shell( true, true )

      endif

endclass // don't forget this!


/*
      SETUP.PRG

      The "setup program" for the MDI ARDF2013
      application ... open any and all files
      needed to run the application and/or develop
      the application.
   */

   // These always get me -- if the program
   // crashes, and they usually do while developing --
   // (due to programmer error), the speedBar and the
   // statusBar in the IDE is not available ...  this
   // just puts them back. the MDI application class turns
   // them back off ...
   _app.speedbar  := true
   _app.statusBar := true

   // this can also cause problems:
   set design on

   // Set procedures ...:
   set procedure to START.PRG additive

   // make sure the menu is available:
   set procedure to BH2012.mnu additive

   // custom controls used by the application
   set procedure to :FormControls:SEEKER.CC     additive
   set procedure to :ReportControls:report.cc   additive
   set procedure to :dUFLP:Repcntl.cc           additive
*        set procedure to Repcntl.cc           additive
   set procedure to MyControls.cc               additive
   set procedure to CustomReportControls.cc     additive
   set procedure to SeekerSQL.cc                additive
   // add others as needed here:
   set procedure to CompetitorInfo.WFM    additive
   set procedure to PREVIEW.WFM           additive

msgbox( "The setup should now have data in it","Done", 64 )

** END HEADER -- do not remove this line
//
// Generated on 07/13/2019
//
parameter bModal
local f
f = new ARDFChampionships2019Form()
if (bModal)
   f.mdi = false // ensure not MDI
   f.readModal()
else
   f.open()
endif

class ARDFChampionships2019Form of BASEFORM from "BASE.CFM"
   set procedure to MyControls.cc additive
   with (this)
      colorNormal = "0xffaeae"
      height = 23.2727
      left = 2.5714
      top = 2.9091
      width = 99.5714
   endwith

   this.SSTITLE = new MYTITLETEXT(this)
   with (this.SSTITLE)
      left = 22.0
      width = 45.0
      colorNormal = "Blue/yellow"
      text = "ARDF Championships 2019"
   endwith

   this.PROGRAMHEADER = new MYTEXT(this)
   with (this.PROGRAMHEADER)
      height = 1.0
      left = 37.0
      top = 2.0
      width = 16.7143
      colorNormal = "0xe87d98/0x40ff00"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontSize = 12.0
      fontBold = true
      text = "Programs"
      borderStyle = 4        // Single
   endwith

   this.IMPORTLABEL = new MYTEXT(this)
   with (this.IMPORTLABEL)
      height = 1.0
      left = 1.0
      top = 3.0
      width = 23.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      transparent = false
      fontSize = 10.0
      fontBold = true
      fontItalic = false
      text = "Import Registration Data:"
      borderStyle = 3        // None
   endwith

   this.IMPORT = new MYPUSHBUTTON(this)
   with (this.IMPORT)
      onClick = class::IMPORT_ONCLICK
      height = 1.0909
      left = 25.0
      top = 3.0
      width = 7.4286
      text = "Import"
      borderStyle = 10        // Etched Out
   endwith

   this.CREATESTARTSLABEL = new MYTEXT(this)
   with (this.CREATESTARTSLABEL)
      height = 1.0
      left = 3.0
      top = 4.5
      width = 20.4286
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontSize = 10.0
      fontBold = true
      text = "Create Start Tables:"
      borderStyle = 3        // None
   endwith

   this.CREATE2MGRID = new MYPUSHBUTTON(this)
   with (this.CREATE2MGRID)
      onClick = class::M2STARTS_ONCLICK
      height = 1.0909
      left = 25.0
      top = 4.5
      width = 9.0
      text = "2 Meter"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.CREATE80MGRID = new MYPUSHBUTTON(this)
   with (this.CREATE80MGRID)
      onClick = class::M80STARTS_ONCLICK
      height = 1.0909
      left = 35.0
      top = 4.5
      width = 9.5714
      text = "80 Meter"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.CREATEFOXGRID = new MYPUSHBUTTON(this)
   with (this.CREATEFOXGRID)
      onClick = class::FOXSTARTS_ONCLICK
      height = 1.0909
      left = 45.0
      top = 4.5
      width = 9.0
      text = "FoxOring"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.CREATESPRINTGRID = new MYPUSHBUTTON(this)
   with (this.CREATESPRINTGRID)
      onClick = class::SPRINTSTARTS_ONCLICK
      height = 1.0909
      left = 55.0
      top = 4.5
      width = 9.0
      text = "Sprint"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.ADDSTARTSLABEL = new MYTEXT(this)
   with (this.ADDSTARTSLABEL)
      height = 1.0
      left = 62.0
      top = 3.0
      width = 24.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontSize = 10.0
      fontBold = true
      text = "Add Starts to Competitors:"
      borderStyle = 3        // None
   endwith

   this.ADDSTARTS = new MYPUSHBUTTON(this)
   with (this.ADDSTARTS)
      onClick = class::ADDSTARTS_ONCLICK
      height = 1.0909
      left = 88.0
      top = 3.0
      width = 7.4286
      text = "Starts"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.UPDATESTARTSLABEL = new MYTEXT(this)
   with (this.UPDATESTARTSLABEL)
      height = 1.0
      left = 3.0
      top = 6.0
      width = 20.4286
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontSize = 10.0
      fontBold = true
      text = "Update Start Tables:"
      borderStyle = 3        // None
   endwith

   this.UPDATE2M = new MYPUSHBUTTON(this)
   with (this.UPDATE2M)
      onClick = class::M2STARTS_ONCLICK1
      height = 1.0909
      left = 25.0
      top = 6.0
      width = 9.0
      text = "2 Meter"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.UPDATE80M = new MYPUSHBUTTON(this)
   with (this.UPDATE80M)
      onClick = class::M80STARTS_ONCLICK1
      height = 1.0909
      left = 35.0
      top = 6.0
      width = 9.5714
      text = "80 Meter"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.UPDATEFOX = new MYPUSHBUTTON(this)
   with (this.UPDATEFOX)
      onClick = class::FOXSTARTS_ONCLICK1
      height = 1.0909
      left = 45.0
      top = 6.0
      width = 9.0
      text = "FoxOring"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.UPDATESPRINT = new MYPUSHBUTTON(this)
   with (this.UPDATESPRINT)
      onClick = class::SPRINTSTARTS_ONCLICK1
      height = 1.0909
      left = 55.0
      top = 6.0
      width = 9.5714
      text = "Sprint"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.CREATETSHIRTTABLELABEL = new MYTEXT(this)
   with (this.CREATETSHIRTTABLELABEL)
      height = 1.0
      left = 66.0
      top = 4.5
      width = 20.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontSize = 10.0
      fontBold = true
      text = "Create T-Shirt Order:"
      borderStyle = 3        // None
   endwith

   this.CREATETSHIRTTABLE = new MYPUSHBUTTON(this)
   with (this.CREATETSHIRTTABLE)
      onClick = class::TSHIRTSCREENER_ONCLICK
      height = 1.0909
      left = 88.0
      top = 4.5
      width = 7.4286
      text = "TShirt"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.CREATETHSIRTGRIDLABEL = new MYTEXT(this)
   with (this.CREATETHSIRTGRIDLABEL)
      height = 1.0
      left = 67.0
      top = 6.0
      width = 19.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontBold = true
      text = "Create T-Shirt Grid :"
      borderStyle = 3        // None
   endwith

   this.CREATETSHIRTGRID = new MYPUSHBUTTON(this)
   with (this.CREATETSHIRTGRID)
      onClick = class::TSHIRTORDER_ONCLICK
      height = 1.0909
      left = 88.0
      top = 6.0
      width = 7.4286
      text = "TShirt"
      borderStyle = 10        // Etched Out
      colorNormal = "black/0x80ff80"
   endwith

   this.FORMSHEADER = new MYTEXT(this)
   with (this.FORMSHEADER)
      height = 1.0
      left = 36.0
      top = 9.5
      width = 17.0
      colorNormal = "0xe87d98/0x40ff00"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontSize = 12.0
      fontBold = true
      text = "Forms"
      borderStyle = 4        // Single
   endwith

   this.STARTGRIDFORMLABEL = new MYTEXT(this)
   with (this.STARTGRIDFORMLABEL)
      height = 1.0
      left = 2.0
      top = 11.0
      width = 12.4286
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontBold = true
      text = "Start Grid:"
      borderStyle = 3        // None
   endwith

   this.STARTGRIDM2FORM = new MYPUSHBUTTON(this)
   with (this.STARTGRIDM2FORM)
      onClick = class::STARTGRIDM2FORM_ONCLICK
      height = 1.0909
      left = 16.0
      top = 11.0
      width = 9.0
      text = "2 Meter"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTGRIDM80FORM = new MYPUSHBUTTON(this)
   with (this.STARTGRIDM80FORM)
      onClick = class::STARTGRIDM80FORM_ONCLICK
      height = 1.0909
      left = 26.4286
      top = 11.0
      width = 9.5714
      text = "80 Meter"
      borderStyle = 10        // Etched Out
      colorNormal = "BtnText/BtnFace"
   endwith

   this.STARTGRIDFOXFORM = new MYPUSHBUTTON(this)
   with (this.STARTGRIDFOXFORM)
      onClick = class::STARTGRIDFOXFORM_ONCLICK
      height = 1.0909
      left = 37.0
      top = 11.0
      width = 9.0
      text = "FoxOring"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTGRIDSPRINTFORM = new MYPUSHBUTTON(this)
   with (this.STARTGRIDSPRINTFORM)
      onClick = class::STARTGRIDSPRINTFORM_ONCLICK
      height = 1.0909
      left = 47.0
      top = 11.0
      width = 9.0
      text = "Sprint"
      borderStyle = 10        // Etched Out
   endwith

   this.REPORTSHEADER = new MYTEXT(this)
   with (this.REPORTSHEADER)
      height = 1.0
      left = 36.0
      top = 13.0
      width = 16.7143
      colorNormal = "0xe87d98/0x40ff00"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontSize = 12.0
      fontBold = true
      text = "Reports"
      borderStyle = 4        // Single
   endwith

   this.STARTLISTBYCLASSLABEL = new MYTEXT(this)
   with (this.STARTLISTBYCLASSLABEL)
      height = 1.0
      left = 1.0
      top = 14.5
      width = 18.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontBold = true
      text = "Start List By Class:"
      borderStyle = 3        // None
   endwith

   this.STARTM2BYCLASS = new MYPUSHBUTTON(this)
   with (this.STARTM2BYCLASS)
      onClick = class::STARTM2BYCLASS_ONCLICK
      height = 1.0909
      left = 20.0
      top = 14.5
      width = 9.0
      text = "2 Meter"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTM80BYCLASS = new MYPUSHBUTTON(this)
   with (this.STARTM80BYCLASS)
      onClick = class::STARTM80BYCLASS_ONCLICK
      height = 1.0909
      left = 30.0
      top = 14.5
      width = 9.0
      text = "80 Meter"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTFOXBYCLASS = new MYPUSHBUTTON(this)
   with (this.STARTFOXBYCLASS)
      onClick = class::STARTFOXBYCLASS_ONCLICK
      height = 1.0909
      left = 40.0
      top = 14.5
      width = 9.0
      text = "FoxOring"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTSPRINTBYCLASS = new MYPUSHBUTTON(this)
   with (this.STARTSPRINTBYCLASS)
      onClick = class::STARTSPRINTBYCLASS_ONCLICK
      height = 1.0909
      left = 50.0
      top = 14.5
      width = 9.0
      text = "Sprint"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTGRIDS = new MYTEXT(this)
   with (this.STARTGRIDS)
      height = 1.0
      left = 1.0
      top = 16.0
      width = 18.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontBold = true
      text = "Start Grids:"
      borderStyle = 3        // None
   endwith

   this.STARTLISTBYNAMELABEL = new MYTEXT(this)
   with (this.STARTLISTBYNAMELABEL)
      height = 1.0
      left = 1.0
      top = 17.5
      width = 18.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontBold = true
      text = "Start List By Name:"
      borderStyle = 3        // None
   endwith

   this.STARTLISTBYNAME = new MYPUSHBUTTON(this)
   with (this.STARTLISTBYNAME)
      onClick = class::STARTLISTBYNAME_ONCLICK
      height = 1.0909
      left = 20.0
      top = 17.5
      width = 8.0
      text = "Start"
      borderStyle = 10        // Etched Out
   endwith

   this.TSHIRTORDERLABEL = new MYTEXT(this)
   with (this.TSHIRTORDERLABEL)
      height = 1.0
      left = 1.0
      top = 19.0
      width = 13.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontBold = true
      text = "T-Shirt Order:"
      borderStyle = 3        // None
   endwith

   this.TSHIRTORDER = new MYPUSHBUTTON(this)
   with (this.TSHIRTORDER)
      onClick = class::TSHIRTORDER_ONCLICK1
      height = 1.0909
      left = 15.0
      top = 19.0
      width = 8.0
      text = "Order"
      borderStyle = 10        // Etched Out
   endwith

   this.TSHIRTORDERGRIDLABEL = new MYTEXT(this)
   with (this.TSHIRTORDERGRIDLABEL)
      height = 1.0
      left = 24.0
      top = 19.0
      width = 12.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontBold = true
      text = "T-Shirt Grid:"
      borderStyle = 3        // None
   endwith

   this.TSHIRTGRID = new MYPUSHBUTTON(this)
   with (this.TSHIRTGRID)
      onClick = class::TSHIRTGRID_ONCLICK
      height = 1.0909
      left = 37.0
      top = 19.0
      width = 8.0
      text = "Grid"
      borderStyle = 10        // Etched Out
   endwith

   this.TSHIRTSCREENERLABEL = new MYTEXT(this)
   with (this.TSHIRTSCREENERLABEL)
      height = 1.0
      left = 47.0
      top = 19.0
      width = 11.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontBold = true
      text = "T-Shirt List:"
      borderStyle = 3        // None
   endwith

   this.TSHIRTSCREENER = new MYPUSHBUTTON(this)
   with (this.TSHIRTSCREENER)
      onClick = class::TSHIRTSCREENER_ONCLICK1
      height = 1.0909
      left = 59.0
      top = 19.0
      width = 9.0
      text = "Screener"
      borderStyle = 10        // Etched Out
   endwith

   this.TSHIRTCOUNTLABEL = new MYTEXT(this)
   with (this.TSHIRTCOUNTLABEL)
      height = 1.0
      left = 70.0
      top = 19.0
      width = 13.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontBold = true
      text = "T-Shirt Count:"
      borderStyle = 3        // None
   endwith

   this.TSHIRTCOUNT = new MYPUSHBUTTON(this)
   with (this.TSHIRTCOUNT)
      onClick = class::TSHIRTCOUNT_ONCLICK
      height = 1.0909
      left = 84.0
      top = 19.0
      width = 8.0
      text = "Count"
      borderStyle = 10        // Etched Out
   endwith

   this.PACKETSLABEL = new TEXT(this)
   with (this.PACKETSLABEL)
      height = 1.0
      left = 1.0
      top = 20.5
      width = 13.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontBold = true
      text = "Packets:"
   endwith

   this.PACKETS = new PUSHBUTTON(this)
   with (this.PACKETS)
      onClick = class::PACKETS_ONCLICK
      height = 1.0909
      left = 15.0
      top = 20.5
      width = 8.0
      text = "Packets"
      borderStyle = 10        // Etched Out
   endwith

   this.EPUNCHLABEL = new TEXT(this)
   with (this.EPUNCHLABEL)
      height = 1.0
      left = 70.0
      top = 20.5
      width = 13.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontBold = true
      text = "Rental SI:"
   endwith

   this.EPUNCH = new PUSHBUTTON(this)
   with (this.EPUNCH)
      onClick = class::EPUNCH_ONCLICK
      height = 1.0909
      left = 84.0
      top = 20.5
      width = 8.0
      text = "EPunch"
      borderStyle = 10        // Etched Out
   endwith

   this.AMOUNTDUELABEL = new TEXT(this)
   with (this.AMOUNTDUELABEL)
      height = 1.0
      left = 24.0
      top = 20.5
      width = 12.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontBold = true
      text = "Amount Due:"
   endwith

   this.AMOUNTDUE = new PUSHBUTTON(this)
   with (this.AMOUNTDUE)
      onClick = class::AMOUNTDUE_ONCLICK
      height = 1.0909
      left = 37.0
      top = 20.5
      width = 8.0
      text = "AmtDue"
      borderStyle = 10        // Etched Out
   endwith

   this.DINNERLABEL = new TEXT(this)
   with (this.DINNERLABEL)
      height = 1.0
      left = 51.0
      top = 20.5
      width = 7.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 1        // Center
      fontBold = true
      text = "Dinner:"
   endwith

   this.DINNER = new PUSHBUTTON(this)
   with (this.DINNER)
      onClick = class::DINNER_ONCLICK
      height = 1.0909
      left = 59.0
      top = 20.5
      width = 8.0
      text = "Dinner"
      borderStyle = 10        // Etched Out
   endwith

   this.COMPETITORINFOLABEL = new MYTEXT(this)
   with (this.COMPETITORINFOLABEL)
      height = 1.0
      left = 61.0
      top = 11.0
      width = 16.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontBold = true
      text = "Competitor Info:"
      borderStyle = 3        // None
   endwith

   this.COMPETITORINFO = new MYPUSHBUTTON(this)
   with (this.COMPETITORINFO)
      onClick = class::COMPETITORINFO_ONCLICK
      height = 1.0909
      left = 78.0
      top = 11.0
      width = 10.0
      text = "Competitor"
      borderStyle = 10        // Etched Out
   endwith

   this.BIBNUMBERS = new MYPUSHBUTTON(this)
   with (this.BIBNUMBERS)
      onClick = class::BIBNUMBERS_ONCLICK
      height = 1.0909
      left = 25.0
      top = 7.5
      width = 7.4286
      text = "Bib"
      borderStyle = 10        // Etched Out
   endwith

   this.MYTEXT1 = new MYTEXT(this)
   with (this.MYTEXT1)
      height = 1.0
      left = 7.0
      top = 7.5
      width = 17.0
      colorNormal = "maroon/0xdda2fd"
      alignVertical = 1        // Middle
      alignHorizontal = 2        // Right
      fontBold = true
      text = "Add Bib Numbers:"
      borderStyle = 3        // None
   endwith

   this.STARTGRIDM2 = new MYPUSHBUTTON(this)
   with (this.STARTGRIDM2)
      onClick = class::STARTGRIDM2_ONCLICK
      height = 1.0909
      left = 20.0
      top = 16.0
      width = 9.0
      text = "2 Meter"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTGRIDM80 = new MYPUSHBUTTON(this)
   with (this.STARTGRIDM80)
      onClick = class::STARTGRIDM80_ONCLICK
      height = 1.0909
      left = 30.0
      top = 16.0
      width = 9.0
      text = "80 Meter"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTGRIDFOX = new MYPUSHBUTTON(this)
   with (this.STARTGRIDFOX)
      onClick = class::STARTGRIDFOX_ONCLICK
      height = 1.0909
      left = 40.0
      top = 16.0
      width = 9.0
      text = "FoxOring"
      borderStyle = 10        // Etched Out
   endwith

   this.STARTGRIDSPRINT = new MYPUSHBUTTON(this)
   with (this.STARTGRIDSPRINT)
      onClick = class::STARTGRIDSPRINT_ONCLICK
      height = 1.0909
      left = 50.0
      top = 16.0
      width = 9.0
      text = "Sprint"
      borderStyle = 10        // Etched Out
   endwith


/*






















































































*/
   function ADDSTARTS_onClick
      set procedure to AddStartsToCompetitor additive
      do AddStartsToCompetitor        
   return

   function AMOUNTDUE_onClick
      set procedure to AmountDue.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "AmountDue.rep"
      fPreview.Open()      
   return

   function BIBNUMBERS_onClick
      set procedure to AddBibNumbersToCompetitor additive
      do AddBibNumbersToCompetitor        
   return

   function COMPETITORINFO_onClick
      set procedure to CompetitorInfo.wfm additive
      local f
      f = new CompetitorInfoForm()
      // call the code we created elsewhere to actually open the form
      class::openForm( f )
   return

   function DINNER_onClick
      set procedure to Dinner.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "Dinner.rep"
      fPreview.Open()      
   return

   function EPUNCH_onClick
      set procedure to EPunch.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "EPunch.rep"
      fPreview.Open()      
   return

   function IMPORT_onClick
      set procedure to ImportRegData additive
      do ImportRegData
   return

   function STARTGRIDM2_onClick
      set procedure to StartGridM2.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "StartGridM2.rep"
      fPreview.Open()      
   return

   function STARTGRIDM80_onClick
      set procedure to StartGridM80.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "StartGridM80.rep"
      fPreview.Open()      
   return

   function STARTGRIDFOX_onClick
      set procedure to StartGridFox.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "StartGridFox.rep"
      fPreview.Open()      
   return

   function STARTGRIDSPRINT_onClick
      set procedure to StartGridSPRINT.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "StartGridSprint.rep"
      fPreview.Open()      
   return

/*
   function COURSECOUNTS_onClick
      set procedure to CourseCounts.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "CourseCounts.rep"
      fPreview.Open()      
   return

   function CREATECOURSECOUNTS_onClick
      set procedure to CreateCourseCounts additive
      do CreateCourseCounts        
   return
*/

   function M2STARTS_onClick
      set procedure to CreateM2Grid additive
      do Create2MStarts        
   return

   function M2STARTS_onClick1
      set procedure to CreateStartTimesM2 additive
      do CreateStartTimesM2        
   return

        function M80STARTS_onClick
      set procedure to CreateM80Grid additive
      do Create80MStarts        
   return

   function M80STARTS_onClick1
      set procedure to CreateStartTimesM80 additive
      do CreateStartTimesM80        
        return
        

        function FOXSTARTS_onClick
      set procedure to CreateFoxGrid additive
      do CreateFoxStarts        
   return

   function FOXSTARTS_onClick1
      set procedure to CreateStartTimesFox additive
      do CreateStartTimesFox        
   return

        function SPRINTSTARTS_onClick
      set procedure to CreateSprintGrid additive
      do CreateSprintStarts        
   return

   function SPRINTSTARTS_onClick1
      set procedure to CreateStartTimesSprint additive
      do CreateStartTimesSprint        
   return

   function STARTGRIDM2FORM_onClick
      set procedure to StartGridM2.wfm additive
      local f
      f = new StartGridM2Form()
      // call the code we created elsewhere to actually open the form
      class::openForm( f )
   return

   function STARTGRIDM80FORM_onClick
      set procedure to StartGridM80.wfm additive
      local f
      f = new StartGridM80Form()
      // call the code we created elsewhere to actually open the form
      class::openForm( f )
   return

   function STARTGRIDFOXFORM_onClick
      set procedure to StartGridFox.wfm additive
      local f
      f = new StartGridFoxForm()
      // call the code we created elsewhere to actually open the form
      class::openForm( f )
   return

   function STARTGRIDSPRINTFORM_onClick
      set procedure to StartGridSprint.wfm additive
      local f
      f = new StartGridSprintForm()
      // call the code we created elsewhere to actually open the form
      class::openForm( f )
   return

   function STARTLISTBYNAME_onClick
      set procedure to StartList.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "StartList.rep"
      fPreview.Open()
   return

   function STARTM2BYCLASS_onClick
      aParams = new assocarray()
      aParams["headText"] = "2 Meter Start List by Class "
      aParams[ "eventDate" ] = "Event Date: Saturday August 3, 2019"
      aParams["sqlFile"] = "@StartM2ByClass.sql"
      fPreview = new PreviewForm()
      fPreview.bModal = true
      fPreview.params = aParams
      fPreview.viewer.fileName := "startbyclass.rep"
      fPreview.Open()
   return

   function STARTM80BYCLASS_onClick
      aParams = new assocarray()
      aParams["headText"] = "80 Meter Start List by Class "
      aParams[ "eventDate" ] = "Event Date: Sunday August 4, 2019"
      aParams["sqlFile"] = "@StartM80ByClass.sql"
      fPreview = new PreviewForm()
      fPreview.bModal = true
      fPreview.params = aParams
      fPreview.viewer.fileName := "startbyclass.rep"
      fPreview.Open()
   return

   function STARTFOXBYCLASS_onClick
      aParams = new assocarray()
      aParams["headText"] = "FoxOring Start List by Class "
      aParams[ "eventDate" ] = "Event Date: Thursday August 1, 2019"
      aParams["sqlFile"] = "@StartFoxByClass.sql"
      fPreview = new PreviewForm()
      fPreview.bModal = true
      fPreview.params = aParams
      fPreview.viewer.fileName := "startbyclass.rep"
      fPreview.Open()
   return

   function STARTSPRINTBYCLASS_onClick
      aParams = new assocarray()
      aParams["headText"] = "Sprint Start List by Class "
      aParams[ "eventDate" ] = "Event Date: Friday August 2, 2019"
      aParams["sqlFile"] = "@StartSprintByClass.sql"
      fPreview = new PreviewForm()
      fPreview.bModal = true
      fPreview.params = aParams
      fPreview.viewer.fileName := "startbyclass.rep"
      fPreview.Open()
   return

   function TSHIRTCOUNT_onClick
      set procedure to TShirtCount.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "TShirtCount.rep"
      fPreview.Open()      
   return

   function TSHIRTGRID_onClick
      set procedure to TShirtOrderGrid.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "TShirtOrderGrid.rep"
      fPreview.Open()      
   return

   function TSHIRTSCREENER_onClick
      set procedure to Screener additive
      do Screener        
   return

   function TSHIRTSCREENER_onClick1
      set procedure to Screener.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "Screener.rep"
      fPreview.Open()      
   return

   function TSHIRTORDER_onClick
      set procedure to CreateTShirtOrderGrid additive
      do CreateTShirtOrderGrid        
   return

   function TSHIRTORDER_onClick1
      set procedure to TShirtOrder.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "TShirtOrder.rep"
      fPreview.Open()      
   return

   function OpenForm( oForm )
      set procedure to StartByClass.rep additive
       set procedure to :FormControls:SEEKER.CC additive
     // set the top/left properties so the form isn't *right* on top
     // of the current one ...
     if type( "_app.framewin.currentForm" ) == "O"
        oForm.top  := _app.framewin.currentForm.top + 2
        oForm.left := _app.framewin.currentForm.left + 2
     else
        oForm.top  := 0
        oForm.left := 10
     endif
     oForm.open()
     oForm.setFocus()
  return

   function PACKETS_onClick
      set procedure to Packet.rep additive
      fPreview = new PreviewForm()
      // to open with ReadModal()
      fPreview.bModal = true
      fPreview.viewer.fileName := "Packet.rep"
      fPreview.Open()      
   return

   function CLOSE_onClick
      // close current form if there is one
      if type( "_app.framewin.currentForm" ) == "O"
         _app.framewin.currentForm.close()
      else
         msgbox( "The currently active form cannot be closed "+;
                 "with this option.","Can't do it!", 64 )
      endif
   return

endclass



   /*
       START.PRG
       Author: Ken Mayer
       Date  : November 8, 1999
       Modified: Ocotber 2, 2013
                 modified: July 14, 2019

       ARDF Championships 2019 project START program

       This program is used to start the ARDF2019
       application.

       There is a reference to another .CC, which is
       the genericMDIApp.CC file -- this contains
       the generic application object, and below we
       subclass it ...

       The idea is that you have a lot of "things" that
       you always do for any application that is
       an MDI app. You create one object that handles
       all of that, and then you subclass that for
       the specifics for an application, as each is
       at least slightly different.
   */

local app
set talk off
set procedure to GenericMDIApp.cc additive
app = new ARDF2019App()
app.open()
return

class ARDF2019App of GenericMDIApp
   // set any specific code for the subclassed
   // MDI application here:

   this.FrameWinText = "dBASE Plus ARDF2019 Project"

   // note this is not the file name -- the
   // SETUP program must execute "set procedure ..." that
   // will open the file "ARDF2019.mnu" ... the class
   // will be available from that point on. This is
   // the classname of the menu:

   this.MenuClassName = "ARDF2019"

endclass