Jump to content

Uwe Raabe

Members
  • Content Count

    2538
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by Uwe Raabe

  1. Uwe Raabe

    Offline Help updates available from Embarcadero

    No: https://github.com/UweRaabe/CompressPath
  2. Uwe Raabe

    Offline Help updates available from Embarcadero

    Also this list from Darian Miller may give a rough overview: Delphi Master Release List
  3. Uwe Raabe

    Offline Help updates available from Embarcadero

    I use my build VM for that. It has Delphi versions 5, 7, D2007 up to 11 installed side by side and there still is plenty of room for more. When someday it will run out of disk space I can simply extend that. BTW, having all versions on the same machine simplifies multi-version builds a lot. My working environment is different, though. There I have several VMs for each of my customers to avoid problems with different needs and security. The Delphi versions on those may change during time. The physical host is reserved for my own projects and has only Delphi versions 10 to 11 installed. Usually it is cleaned after some years - latest when the hardware changes.
  4. Uwe Raabe

    Offline Help updates available from Embarcadero

    The Alexandria Wiki page has links to Previous Versions on the left.
  5. Uwe Raabe

    ToDo seems to be broken in 11.3

    Ate least I cannot reproduce.
  6. Uwe Raabe

    My Object Inspector is broken

    This can also be a side effect of installing some design time package.
  7. Uwe Raabe

    Compiling Delphi Apps on Azure DevOps Pileline

    Perhaps this may help a bit: Azure DevOps and Delphi – Build Agents
  8. Uwe Raabe

    String literals more then 255 chars

    Because they prohibit the formatter from concatenating the lines.
  9. Uwe Raabe

    String literals more then 255 chars

    Isn't that what I just wrote?
  10. Uwe Raabe

    E2137 Method not used in base class

    The interesting part would be the declaration of PanelResize in the base class.
  11. Uwe Raabe

    String literals more then 255 chars

    Actually I use these quite often. In the case of your SQL, which could as well come from the FireDAC query editor, I just copy the whole code, create a string array constant with a simple template, multi-paste the SQL and format the results: const cArr: TArray<string> = [ // 'SELECT', // 'DATE_FORMAT(co.order_date, ''%Y-%m'') AS order_month,', // 'DATE_FORMAT(co.order_date, ''%Y-%m-%d'') AS order_day,', // 'COUNT(DISTINCT co.order_id) AS num_orders,', // 'COUNT(ol.book_id) AS num_books,', // 'SUM(ol.price) AS total_price,', // 'SUM(COUNT(ol.book_id)) OVER (', // ' ORDER BY DATE_FORMAT(co.order_date, ''%Y-%m-%d'')', // ') AS running_total_num_books', // 'FROM cust_order co', // 'INNER JOIN order_line ol ON co.order_id = ol.order_id', // 'GROUP BY ', // ' DATE_FORMAT(co.order_date, ''%Y-%m''),', // ' DATE_FORMAT(co.order_date, ''%Y-%m-%d'')', // 'ORDER BY co.order_date ASC;', // '']; procedure UseSQL; begin var qry := TFDQuery.Create(nil); try qry.SQL.AddStrings(cArr); // ... finally qry.Free; end; end; The same scheme also works for JSON or XML. Interesting, that you bring up the SQL text, which is neatly split into multiple lines - probably for better readability. Despite allowing string constants with more than 255 characters in one line, it would be more helpful to have string constants over multiple lines preserving linefeeds. Then it wouldn't even matter if the lines are limited to 255 characters each, although I expect this limit being lifted anyway whenever such a feature will be implemented.
  12. Uwe Raabe

    Type inference question

    You probably meant w := Use.When<Word>(Cond, 1, 32000);
  13. In fact they are: type TStringArr = array of string; const cStringArr: TStringArr = ['Hello', 'World']; Just not with the record element type, because the record constants are not accepted as true constants.
  14. That is not needed when the dcu folder is configuration and platform specific using something like $(Platform)\$(Config). That way the existing dcu files in that folder are compiled with the last settings for that platform and configuration. If working with several projects it also helps to have separate dcu folders for each. Some use $(SanitizedProjectName) for that. With this approach I have no problems switching platforms, configurations or projects. I very rarely make changes to the directives in a project configuration. If that turns out to be necessary I'd rather add another (child-)configuration with separate dcu folders. BTW, avoiding circular unit dependencies gives a significant performance boost for Code Insight.
  15. Uwe Raabe

    Assign an event at run time??

    Move the event to the private section, so the Form Designer won't fiddle with it. At the appropriate code determine which of the eligible methods must be used and assign it to the TDataSource OnDataChange event. // assuming this code runs inside the datamodule. Otherwise myDataSource must be qualified begin if SomeCondition then myDataSource.OnDataChange := MyEventHandler else myDataSource.OnDataCHange := MyOtherEventHandler; ... Personally I would rather extract the code from inside the event to a separate method or different separate methods. Then you can make the decision inside the hard-wired event: procedure TdmC.dsJobTicketsDataChange(Sender: TObject; Field: TField); begin if SomeCondition then MyEvent(Sender, Field) else MyOtherEvent(Sender, Field); end;
  16. Uwe Raabe

    TNumberBox and scientific notation (exponential format)

    Seems like a feature request in QP would be appropriate.
  17. Uwe Raabe

    FireDAC MSSQL behaviour changed between 11.1 and 11.3

    Just yesterday I had a similar case where I had to add an Encrypt=No to the connection parameters for ODBC 18.
  18. Uwe Raabe

    Touchpad two fingers pan in a VCL app ?

    Have you dropped a TGestureManager onto the form and wire it to the forms Touch.GestureManager property? In addition, the Touch.InteractiveGestures.igPan musst be active (which is by default).
  19. Uwe Raabe

    String literals more then 255 chars

    I for myself have never spent any time on this limitation, because I never had to (and probably never will) write that long string literals. Not only that the style guide is much stricter, it is just way less readable and thus I would never even think of doing that. In addition I would literally slap such code in the face of the developer presenting it to me. So better don't count me in here.
  20. Uwe Raabe

    help for Indy is not available as stated in Delphi dokumentaiton

    It opens up without problems here (RAD Studio 11.3). Edit: It opens via the Help menu entry. Do you expect it to open with F1 in the sources?
  21. Uwe Raabe

    Panels and alignment

    Another answer can be found on StackOverflow (although for alTop) Delphi: How to programmatically adjust visual ordering of components with align = alTop
  22. Uwe Raabe

    Async/Await with updating visual controls

    In addition I would pre-calculate the timestamp (Now) inside the thread. Otherwise you'll get the time stamp when the main thread handles the call. Not sure if this is actually significant, though.
  23. I am reluctant to write the trivial case, but it won't execute if just no exception bubbles up to that point, perhaps because it is caught (not necessary handled properly) at some deeper level. Just curious: What problem are you actually trying to solve?
  24. Uwe Raabe

    Deleting a Field Problem

    Extend that to all dfm files.
  25. Uwe Raabe

    Delphi 11.3 is available now!

    It is indeed. That is also the reason why a couple of bugs are fixed and features implemented the way they are or not even at all.
×