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

Thank you for the suggestion of NewObject. I will use it.


>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,
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform