Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to put startup validation code?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Where to put startup validation code?
Miscellaneous
Thread ID:
00733452
Message ID:
00733452
Views:
62
I have some code that validates customer-specific licensing information contained in an external file. If the external file is not valid, the app displays a message, then shuts down.

IF FileIsValid()
* normal startup
ELSE
* display message to user
* goApp.OnShutDown()
ENDIF

Question: Where should such code best be put in MM (I'm new to MM)? I tried putting it in the BeforeReadEvents code, but then the OnShutDown() code fails. I tried putting it in Setup.Prg but I got other errors. A few other points: (a) The file is always in the same folder as the app's exe. (b) Users are not allowed to login unless the external file validates True (this is startup security, not login security). (c) FileIsValid() makes use of routines in a procedure file whose 'Set Proc To' happens in goApp.BeforeReadEvents.

Any thoughts? TIA, - Larry
Next
Reply
Map
View

Click here to load this message in the networking platform