Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loading an .APP file from a VFP COM object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01503828
Message ID:
01503940
Vues:
95
Hi Rick,

I use newobject() to instantiate classes, once SET PROC is done, and that works fine for me, in several scenarios.

Hank

>>>
>>>SET PROCEDURE TO wcdemo.app ADDITIVE
>>>DO wconnect
>>>oHttp = CREATEOBJECT("wwHttp")  && PRG class works
>>>oBus = CREATEOBJECT("wwBusiness")   && VCX fails: Can't find ..\classes\wwbusiness.vcx
>>>
>>>
>>>So it does seem to load procedure files but fails to load VCX classes (which is REALLY odd since SET CLASSIB tends to be automatic inside of .APP files.
>>>
>>
>>But the createobject is callled from outside. Either add a 1Liner to wcDemo for automatic set classlib to use as factory, Set classlib explicitly or use Newobject().
>
>That's what wconnect.prg (in wcdemo.app) does. It loads all the libarires. I think that that should work, even if you instantiate from the outside. Once SET CLASSLIB is called and that worked in the running VFP instance it seems like the class should be invokable from anywhere - in the APP and out.. But it doesn't.
>
>It seems in order to get THAT to work you'd have to have a factory outside that does the approprate SET CLASSLIB TO IN wcDemo.app ADDITIVE which is pretty lame. I'm pretty sure some other libraries do this and it works (like the GDIPLUS library)? It could be that this happens because the classes have a relative path location (.\classes) rather than being at the root project level...
>
>Fortunately this is not the scenario I'm after - my scenario is actually just to bootstrap a class in the .App file and I got that to work with Hank's tip. See the other message in the thread that also shows what I'm doing a little more clearly.
>
>+++ Rick ---
>
>
>>
>>HTH
>>
>>thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform