Kevin,
< Does this happen with all forms that have this architecture or just some? At the point where you try to instantiate the classes, does SET CLASSLIB contain a reference to the library containing the class that can't be found?
It happens with all forms that have classes not contained in the forms base class library. The set('classlib') doesn't have the classlibs in them - which is the problem.
I have a solution that I would like to suggest (review and clean up as needed) that appears to work that you might consider incorporating into the framework.
1) I expanded the cLibrary field in the classes.dbf to 250 characters so I could put in the other classlibs the forms need separated with a comma.
2) I modified the addlib procedure in utilities to 'set classlib' for each classlib parsed out of the cLibrary string:
PROCEDURE AddLib
LPARAMETERS tcLib, tcFile
IF NOT UPPER(tclib) + '.VCX' $ SET('CLASSLIB')
IF PCOUNT() = 1
SET CLASSLIB TO (tcLib) ADDITIVE
ELSE
ALINES(LibArray, tcLib, .T.,',')
FOR EACH tcLib IN LibArray
SET CLASSLIB TO (tcLib) IN (tcFile) ADDITIVE
ENDFOR
ENDIF
ENDIF
ENDPROC
I tested this approach with a form that had 10 foreign bizobjects on it and it worked great. Any drawbacks to this approach as something official for the framework?
Gary.
>Gary,
>
>>2) However, If I have a form class that has used classes from other classlibs, with their only identified reference being “I dropped them on the form”, they won’t instantiate even though they are all compiled into my AnyPackage.app file. The form causing the error in this example is in the same classlib and called from a form class (instantiated successfully) containing a clistobjedit class.
>
>Does this happen with all forms that have this architecture or just some? At the point where you try to instantiate the classes, does SET CLASSLIB contain a reference to the library containing the class that can't be found? I've seen problems before using this approach but they were never consistent...the only way I saw to get around it was to add the library into the main project.
>
>Regards,