>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
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