Mar 5, 2011 at 7:06 PM
Edited Mar 5, 2011 at 7:13 PM
You've done it again! Though I haven't played with this yet, it sounds like a major development. It's great to
be able to program everything on one page. It's much more intuitive that having the
main.prg act as a middleman.
Claude, I also like the way you documented this. The code shows a clear separation between HTML sections, VFP code
sections, and combined VFP/HTML sections. Very helpful.
I suppose there are situations where using main.prg is the best way to go, but I'm thinking most of the time this is the best
way to go.
Actually, if you look at all the Page Number setup code - that all needs to be centralized. No one wants to put all that code on every page that lists a table and needs page numbers.
Solution: Centralize it in Main.prg or its own file.
Either <%= GetPageNumbers(10,5 ) %> **This function would be in Main.prg. Might be easier and faster than ExecScript below?
or <%= EXECSCRIPT(FILETOSTR(oProp.AppStartPath+'\prg\GetPageNumbers.prg',10,5))) %>
or you could do a DO, CreateObject, etc. if it's solid code (doesn't need to be changed or rarely changed)
I guess the future for Main.prg is less of a big CASE statement and more of a function library...