[fpc-pascal] Directory Tree

James Richters james.richters at productionautomation.net
Sun Apr 25 21:30:38 CEST 2021


          >I added LoadFromFile in this event.
That was the first thing I tried, but the problem is, this happens before anything is put on the screen.. so when I run the program with an Ini file with 4000 entries in it, there is a good 30 second delay, and then the screen is shown with everything loaded.

So I tried putting it in various places in the form, but then it runs additionally when I don’t want it to.

The problem I’m having is understanding the sequence of things (if there even is one)  with my console programs, I specifically determine the exact order I want things to run, but this is more just a collection of things that all run at the same time.. well they don’t run at the same time, it’s an illusion, computers only do one thing at a time.. but I don’t understand how this illusion is controlled…how can I order it to show form1, show the buttons, show the load bar graph… get everything on the screen, THEN load the last used file?  I can’t really use config.ini, because in order to get everything on the screen in the proper size and position, the configuration would have had to be read in already.. so before anything is displayed.. I want the load to happen after everything is displayed.  I supposed I can maybe launch a timer to wait 1 second to get everything on the screen then load the files, but I don’t even know where to put the timer.

          >I have extracted the pdf generation to a unit uText_to_PDF with a class TText_to_PDF to make a pdf from a string. You can even use it in a console app.
          >3 pdf are generated now: List, Tree, List+Tree.
The PDF Files look great, separate PDF files is really better in my opinion anyway. That is awesome that I can make text to pdf in a console app!    Thanks for making that a separate unit.


          >I’m I have delete some files which differed only by case. After committing from linux, the pull on windows deleted all the files but I could revert them on next commit from windows to get them back in correct case. 
          >It seems to be stable now.
I'll try another pull request of something simple just to see if it will work.

          >I used your code for days to make a function Duration_from_DateTime( _DateTime: TDateTime): String;
          >I added on main form a button "Test" with a few test cases
          >Let me know if it's ok for you. still not getting a page break using word to open the odt file.
The duration looks great, all the test cases look great too.
I'm not getting the page break in word either.

James



More information about the fpc-pascal mailing list