Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can call a function from DEFINE class?
Message
From
06/05/2024 06:44:07
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01687987
Message ID:
01687991
Views:
33
>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform