Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET PROCEDURE TO/Multiple APPs

Status
Not open for further replies.

SleepDepD

Programmer
Mar 13, 2004
65
US
I'm working on a project that has one EXE and several APP files. I have a PRG containing "global functions" (GLOBAL.PRG)--and my SET PROCEDURE TO command for this is in the main PRG for my EXE (MAIN.PRG).

I've noticed I have to have the GLOBAL.PRG referenced in my other APP projects otherwise they won't compile--but I don't have to have it included in them, do I?

Also, if I make a change to GLOBAL.PRG, I just have to recompile the EXE, and not the APPs because the EXE is the only project that actually contains the PRG file, right?

Appreciate the help.
 
Right. What makes you ask? Is it causing you a problem or throwing an error during compile or runtime?

boyd.gif

 
All these APP projects have separate copies of the GLOBAL.PRG included...I was wondering if that was necessary--but it sounds like it's not? Everything I was assuming you believe is accurate?
 
It is necessary that the different projects you are compiling into apps have the global.prg referenced in the project. However, you can right-click on the global.prg in the project manager and set it to exclude... that way the compiler can still find the references it needs to functions, procedures, and such and yet it won't increase the size of your app as the global.prg will not be compiled in to these apps.

boyd.gif

 
I just found one of the APPs that are DO'ed by the EXE has a SET PROCEDURE TO command for it's own PRG--then a SET PROCEDURE TO GLOBAL.PRG ADDITIVE after.

Because this APP is SET PROCEDURE TO'ing my GLOBAL.PRG again, does it have to be set as included in that project? I tried it excluded, compiled and it seemed to work...I don't know how it found the GLOBAL.PRG if it wasn't included in the project, but it didn't blow-up saying it couldn't find it. Is the APP able to find it and get it out of the calling EXE?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top