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

Dumb Question: View / Edit source?

Status
Not open for further replies.

gmagana

Programmer
Jun 14, 2007
2
US
I feel stupid asking this, but I have a FPW 2.6 application and source code and I cannot get to a screen that shows me the source code of a screen or a report. I can only view the design view, it's pretty and all, but I need to get to the code. I can see there is code if I open the file in notepad, but I want to open the source in FP.

Can anyone help?
 
The source code for a screen or a report is not text like most programming languages, it is in a table. The SCX and FRX files are VFP tables that hold metadata that the FoxPro runtime interprets to create the screens and reports. You can USE MyScreen.scx and view the table just like any DBF.

There isn't much you can find in there that isn't exposed through the designers. What are you looking for exactly?

pamela
 
While what Pamela says is true, there are portions of code within various parts of a screen.

If, when you have the screen open, you go to your Top Menu
Screen
Open All Snippets
All Field When & Valid code, Screen Setup & Cleanup code, and any other code "snippet" will open for your review and/or modification.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Have not done this in years and do not remember how, But 2.6 screens when compiles would be sent to a prg. It is on the main menu under screen someplace, Just do not remember where.

When VFP3 first came out we designed all the screen in 2.6 and exported then to prg's, then had VFP3 run them so I know it is there.

I wish the Reports were the same way, You,ll have to hack the report.frx file as mentioned above.


David W. Grewe Dave
 
Even though it has been a LONG while since I have worked in FP2.5 or FP2.6 instead of VFP, Dave has reminded me that when you "Build" a FP screen you end up with a .SPR file containing ALL of the screen's code.

That code can be edited to change how a screen looks and/or behaves, but it is not recommended. The problem is that if you change the .SPR code, and then modify something via the FP Screen designer, the non-modified code will be built into a new .SPR file - replacing the one with your modified code in it.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
gmagana,
i fully agree with jrbbldr.
If you wish SEE in FOX .spr file, try
modi comm myscreen.spr noedit
(need if is error inside .spr)
Tesar
 
THANK YOU ALL! Wow, I had forgotten just how hard it is to use old MS software, the old "training wheels you can't remove" thing... I have certainly learned a lot from all of this. THANKS to all of you :)

With a little more perseverance I was able to figure out how to debug the source code :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top