Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to modify Event/Method programatically
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00537145
Message ID:
00537176
Views:
11
>If I place a class on a form I can easily change the code for a method or event. If I instantiate a class using CREATEOBJECT() in code, how do I make the same code changes to a method or event?

You cannot change the method code of the object created at runtime. However, there is a workaround. If you add the line calling the program into your class method code at design time, then you may dynamically create the necessary code in PRG on the fly at runtime and compile it.

* myclass.somemethod()

*** some method code
DO myprg1
*** more method code
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform