Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where Should Public Variables be Placed
Message
De
17/06/2013 20:42:54
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01576563
Message ID:
01576585
Vues:
60
>>Sorry, I didn't got that.
>>
>>Suppose I am getting a value say _MonthPeriod='April' and _YearPeriod=2013 from CLICK event of COMBO1 and COMBO2 in my FORM1. and Than When I press COMMAND1 some calculation is performed and REPORT FORM .... Command is executed. In My Report File I have _MonthPeriod and _YearPeriod fileds. But they are displayed blank if I dont declare _MonthPeriod and _YearPeriod as PUBLIC somewhere initially,
>>
>>So I am bound to declare them as Public here. Is it not so ? Also can you please Expalin(preferbly by an example) that what exactly is difference between LOCAL, PUBLIC,PRIVATE AND GLOBAL? Where and How they should be used
>>
>>
>>
>Try

Shouldn't that be private not local?

>
>local _MonthPeriod, _YearPeriod
>
>_MonthPeriod = thisform.comboMonths.value  &&(or DisplayValue)
>
>_YearPeriod = thisform.comboYears.value && use actual names for your comboboxes
>
>REPORT FORM myReport ...
>----------------------
>Take a look at this WiKi article
>
>http://fox.wikis.com/wc.dll?Wiki~PublicAndPrivateVariables
>
>For 99% cases you should be able to use local variables. You rarely need global (public) variable and if you do, most likely it is an indication of the design problem.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform