Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it advisable to modify GenScrn to hardcode proc-func
Message
From
25/10/2005 18:31:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Environment versions
Visual FoxPro:
FoxPro Dos
Miscellaneous
Thread ID:
01061979
Message ID:
01062078
Views:
10
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all
>
>I recently had to make a copy of a FDP25 project. As the directory had changed the project did a recompile of all the screen files (especially), menu files. According to Source Control these became modified files. All that had really changed was the Date/Time at the top of the .SPR and the Procedure/Function names that were generated at the compile time.
>
>I feel this is a lot of unnecessary flagging of source codes.
>
>I was hoping to change the GenScrn.PRG as follows:
>- Not to change the date/time (if logically possible) or altogether not print the date/time` at all.
>- If a proc./func. name has to be generated, then the code snippet (memo) should be replaced with a #NAME directive containing the newly generated name. I can do that in GetCName() function or whereever the snippet is first encountered.
>
>Please advise of any pitfalls that you feel maybe lurking if I went ahead with it.

Why would you do that? If you're using source control, that means the disk space is no concern. The generated files are generated each time you do a "compile all", so having them written afresh is pretty much normal. Meaningless snippet names will be reinvented each time, unless you go and waste a lot of time inserting #name directives everywhere.

And, besides, the whole point with code generators is that the code should be recreatable at any time. The generated code is not "source"; it is just an output from your metadata (i.e. scx, mnx et al), which can be and is produced whenever needed. And I remember that even on a 40MHz 486, re-generating all forms I had in a 52000-lines app took less than a minute (with my generator, but then that couldn't have been much different from FP's own in terms of speed :).

If you're editing the genscrn, you need to take good care to make it work as before in the highly likely case when there was a real edit. What you may want to do is to keep the generated code out of source control (as it's just output). When refreshing the master copy, the project manager will notice that its .spr and .mpr files are outdated and will be happy to recreate them.


In other words, I have only two questions for you:
- do you really care about this issue?
- do you have the time to play with it?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform