> > Dear Experts,
> >
> > The classes I use in my current project are sub-classes of the ones I have created before. just for an example:
> >
> > c:\EIBClasses\ebase.vcx <----base class
> > c:\EIBProjects\Project1\Vcxs\p1_ebase.vcx <---sub-class of c:\EIBClasses\ebase.vcx
> >
> > my problem is, everytime i build my project, VFP would always say
> >
> >
"Unable to find Visual Class Library EBASE"> >
> > I have to locate ebase.vcx first (and all the other vcxs) to compile successfully. If i try to recompile at a later time, VFP would say
>
> Give VFP a path at development time that includes the base class directory. This will stop that problem.
>
>
> >
"Cannot update the cursor c:\exportbank\eibclasses\eforms.vcx, since it is read-only." (my guess with this one is this is because im using source safe)
> >
> > i have to remove all base/parent classes before i can recompile successfully. after successful compilation, VFP includes the base classes into my project... and the cycle goes on....
> >
> > is there any way to avoid this?.
>
> Yes. When you build your project do not use the "Recompile All" option.
>
> Instead create a little program that lists and compiles Forms, Class Libraries and Programs. You can build this automatically out of the project by opening it as a table and extracting the names - something along these lines should do it for you (modify the case statement as needed):
>
>
>
> *** Clean the environment and open the project
> CLOSE ALL
> CLEAR ALL
> IF FILE( 'makefile.prg' )
> DELETE FILE makefile.*
> ENDIF
>
> *** Write out the names of the objects to the makefile
> USE worklog.pjx
> GO TOP
> SCAN
> *** Get the name of the item
> lcObjName = ALLTRIM( name )
>
> *** Does it need to be compiled?
> DO CASE
> CASE '.prg' $ lcObjName && Program
> lcOutStr = "COMPILE " + lcObjName
> CASE '.scx' $ lcObjName && Form
> lcOutStr = "COMPILE FORM " + lcObjName
> CASE '.vcx' $ lcObjName && Form
> lcOutStr = "COMPILE CLASSLIB " + lcObjName
> CASE '.frx' $ lcObjName && Form
> lcOutStr = "COMPILE REPORT " + lcObjName
> CASE '.lbl' $ lcObjName && Form
> lcOutStr = "COMPILE LABEL " + lcObjName
> CASE '.dbc' $ lcObjName && Form
> lcOutStr = "COMPILE DATABASE " + lcObjName
> OTHERWISE
> lcOutStr = ''
> ENDCASE
>
> *** If so, add the command to the makefile program
> IF NOT EMPTY( lcOutStr )
> STRTOFILE( lcOutstr + CRLF, 'makefile.prg', 1 )
> ENDIF
> ENDSCAN
>
> *** Tidy up
> CLOSE ALL
>
> *** Execute the makefile to recompile the project
> DO makefile.prg
>
>
> Regards
> Andy Kramek
> Microsoft MVP (Visual FoxPro)
>
Tightline Computers Inc, Akron Ohio, USAThanks Andy, will try to work this solution immediateley...
Regards,
ian panoSometimes it is hard to see the forest - all those ^%$#@ trees get in the way! - Ken Murphy