Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Code Programmatically
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00147160
Message ID:
00147579
Vues:
28
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform