Information générale
Catégorie:
Codage, syntaxe et commandes
>>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
Even beetr, use form properties, as apposed to variables..
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement