Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application object won't die
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Application object won't die
Miscellaneous
Thread ID:
00594471
Message ID:
00594471
Views:
46
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
Next
Reply
Map
View

Click here to load this message in the networking platform