Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 To: David Hall
  Where is David Hall?
 Birmingham
 United Kingdom
 David Hall
 Tags
Subject: RE: libraries in applications
Thread ID: 188928 Message ID: 189186 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: General VFP Topics
Date: Wednesday, August 13, 2008 5:22:57 PM         
   


> > If, on the other hand (and I hope this is exactly the case), this MainLib is a separate PRG, and "included" means that any other module in the program refers to it like
> >
SET PROCEDURE TO "MainLib.PRG" ADDITIVE

> > (which, in my humble opinion, would be the proper design manner), the only module you would have to re-compile is this MainLib.PRG.
> >

> Yes, that statement in the main.prg which launches the whole project's
> top-level .app.
> There is no such statement anywhere else, but there are similar statements
> including other libraries in the top-level form of other .apps. In the Load event
> of certain main forms, there is, for example
SET PROCEDURE TO "goodslib" ADDITIVE
and in the Unload event
RELEASE PROCEDURE "goodslib"

>
> Therefore, the procedure goodslib.prg becomes bound into those .app's which
> have that statement in their main Forms, and no others.
>
> By contrast, mainlib.prg becomes bound into all .apps, not because it is
> declared, but simply because functions or procedures within it are referenced
> within all .apps.
>
> So now can you answer this question:
>
> Could the procedure mainlib in all the .app's except the top-level one, be
> declared 'exclude'. If so, what else might need to be done to ensure that
> the .apps still compile correctly, but that in future, only the top-level .app
> would need to be compiled if any changes were needed within mainlib.prg?

I'm afraid you cannot "exclude" your MainLib module from other APP modules present
in the same project: there's no such command, neither precompiler directive to that
effect. You can exclude a file in your project from being compiled into an APP or
EXE (see Excluded property in the VFPs Help), but then, if the other APPs call any
function in that MainLib - VFP will generate an error.

The good news, I hope, for you is that you do not need to re-compile all apps but
just that one containing MainLib.PRG module (I assume your system consists of .APPs
only and is not compiled into an EXE). If your top-level (or starting-up) APP calls
all the other APPs - MainLib's subroutines are accessible to them as well.

I hope this answers your original question.

Regards,

Ilya

ENTIRE THREAD

libraries in applications Posted by David Hall @ 8/12/2008 4:56:11 PM
RE: libraries in applications Posted by Ilya Rabyy @ 8/12/2008 5:19:41 PM
RE: libraries in applications Posted by David Hall @ 8/12/2008 8:47:21 PM
RE: libraries in applications Posted by Ilya Rabyy @ 8/12/2008 9:49:39 PM
RE: libraries in applications Posted by David Hall @ 8/13/2008 11:44:54 AM
RE: libraries in applications Posted by Mike Yearwood @ 8/13/2008 4:03:49 PM
RE: libraries in applications Posted by Ilya Rabyy @ 8/13/2008 5:22:57 PM
RE: libraries in applications Posted by David Hall @ 8/13/2008 6:17:10 PM
RE: libraries in applications Posted by Ilya Rabyy @ 8/14/2008 4:43:49 PM
RE: libraries in applications Posted by David Hall @ 8/14/2008 6:17:06 PM
RE: libraries in applications Posted by Ilya Rabyy @ 8/14/2008 6:22:07 PM
RE: libraries in applications Posted by Mike Yearwood @ 8/13/2008 4:24:31 AM
RE: libraries in applications Posted by David Hall @ 8/13/2008 11:59:28 AM
RE: libraries in applications Posted by Mike Yearwood @ 8/13/2008 4:00:00 PM
RE: libraries in applications Posted by tushar @ 8/13/2008 5:22:28 AM
RE: libraries in applications Posted by David Hall @ 8/13/2008 11:56:10 AM
RE: libraries in applications Posted by Tom Saddul @ 8/13/2008 12:52:40 PM
RE: libraries in applications Posted by Ilya Rabyy @ 8/13/2008 4:37:57 PM
RE: libraries in applications Posted by tushar @ 8/13/2008 2:59:19 PM