Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class dependence
Message
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00857593
Message ID:
00857682
Views:
27
Dmitry,

It sounds like somewhere later on there is code that is doing a SET CLASSLIB without the ADDITIVE clause, which will wipe out the one in your main.prg.

>I have a class for calendar lookup, which is a container with textbox and a button. When button is clicked, calendar class is created and is popped up. The container and the calendar pop-up class reside in the same .vcx file (MYCLASSLIB.VCX). At the top of the application I
>SET CLASSLIB TO MYCLASSLIB ADDITIVE where calendar classes reside. All works well.
>
>But I get error when using this container class in Stonefield Query (SFQuery). When user selects a date field for the filter, the calendar control is displayed. But when user clicks on calendar popup button, error "Class definition Calendar not found" appears. But if I add a line SET CLASSLIB TO MYCLASSLIB ADDITIVE in the click method of the button, before creating object of class Calendar, program works without the error.
>
>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?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform