Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Missing classes in Class Browser?
Message
De
10/02/2003 00:33:22
 
 
À
09/02/2003 17:34:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00751108
Message ID:
00751280
Vues:
25
>The documetation is currently correct. You can only use the Empty class in a PRG, not in the VCX system.
>

Ken,

Once again, with all due respect, this is NOT correct. I used the empty class in a VCX based class just fine. I create a line in a vcx. Here is the code:

*TestEmpty::Init()
ADDPROPERTY(This, 'EmptyClass')

WITH This
.EmptyClass = createobj('Empty')

ADDPROPERTY(.EmptyClass, 'First',1)
ADDPROPERTY(.EmptyClass, 'Second',2)
ADDPROPERTY(.EmptyClass, 'Third',3)


.Enumerate()

ENDWITH

*TestEmpty::Enumerate()
LOCAL OutString AS Character

OutString = ""

WITH This.EmptyClass

OutString = OutString + 'First ='+TRANSFORM(.First)+CHR(10)
OutString = OutString + 'Second ='+TRANSFORM(.Second)+CHR(10)
OutString = OutString + 'Third ='+TRANSFORM(.Third)+CHR(10)

MESSAGEBOX(OutString)
ENDWITH


***********
So, it seems I 'used' the empty class in a VCX.


>You cannot subclass the Empty class at all, but the documetation does not say that you can. In fact, the docs do state:
>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.

Exactly, and this is true whether you try to DEFINE a class as empty in a PRG or a VCX. I think the doc writers confused this class which you CAN'T EVEN DEFINE/SUBCLASS with a class like session which you can only define in a PRG.

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform