Hi everybody,
I have a browser form class which calls another form. If the second form finds an error in its Init method, it doesn't instantiate. The Init returns .f. (I added Destroy method also, because we need it in MereMortals to properly clear all the references).
Now, here is the last part of the Calling form SelectRecord method (nothing follows this line of code):
if .cType = 'Payment'
lcForm = 'frmPaymentBatch'
else
lcForm = 'frmReferralBatch'
endif
=doForm(m.lcForm, c_BatchImports.cBatch_Imports_pk, .cAction)
endcase
if type('m.goApp.oRecordMGR.name') = 'C'
m.goApp.oRecordMGR.UnLockRecord( ;
alltrim(str(c_BatchImports.iBatch_Number)), "BATCH_IMPORTS")
endif
endif
endwith
The Browser form allows to Close on Deactivate by using a special property. However, this property is false for this particular form.
When I call this Batch Selector form, select record from the grid, then the Batch Details form encounteres a problem and closes, the original form tries to close to. I don't understand, why Destroy method of this form is called. Very weird...
And if I try to Exit application at this point using Exit button from the Main toolbar I'm getting "Not an object" error...
Thanks in advance for any ideas.
If it's not broken, fix it until it is.
My Blog