INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Program Header

Program Header

(OP)
Hi,
How do I get these fields filled in with my data?

* * Author's Name
* *
* * Copyright (c) 2017 Company Name
* * Address
* * City, Zip
* *
* * Description:
* * This program was automatically generated by GENSCRN.

Thanks,
Joe

RE: Program Header

Quote (JPGalea)

How do I get these fields filled in with my data?

Those fields WHERE?
* On a User Input Form?
* In a Data Table?

And where is the data coming from?
* A FP/VFP Data Table?
* Somewhere else?

Plus:

Quote:

This program was automatically generated by GENSCRN

We STRONGLY suggest that you not use a Wizard to create forms.
Instead learn to build Forms/Screens as 'raw' so that you can learn how they work and what needs to be done where/when within the Form/Screen.

Due to the language-specific forum area you have posted this question into, we can only guess that you are using an OLD version of Foxpro.

If you should happen to be using one of the more modern versions of VISUAL FOXPRO, you should probably spend some time looking over the Free, Online VFP Tutorial Videos at:

Good Luck,
JRB-Bldr

RE: Program Header

(OP)
Sorry For any confusion. This is FPV2.6 output from Program Generate after a screen is defined. It creates screen_name.SPR Which is then compiled into .SPX.
The generated code has the header that I copied into this post. I was asking how would I pass my information so that it would be in the generated code. So Company Name would become Acme Corporation and Address would become 1000 Circle Dr., etc..

RE: Program Header

(OP)
Never mind, I found it.
There is a "Comment Options" button on the Generate Screen/Menu window.

RE: Program Header

Admittedly it has been a LONG time since I used FP2.6W, but I do remember that the Screens had code 'Snippets' where you write the code to make the screen work the way you want it to.

Quote (JPGalea)

I was asking how would I pass my information so that it would be in the generated code.

You could either 'Hard Code' in the values that you wanted to write to the Screen's textboxes (not the recommended approach).

Or you could put the separate values into their appropriate fields in a FP Data Table and then have the Screen USE the data table and 'read' the values out - putting them into the Screen's textbox fields.

Since you seem to be new to all of this I'd recommend that you get into VISUAL Foxpro where things work a little differently, but it is the most current. VFP9 is the latest version that most of us are using.

Good Luck,
JRB-Bldr

RE: Program Header

Note that those values, used by genscrn.prg, are stored in the project.

If you do all your work through the project manager (which you SHOULD be doing), you only have to enter them once.

RE: Program Header

Building on what Dan has said: When you have your project opened (assuming you are using the project manager - which like Dan said... YOU SHOULD), on the menu click PROJECT-->OPTIONS

The screen that appears is where you can enter the information you are talking about.
This info will then be applied to the entire project, not just one screen.

Hope that helps.

RE: Program Header

(OP)
I would like to discuss the recommendation of using Project Manager. I am willing to do it right, but not at the cost of complicating and slowing my response to my client.
I have tried to use PM and found limitations. For instance my screens/menu and report forms are in their own folders as are my tables and programs. I also get numerous errors where it thinks arrays are programs and can't find them.
I am the creator and sole support of one custom app for my son's business. If there needs to be any changes I simply copy the modified Foxprow elements to the production environment. I have been doing this off and on since 1991 and have provided support without the formality of PM. It seemed to me that it would be a lot more work for me and slower response to my one 'client'.

RE: Program Header

You do realize that "copying FPW elements" to your client machines is illegal unless they've purchased full FPW licenses, right?

The PM allows you to build executable files that you CAN freely distribute (with appropriate runtime support files). The PM does not care about files in multiple directories. You can resolve array references with the EXTERNAL keyword (see the help file), but those are just compile-time warnings anyway.

The project manager is the most important tool for developing applications for (legal) distribution.

RE: Program Header

To the contrary, using the project manager makes things a lot easier and quicker - regardless of the situation. The various components being located in different folders is not an issue - in fact I use folders to organize components as well. When you create a project you need to add every component to the list - if you leave any out than issues can arise.

In regards to it thinking that arrays are programs/functions, you would need to post some of the code. The only time it should do that is if the array isn't predefined before the reference that is erroring-out - this could be caused by a snipet being ran that contains the array before the snipet that initializes it.

If you don't have this already, I would suggest creating a master PRG, which will be the first code that is executed. In that code you will initialize all the variables you are using globally for your project. Then when you create the project, this master PRG will be the FIRST item you add - making it the first item to run. You will see that a little black dot will be to the right of it - which indicates its the first code to be executed.

The beauty of the project manager is that you only have to click "compile" once no matter how much code, and how many files, are modified. I assume from your current setup, if you modify 5 screen files that you have to go and generate and compile each one individually. Also the project manager is the only way to make APPs and standalone EXEs.

So it may that a few minutes to get acquainted with the project manager - but it will make your life so much easier.... its a shame you have been coding in FPW26 for 25 years without using it.

RE: Program Header

The solution to the array issue is to add:

CODE

EXTERNAL ARRAY YourArrayName 

in any routine that references an array that's declared elsewhere.

Tamar

RE: Program Header

(OP)
Thanks to all for your insights!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close