I’m trying to make sure that
SET ASSERTS ON
is set in my application.
I issue the command in the StartMM.Prg so that it is available during normal development work. Then I start the application ( via do Main ) and find that it is changed to OFF. Doing a little code tracing I see that the cGlobalEnvironment has changed it.
In the application object code there is a CreateGlobalEnvironmentObj method. I added the following code:
DODEFAULT( )
This.oEnvironment.cAssert = [ON]
That did not help, then I tried this:
DODEFAULT( )
This.oEnvironment.cAssert = [ON]
This.oEnvironment.Set( )
That fixed it, but it seems a both like a kludge and inefficient. Inefficient because it appears that after every change ( or group of changes ) to a Set command the oEnvironment.Set( ) will have to be called, and 99% of the code in that method does need to run for any limited amount of Set Changes. Is that correct?
Is there a better/more MM standard way of changing the standard SET settings then what I’ve done? Yes I have read pages 362-364 of the dev guide ( MM 7.0 ) and they are of some help, but I was not able to get a solution via reading that.