General information
Category:
The Mere Mortals Framework
Armin,
Thanks for your feedback and thoughts. Putting the code in the init() worked fine, although I kept getting a "Unknown member ." message on the This.Cleanup() line. I commented out this line and it seems to work fine now. Will I be screwing something up if the Cleanup() does not run? Thanks again,
- Larry
Hi Larry,
>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.
as Chris already mentioned, the application object is a good place. I'd like to recommend that you put that code in the app class PreInitHook() method, but there seems to be an issue that the cleanup code isn't really run in case you're returning .F. from there. I don't know if this could cause any trouble, but IMO, the safer way is to use the Init() at the moment.
*-- YourApplicationClass.Init()
IF NOT FileIsValid()
* display message to user
This.CleanUp()
RETURN .F.
ELSE
RETURN DODEFAULT()
ENDIF
Previous
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