TurboPack/DOSCommand

No documentation on working with DOSCommand

FiftyTifty opened this issue · 2 comments

It's a very unfortunate, as DOSCommand looks much sleeker than handling stuff with ShellExecute, which is too bare-bones and not explained well either. But I've not the foggiest on how to properly run DOSCommand.

For example, there is no explanation on:

  • How to use of the events
  • How to work with anything in a command line application
  • How to set up the uses statements
  • How to issue multiple commands
  • How to terminate DOSCommand
  • How to wait for the current command to finish executing

My current issue, is that DOSCommand spawns a huge number of threads, faster than they exit. After 20 seconds of execution, my system is flooded with threads, and Delphi won't make any more. Even though I make sure to wait for execution to finish with the following statements:

while dosToRun.EndStatus = TEndStatus.esStill_Active do
                        	sleep(1);

There needs to be actual documentation. Two lines that don't do anything, and throw errors because more code needs to be added to the .pas file before they can actually function, is not enough to work with at all.

I'm happy to provide my current command line project, if that would help. It only has around 120 lines of code excluding whitespace.

Calling Sleep(1) in a while loop is deadly!

This is an open source library. If you have enough time feel free to write a documentation.

If I knew how to use the library, I would. The issue, is that I want to know how to use the library. Without documentation, there's no way to learn how to use it.