Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another Speed Thingy
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00843972
Message ID:
00844034
Vues:
17
Hi, Nigel.

>Controls on oForm need to call methods in oChild. There will be quite a few calls on each form.
>
>The scenarios...
>
>A) oForm.Control calls Procedure which in turn calls oParent.oChild.Method
>
>B) oForm.Control calls oParent.Method which in turn calls oParent.oChild.Method

I think that if you always know oParent will be there, you can put a method in it to check for oChild, instantiate it if it not already there, then make the call.

Except this is done in very tight loops, I don't think it will have any perceptible impact on performance. If that is the case, the best approach could be to have a method that ensure oChild is properly setup, and then let the loop make the call directly, without any check.

In any case, if you are using VFP 8, the best approach could be make the call inside a Try/Catch structure.

Hope this helps,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform