Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Custom classes instead of global variables
Message
De
17/01/2000 15:37:49
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00319087
Message ID:
00319186
Vues:
10
>I'm trying to make a class to hold variables that I need to be public. I'm a bit confused, though, on how to do it. Here's my main program:
>
>
>PROCEDURE main
>
>PUBLIC goSettings
>
>DEFINE CLASS settings AS CUSTOM
>   CurClient = ""
>   CurProject = ""
>   CurUser = ""
>ENDDEFINE
>
>goSettings = CREATEOBJECT('settings')
>
>ENDPROC
>
>
>When I try to compile it, it stops on the goSettings = line and tells me it's not in a procedure. It looks like it's in a procedure to me. What is it that it's not liking?
>

You can't have an in-line class declaration.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform