Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Define Class ... As ?
Message
 
 
À
17/05/2006 12:24:09
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01122798
Message ID:
01122837
Vues:
13
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform