Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ClassLibrary Confusion
Message
De
12/08/1998 17:47:01
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
À
12/08/1998 16:14:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00126238
Message ID:
00126282
Vues:
22
>I was looking at the Tastrade example included with VFP and compared the class TasTrade in Main.VCX to its parent
>Application in TsGen.VCX.
>
>Why does the ClassLibrary in Tastrade show it
>ClassLibrary as TsGen.VCX when it is clearly in
>Main.VCX? The parentclass is set to Application for
>Tastrade and it is custom for the Application class.
>
>All this makes sense except for the classlibrary value
>for the TasTrade. I would think it should be Main.VCX
>not TsGen.VCX.
>
>Can someone enlighten me?

What the property ClassLibrary gives you is ...
The Class Library of "ParentClass".

The Class TasTrade is a sub-class of application(inside tsgen.vcx)
Thus ClassLibrary reveals its location as tsgen.vcx

ClassLibrary gives the class library of the class itself if it has no user defined parent and is based on the prepackaged baseclasses that come with vfp

if ParentClass <> Baseclass then
ClassLibrary = the location of the class library of ParentClass
endif

if ParentClass = BaseClass then
ClassLibrary = the location of the class library itself
endif


The wording in the information and help files is confusing and loose usage of object oriented programming terms makes the confusion even worse.
I for one do not know the "official" academic definition of these terms.

HTH ,
Dave.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform