Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Non visual classes
Message
De
12/08/1999 08:46:50
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00252749
Message ID:
00252897
Vues:
7
Hi, Dan-

You can use the name property. But, as George pointed out, it is a native property of a custom class. All you need to change is to remove the space in the assignment. The code runs fine with that change. ("Name" cannot contain spaces.)

Also, there is a difference of opinion about whether object properties should use Hungarian notation (prefixing properties with their intended type). Nigel has pointed out that some feel you should, but some of us (I'm in this camp) feel it's not appropriate/necessary for properties as it is for code. IOW, it's really up to you, but do use your convention consistently.

>I want to create a custom (non-visual) Client class to store property values that I can have access to and change as a new client is selected. I am creating the Client class in my main.prg with the following:
>
>DEFINE CLASS Client AS Custom
> Name = 'Company 1'
> CompanyId = '1'
> DataPath = 'e:\mrs\data\'
>ENDDEFINE
>
>However, now my main.prg will not execute passed this when I run it. Am I doing something wrong, or should I just be putting it someplace else?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform