Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional Best Practice
Message
De
26/07/2001 11:11:22
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
 
À
26/07/2001 11:00:42
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00535738
Message ID:
00535753
Vues:
25
>Often I code with logic like the following:
>
>
>If PemStatus(This.cbo_TypeDesc,'cSourceAlias',5) = .F.
>   This.cbo_TypeDesc.mInitSQL
>Endif
>If PemStatus(This.cbo_MFSystem,'.cSourceAlias',5) = .F.
>   This.cbo_MFSystem.mInitSQL
>Endif
>If PemStatus(This.cbo_Code,'cSourceAlias',5) = .F.
>   This.cbo_Code.mInitSQL
>Endif
>If PemStatus(This.cbo_FullDesc,'cSourceAlias',5) = .F.
>   This.cbo_FullDesc.mInitSQL
>Endif
>
>
>It seems redundant. Is there a better way? Thanks!
>
>Regards, Renoir


Hi,

So, the first thing is to ask what you are doing here. You seem to have a number of combo boxes and, if any have a cSourceAlias property, then you call their mInitSQL method.

I guess that you have created the combos from a combo class, subclassed from the combo control in order to create the version with the cSourceAlias property, so why not just put a mandatory call to mInitSQL in the init or refresh (whichever is appropriate) method of the combo class that you have based these controls on.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform