Jump to content

Uwe Raabe

Members
  • Content Count

    2538
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by Uwe Raabe

  1. Yes, it reports that warning:
  2. Agree. I prefer Pascal Analyzer to get notified about problems like the one this thread is all about. In contrast to the compiler, eliminating all warnings from Pascal Analyzer is not the goal. If I don't want to get notified the next time I can suppress it with a simple comment.
  3. As I said, this may not always be possible:
  4. I agree, Enable(True) is just bad. It is either Enabled := True and Enabled := False or Enable and Disable; It is quite similar to TDataSet having Active, Open and Close. Side note: we can see a problem here where Open can bei either a state or an operator. Thus I prefer the Is prefix for states: IsOpen, IsEnabled for clarity. (Is only serves as a placeholder here for syntactical equivalents appropriate for the used wording and intention).
  5. One could argue that an out parameter counts as initialized while a var does not. Due to the history of var/out that doesn't work in a consistent manner. As @Dalija Prasnikar said, out has its merits, too.
  6. There are probably plenty of methods, built-in or from 3d party libraries, that offer only var parameters where out would be the better choice, but we are not able to change the signature.
  7. If a variable is given to a method as var or out parameter that should be sufficient to rate that variable as initialized inside that method. If that would always issue a warning, you will have to make a redundant initialization just to make the warning vanish. I strongly reject this request.
  8. Would you expect this code issue such a warning? {$APPTYPE CONSOLE} procedure EchoLineUntilEmpty; var S: string; begin repeat Readln(S); Writeln(S); until S = ''; end;
  9. In theory the chance of a 32-bit pointer being 0 is 1:2^32 while the chance for a 64-bit pointer being 0 is 1:2^64. That is quite a big difference. I am aware that this estimate is probably pretty wrong because the memory contents are anything but evenly distributed. If you have some spare time you can analyze the 32-bit code and find out if some other method called clears the part of the stack later used for sl with zero most of the time. Note, that the benefit of this research is just to ease your mind.
  10. Only a link, no more information. Looks not very seriously to me.
  11. That has never been necessary using MMX. Renaming the property automatically renames the field, getter, setter and optionally all references to the property in the current unit. Also related to MMX: Using read/write properties allows to make use of the reverse assignment tool.
  12. This is exactly what I'm trying to do: You missed to quote my suggestion to the end: procedure TForm2.Button1Click(Sender: TObject); begin Edit1.Text := inttostr(TChild.GetChildId) { <= Calling the Child's class function} end;
  13. The docs give some hints: That implies, that they have no idea on which class they are called on and always use the class they are declared in to access any non-static class method. Unfortunately, what you are trying to achieve is not possible this way. Use a non-static class function instead of a class property.
  14. A datamodule has its advantage when component properties are loaded from the DFM - that includes wiring of components and event handlers. (I am aware that some see that as a disadvantage) Another point is that, if you don't actively prohibit that, ist is registered in Screen.DataModules and can be found without that dreaded global instance variable.
  15. Uwe Raabe

    Windows Software Development Kit - why?

    Well, I also have no more info as the docs provide. In my personal experience I didn't notice any quirks when skipping the SDK installation.
  16. Uwe Raabe

    Windows Software Development Kit - why?

    The docs are pretty clear: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Installation_Notes#Windows_10_SDK
  17. Uwe Raabe

    RS 11 FMX zip file with password

    I will have a look ASAP.
  18. Uwe Raabe

    Updating a JSON file with THTTPClient

    Because POST and PUT need some appropriate server action to achieve the desired result. The web server implementation resolves a GET to an existing file by providing the file content just as it were a static HTML page. On the other side there is no standard implementation to update, replace or create the file via POST or PUT. This feature has to be implemented to be used. Imagine every user accessing your web server could change the static web pages by simply calling PUT or POST. The standard solution for your problem would be using FTP. An FTP server has separate access control and allows writing on a per user/folder/file basis.
  19. Uwe Raabe

    Updating a JSON file with THTTPClient

    That's basically the same. Just imagine, the file is not existent, but the server produces the content on the fly. The result from a GET would be the same. How do you think could you change such a response?
  20. Uwe Raabe

    Updating a JSON file with THTTPClient

    What is written in the documentation for the server how to upload that file? If the request succeeds, what is in the response content?
  21. Uwe Raabe

    Magic numbers (1)

    Fixed in V15.0.49
  22. Uwe Raabe

    Target 64bit Delphi 10.4

    Check your library paths for 64-bit.
  23. Uwe Raabe

    Printing in Dark Mode????

    Most likely printing unit sources has been in no ones mind when dark theme was introduced. I suggest filing a QP report. Otherwise this will for sure never be taken care of.
  24. Uwe Raabe

    DPI and Scaling Discussion

    It only has an effect when VCL styles are used. For plain VCL applications it has no influence.
  25. Uwe Raabe

    C++ Builder Editor Questions

    Unfortunately it was never designed to support C++ Builder. So, while this specific functionality may work, I doubt it would justify to install the whole product with near to none additional benefit.
×