Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Destroy method of biz object is not fired when it's real
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00989209
Message ID:
00989443
Vues:
44
>Another issue I bumped into was that releasing a child-object, 'inside' the child was also unpredictable. I found that 'setting focus' to, or 'activating' the parent (or container object) and then releasing the 'child' (from it's parent) gave predictable results.
>
>In summary - for timing issues - changing the objects type resolved the problem. For child.release issues, it seems better to have the parent release the child, rather than having the child release itself.

I found that form does have some code to cleanup everything:
IF TYPE("This.RefBizObj") == "O"
	lnObjCount = This.RefBizObj.GetObjectCount()
	FOR lnBizObj = lnObjCount TO 1 STEP -1
		loBizObj = This.RefBizObj.Get(lnBizObj)
		IF TYPE('loBizObj') == 'O' AND NOT ISNULL(loBizObj)
			ThisForm.UnregisterBizObj(loBizObj)
			loBizObj.UnregisterAllChildren()
			loBizObj.oParentBizObj = .NULL.
		ENDIF
	ENDFOR
ENDIF
So the problem appears only when the object is instantiated independently.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform