Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Code Programmatically
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00147160
Message ID:
00147579
Views:
25
If you are talking about adding method code to a class you should use the Decorator pattern. Something like:
-----------------------------------------
CREATE CLASS decoratedThing AS custom
oThing = .NULL.

PROCEDURE Init
This.oThing = CREATEOBJECT("OriginalThing")
ENDPROC

PROCEDURE OriginalFunction
This.oThing.Function()
ENDPROC

PROCEDURE DecoratedFunction
** You could add code here.
ENDPROC

-------------------------------------------

Steven Black's web page will tell you more.
www.stevenblack.com
Marty Smith, CSQE
Previous
Reply
Map
View

Click here to load this message in the networking platform