Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading class properties without instantiating a class
Message
De
29/09/2006 16:45:59
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01158181
Message ID:
01158282
Vues:
27
This message has been marked as the solution to the initial question of the thread.
>>>Hi everybody,
>>>
>>>We may want to be able to read some class properties (set in design time) without instantiating the class. There is one class library with lots of classes. I assume, the only way to get the properties is to read through vcx? What if the class is defined in the program?
>>>
>>>What do you think?
>>>
>>>Thanks in advance.
>>
>>with VCX.properties : ALINES() + some line of code
>>
>>with PRG : APROCINFO(...,1) + some line of code
>>
>>Why you cannot load the class ?
>
>The class has some code referencing thisform in its based class (the class is a container class) and we want to run the process without user interaction in a batch mode. My other idea is to instantiate the form (make it invisible) and assign all the values using code.
>
>Anyway, that is not my project, but my colleague's and I'm just trying some ideas in his behalf...
WITH NEWOBJECT("CLASS","CLASSFILE_VCX_PRG",0)
   for p=1 to AMEMBERS(apnames,this)
     pvalue=getpem(.class,ap[p])
     * writeexpression/addproperty
   next
   * other
ENDWITH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform