Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How much faster or slower is to use with..endwith?
Message
De
20/08/2000 16:48:52
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00407175
Message ID:
00407178
Vues:
31
Hi Alex,
I think I saw Christof write that if you reference more than 3 items, use WITH. Otherwise, the overhead of the WITH may be more than the work to address each item. I use WITH with greater than two items. I'm sure if you had two items a mile deep in dots, it might help with two items, but if it's hard to tell, it must not matter much.

>I have a form with several bizobjs and I need to set properties in all of them.
>
>For example, and I now use:
>
Thisform.bizobj1.vp = 1
>Thisform.bizobj1.requery()
>
>Thisform.bizobj2.vp = 3
>Thisform.bizobj2.requery()
>What is the speed change if instead I decide for:
>
with thisform
>    with .bizobj1
>        .vp = 1
>        .requery()
>    endwith
>    with .bizobj2
>        .vp = 3
>        .requery()
>    endwith
>endwith
>What criteria should I use to choose either way of doing this?
>
>Thanks!
>
>Alex
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform