Jump to content

David Heffernan

Members
  • Content Count

    3586
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by David Heffernan

  1. David Heffernan

    0/0 => EInvalidOp or NAN ?

    Whatever problem this is attempting to solve, this isn't the solution
  2. David Heffernan

    Setting Font Color on certain controls

    And also introduce large numbers of obscure bugs that will take forever to debug.
  3. David Heffernan

    'for i:= 0 to 4' does 6 loops when not in Debug mode

    Enable range checking, at least in debug builds
  4. David Heffernan

    'for i:= 0 to 4' does 6 loops when not in Debug mode

    Anyway you should use the debugger to inspect this. Enable debugging for the release build.
  5. David Heffernan

    'for i:= 0 to 4' does 6 loops when not in Debug mode

    > 'for i:= 0 to 4' does 6 loops when not in Debug mode No it doesn't.
  6. David Heffernan

    0/0 => EInvalidOp or NAN ?

    Check what the floating point exception mask is. I'm sure you'll find that invalid op is unmasked. Some code in your process is doing this.
  7. FWIW this doesn't match what I see in my list
  8. It's not slow in virtual mode. VirtualTreeView is the usual alternative.
  9. That's the scenario I have, with multi select enabled. And yes I walk the entire list checking selected state for each item.
  10. In my virtual list view I'm getting OnSelectItem fired whenever the selection changes. However, the Item and Selected arguments don't tell you everything that has happened. You just need to run through the list and check Selected on each item again.
  11. Didn't you ask this on SO recently, and get an answer? Could you link that question, which is always good practise when cross-posting.
  12. Thanks for the vote of confidence!
  13. True, but all the same, that salary is pretty terrible even in Europe, considering the experience they are asking for.
  14. That would have been, and still is, illegal
  15. Evidence please. The last time I saw this happen, with one of your posts, the voting and comments were reasonable in my opinion. Instead of deleting the post, you should have improved it as suggested. That's the entire point. That's the design goal. As I said above, the primary use case of SO is to curate high quality questions and answers. The criticism that you experience on your questions is part of the curation mechanism. You just come across as salty that you didn't get an answer to your question. But as mentioned above, SO is not trying to answer your questions. You can just go elsewhere to find the service you need. There are a few reasons. One of them is that there aren't as many questions that haven't already been asked. Perhaps the main reason is the policy changes by corporate SE, some discussion of that here: https://meta.stackexchange.com/questions/389811/moderation-strike-stack-overflow-inc-cannot-consistently-ignore-mistreat-an Mods (elected and community) are just fed up with being unable to curate. I also think it's important to look beyond the delphi tag in SO. Delphi is a mature tech, with not much innovation. If you want to look at how SO works, then you need to look at tags for a broad spectrum of technologies. What I find ironic about the corporate SE policy changes in the past 5 years is that the community largely ignores them. They have a community run site. The vast majority of moderation and curation is done by community mods. Then there are elected mods who are bound by slightly different terms of reference. And corporate do none of the actual work. So they can make whatever policies they want, but it has little effect because the community does what it wants. Corporate told mods to be more permissive of low quality posts. Community doesn't want to do that and so is in constant conflict with corporate. Stack Overflow is worse than it used to be, much worse, in my view. But it's not because mods don't allow low quality posts. It's because mods aren't empowered enough to deal with low quality.
  16. The first few times I asked questions and then answered questions on SO I did so badly and was told so. So I learnt. I think a lot of people who are criticised on SO would just better off heeding the criticism. As a moderator (not an elected moderator) I can say that SO's policies in recent years to drive quantity of posts to the detriment of quality has been dispiriting. The vast majority of users of SO don't ask. They use posts that are already there. This relies on there being well posed questions with good and accurate answers. Invariably the people complaining are asking poorly posed questions that aren't going to be of use to future visitors. In my view these questions should simply be removed. With a minimum of fuss for mods. Not doing so is the tail wagging the dog. The site should be catering to the majority of its users who are largely voiceless. Instead it caters to a tiny minority who make a lot of noise. I definitely support this strike.
  17. David Heffernan

    delphi 10.4.2 invalid compiler directive

    Except this is troublesome if you have important project settings defined in the dproj file
  18. David Heffernan

    delphi 10.4.2 invalid compiler directive

    We can't reproduce what you report. Looks like the issue might be in your project settings. Maybe.
  19. David Heffernan

    delphi 10.4.2 invalid compiler directive

    And what about the rest of what I asked for?
  20. David Heffernan

    delphi 10.4.2 invalid compiler directive

    If there's an error reported by the compiler, is possible for you to copy and paste that here? Is it possible that we can say the minimal code that reproduces the issue? At the moment you are asking us to give you directions but blind folding us.
  21. David Heffernan

    ChatGPT Converted Unit

    Have you considered learning Delphi yourself, or hiring a programmer with thee skills. Because ChatGPT plus this forum isn't going to work out.
  22. David Heffernan

    How many end keywords are there?

    Semicolon is the statement separator, and so is only needed if the next code is a statement It's also only by convention that you put the semicolon right next to the end. You could equally write: begin // foo end ; Same is true for the end of a unit. You can write it like this: end . If you omit the period at the end of a unit the compiler error says So, it's talking about the period which it considers a separate thing. So, in conclusion, there's only one end keyword. And semicolon is the statement separator, unrelated to end. And the period marks the end of a unit. Again unrelated to the end keyword.
  23. I came across this code in the RTL: function TRegistry.GetKeyInfo(var Value: TRegKeyInfo): Boolean; begin FillChar(Value, SizeOf(TRegKeyInfo), 0); Result := CheckResult(RegQueryInfoKey(CurrentKey, nil, nil, nil, @Value.NumSubKeys, @Value.MaxSubKeyLen, nil, @Value.NumValues, @Value.MaxValueLen, @Value.MaxDataLen, nil, @Value.FileTime)); if SysLocale.FarEast and (Win32Platform = VER_PLATFORM_WIN32_NT) then with Value do begin Inc(MaxSubKeyLen, MaxSubKeyLen); Inc(MaxValueLen, MaxValueLen); end; end; I'm wanting to call RegQueryInfoKey and wondering if I also need to mimic this far east if statement. I had a quick search on github for other code calling this function and can't see anything similar. Is it possible that this code is bogus?
  24. David Heffernan

    Have any of you worked with Visual C++?

    That's all very nice. It's 2023 now though.
×