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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only