Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define Class ... As ?
Message
 
 
To
17/05/2006 12:24:09
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01122798
Message ID:
01122837
Views:
15
>>>I have to define a class in code. What is the most lightweight VFP base class to specify as the parent class? We used to use Line--is there a better option now?
>>>
>>>EXAMPLE:
>>>DEFINE CLASS MyClass AS Line
>>>... (more stuff here)
>>>ENDDEFINE
>>
>>You can try EMPTY class.
>
>Anything but EMPTY - because it can't be subclassed. You get a "class name is invalid" error, which is a bit misleading. From help:
>
>The Empty base class contains no intrinsic properties, methods or events. You cannot subclass or add custom methods and events to the Empty class. However, at run time, you can add custom properties using the ADDPROPERTY( ) function or the SCATTER NAME...ADDITIVE command.

Good point.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform