Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Non visual classes
Message
From
12/08/1999 08:46:50
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00252749
Message ID:
00252897
Views:
9
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform