Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/18/19 in all areas

  1. In some places I use such constructions for ctrl in TArray<TControl>.Create(Button1, Checkbox1, Memo1) do ctrl.Enabled := True;
  2. Dalija Prasnikar

    Cross-platform solution to forcefully end a thread

    -Edward A. Lee, "The Problem With Threads" All I can say to Professor Lee is good luck with creating any non trivial mobile application without using threads that will not be killed by the OS for not responding or performing network operations on main thread. Theory is one thing practice another.
  3. I used it by accident twice. UNDO is a life safer indeed. Never ever since. I guess we should build a "black list" of IDE feature we should avoid.
  4. It ever did? Not for code that I write and it does not completely format as I would like it to.
  5. Lars Fosdal

    Cross-platform solution to forcefully end a thread

    Our servers rarely run with less than 25 concurrent threads. We also have threads that can't run in parallel and a scheduler in place that ensures that it doesn't happen. Have we had problems? Sure, when we broke the rules. Threads are not more dangerous or hard to use than any other field of development you are introduced to. The hardest thing about multithreading is to adapt your thinking to asynchronous events, instead of sequences.
  6. David Heffernan

    Creating an array of controls in Delphi

    What's wrong with just adding the controls to a collection? Controls.Add(control1); Controls.Add(control2); Etc.
  7. David Heffernan

    Cross-platform solution to forcefully end a thread

    What are you on about. It is perfectly possible to write code that is correct, and behaves in a deterministic fashion with threads. For sure the order of scheduling and execution is not deterministic, but that doesn't mean that you can't write programs whose behaviour is deterministic. I for one make a living doing just that.
  8. But the formatter is of little use, if it can be confused by coding style. There are many things I don't do that others have done, and in some cases, I will use a formatter to clean things up, but most of the time, I am dealing with old code in source control, and my colleagues would be very unhappy to see files reformatted. 😉
  9. Try to format this: procedure TForm1.Button1Click(Sender: TObject); var test: record a: integer; b: double; end; dt1: record dt: tdatetime; s: string; end; begin end; it becomes this: procedure TForm1.Button1Click(Sender: TObject); var test: record a: Integer; b: Double; end; dt1: record dt: tdatetime; s: string; end; begin end; And don't tell me that's any known coding style. 😉 Yes, I reported it: https://quality.embarcadero.com/browse/RSP-18273 And yes, the GExperts code formatter works fine for it. (There are no known problems left. edit: Now there is: https://sourceforge.net/p/gexperts/feature-requests/89/ )
×