Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding run-time code to a header - grid control
Message
From
14/10/2005 11:23:50
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
14/10/2005 09:57:20
Peter Garneau
Statistics Canada
Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01059114
Message ID:
01059175
Views:
14
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform