Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class dependence
Message
De
10/12/2003 20:44:40
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00857593
Message ID:
00857937
Vues:
20
Hi Dimitry.

>My question is, why within my program, the statement SET CLASSLIB TO MYCLASSLIB ADDITIVE is enough to allow Calendar object to be created. But when used from SFQUERY I have to repeat the statement again?
>
>TIA.

I know I am late in this thread. Stefan Otto had the right idea, in my opinion. Use NewObject. This is exactly why we stopped the use of CreeateObject. You are at the mercy Classlib setting. Nothing has to be hard coded either. lo_obj = newobject(lcClass, lcLibrary). This works just as well as lo_obj = NewObject("MyClass", "MyClassLibrary").

We have had no problems since moving to NewObject. It is less problematic and more direct. Like anything else, if you don't do direct references to the library you have to find a way to pull it in to the project altomatically. Our App classes all have a _ClassRef method. In here we dump anything that needs to be a part of the exe that is not directly referenced.
if .f.
report form "MayReport"
Set Clcasslib to "MyClassLibrary"
etc.
endif

In case you did not notice, my feelings are to dump CreateObject and use NewObject.

Regards,
- Glen -

The impossible we do immediately.
The miraculous will take a little longer.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform