Jump to content
Registration disabled at the moment Read more... ×

Leaderboard


Popular Content

Showing content with the highest reputation since 07/23/25 in Posts

  1. Yeah, right 🤦‍♂️ More syntactic sugar, the compiler codegen is still a joke, and we still haven't got SIMD intrinsics. The only time I've ever wished for a ternary operator was when porting C code and being in a rush. But I wouldn't mind all this fluff (since I don't have to use it) - if they would also throw an occasional bone to those of us that need low level performance. Yes, but you don't have to use it.
  2. FWIW I reported the bad inlining due to the way these methods are implemented in TInterlocked and proposed the improvements in https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-3862
  3. Hi everyone, I'm excited to share my open-source project: DAOUI Reports, a lightweight visual report designer built with Delphi FMX. It works on both Windows and Android and acts as a simplified alternative to QuickReport, but designed for FireMonkey! 🔹 Features: Drag-and-drop report components (labels, images, shapes, etc.) Data binding with your database fields Preview, Print, and Export to PDF Supports page size customization (A4, etc.) Ideal for mobile reporting 📦 GitHub Repository Any feedback, contributions, or suggestions are more than welcome! Thank you all 🙏 — Daoui Mahmoud.
  4. Great! This is a very long awaited addition for me. I hope they also add a case statement for string types
  5. We have released new updates of all products: Pascal Analyzer 9.17 Pascal Expert 9.17 Pascal Browser 3.5.38 It is possible to download evaluation versions, and also to view the entire documentation online. Go to Peganza for more information. If you are new to the products, we recommend our Youtube video (18 minutes) that describes Pascal Analyzer, with examples and a short demo. These are the changelogs for these updates: Pascal Analyzer 9.17.0 July 15, 2025 fixed an issue with STWA5-"Possible bad pointer usage" improved parsing of constant declarations new section in Warnings Report, WARN64-"Misformed call to Format function" checks if calls have the correct number of arguments and that the types are correct fixed a problem with CONV30-"Private can be changed to strict private" and CONV31-"Protected can be changed to strict protected" fixed issue with WARN46-"Local variables that are set but not later used" WARN3-"Variables that are referenced but never set" does not warn for variables of type TFormatSettings, needs extended analysis to provide accurate warnings fixed an edge-case error that could affect STWA6-"Possible bad typecast" Pascal Expert 9.17.0 July 15, 2025 fixed an issue with STWA5-"Possible bad pointer usage" improved parsing of constant declarations new section in Warnings Report, WARN64-"Misformed call to Format function" checks if calls have the correct number of arguments and that the types are correct fixed a problem with CONV30-"Private can be changed to strict private" and CONV31-"Protected can be changed to strict protected" fixed issue with WARN46-"Local variables that are set but not later used" WARN3-"Variables that are referenced but never set" does not warn for variables of type TFormatSettings, needs extended analysis to provide accurate warnings fixed an edge-case error that could affect STWA6-"Possible bad typecast" Pascal Browser 3.5.38 July 15, 2025 improved parsing of constant declarations
  6. I wonder whether there will be a code formatter that supports this. Given that they deprecated the existing one since Delphi 11, I somehow doubt it.
  7. Actually, a patch was already created for FreePascal to add this very same conditional operator (FPC already had an IfThen() intrinsic); https://forum.lazarus.freepascal.org/index.php/topic,71398.msg556926.html#msg556926
  8. I just noticed this, maybe its interesting https://www.delphipraxis.net/217543-embarcadero-jobportal.html#post1550400
  9. Conditional operator coming in Delphi 13 https://blogs.embarcadero.com/coming-in-rad-studio-13-a-conditional-ternary-operator-for-the-delphi-language/ It is not clear from blog post are both expressions evaluated every time or based on condition? I think is most important thing about this feature.
  10. Visualize complex multi-dimensional data using #TeeBI Composer control. Minimal code, automatic output. https://github.com/Steema/TeeBI/tree/master/demos/delphi/Visualization/Composer
  11. Vincent Parrett

    Need help investigating an app crash

    I would try using MadExcept or Eurekalog for capturing unhandled exceptions - in my experience they produce far more reliable and useful information than JCL.
  12. On this atleast syuntax is readable X := if Left < 100 then 22 else 45; For example C-syntax is not what I really can say that I like. int result = (x > 5) ? 10 : 20; even worse if writte like this int result=(x>5)?10:20; Syntax highlighting saves a bit for sure but still easy to miss those... One character operator thingies... -Tee-
  13. Wow, I hated the ternary operator in every language I encountered so far. But this one with pascal keywords seems almost bearable. But, I'm sure it will bring all sorts of new anti-patterns to Delphi. And I don't think a language saddled with 'with' needs any more anti-patterns.
  14. Anders Melander

    if Obj <> nil then Obj.Free

    Delphi 1 ; procedure TObject.Free ObjectFree: MOV BX,SP LES DI,SS:[BX+4] MOV AX,ES OR AX,DI JE @@1 MOV AL,1 PUSH AX PUSH ES PUSH DI LES DI,ES:[DI] CALL ES:[DI].vtDestroy @@1: RETF 4 Delphi 2 procedure TObject.Free; asm TEST EAX,EAX JE @@exit MOV ECX,[EAX] MOV DL,1 CALL dword ptr [ECX].vtDestroy @@exit: end;
  15. devlopnew

    Project: Daoui Reports What Is It?

    Project: Daoui Reports 🧩 What Is It? Daoui Reports is a dynamic report generator developed using Delphi FireMonkey (FMX), designed to create visually rich, data-driven reports for both Windows and Android platforms. It is a lightweight, open-source alternative to commercial reporting tools like QuickReport or FastReport, offering a simple yet powerful way to design and generate printable or exportable reports directly from SQLite databases. ✅ Key Features Visual Design: Drag-and-drop components (Text, Labels, Images) onto a report template, just like in QuickReport. 🔁 Dynamic Data Binding Connects to a TFDQuery and repeats the Detail section for each record in the dataset. 📄 Automatic Page Breaking Splits content across multiple pages when it exceeds the page height, using IntersectsWith logic. 📸 Screenshot-Based Rendering Uses MakeScreenshot to capture the visual state of each Detail block and render it as an image in the final report. 🖨️ Preview & Print Offers a preview window with zoom and page navigation. Supports direct printing on Android via PrintBitmap 📎 PDF Export (Android) Exports the final report to PDF using Android’s JPdfDocument API. 📱 Cross-Platform Built with FireMonkey for full compatibility with Windows and Android . 💡 No External Dependencies Relies only on native Delphi components and FireDAC—no third-party libraries required. 🏗️ How It Works Design Mode You place visual components (like TText, TLabel) inside a TLayout called Detail. This acts as the template for each data row. Data Binding A TFDQuery is linked to your SQLite database. When the report runs, it loops through each record. Dynamic Height Calculation For each field (especially multi-line text), the system calculates the required height using TTextLayout to ensure text wraps correctly. Page Generation Each record is rendered into the Detail layout. A MakeScreenshot captures its visual state. The image is placed in a TRectangle within ZoneDetail. When the content reaches the bottom of the page (checked via BoundsRect.IntersectsWith), a new page is created. Preview & Output All generated pages are displayed in PreviewF.LayoutZOM as TImage components. From there, users can: Zoom in/out Navigate pages Print Export to PDF (on Android) 📁 Core Units UnitMain.pas Main form with SQL input, data grid, and report settings (show/hide sections). DesignU.pas The engine of the report. Contains DESINGFACT , the core function that generates the report dynamically. PreviewU.pas Handles preview, printing, and PDF export . Manages the display of all report pages. 🎯 Why Use Daoui Reports? Simple & Fast: No complex setup—just design and run. Open & Transparent: Full access to source code for customization. Mobile-Ready: Works seamlessly on Android devices. SQLite-Friendly: Ideal for local database apps. Lightweight: No bloated dependencies or installer packages. 🚀 Ideal For Inventory reports Sales summaries Fish species catalogs (as in the demo) Any application needing simple, printable reports without licensing costs. 💬 In Summary Daoui Reports is a practical, no-frills reporting solution for Delphi developers who want full control over report design and output—without relying on expensive or complex third-party tools. It proves that with smart use of MakeScreenshot, FireMonkey, and FireDAC, you can build a robust reporting system entirely in Delphi. 🔗 GitHub: https://github.com/devlop0/daoui-reports
  16. Rollo62

    Anonymous instance methods

    Yes, thats nice and useful, you can also extend this a bit, to avoid dangling pointers. See these rough ideas ... destructor TAnonProc.Destroy; begin if (Owner is TButton) and (TMethod(TButton(Owner).OnClick).Data = Self) then begin TButton( Owner ).OnClick := nil; // Ensure to remove dangling Pointer end; inherited; end; or you could even separate the Owner from the Observer type TAnonProc = class(TComponent) private FProc: TProc<TObject>; procedure Notification(AComponent: TComponent; Operation: TOperation); override; procedure OnSender(Sender: TObject); public constructor Create(AOwner, AObserved: TComponent; AProc: TProc<TObject>); end; constructor TAnonProc.Create(AOwner, AObserved: TComponent; AProc: TProc<TObject>); begin inherited Create(AOwner); // Owner = Form FProc := AProc; AObserved.FreeNotification(Self); // register observer if AObserved is TButton then TButton(AObserved).OnClick := OnSender; end; procedure TAnonProc.Notification(AComponent: TComponent; Operation: TOperation); begin if (Operation = opRemove) and (AComponent is TButton) then begin TButton(AComponent).OnClick := nil; // Clear the Pointer end; inherited; end; procedure TAnonProc.OnSender(Sender: TObject); begin if Assigned(FProc) then FProc(Sender); end; //.......................... TAnonProc.Create(Self, Button1, procedure(Sender: TObject) begin Caption := 'Click!'; end);
  17. Angus Robertson

    if Obj <> nil then Obj.Free

    In general, ICS does use FreeAndNil for new code, if not nilled in code, the nil being the important part, since double Free without nil does cause an exception. Double free is common, due to the complex inheritance of many ICS components. But I simply don't have the time to clean up code written up to 25 years ago, unless I'm updating that code for other reasons. It all needs testing afterwards, and often correction when it then fails to compile on older versions of Delphi... Angus
  18. Demo source code: https://github.com/Steema/TeeBI/tree/master/demos/delphi/Geographic/USA_Counties Note: This demo needs the "Pro" version of TeeChart.
  19. dummzeuch

    Any way a proc can find out its calling proc?

    There is always the return address on the stack. Which you can get by calling ReturnAddress But I guess you don't want an address but a function / method name? JclDebug offers some functions for that: https://stackoverflow.com/questions/1301254/how-to-get-current-methods-name-in-delphi-7 Or as described here:
  20. Anders Melander

    Minimum Viable Product (MVP)

    *facepalm*
  21. In the example thay gave, the equivalent expression is a typical IF, so we can deduce that the new expression also behaves in this way: the part not affected by the condition will not be evaluated. Of course, only they or the release can confirm this.
  22. I have some more testing to do, but I can confirm that using TFDScript behaves like I'd imagine. Thank you very much. So that leaves 2 options so far: * Use TFDScript * Have a 2nd TFDConnection that's in charge of handling multi command transactions.
  23. I would split it up into multiple parts. Make the code be generated into multiple separate files (you likely can combine them back later if that is important to you). Focus on getting each part correct. separate out the different parts... HTTP server part, request decoding, cache file storage/ range checking, HTTP request. I suspect concurrency is going to be a big issue so tell the AI to make sure it takes that into account.
  24. David Heffernan

    What is the best AI at Delphi

    MechaHitler surely
  25. see also: delphi - XE4: How to change exe output name base on platform? - Stack Overflow
×