Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
How can I tell if a class exists?
I have a visual class library (VCX) with several classes in it. Is there a way to tell if a class exists (not necessarily instatiated) in a class library? This is what I have right now. It works, but it has to instatiate the object to determine whether the class exists. This slows down my application among other things.
LPARAMETERS tcObject
LOCAL llRetVal
LOCAL loObject
loObject = CREATEOBJECT(tcObject) && Create object
llRetVal = (TYPE("loObject.Name") == "C") && True=Class exists
IF llRetVal && If class exists...
loObject.Release() && Release object
ENDIF
RETURN llRetVal
The error event catches and ignores error 1733 (Class definition is not found).
Thanks in advance for any help!
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