Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instantiate a class from another .EXE
Message
From
02/09/2005 08:50:59
 
 
To
02/09/2005 08:40:25
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01046169
Message ID:
01046173
Views:
13
I, Alex, foi mal... vou traduzir pra cá de novo rapidinho. :)


Pessoal,

Isso funciona

loTest = NewObject("MyClassName", "MyVCXName.VCX", "MyExecutableName.EXE")
Mas isso não funciona

loTest = NewObject("MyClassName", "MyPRGName.PRG", "MyExecutableName.EXE")

Tenho uma classe num programa(.EXE) e preciso usar essa classe de outro programa. Posso fazer isso por pela função NewObject(), mas se a classe estiver num programa .PRG não funcionará retornando uma mensagem de erro.


No arquivo .PRG tenho
Define class MyClassName as Custom
...
EndDefine
no help fala assim:

NEWOBJECT(cClassName, cModule, cInApplication)

cModule
Specifies a .vcx file or Visual FoxPro program (.prg, .fxp, .mpr, .app, .exe, and so on) containing the class or object specified with cClassName. The default is a .vcx file. If you specify a program file, you must include an extension.


---
Depois que foi adicionado o Document View no VFP passei a ter preferência pelos PRGs às VCXs
Previous
Reply
Map
View

Click here to load this message in the networking platform