

Rollo62
-
Content Count
1984 -
Joined
-
Last visited
-
Days Won
26
Posts posted by Rollo62
-
-
9 hours ago, Kevin60 said:Pleas could we have more tips like this. Maybe we could compile enough tips from Delphi praxis members into a pdf.
Perhaps this will do it:
https://learndelphi.tv/
https://www.amazon.de/-/en/Code-Faster-Delphi-Alister-Christie/dp/B08KH3R42T -
24 minutes ago, Lajos Juhász said:During the release webinar Marco has mentioned that it was trained among other informations using the Delphi 13 docwiki.
Ok, it has kindof strange infos too, like bugfix would be possible somehow.
https://docwiki.embarcadero.com/RADStudio/Florence/en/Release_Notes#Launching_iOS_fails_with_PAServer_22it doesn't say here either very clearly
https://docwiki.embarcadero.com/PlatformStatus/en/Main_Page#Supported_Platforms_and_Operating_Systems
Perhaps its not clearly noted, that there were any issues.
For example at Delphi 12 it clearly stated that its not able to debug on iOS 17 devices,
https://docwiki.embarcadero.com/PlatformStatus/en/Main_Page#cite_note-iOS17-2
Strange, why did they removed this note in Delphi 13?
Maybe they intend to fix this in an early patch.
-
1
-
-
1 hour ago, David Heffernan said:I was interested in the new AI chatbot that Emba are offering,
Good question, I've tried this
"How can I debug iOS with Florence?"As far as I know, debugging iOS ist still broken, which I can find also in the release notes for example
If this compainion was trained on the current data, then its a little off here.
So I wonderwhat they used for training really, I hope also some insights from Jira or the like.
-
-
Oh my God, AI really doesn't have much support in this forum, or at least fair, open treatment.
We'd be better off banning the use of the anti-term “AI” with a flashing red warning light,
rather than thinking about new forum sections.-
1
-
-
2 hours ago, Stefan Glienke said:.... if there is sufficient activity around this topic ....
I would say it is already much, because there were so many GitHub Delphi AI libraries popping up including the Delphi AI support too,
so I think it is a high topic density right now.
It would be worth to give them a common home, and keep all their questions focused into them.
On the contrary, if no AI forum, what will the best place to ask questions ( Off-Topic, Other stuff, ... )?
-
6 hours ago, MrZ said:switched to Parallels when we moved over to MacBook Pro M1's.
Thanks a lot.
So you say Option C is working on MacBook M1, or have you tested it also successfully under MacBook x86, because thats still my main system?
Maybe I will give it a try. -
16 hours ago, Stefan Glienke said:... a terrible hack - if you add a new case, you have to change not just one place but several ones ...
Two places, I would say, thats what I noted above regarding its disadvantage.
I'm fully aware of its pros and cons, it was just a proof of concept, but it works not that bad, I must say.
The main usefulness perhaps comes from its wildcard and RegEx options and its general good readability, IMHO,
while its not the most pure string to case solution of course.
This was just a fast hack yesterday, combining my thoughts over some years, if this would makes sense or not, just think about that problem a bit deeper.
Right, it doesn't replace a real, native string case of, but perhaps it has its place in the world too.16 hours ago, Stefan Glienke said:... make sure you did not make any mistake with the index or the order. ...
True, that why I considered a combination with the enum type too, that should be easy to add and extend to the former enum proposals.
All these "case TRttiEnumerationType<TMyStrings>.GetValue(s) of" solutions, I would see more related to enums, than to the original demand of a "case-of" implementation.
They need perhaps even more than two pre-definitions and more code distributed over the whole unit, with defining specific enum types.
To use kindof fluent interface with anonymous methods would work perfectly too, but thats way too far from the case-of look-and-feel I am thinking of.
There are some ideas, but all of them has a lot of pros and cons, hard to find the sweet spot, for a general "case-of" implementation
-
Interesting, do you have a small sample how you get this running?
Its quite a messy protocol
https://gpsd.gitlab.io/gpsd/NMEA.html#_talker_ids
I wonder, what subset of the data will be available over Android phones, I think the phones will miss out a lot of data, right?
-
5 hours ago, MrZ said:We've used the ASUS USB-BT500 for this purpose. Our experience is that it works better than using the built-in Bluetooth device.
Thanks, that looks good, but I'm unsure if this is only working under Win11.
It only tells us Win11 ready, but nothing about MacOS.
My setup is on a MacBook (Intel x86), running Parallels Desktop VM with Windows and Delphi,
when debugging on the MacOS hardware it was always possible to access the Mac's BT device when running on this.
There three scenarios, I would think:
A.) MacOS -> PLS -> Win11 -> Delphi -> Debugging on MacOS hardware -> Accessing MacOS BLE shall be possible still ( I hope so )
B.) MacOS -> PLS -> Win11 -> Delphi -> Debugging on Win11 VM -> Accessing original MacOS BLE through PLS -> seems to be gone in the futureC.) MacOS -> PLS -> Win11 -> Delphi -> Debugging on Win11 VM -> Accessing BLE dongle via MacOS -> PLS making BLE dongle available in Win11 VM -> You mean this?
Does such Asus BLE dongle works for the Mac too, or doesn't it need to work under MacOS as it is handled by Win11 alone?
I've tried years ago to find some working dongle and gave up, as it is nearly impossible to get clear answers to the BLE dongle compatibility.
At that time, it was only said possible by a specific Allpe-compatible chipset and some hacky driver installation, as far as I remember.
-
-
Here is another update, with registration of group patterns and guard options.
Usable like this:
procedure TMainFrm.SimpleWhenExample; begin Log_Memo('=== RegEx Pattern Matching Example ==='); var LCaser := TS4Caser_Factory.New( True, -1 ); LCaser .Register( 1, 'aaa' ) .Register( 2, 'bbbb' ) .Register( 3, 'ccc' ) .Register( 4, 'aa' ) ; var LTest := 'ccc'; case LCaser.Match( LTest ) of 1: Log_Memo( 'aaa matched' ); 2: Log_Memo( 'bbb matched' ); 3: Log_Memo( 'ccc matched' ); 4: Log_Memo( 'aa matched' ); else Log_Memo( 'nothing matched to ' + LTest ); end; LTest := 'bbb'; case LCaser.Match( LTest ) of 1: Log_Memo( 'aaa matched' ); 2: Log_Memo( 'bbb matched' ); 3: Log_Memo( 'ccc matched' ); 4: Log_Memo( 'aa matched' ); else Log_Memo( 'nothing matched to ' + LTest ); end; LTest := 'bbbb'; case LCaser.Match( LTest ) of 1: Log_Memo( 'aaa matched' ); 2: Log_Memo( 'bbb matched' ); 3: Log_Memo( 'ccc matched' ); 4: Log_Memo( 'aa matched' ); else Log_Memo( 'nothing matched to ' + LTest ); end; LTest := 'aa'; case LCaser.Match( LTest ) of 1: Log_Memo( 'aaa matched' ); 2: Log_Memo( 'bbb matched' ); 3: Log_Memo( 'ccc matched' ); 4: Log_Memo( 'aa matched' ); else Log_Memo( 'nothing matched to ' + LTest ); end; // // GUARD: Ignore <= 2 char lengths // LCaser .WhenAny( function ( const AValue : string ) : Boolean begin if AValue.Length > 2 then Result := True else Result := False; end ) ; LTest := 'aaa'; case LCaser.Match( LTest ) of 1: Log_Memo( 'aaa matched' ); 2: Log_Memo( 'bbb matched' ); 3: Log_Memo( 'ccc matched' ); 4: Log_Memo( 'aa matched' ); else Log_Memo( 'nothing matched to ' + LTest ); end; LTest := 'aa'; //! This ís guarded ( len <= 2 ) case LCaser.Match( LTest ) of 1: Log_Memo( 'aaa matched' ); 2: Log_Memo( 'bbb matched' ); 3: Log_Memo( 'ccc matched' ); 4: Log_Memo( 'aa matched' ); else Log_Memo( 'nothing matched to ' + LTest ); end; end; // Example 2: OR-Pattern for groups procedure TMainFrm.SimpleOrExample; var Command : string; LCaser : IS4Caser; begin Log_Memo( '=== OR Patterns Example ==='); LCaser := TS4Caser_Factory.New( False, -1 ); // RegisterOr: Mehrere exakte Alternativen für gleichen Index LCaser .RegisterOr( 1, ['start', 'run', 'begin', 'launch', 'execute']) .RegisterOr( 2, ['stop', 'halt', 'end', 'terminate', 'kill', 'abort']) .RegisterOr( 3, ['pause', 'suspend', 'hold', 'freeze']) .RegisterOr( 4, ['resume', 'continue', 'unpause', 'thaw']); // RegisterWildcardOr: Mehrere Wildcard-Pattern LCaser .RegisterWildcardOr(10, ['config_*', 'cfg_*', 'setting_*']) .RegisterWildcardOr(11, ['log_*', 'trace_*', 'debug_*']); Command := 'execute'; case LCaser.Match(Command) of 1: Log_Memo( ' Service startet: ', Command); 2: Log_Memo( ' Service estopped: ', Command); 3: Log_Memo( 'â¸ï¸Service paused: ', Command); 4: Log_Memo( 'â–¶ï¸ Service resumed: ', Command); 10: Log_Memo( 'âš™ï¸Config-Command: ', Command); 11: Log_Memo( ' Logging-Command: ', Command); else Log_Memo('â“ Unknown command: ', Command); end; Command := 'halt'; case LCaser.Match(Command) of 1: Log_Memo( ' Service startet: ', Command); 2: Log_Memo( ' Service estopped: ', Command); 3: Log_Memo( 'â¸ï¸Service paused: ', Command); 4: Log_Memo( 'â–¶ï¸ Service resumed: ', Command); 10: Log_Memo( 'âš™ï¸Config-Command: ', Command); 11: Log_Memo( ' Logging-Command: ', Command); else Log_Memo('â“ Unknown command: ', Command); end; Command := 'suspend'; case LCaser.Match(Command) of 1: Log_Memo( ' Service startet: ', Command); 2: Log_Memo( ' Service stopped: ', Command); 3: Log_Memo( 'â¸ï¸Service paused: ', Command); 4: Log_Memo( 'â–¶ï¸ Service resumed: ', Command); 10: Log_Memo( 'âš™ï¸Config-Command: ', Command); 11: Log_Memo( ' Logging-Command: ', Command); else Log_Memo('â“ Unknown command: ', Command); end; Command := 'go'; case LCaser.Match(Command) of 1: Log_Memo( ' Service startet: ', Command); 2: Log_Memo( ' Service estopped: ', Command); 3: Log_Memo( 'â¸ï¸Service paused: ', Command); 4: Log_Memo( 'â–¶ï¸ Service resumed: ', Command); 10: Log_Memo( 'âš™ï¸Config-Command: ', Command); 11: Log_Memo( ' Logging-Command: ', Command); else Log_Memo('â“ Unknown command: ', Command); end; Command := 'config_database'; case LCaser.Match(Command) of 1: Log_Memo(' Start-Command: ', Command); 10: Log_Memo('âš™ï¸Configuration in progress: ', Command); 11: Log_Memo(' Log-Command: ', Command); else Log_Memo('â“ Unknown Command: ', Command); end; end;
-
Good question.
This had been on my mind for quite some time, so I tried to come up with a universal solution that would be as painless as possible.
Here is the first draft. I welcome feedback and suggestions for improvement.
A real case is hardly possible, except in Delphi itself,
I had been racking my brains over this for a long time.
Neither attributes nor other tricks will get you very far.
I found the most painless way for me, see the attachment,
which unfortunately consists of two phases:
1. Definition of the cases
2. The actual match case, but with integer values
This preserves the case feeling and adds RegEx and wildcard matches as a bonus.
Just in short, as simple example, with direkt pattern-matchvar LCaser := TS4Caser_Factory.New( True, -1 ); LCaser .Register( 1, 'aaa' ) .Register( 2, 'bbb' ) .Register( 3, 'ccc' ) ; var LTest := 'ccc'; case LCaser.Match( LTest ) of 1: Log_Memo( 'aaa matched' ); 2: Log_Memo( 'bbb matched' ); 3: Log_Memo( 'ccc matched' ); else Log_Memo( 'nothing matched' ); end;
buit it can do much more, in a similar, easy to handle RegEx style
LCaser := TS4Caser_Factory.New( True, -1 ); // RegEx Pattern registrieren - viel mächtiger als einfache Strings! LCaser .RegisterRegex( 1, '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$') // E-Mail .RegisterRegex( 2, '^\d{3}-\d{2}-\d{4}$') // SSN Format .RegisterRegex( 3, '^(\+49|0)[1-9]\d{1,4}\s?\d{1,12}$') // Deutsche Telefonnummer .RegisterRegex( 4, '^https?://(?:[-\w.])+(?::\d+)?(?:/(?:[\w/_.])*)?(?:\?(?:[\w&=%.])*)?(?:#(?:\w*))?$'); // URL EmailInput := 'test@example.com'; case LCaser.Match( EmailInput ) of 1: Log_Memo('✓ Valid E-Mail-: ', EmailInput); 2: Log_Memo('✓ Valid SSN: ', EmailInput); 3: Log_Memo('✓ Valid German Phone no.: ', EmailInput); 4: Log_Memo('✓ Valid URL: ', EmailInput); else Log_Memo('✗ Unknown Format: ', EmailInput); end; EmailInput := '+491234567890'; case LCaser.Match( EmailInput ) of 1: Log_Memo('✓ Valid E-Mail-: ', EmailInput); 2: Log_Memo('✓ Valid SSN: ', EmailInput); 3: Log_Memo('✓ Valid German Phone no.: ', EmailInput); 4: Log_Memo('✓ Valid URL: ', EmailInput); else Log_Memo('✗ Unknown Format: ', EmailInput); end; Log_Memo; // RegEx with Capture Groups LCaser.Clear; LCaser.RegisterRegex( 10, '^(\d{4})-(\d{2})-(\d{2})$' ); // Date YYYY-MM-DD LIndex := LCaser.MatchWithCaptures( '2024-03-15', LCaptures ); if LIndex = 10 then begin Log_Memo('✓ Date recognized:'); Log_Memo(' Year: ', LCaptures[0]); Log_Memo(' Month: ', LCaptures[1]); Log_Memo(' Day: ', LCaptures[2]); end;
Or with Wildcards too
LCaser := TS4Caser_Factory.New( False, 0 ); // Case insensitive // Wildcard Pattern registrieren (* und ? Unterstützung) LCaser .RegisterWildcard( 1, '*.txt') // Alle .txt Dateien .RegisterWildcard( 2, '*.doc*') // .doc, .docx, etc. .RegisterWildcard( 3, 'temp_?.log') // temp_1.log, temp_a.log, etc. .RegisterWildcard( 4, 'backup_*.*') // backup_xyz.abc .RegisterWildcard( 5, '*.jp*g'); // .jpg, .jpeg FileName := 'document.DOCX'; case LCaser.Match( FileName ) of 1: Log_Memo('📄 Text-File: ', FileName); 2: Log_Memo('📝 Word-Document: ', FileName); 3: Log_Memo('📋 Temporal Log-File: ', FileName); 4: Log_Memo('💾 Backup-File: ', FileName); 5: Log_Memo('🖼️JPEG-Image: ', FileName); 0: Log_Memo('❓ Unknown file: ', FileName); else Log_Memo('❌ Error at file recognition: ', FileName); end; FileName := 'backup_123.456'; case LCaser.Match( FileName ) of 1: Log_Memo('📄 Text-File: ', FileName); 2: Log_Memo('📝 Word-Document: ', FileName); 3: Log_Memo('📋 Temporal Log-File: ', FileName); 4: Log_Memo('💾 Backup-File: ', FileName); 5: Log_Memo('🖼️JPEG-Image: ', FileName); 0: Log_Memo('❓ Unknown file: ', FileName); else Log_Memo('❌ Error at file recognition: ', FileName); end; FileName := 'image/folder/pic.jpg'; case LCaser.Match( FileName ) of 1: Log_Memo('📄 Text-File: ', FileName); 2: Log_Memo('📝 Word-Document: ', FileName); 3: Log_Memo('📋 Temporal Log-File: ', FileName); 4: Log_Memo('💾 Backup-File: ', FileName); 5: Log_Memo('🖼️JPEG-Image: ', FileName); 0: Log_Memo('❓ Unknown file: ', FileName); else Log_Memo('❌ Error at file recognition: ', FileName); end;
Is this closer to the function you were looking to?
Let me know, if you could find improvements or a easier, better solution.
-
Hi there,
I have see a new not that Parallels 26 is available, but with some not so nice news.
It says, translated from German:
QuoteBelow is a list of features that are no longer supported and have been removed from Parallels Desktop for Mac 26:
...Shared Bluetooth functionality. Bluetooth devices connected to your Mac (such as keyboards, mice, or game controllers) will continue to function normally in virtual machines.
Note: To connect a Bluetooth device directly to a virtual machine, you should use a USB Bluetooth dongle.
One of my main functions was to use MacOS as a last resort for debugging iOS BLE devices and their protocols.
Because the MacOS and iOS Bluetooth systems are fairly compatible, this has been a 100% error-free option up to now.
According to the text above, this now seems to be a thing of the past.
An external dongle brings with it a 99% probability of further new errors and problems during debugging, and 1:1 behavior between macOS and iOS may no longer be guaranteed.Because multi-platform debugging under Delphi is currently almost completely unusable anyway, this is my last hope for testing external Bluetooth devices (Android debugging is extremely unreliable, iOS debugging has not been possible for some time, and macOS debugging has still been possible until now).
Yes, there is still the option of debugging under Windows with a BLE dongle, but that was also relatively tricky and not really compatible with iOS/Android, etc.
It starts with finding a compatible BLE dongle that works with Windows/macOS.
Does anyone else have the same concerns as me?
Maybe there are already solutions for this, or, at best, everything still works as before under PLS 26?
BTW: I'm still working on an Intel MacOS, which maybe also behaves different to the M1, regarding external BLE-Dongles.
-
20 hours ago, corneliusdavid said:Always use the most recent version of XCode.
Not without carefully checking what might breakdown before and why exactly you wanna do this.
The way back is made a bit hard, by Apple, better be shure if you upgrade.
Avoid also the Beta-Versions, which can cause much trouble too.-
1
-
-
I'm not using it with Delphi directly (yet), but still with some HTML, JS, PHP, Python, etc., to see what performance to get.
Still in a phase of extended testing of different AI systems, so to speak.
I'm using Claude Code and Cursor as well, and both are really impressive, but my experience ist that they worked best, if you design from ground up.
Cursor has a really amazing workflow and really good outcome, IMHO, but its a little unclear to me if Claude is behind, or not.
If you throw them on a larger, existing projects, it works too, but struggles more often than on new projects.
I' going to switch to use it with Delphi too, in the near future, I'm curious what brings the next level of Claude.
-
1 hour ago, Javier Tarí said:Delphiers are still sleepy about them
I'm not sleepy, 🛌💤, but always awake, with my eyelids pinned wide open ... ☕👀🤪☕☕☕
-
1
-
-
The whole discussion here is only based as the technical/functional view on such system,
forgetting that there is also a similar large legal view on these products (even including hardware and security requirements and whats not ...).The big problem is that the legal parts may completely destroy what your technical part has in favor, at least in the EU,
so you were always forced to consider them together.
-
On 8/12/2025 at 8:45 PM, GabrielMoraru said:1. Better support for web technologies.
Yes, very interesting thought.
I would fully agree, but I have only the question "... but how ... ?".
If this only means to have a full fledged HTML, JS, CSS, Markdown Editor page in the IDE,
I should be realistic and must propose to better switch to VsCode instead.
Or do you have other "web technology" thoughts in mind, more under the hood?
And yes, at least a full fledged WYSIWYG Markdown editor page would be a great improvement in the IDE, as well as maybe accompanied Markdown access components, but there were more important topics first, IMHO.
-
There have been some discussion here and in the German DP, but best of all,
there is an official announcment.
https://blogs.embarcadero.com/fmx-linux-for-delphi-12-3-is-now-available/
https://www.delphipraxis.net/216783-fmx-linux-kennt-jemand-den-aktuellen-stand.html#post1546803https://en.delphipraxis.net/topic/12288-fmxlinux-missing/?tab=comments#comment-102324
It should be available in summer, as arnof reported from the 12.3 introduction. -
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);
-
2
-
-
-
I just noticed this, maybe its interesting
https://www.delphipraxis.net/217543-embarcadero-jobportal.html#post1550400-
4
-
-
Just try with GELATO to find out if its defined somewhere
Android 15 and edge-to-edge enforcement
in Cross-platform
Posted
What means "fixed", where is this noted?
There are use-cases in views where I want edge-to-edge and where I don't.
Is there a kind of switch in Delphi to handle this, perhaps even on-the-fly?
Personally I think the right way would be to do this in the manifest file, but this is for the whole application only.
Perhaps it would make sense to have options to switch the Form between normal, normal-edge-to-edge, fullscreen, fullscreen-edge-to-edge,
without hacking this on my own.
Now a solutions could be to insert layouts and elements on the form, in the way you want, showing or don't showing depending on the version.
I'm still installing and setup a fresh Delphi 13, if you have infos I can try to test this.