Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another Speed Thingy
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00843972
Message ID:
00844034
Views:
16
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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform