>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement