Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to manage Class Libs?
Message
 
To
03/10/2000 15:30:23
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00424226
Message ID:
00424328
Views:
15
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform