Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scope of variables
Message
De
13/03/1998 03:32:37
 
 
À
13/03/1998 02:38:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00084372
Message ID:
00084375
Vues:
28
>I've noticed that any variables defined (specifically, with a SCATTER MEMVAR) in the Init method cannot be seen from elsewhere in a form. Is there a different place that I put declarations so that variables are seen in the rest of the form?
>
>Thanks!
>David Chan

David,

Variables scattered from a table, behave like all other variables declared in a method - when the method goes, so do the variables.

You have to use a different mind set for developing under visual as opposed to fox 2.x. The best way to put fields from a table on to a form is to use bound controls ( as you have always been told to avoid in 2.x!!). Then you have a 'memory variable' pointer to the field in the form of

THISFORM.FieldName.Value

If you must scatter your variables though - converted form?, scatter them before you run the form. This should only be used in modal forms - (the variables would obviously clash if you tried running the same form more than once!) - if at all :-)

Hope this helps

Ian
regards

Ian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform