Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to manage Class Libs?
Message
 
À
03/10/2000 15:30:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00424226
Message ID:
00424328
Vues:
16
John,

I think you have got the ticket. SET CLASSLIB is my problem. If I don't have to use it, I haven't got a problem.

I will give it a try.

>Hi Richard,
>
>How about using NEWOBJECT and avoiding SET CLASSLIB altogether in this situation, as in:
>
>oForm=NEWOBJECT("Form")
>oForm.NewObject("lblHello","MyLabelClass","MyClasslib")
>oForm.lblHello.Caption="Hello"
>oForm.lblHello.Visible=.T.
>
>>I am having a problem where I am trying to ADDOBJECT a specific class from a specific class library and it finds a class of the same name in a previously set class library.
>>
>>As users navigate through my application they are triggering SET CLASSLIB when objects need to be created in my forms. If a previously accessed form has added a class library to the SET CLASSLIB list and it contains a class definition with the same name, it is the first one in the list which is used. The result is that subsequently called forms may be adding the wrong classes.
>>
>>Should I be ensuring that my class names are unique across all class libraries that might be called?
>>
>>Should I SET CLASSLIB then ADDOBJECT then RELEASE CLASSLIB for each object being added?
>>
>>There has got to be a better way. I am sure that I must be doing something stupid.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform