This is the reason I no longer test my code in the same session I'm
programming.

I have an icon, and a menu option that launches vfp9 with a parameter of a
special config.fpw.
It is simple:
        resource=off
        Title=PCPLUS115-CODE
        command=Do C:\Work\Pc115Source\Resource\StartUp-Code.prg

The startup-code.prg can be anything you need to start your application. 

The application I work on runs in the _Screen as a Multiple Document
Interface (MDI).
Modal forms are rare. 
My startup-code.prg has this basic structure:
    CLEAR ALL
    =runpc()
    Procedure runpc
        LOCAL DebugObject
        DebugObject = CreateObject("DebugClass")
        DO Main.prg
        ON ERROR
        ON SHUTDOWN
        RELEASE ALL
        CLEAR ALL
    EndProc
    Define Class DebugClass as Custom
    Procedure Init
        If WExist("Standard")
            Hide Window "Standard"
        EndIf
        BindEvent(_Screen, "RightClick", THIS, "ScreenRightClickEvent")
    EndProc
    Procedure ScreenRightClickEvent
        THIS.ScreenRightClickHandler()
    EndProc
    Procedure ScreenRightClickHandler
        LOCAL BarNumber
        BarNumber = 0
        Define Popup rclk Shortcut Relative Color Scheme 3 From MRow(),
MCol()
        Define Bar 1 of rclk Prompt "Open Debugger"
        Define Bar 2 of rclk Prompt "Open Data Session Window"
        On Selection Popup rclk BarNumber = BAR()
        Activate Popup rclk
        Do Case
            Case BarNumber = 1
                DEBUG
            Case BarNumber = 2
                SET
        EndCase
        Release Popups rclk
        Clear Program
    EndProc
    Procedure Destroy
        If WExist("Standard")
            Show Window "Standard"
        EndIf
        If MessageBox("Keep Open?", 4, _Screen.Caption, 750) <> 6
            QUIT
        EndIf
    EndProc
    EndDefine


If you put an error method in the DebugClass, you can capture errors with
the Right Click popup menu code in it.

Tracy Pearson
PowerChurch Software


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to