Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Method code at runtime??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00114464
Message ID:
00114467
Vues:
24
>Good day to you all,
>
>Is there any way I can change the Method code of an object from the objects Init Method, or from any other place for that matter??

Changing Method Code of an object at run time is not possible. However, why not create a custom method and control what portion of the code to be executed by passing parameters as in:
PROCEDURE myobject.Init
    Thisform.MyCustomMethod('A')
ENDPROC

PROCEDURE myobject2.Valid
    Thisform.MyCustomMethod('B')
ENDPROC

PROCEDURE MycustomMethod
LPARAMETERS cBase
    DO CASE
    CASE cBase = 'A'
       CODE HERE...
    CASE cBase = 'B'
       CODE HERE...
    ETC..
    ENDCASE
ENDPROC
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform