General information
Category:
The Mere Mortals Framework
Title:
Where to put startup validation code?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only