Jump to content

Uwe Raabe

Members
  • Content Count

    2919
  • Joined

  • Last visited

  • Days Won

    170

Everything posted by Uwe Raabe

  1. So you are out for a warning/hint when abbreviations are used? (I won't consider error as long as CTRL-O-O actually follows such a setting) You might consider to rephrase the description as it isn't clear IMHO.
  2. It is not clear to me what this issue is about. Currently you can use the abbreviated version as well as the verbose one. I don't see where hint/warning/error settings come into play here, besides the directives affecting them.
  3. The problem in your code is that the anonymous method calling RunWork uses the counter variable directly. While it is correct that this variable is captured for the anonymous method, it is captured by its address and not by its value. Therefore the RunWork call uses the value of counter that is given in the moment of that call. Usually that is different from what you expect. You can solve this by injecting a method returning the anonymous method with the counter value at that time. function MakeRunWork(ACounter: Integer): TProc; begin Result := procedure begin RunWork(ACounter); end; end; procedure TForm780.Button1Click(Sender: TObject); const NumberOfParts = 1; var counter: integer; TaskArray: array of iTask; begin { --- run button --- } SetLength(TaskArray, NumberOfParts); for counter := 0 to NumberOfParts - 1 do begin try TaskArray[counter] := TTask.Run(MakeRunWork(counter)); except on E:EAggregateException do ShowMessage( E.ToString); end; // try end; // for counter end;
  4. I don't understand how this can even work at all. If PosY equals Y - 1 then PosY cannot be equal to Y - 2 nor Y - 3 and so on. There can either one condition be met or none, but not all.
  5. Uwe Raabe

    while TStream_TryRead() do

    @David Heffernan, that was my first idea, too. There is just some code missing that handles the BytesRead > 0 case before the loop exits. Some if-then after the read cannot be avoided in this case.
  6. Uwe Raabe

    Paradox in FireDAC Delphi 11 Ent 32bit VCL App

    I cannot see any compile error shown in the original post either. There is only one reference which doesn't make any sense:
  7. Uwe Raabe

    How do I know if the click is an actual user click ?

    One can also use the csUpdating flag in ComponentState, which is controlled by the Updating and Updated methods. It works for all TComponent descendants. But now we are in a much wider realm than the original OnClick problem describes.
  8. Uwe Raabe

    How do I know if the click is an actual user click ?

    Simply setting FState doesn't reflect the change in the control while its handle is allocated. That may work for some initialization during FormCreate before the handle allocated, but is no general solution.
  9. Uwe Raabe

    Project Options -> Version Info aka. dproj madness

    That is actually what my build server (resp. FinalBuilder) does here. That is only one reason, why I avoid creating any exe on my development system and send it to a customer. I would love to see a reliable solution in the IDE itself. For compatibility reasons I suggest to add a special entry to the configuration combo which handles the storage in the base configuration and clear all child configurations. One has to remember that the version info dialog for Win32/Win64 only projects differs from those targeting other platforms, too. The former can handle that in the base configuration, while the latter has to do it in the platform bases. The reason is that different platforms follow different rules.
  10. Uwe Raabe

    PDF to PNG and PNG to PDF

    Sadly, that exactly hits the point. Joe Hecht passed away some time ago.
  11. Uwe Raabe

    How do I know if the click is an actual user click ?

    It affects all TButtonControl descendants of which TCheckBox is just one. The easiest way to avoid that is to use actions. Another way would be to make use of the (protected) ClicksDisabled property, which skips the call to the event handler. That is basically the same as what the actions do.
  12. Uwe Raabe

    Project Options -> Version Info aka. dproj madness

    Project Magician follows a different scheme: It has an option to remove all child entries so that only the base values are effective. Unfortunately it doesn't force you to change base values only nor does it warn if you don't.
  13. Uwe Raabe

    JSON and UInt64 problem

    This can be easily solved by converting to string before calling the constructor: JSonObject.AddPair('Test', TJSONNumber.Create(High(UInt64).ToString)); // add System.SysUtils to uses clause If the UINT64 value is already correct in the JSON string it is properly converted to an UNIT64 later.
  14. Uwe Raabe

    Display Value at runtime

    I'm sorry, but I have no clue what you are talking about.
  15. Uwe Raabe

    JSON and UInt64 problem

    I have to revert my statement: Currently not even creation of a UINT64 is supported. Nevertheless, the values are always stored as string, so no restrictions apply here. It is the responsibility of the developer to do the conversion needed. For completeness I suggest to create a QP request. Internally it needs just some extension to the case statement in TJSONString.AsTValue.
  16. Uwe Raabe

    Project Options -> Version Info aka. dproj madness

    I guess you already did: https://quality.embarcadero.com/browse/RSP-33469
  17. Uwe Raabe

    JSON and UInt64 problem

    Probably not. Although it accepts UINT64 at creation, there is no support for retrieving it. I suggest to file a QP report.
  18. Uwe Raabe

    Rad studio install on several machines

    Licenses are bound to the machine name, so you probably have to use your serial to register online on the new system. This should work for a certain (low) number of times after which you need to ask for a registration bump. If you have an active subscription you can contact support for that, otherwise you need to ask sales for a bump.
  19. Uwe Raabe

    Project Options -> Version Info aka. dproj madness

    Unfortunately, changing any version information values at least once will break inheritance and the values in that build configuration have their own life. There is no built-in way to establish inheritance - unless the entries are removed from the dproj with some exterenal tool. That is the reason why Project Magician has this option
  20. Uwe Raabe

    Project Options -> Version Info aka. dproj madness

    Can you elaborate on what do you expect instead?
  21. Uwe Raabe

    Airline phone number spam

    And they are back again!
  22. Uwe Raabe

    Airline phone number spam

    Not sure about your system, but when I here hover over your post there is a Report post label highlighted in the post title to the right, which can be used to, well, report the post.
  23. Uwe Raabe

    New mystery of freezing IDE.

    Existing project is just a bit vague.
  24. Uwe Raabe

    How do I upgrade an old 2007 project ?

    I would also recommend doing it in one step to the most recent version. Just make sure to disable all new features like VCL Styles or High DPI support (which is enabled by default). Using the IDE in highdpi:unaware mode may also simplify ones life in case one has a high dpi system for development.
  25. Uwe Raabe

    TFruit class moved to component

    I luckily managed to grab a copy in good condition (including CD) for unbelievable 12.38€ - sometimes it pays to have relatives in the U.S. Now I only have to wait for them visiting us in November, but looking at the ~65€ they tried to charge for shipping it to Germany that is definitely the better option.
×