Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do .. with... endwith
Message
De
30/06/1998 13:22:00
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00112459
Message ID:
00113013
Vues:
31
>Have a look at the online help topic for With...Endwith. it explains it fully. An example of use might be:
>
>Instead of:
>
>thisform.pgfMain.pagEmployees.text1.enabled=.f.
>thisform.pgfMain.pagEmployees.text2.enabled=.t.
>thisform.pgfMain.pagEmployees.text3.enabled=.f.
>
>You can do this:
>
>WITH thisform.pgfMain.pagEmployees
> .text1.enabled=.f. && Now I don't need the whole object refrerence
> .text2.enabled=.t.
> .text3.enabled=.f.
>ENDWITH
>
>It's just a shortcut in typing out code.
Hi,
Sure it's a a shortcut in typing but not all that is. It's more important for it eliminates the search of "thisform.pgfMain.pagEmployees" object 3 times hence there is a speed gain which of course may not be noticed in 3 lines.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform