Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class library not found
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00767675
Message ID:
00768191
Vues:
30
>I am not sure I'd agree with your assumption there (dependancy on set path for newobject command). Take a look at the Documentation in the online help of 'newobject', specifically 'cModule' part as there is no suggestion that could backup that assumption.

I have no idea what you are talking about - what assumption did I make?

>
>I'd use 'set class lib'instead which keys on set paths.

Originally we had 'set class lib', but then all users had classes in use, so we could not do any development work on classes.
We included classes in projects and used newobject() to separate class libraries used in development from production. Here is an extract from HackFox about newobject():

NewObject() was added in VFP 6 and lets you instantiate things without having to issue SET CLASSLIB or SET PROCEDURE first. Instead, you can incorporate the information about where to find the relevant class into the command. Because you can omit the class information if you want, and then NewObject() behaves just like CreateObject(), we suspect we'll be using NewObject() all the time, if we can only retrain our fingers from typing o=CREA("whatever").

NewObject() even lets you deal with classes whose definition exists only in an application (APP or EXE or whatever). You don't have to have the actual class library available. Just point to the class library and the application:

o = NewObject("MyClass", "MyClassLib", "MyApp.APP")
and VFP is able to dig through the app file and find the class definition.
Doru
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform