Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Basic COM question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01057884
Message ID:
01057899
Vues:
13
Jaime,
This works for me:
m1 = CREATEOBJECT("Test")

? m1.Test("MyFunc1","func1")
? m1.Test("MyFunc2","func2")


DEFINE CLASS Test AS Custom
    FUNCTION Test(a1 AS String, a2 AS String) AS String
    RETURN EVALUATE("this."+a1+"('"+a2+"')")
    
    FUNCTION MyFunc1(a1)
    RETURN "Function 1 "+a1

    FUNCTION MyFunc2(a1)
    RETURN "Function 2 "+a1

ENDDEFINE
this also:
m1 = CREATEOBJECT("Test")

? m1.Test("MyFunc1","func1")
? m1.Test("MyFunc2","func2")


DEFINE CLASS Test AS Custom
    FUNCTION Test(a1 AS String, a2 AS String) AS String
    LOCAL cTest
    cTest = "this."+a1+"('"+a2+"')"
    RETURN &cTest.
    
    FUNCTION MyFunc1(a1)
    RETURN "Function 1 "+a1

    FUNCTION MyFunc2(a1)
    RETURN "Function 2 "+a1

ENDDEFINE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform