Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defining Methods in Classes for Objects Added at Runtime
Message
De
19/02/2006 14:35:56
 
 
À
19/02/2006 00:23:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01096949
Message ID:
01097424
Vues:
17
Dragan,

>
Of course, since VFP has the COMPILE command available at runtime (ever since version 6 SP 4, I think), nothing's stopping you from generating a .prg with the complete set of Define Class.... EndDefine, and adding an object based on such a class. Such an object may have any set of methods you can think of, and the text for these methods may be in memo fields of a table. These are building blocks for a potentially powerful engine, almost a system which can learn, if you like, but for some reason it's not done. Not that I know of. The probable reason for that is that we all know how to get our work done with VFP without resorting to something like that.
<

I didn't know that. I left FoxPro in 1994, so I'm getting both acquainted and reacquainted with its features and improvements. A runtime COMPILE sets up JIT possibilities. I can do this in Eiffel easily enough with the PARSE and LEX libraries, and the conditional assignment operator provides type-safe runtime assignment. The polymorphic elements can be robust, but the range of possibilities must be pre-computed. This kind of implementation, however, generates permutations in system design that can quickly get out of control.

Thank you for the insights into ADD OBJECT and Object.AddObject(). At least now I know I'm not losing my mind. BTW, I don't use the VCX facility. I guess I'm a bit old-school: Give a blank slate, I can type and program and visualize away. Put those blasted visual designers in front of me and the very last thing I can do is visualize. I see it as _my_ weakness, not VFP's.

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

Click here to load this message in the networking platform