Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject() vs. NewObject() functions
Message
De
13/12/2008 12:20:59
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01367158
Message ID:
01367181
Vues:
9
This message has been marked as a message which has helped to the initial question of the thread.
I always do NEWOBJECT(). In developement I use the Environment Manager to set the paths to all the needed folders for each project. I don't need a path when running from the EXE since all the resources needed are built into the EXE. I never include the paths for classes/prgs/frxs relying on SET PATH in developement and the fact that the files are built into the EXE.

>Hi all
>

>Maybe I am doing something wrong but for me a command like the following fails in the development environment when I DO main.prg (but not in the built exe)
>
loODBC = NEWOBJECT("cODBC", "cVSONoSCNonVisualUtilities")
>unless I provide the full path to the vcx
>
loODBC = NEWOBJECT("cODBC", "C:\VSO3\Common\Libs\cVSONoSCNonVisualUtilities.vcx")
>
>Alternatively I can switch to the following and yet be successful
>
loODBC = CREATEOBJECT("cODBC")
>
>Which is more advisable function to use - NewObject() or CreateObject()
>
>Thanks.
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform