Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
It's a mystery
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
It's a mystery
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01105403
Message ID:
01105403
Vues:
74
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
* Now unlock that record
		if type('m.goApp.oRecordMGR.name') = 'C' && Make sure the oRecordMGR exists
			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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform