Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public variables become Private
Message
De
20/02/1997 11:24:04
Narendra Lilaramani
Gentech Business Machines Ltd
Ahmedabad, Inde
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00021278
Message ID:
00021311
Vues:
46
>>>
>>> >I created one form in which I used scatter memvar command. Now these
>>> variables were public & so available
>>> >throughout the form.
>>> >Now I call this form from a program. This time scatter
>>> >memvar does not created public variables but they were
>>> >private.
>>> >What is this??Can anybody help me so that if I call the
>>> >form from a program and these varibles remain public.
>>> >Otherwise I have to go into each of my forms & change
>>> >handling of some parts.
>>> >
>>> >Thanks
>>> >Narendra
>>>
>>> i'd recommend against using public variables. if you issue 'scatter
>>> memvar' command from command window, the variables are public. if issued
>>> from within form, the variables are (by default, i think) private to that
>>> form.
>>
>>I'd say they are private to the method that issued the scatter memvar
>>statement, making it perfectly unusable...
>>
>>Marc
>
>if issued in a method, yes. this looked like a 2.6 question (to me, anyhow), so i gave a 2.6 answer. hope i didn't cause too much trouble.


The variables are PUBLIC if they are issued from the "form". I
do this in form's load event. But if I say "DO form form_name"
from a program (.prg file) variables become private.

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

Click here to load this message in the networking platform