Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can call a function from DEFINE class?
Message
 
 
À
06/05/2024 06:44:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01687987
Message ID:
01687994
Vues:
31
>>Lutz,
>>
>>Thank you very much for the detailed reply and help!
>
>On top of what's been said here, yes you can call an object's method as a function, we do that a lot. Assume you have a PathHelper class, and then, for example
>
>lcPath=oPathHelper.getAppHomePath()
>
>To have that object accessible, make it a global variable, or, if you also want to reduce the number of global variables, set it as a property of one global object:
>
>oApp.NewObject("oPathHelper", "pathhelper", "helpers.vcx")
>
>lcPath=oApp.oPathHelper.getAppHomePath()
>
>I've seen this done many times, and I did it too.

Thank you. This (above) is what I ended up doing.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform