Leaderboard
Popular Content
Showing content with the highest reputation since 08/15/25 in all areas
-
Whilst there are many Delphi components for detecting changes to file system folders they suffer from serious limitations: typically they only allow you to monitor a single folder they do not support the monitoring of specific files they rely on the FindFirstChangeNotification API which gives no information about what has changed, requiring an inefficient search. I have created a new file system monitoring library that addresses the above limitations. Features: Easy to use, but also suitable for heavy duty monitoring Single unit with no external dependencies Allows monitoring folders and/or specific files Uses the ReadDirectoryChangesW API which provides information about what exactly was changed A single instance of the component can handle the monitoring of many folders and/or files Uses an I/O completion port for efficient handling of large numbers of requests A single thread handles all requests A different notification handler can be specified for each request You can have multiple handlers for each folder or file When you monitor folders you can specify whether you want to also monitor subfolders Installation: You do not need to install the library. Just download or clone the repo and add the source subdirectory to the Library path. Usage: procedure TForm1.FormCreate(Sender: TObject); begin // Create the IFileSystemMonitor interface FFileSystemMonitor := CreateFileSystemMonitor; // Monitor a directory FFileSystemMonitor.AddDirectory(TPath.GetTempPath, False, HandleChange); // Also monitor a specific file FFileSystemMonitor.AddFile('pathtoyourfile', HandleChange); end; procedure TForm1.HandleChange(Sender: TObject; const Path: string; ChangeType: TFileChangeType); begin with lvEventList.Items.Add do begin Caption := GetEnumName(TypeInfo(TFileChangeType), Integer(ChangeType)); SubItems.Add(Path); end; end; To stop monitoring a specific file or folder you use the following methods: function RemoveDirectory(const Directory: string; OnChange: TMonitorChangeHandler): Boolean; function RemoveFile(const FilePath: string; OnChange: TMonitorChangeHandler): Boolean;
-
Hi All I have released a new YAML Parser/Emitter library for Delphi XE2 or later. It is pure delphi code, tested with Win32 and Win64 but it should work for other platforms too (no winapi dependencies). Supports YAML 1.1 (partially) & 1.2 JSONPath queries with filter expressions Multiple Document streams. https://github.com/VSoftTechnologies/VSoft.YAML
-
udp discovery Delphi Super Fast LAN tethering in IPv4 network using Indy UDP AutoDiscovery IP
Remy Lebeau replied to bravesofts's topic in I made this
I have some issues with your implementation: IPv6 networks are not supported. The client request is needlessly wordy. The client broadcasts to 255.255.255.255 instead of to the subnet's actual broadcast IP. Some routers block traffic to 255.255.255.255 by default. In case the client is run on a machine with multiple networks installed (VPN, etc), there is no option to let the user decide which network to broadcast to. The client is using separate UDP sockets to send the request and read replies. You are forcing the client to receive on a specific listening port. The server is not sending its reply back to the real port that actually sent the request. Most routers will block this traffic if port forwarding is used. On the server side, always reply to the sending port. On the client side, either 1) let TIdUDPClient read replies on its sending port, or 2) let TIdUDPServer send the request on its listening binding. Use one or the other, not both. Doesn't use Indy's TIdStack.GetLocalAddressList() method to discover local networks (at least on Windows, as it may have issues on Android). Since your goal is to allow a TCP client to discover a server, I would opt to get rid of the TIdUDPServer on the client side, and just use TIdUDPClient by itself. Send a request, read a response, done. You don't need to make that process asynchronous with TIdUDPServer in most use cases. Using TIdUDPServer on the client side makes more sense if you want to discover multiple servers and then let the user choose between them, or to leave it open so servers can just broadcast their presence over time. -
suggestion for 2 new su forum: AI usage and AI coding
Anders Melander replied to Javier TarĂ's topic in Community Management
They will be unemployed because they know how to write code on their own? Yes, that makes perfect sense; Nobody wants to hire that kind of developers. -
udp discovery Delphi Super Fast LAN tethering in IPv4 network using Indy UDP AutoDiscovery IP
bravesofts posted a topic in I made this
A simple, cross-platform demo (VCL + FMX) showing how to Super Fast LAN tethering in IPv4 network Automatically discover a server on the same LAN using UDP Broadcast with Indy components. 📌 Overview This project demonstrates a lightweight, zero-configuration **auto-discovery mechanism**: - The **Server** listens on a known UDP port (`3434`) for broadcast packets. - A **Client** (VCL or FMX/Android) sends a broadcast message (`Discovery|Hello...`) on port `3434`. - The **Server replies** directly to the client (on port `22049`) with its LAN IP address. - The **Client receives the reply**, extracts the server’s IP, and can then connect via TCP or continue communication. This makes it possible to build applications that can **find each other on the same LAN instantly** without manual IP setup. 🏗 Components Used - Indy UDP Components - TIdUDPServer. - TIdUDPClient. 2. - Cross-platform IP detection - Windows: `GetAdaptersAddresses` API - Android: `Java.Net.NetworkInterface` enumeration 3. - Thread-safe logging via `TThread.Queue`. 4. - Timer to control discovery message sending Loop All details has been added in my Github Repo here. Mit Licence: Please feel free to fork and improve & use it on your projects... Any remarks or suggestions are very wellcome here. -- thank you All. -
suggestion for 2 new su forum: AI usage and AI coding
dummzeuch replied to Javier TarĂ's topic in Community Management
They will be unemployed because AI will write all the code (or to rephrase: "Computers will program themselves") within a few years, as predicted already 30 years ago and time and time again afterwards. This time for real, we promise! -
Maybe this would be a good occasion to learn Git then... Here's a quick intro I made for someone else that wanted to contribute a change to Graphics32: On Github Create a Github account: https://github.com/signup Fork the Graphics32 repository to your own Github account. This gives you a copy, on your own Github account, of the main repository where you can push your changes. On your local system Clone your own Graphics32 repository to your local system using a Git client. I recommend the Fork git client: https://git-fork.com/ Create a branch in your local repository. Commit your changes to that branch. Push the branch to your own Graphics32 repository. On Github Create a pull request on your Graphics32 repository. Specify the master branch at the main Graphics32 repository as the target, and your branch at your repository as the source. When Github notifies me that you have submitted a pull request I'll review the changes. Once I accept the pull request, the changes are merged into the branch you specified as the target branch.
-
Executor is one of my favorite projects started in 2007 and now over the summer I did a version 2 of it (Free on MIT license). If you remember old programs like Slickrun and Launchy it was originally a bit of a "techy" alternative to these, that besides launching things can also do clipboard stuff, manage active windows, manage running apps, text manipulation, a lot of hotkey trickery, built-in calculator etc. I develop in a bunch of languages, but I really love to develop in Delphi. It's where I can get idea to something working in the least amount of time, and the project compiles in 2 seconds, where if I'm sitting in Android Studio or Xcode I can fetch a new drink while waiting for the compiler. The project is using Delphi VCL. Originally Executor supported Windows all the way back to Windows XP. Which put quite some restraints on the development side. That minimum requirement was bumped up to Windows 7, also supporting both 64bit and 32bit, adding High DPI support as well. High DPI was a bit of a challange as Executor over those many years have had several skinning systems, some supporting borderless full alphablending on the main form with overlay full alpha blending images. These of course don't look pretty if trying to stretch a full alphablending image to 250% desktop scaling, and the author of the skin might not be active anymore, so you can't expect it to be updated with several resolution of the image assets (TVirtualImage, TVirtualImageList). Because of the skinning support and a lot of visual customization options, there's also a lot of paint events, ownerdrawing, hooking into WM_PAINT, WM_ERASEBKGND, WM_MOVE, CN_DrawItem etc. So I'm not using VCL styles, I tried a couple of times to use VCL styles, as it it would be nice to use for my settings form for dark mode etc. But with my limited experiments it was hard to isolate the VCL styles to only effect specific forms (the settings form and some other trivial forms), and it would then introduce a lot of side effects on the main form, where I'm doing a lot of custom visual stuff, seeming to collide with my code for this. Also in general I'm trying to not be depended on thrid party components and technologies, also caring about system footprint (cpu,gpu,mem,io etc). Some other nice challanges has been the 32bit and 64bit versions of Windows, as Executor can scan folders like the start-menu and other system folders, these are off-limit if not matching bitwise, and also various security restrictions was gradually added with each new version of Windows. Then scanning for UWP apps was another additional challange, as UWP seems like a bit of a "clunky add-on" that changed quite a bit in each version of Windows in terms of Windows API. Cheers and happy programming, Martin Website: https://executor.dk YouTube video:
-
suggestion for 2 new su forum: AI usage and AI coding
Lars Fosdal replied to Javier TarĂ's topic in Community Management
-
suggestion for 2 new su forum: AI usage and AI coding
Dalija Prasnikar replied to Javier TarĂ's topic in Community Management
I would say that is a good thing. This means in the future Delphi will still have a solid base of developers who know how to write their code. -
EdgeAudio: real-time audio pipeline for Delphi/VCL with WebView2
Maxidonkey posted a topic in I made this
Hi all, I have just uploaded the project EdgeAudio integrate mic capture, audio playback, a high‑pass filter, VAD, hysteresis, and a “Talkover” mode from Delphi, orchestrated through a bidirectional JS bridge inside TEdgeBrowser. The architecture centers on TEdgeAudioControl and TAudioSettings, applied in real time on the WebAudio side, with clean VCL integration (virtual host, typed events). Key points Clear architecture: capture (TEdgeAudioCapture), playback (TEdgeAudioPlayer with VAD/Talkover), filtering (THighPassFilter), and a WebView2 bridge; TEdgeAudioControl exposes settings and ready‑to‑use events. Extensible event engine: aggregates/routes JSON events (audio_play, audio_pause, audio_segment, etc.) via TEventEngineManager and IAudioEventHandler. Capabilities: tunable VAD (threshold/silenceMs/timeslice), Talkover with cooldown/ratios to avoid “ping‑pong,” playback/streaming (play/pause/seek/stop), setSinkId, volume boost, built‑in notifications/animations, and optional auto‑blocking of capture during playback. Quick start Install the EdgeAudioDesign.dproj package to register TEdgeAudioControl in the Palette. Two paths: (1) already have TEdgeBrowser → use the Edge.Audio unit; (2) drop TEdgeAudioControl. Copy the web/tools folders into your project and place WebView2Loader.dll (x86/x64) next to the executable. Sample projects (AudioEdgeTest1/2.zip) are provided; add “EDGEAUDIO\SOURCE” (and “OPENAI\SOURCE”) to your project search paths. Dependencies: Delphi 12+, WebView2 Runtime, and ffmpeg if you need audio conversion (configurable ffmpegPath). Learn more Diagrams, event flow, and extension points are detailed in the “Dev note – Architecture & Mechanics” sections and the deep‑dive in the repo. Preview -
That's not quite true. They will usually allow you to continue your subscription if it run out not too long ago. But of course starting with the date it run out. Also, there are some special offers from time to time, where you can save part of the price for a new license. But for a while keeping the subscription active has been the cheapest way to update (if you can call that "cheap"). And every time you have to remove "platinum support" from the order. The one thing that has annoyed me the most, is that you need an active subscription to even download an install bugfixes.
-
@Darian Miller unearthed the following https://www.embarcadero.com/resources/development-jobs/ which allows you to post your "looking for work" requests as well as "looking for developer" posts
-
suggestion for 2 new su forum: AI usage and AI coding
Stefan Glienke replied to Javier TarĂ's topic in Community Management
Wasting terajoules for basic refactorings, welcome to 2025 -
We have had these Delphi FMX guides available for a while, and I thought it could be useful to share them here: How to use Google Maps to determine the user's location in the Embarcadero Delphi FMX app: https://www.softacom.com/blog/how-to-use-google-maps-to-determine-the-users-location-via-embarcadero-delphi-fmx-app/ - shows how to access the user's coordinates and display them on a map. How to save and read data from Google Sheets in an Embarcadero Delphi FMX app: https://www.softacom.com/blog/development/how-to-save-and-read-data-from-google-sheets-in-an-embarcadero-delphi-fmx-app/ How to implement multi-touch in an Embarcadero Delphi FMX app: https://www.softacom.com/blog/development/how-to-add-multi-touch-to-an-embarcadero-delphi-fmx-app/ - shows how to add multi-touch drawing support How to use gestures in an Embarcadero Delphi FMX app: https://www.softacom.com/blog/development/how-to-use-gestures-in-embarcadero-delphi-fmx-app/ - shows how to handle swipe, zoom, and rotate gestures How to master FastReport in Delphi: https://www.softacom.com/blog/development/mastering-fastreport-in-delphi-dynamic-file-reporting-and-visualization/ – shows how to create dynamic reports and charts How to send email via an Embarcadero Delphi FMX app using the Gmail API: https://www.softacom.com/blog/development/sending-email-via-embarcadero-delphi-fmx-app-by-using-api/ How to generate images in an Embarcadero Delphi FMX app: https://www.softacom.com/blog/development/image-generation-capabilities-with-delphi-fmx-application-via-openai-api-dall·e-models/ - shows how to use OpenAI DALL·E for image generation
-
If you let your subscription lapse then they charge you full price for a new license because they are unscrupulous and hate their customers
-
suggestion for 2 new su forum: AI usage and AI coding
Stefan Glienke replied to Javier TarĂ's topic in Community Management
In my opinion, creating new forums should only be considered if there is sufficient activity around this topic (regardless of whether it's AI or anything else), which I don't currently see. -
New YAML Parser Library - VSoft.YAML
Vincent Parrett replied to Vincent Parrett's topic in I made this
Done. Adding JSON writing was pretty trivial. -
A smart case statement in Delphi?
Anders Melander replied to PeterPanettone's topic in RTL and Delphi Object Pascal
And how is that going for us? There are many, many ways of searching for occurrence of a string in a static set of strings, but hashing certainly isn't the fastest. Hashing is a generic algorithm that doesn't take strings' unique properties into account. A chatbot couldn't have expressed it better - whatever it is. -
alternative to call parameter?
A.M. Hoornweg replied to pcoder's topic in Algorithms, Data Structures and Class Design
May I suggest "fluent interfaces" as an alternative to nested calls. Instead of using a record like a dumb data store that is only manipulated from the outside, you can put the methods that fiddle with the record's contents directly into the record itself and thus keep the code and the data closely together. Also, this enables one to use a so-called "fluent interface". Example: This is an example of a record that contains just one integer member, "data". In real life, you can make the record as complex as you want. type pMyrecord=^tMyRecord; tMyRecord=Record data:integer; Function Reset:pMyrecord; Function Add (x:integer):pMyrecord; Function Multiply (x:integer):pMyrecord; Function Divide (x:integer):pMyrecord; End; As you can see, all the methods in this record return a pointer, which simply points to the record itself. That is the "secret sauce" one needs to implement fluent interfaces. function tMyRecord.Add(x: integer): pMyrecord; begin data:=data+x; result:=@self; end; function tMyRecord.Divide(x: integer): pMyrecord; begin data:=data div x; result:=@self; end; function tMyRecord.Multiply(x: integer): pMyrecord; begin data:=data*x; result:=@self; end; function tMyRecord.Reset: pMyrecord; begin data:=0; result:=@self; end; Now the cool thing: All these methods can be concatenated and will be processed left-to-right. This produces very legible and compact code: procedure Test; var x:tmyrecord; begin x.reset.add(12).multiply(4).divide(2); end; (edit) Note that I didn't do a single heap allocation here, never manually passed the record as a parameter and never did a nested call. The data lives on the stack. If the record contains managed objects such as strings, these are disposed of automatically. -
Migrating a Delphi XE4 System to MSSQL, PostgreSQL, and Linux – Softacom’s Experience
Roger Cigol replied to Serge Pilko's topic in Tips / Blogs / Tutorials / Videos
Added support for Linux by rewriting ±769,000 lines of Windows-specific code Built a unit testing framework from scratch (500+ tests) A code base with towards 700 000 lines of windows specific code presumably has much more that is not "windows specific". To then claim that 500 unit tests is useful strikes me as a sentence aimed at people who have never worked with unit testing. Even my simplest projects have unit tests measured in thousands..... -
A Conditional Ternary Operator for the Delphi
HeartWare replied to EugeneK's topic in RTL and Delphi Object Pascal
Yes, but who turns that off? Much code (even in System units) will fail with that setting off, and lots of code will be executed unnecessarily (and may even produce wrong results since it isn't supposed to be called). -
TGridify, convert a flat table into a pivot-grid in one line of code
aehimself replied to david berneda's topic in Delphi Third-Party
You really should treat Julia better :D- 3 replies
-
- pivot-table
- datamining
-
(and 2 more)
Tagged with:
-
[Info & Feedback] DelphiGenAI v1.1.0 — Sharing Updates and an Educational Approach
Maxidonkey replied to Maxidonkey's topic in I made this
I have just updated the DelphiGenAI wrapper to support the OpenAI APIs. Below is the list of changes made compared to version 1.1.0. These enhancements are designed to fully leverage the capabilities of the GPT-5 model while ensuring optimal compatibility with previous models. You can find the complete repository here: https://github.com/MaxiDonkey/DelphiGenAI Version 1.2.0 JSON Normalization Before Deserialization New GenAI.API.Normalizer module (TJSONNormalizer, TWrapKind, TNormalizationRule) to unify polymorphic fields (e.g., string vs. object). Direct integration into the HTTP layer: new Get(..., Path) | Post(..., Path) overloads enabling targeted normalization of a JSON subtree before object mapping. Canceling Background Requests New Responses.AsyncAwaitCancel(response_id) method to cancel an asynchronous response (background = true), with full callback support (OnStart, OnSuccess, OnError). Streaming Enhancements Extended typed coverage for streaming events and outputs (MCP, Code Interpreter, Image Generation, etc.) via new Responses.OutputParams classes (TResponseOutput*, TResponseImageGenerationTool, TResponseCodeInterpreter, etc.). New Types and Parameters InputParams: full coverage for computer interactions, local shell, MCP, web search, code, image generation, reasoning, text/JSON formats, tool choice/hosted tool, and file search filters. OutputParams: states (Created, InProgress, etc.), events (Added, Delta), usage metrics, and statistics. New enums: TOutputIncluding, TReasoningGenerateSummary, TFidelityType, etc. API v1/chat/completions New parameters: prompt_cache_key (prompt caching) safety_identifier (stable ID for safety monitoring) verbosity (low / medium / high) API v1/responses New parameters: max_tool_calls prompt (template reference via TPromptParams) prompt_cache_key, safety_identifier stream_options, top_logprobs, verbosity Structured System and Developer Messages New overloads: TMessagePayload.Developer(const Content: TArray; const Name: string = '') TMessagePayload.System(const Content: TArray; const Name: string = '') Improves parity between plain text and structured content flows.