Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order of Instantiation
Message
De
19/06/2007 15:56:58
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
 
 
À
19/06/2007 14:04:22
John Tomblin
Service Station Systems, Inc.
San Jose, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01234334
Message ID:
01234378
Vues:
14
When I have controls that depend on other controls, such as combo boxes whose contents depend on values from another combo box, etc., an approach I often use is to have a property lInited at the form level that I set as part of the form INIT. I check in the control INIT or other method that may fire during control instantiation for thisform.lInited and if .F., not run code that will fail if the dependent control hasn't INITed yet. An example might be a control that loads with data and has an InteractiveChange event that does something to another control that might not have instantiated yet.

In my custom after_init method or just later in the form INIT, I'll sequence through the desired controls and call the methods that could have failed during instantiation to finish loading data, etc.

Gary


>Is it possible to force Foxpro to instantiate the objects on a form in a specific order? If so, how?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform