Jump to content

Attila Kovacs

Members
  • Content Count

    1944
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by Attila Kovacs

  1. Really? And what if the var in the sub-roc is passed further? How deep do you want the compiler work for you? What if the decision is based on a variant? Should the compiler evaluate every outcomes? How slow should be the compiler just for your entertainment? Buy TMS FixInsight, write unit tests and first of all, develop a coding pattern which doesn't even uses such pitfalls.
  2. It's not the compilers job to do code analysis for you?
  3. As a comment? 😉
  4. these are just your own patterns, no guarantee, it's just made up, also, calcX can be a one liner or a power-plant burner 🙂
  5. they have index you can inherit the accessors they have nice RTTI support, can be decorated the h*ll are you talking about, how should be a GetThis() more verbose about its implementation as a property?
  6. Attila Kovacs

    Class methods Polyformism

    this is it: class function TMaster.GetMasterId: integer; begin writeln(classname); // Result := GetChildID; { <= at this point I get an abstract error } end;
  7. Attila Kovacs

    Class methods Polyformism

    The compiler should read the docs and give some hint, if it's not already the case. At least at the "override".
  8. Attila Kovacs

    ISO8901: Week numbers and year

    There is no such thing in Delphi. You have to roll your own. Should not be that hard.
  9. Attila Kovacs

    Which option to use for a large batch of REST queries?

    I'm using "pipeline" for a multi downloader, with my "download" and "import" stages. It's really cool.
  10. Attila Kovacs

    TVirtualStringTree Columns

    Are the column indexes still the same? The tlte seems different. I'm not using icons so I never encountered such thing.
  11. Attila Kovacs

    SvcMgr and Event Logs

    in the Vcl.SvcMgr.pas / procedure TServiceApplication.Run; there are these two lines: if StartThread.ReturnValue <> 0 then FEventLogger.LogMessage(SysErrorMessage(StartThread.ReturnValue)); where LogMessage (windows ReportEvent()) gets a string parameter containing an error message and having 3 other parameters filled with default values: EventType=1, Category=0, ID=0. Now, every time this LogMessage is called, in the Event Logs I see an entry with ID=0 and the message is not the one passed to this method but the translated error message (to the windows' current language) of the ID=0. (Or some similar mechanism which I'm not aware of.) Like I'm having always: "Der Vorgang wurde erfolgreich beendet." ID = 0. But if I'm also passing the error code to LogMessage, like: FEventLogger.LogMessage(SysErrorMessage(StartThread.ReturnValue), 1, 0, StartThread.ReturnValue); then in the event viewer are the right messages. Also, the message parameter (the first parameter) will be inserted in those messages if there is a placeholder for that. Did something change since Windows NT or ist it a longstanding bug or do I miss something?
  12. Attila Kovacs

    SvcMgr and Event Logs

    btw. is there any default table provided by delphi?
  13. Attila Kovacs

    SvcMgr and Event Logs

    I believe you but I'm not dreaming.
  14. Attila Kovacs

    TVirtualStringTree Columns

    toAutoSpanColumns
  15. Attila Kovacs

    Profiler for Delphi

    @Anders Melander I've installed the VTune Profiler 2022.1.0/621966 and loaded an exe with a 31MB pdb and the hotspot analysis took about a minute. I think this was way slower back in the days you wrote the converter. Give it a try on an other machine.
  16. Attila Kovacs

    Profiler for Delphi

    I've downloaded the "latest" VTune Profiler, 2022.1 but it doesn't even touches the pdb file. Luckily I'm not using this app at all. edit: forgot to bind... stay tuned
  17. Attila Kovacs

    MAPISendMail Win10 64 Bit

    No, the problem will be MapiLogon, don't use MapiLogon. Try this unit and give us feedback
  18. What is the problem with conventional coding? Why the ascii art and why not use some properties and a normal try finally?
  19. But as a Library-Writer, this validation is a Plus, and not a "guard" for the rest of the code 😉
  20. ok, you are right, I missed a lot from the beginning, my apologies
  21. I would eventually, if I'm using them in the constructor. Eventually, as I'm not sure that an exception("I'm dumb") is better than an AV. If I'm not using them in the constructor, there is no reason to validate them. Also, it can be still trash because it's not nil.
  22. he has no problems with memory management, he even made it clear in just a couple of replies above so I have no idea what you trying to prove here
  23. Must be a very rare occasion where the parameter type itself does not cover the validity and the validity would not change with time, as far as I can think of. In this case of course a validation is not avoidable. However, I still think, that that is not the case behind the problem because it should be such rare, that he would not brought it up. I suspect over- and early-validation. At least, my advice was, not to do them if not neccessary.
×