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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems changing and re-generating a screen program

Status
Not open for further replies.

JmichaelSR

Programmer
Mar 17, 2004
15
US

First off, I know very little about ForPro. There are programs in our shop that were written long ago with FoxPro 2.6. I am attempting to make changes to one of these programs.

The program contains multiple screens(3). when I make changes to the master screen and re-generate, the resulting program (PSTMAIN.SPR)shows a window definition for the master screen only. Definitions for the 2 remaining screens are dropped.

I think I must be doing something wrong in my generation process to cause this code to be dropped.

Any help with my problem would be greatly appreciated.

Thanks,


Mike Clark
Programmer/Analyst
Mississippi State Fire Academy
 
The first thing to determine is if you are executing a compiled EXE file or an APP file.

If it is an EXE file, then you will need to re-compile the changes within the Project file after Generating the Screen so that the new SPR file is included in the EXE.

If you are executing from an APP file, then you are merely executing the individual SPR,FXP, etc. files themselves, not a comprehensive EXE file.

When you say: "Definitions for the 2 remaining screens are dropped." I am not sure what you mean.

Do you mean that you have lost the source code for these 2 screens?
Or what?

Good Luck,

JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
JRB-Bldr,

Thanks for your help. Sorry for the confusion in my problem description. Yes to your question, I loose the source code for the 2 screens. I will use the information you provided and continue my research.

Many Thanks,



Mike Clark
Programmer/Analyst
Mississippi State Fire Academy
 
Boy, it's a long time since I did this. But IIRC, you do need to work through the Project Manager when dealing with a screen set. I don't remember exactly how it works, but at some point when you open the principal screen from the Project Manager, you get a dialog that lets you specify all the screens in the screen set.

Try:

MODIFY PROJECT <Your project name--look for a PJX extension>
Find the screen you changed and double-click.

Tamar
 
If you have lost the source code for 2 of the screens you wish to modify, there still may be a hope.

There is a commercial tool called ReFox which can take compiled program, screen, menu, etc files and most often re-create the source code.
A few of us VFP/FP developers have our own copies to use when supporting our clients.
It is not a cheap program.
But if you were going to need to be supporting this program in-house for a while until you upgrade to Visual Foxpro, I might recommend that you get your own copy.

The best and most legal approach is to contact the developer to see if they have a copy of the source code. However when dealing with OLD, Dinosaur programs that is not always possible.

Let us know what you find out about how you are running your application.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
When you generate your main screen (pstmain.scx) you can add screens to the screen set in the 'Generate Screen' dialogue box. So provided you still have the source code for the other two screens, you can add them there.

Hope this helps

Roger
 
It seems as though we again need more clarification of the situation and the problem.

From your saying..
"The program contains multiple screens(3)." I assumed that you had 3 discrete screens within a program.

But when you say..
"When I make changes to the master screen and re-generate, the resulting program (PSTMAIN.SPR)shows a window definition for the master screen only." it might be assumed that you have a single over-all (a.k.a. Master) screen which is comprised of multiple screens as in a Screen Set - a situation to which Tamar & Roger replied.

Regardless, if you do not have the source code (SPX & SPT files) for the individual screens, you cannot make needed modifications nor can you maintain things well for the future.

Yes, as Tamar & Roger both suggest, for a Screen Set you will need to Edit the position of the individual parts of the set through the Project Manager so that when the over-all APP or EXE is generated, it will 'know' that some of the screens 'live' within another.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top