Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding run-time code to a header - grid control
Message
De
14/10/2005 11:23:50
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
14/10/2005 09:57:20
Peter Garneau
Statistics Canada
Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01059114
Message ID:
01059175
Vues:
15
>Or even a more generic question would be... Is there a way to add code to a method at run-time?

For grid headers there's the simple way - bindevent() or having your own class instead of the empty baseclass header.

On the more generic side - it's possible to have your code generate a .prg with all of the Define Class code you want, compile it and then instantiate an object from that. Sounds like a complete overkill for a column header, but I can see some situations where that would actually save time. Imagine a class which has only one of a theoretically large number of combinations of properties, pieces of code etc. If you had a table with all the possible pieces of code and desired properties, then selected what you need from it, and then generated the .prg based on your selection, you'd have a class defined just the way you need it.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform