I use an app class to set all ini path's and environment settings from the main.prg. The last line in main.prg is ".runapp('frmMenu')" from within WITH/ENDWITH. The code in oApp.runapp() is:
* opens main form of application and table, then issues Read Events
LPARAMETERS cForm_to_Run
DO FORM (cForm_to_Run)
READ EVENTS
assert vartype(oApp)='X' message 'oApp is alive !!'
IF TYPE('oApp') = 'O'
oApp = .NULL.
RELEASE oApp
CLOSE ALL
CLEAR ALL
ENDIF
The "CLEAR EVENTS" is issued in frmMenu.destroy(). When the runapp() code finishes, it returns to the main.prg and gives an error message "expression is not valid outside of With/EndWith". There is no code after ".runapp('frmMenu')" in the main.prg
Does anyone have any ideas?
Extreme Programming = Plan -> Design -> Code -> Test