-
Content Count
3416 -
Joined
-
Last visited
-
Days Won
113
Everything posted by Lars Fosdal
-
IDE Reopen not reset directory to that of the project
Lars Fosdal replied to alogrep's topic in Delphi IDE and APIs
My bad. Tokyo of course. Still valid for W7SP1. It does look like something on your PC. If you have a good workstation with Windows 10 Pro, you can enable Hyper-V and easily run a Windows 7 installation in a VM. Having Checkpoints when you are happy with an installation allows you to quickly roll back if something breaks. -
Give me patience. NOW!
-
IDE Reopen not reset directory to that of the project
Lars Fosdal replied to alogrep's topic in Delphi IDE and APIs
10.2 = Berlin - and it is supposed to work under Windows 7 Service Pack 1 However - I am pretty sure that Berlin didn't change two months ago. As far as I can remember, the folder that File Open uses has always followed the file you currently have in front in the editor . There is one exception: if you have the welcome page in front, the directory appears to be the directory of the most recently opened project. -
CrystalNet - .Net Runtime Library for Delphi
Lars Fosdal replied to Lars Fosdal's topic in Delphi Third-Party
Just wondering how they do it. Seems they have a .NET Core lib in the works as well. -
https://github.com/TurboPack/AsyncPro ?
-
This could be an interesting companion to VS Code with OmniPascal.
-
How-to: Post a message to Teams using WebHooks
Lars Fosdal posted a topic in Tips / Blogs / Tutorials / Videos
https://larsfosdal.blog/2020/10/16/post-a-message-to-teams-from-delphi-using-webhooks/ -
How-to: Post a message to Teams using WebHooks
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
TRESTClient is supposed to be in the Professional SKU. The SO link I posted explains how to fix the exception for 10.2. -
How-to: Post a message to Teams using WebHooks
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Isn't Indy in the Pro version? -
I logged in and was not asked to do deal with a captcha.
-
How-to: Post a message to Teams using WebHooks
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Googled a bit: https://stackoverflow.com/questions/42096402/eipabstracterror-while-creating-delphi-trestclient -
How-to: Post a message to Teams using WebHooks
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Is https://limelect.com the URL you tried? The URL you use, must be the webhook URL you have configured in your Teams channel. In your MS Teams team, select the desired channel, and click on Connectors from the β’β’β’ menu. In that channel you must define an Incoming Webhook. -
How-to: Post a message to Teams using WebHooks
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
@limelect I removed the other post. I don't have 10.2 so I can't check if I see the same error. Did you get this error in a bare bone test project, or in a bigger project? -
Make sure that any unit or resource path in the project has a relative path and/or use internal environment variable overrides. That enables you to safely copy the project folder to a new folder. If you are going to copy/paste a form from an old project to a new project - why rename the form at all? Can't the form be reused or be made to be reusable?
-
FYI: New Approximate algorithm for travelling salesman problem
Lars Fosdal replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
The interesting part is that there is still room for improvement - and if it is a significant one - it will have huge implications. -
How-to: Post a message to Teams using WebHooks
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Spotted one challenge with TRESTClient. No easy way to override the flags to ObjectToJsonString. -
How-to: Post a message to Teams using WebHooks
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
@Anders Melander - We use Continua CI and FinalBuilder, and Continua has Teams support built in. My PS scripts also posts to Teams, but I use the PSTeams module. I still need to master how do PS Secure Vault secret keys across multiple users to avoid having the URLs in the PS script, though. Love your example of how simple it is to do Json in PowerShell! @Uwe Raabe Ignorance, I guess I've never used TRESTClient and I already was using Indy for JsonRPC. Thanks for sharing the modified version! I added it to the article. How TLS capable is the TRESTClient? -
How-to: Post a message to Teams using WebHooks
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Thanks, Mahdi! Fixed the URL. -
Organizing enums
Lars Fosdal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
In most cases, yes π -
If your data takes a little time to load, you could delegate the loading to a background task which then again triggers another repaint on completion. That would eliminate any UI stutter due to load times.
-
Organizing enums
Lars Fosdal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
We mostly store the ordinal value of the enumerated type variable to an int in the database. Yes, it is fragile with regards to people changing the enumeration - but we have guidelines and unit tests to avoid that. type TPSDExpeditionType = (etRetailer,etWholesaler,etRetailerDairy,etWholesalerDairy); // Do not reorder or remove - add at end TLocation = class ExpeditionType: TPSDExpeditionType; We use RTTI to export the enums to a view in the database so that we can do logic in the SQL code using the same identifiers as we use in Delphi. T-SQL doesn't do constants per se, but selecting from a flat static view is optimized by the query engine and is extremely low cost. CREATE TABLE [dbo].[t_locations]( [Id] [int] IDENTITY(1,1) NOT NULL, [ExpeditionType] [int] NOT NULL -- CREATE VIEW [dbo].[v_psd_constants] AS SELECT 0 AS etRetailer, 1 AS etWholesaler, 2 AS etRetailerDairy, 3 AS etWholesalerDairy -- SELECT * FROM v_Locations loc WHERE loc.ExpeditionType = (SELECT TOP(1) etRetailerDairy FROM v_psd_constants) This means we can handle renames and additions - but not removals or reordering. From an SQL performance perspective, this runs circles around using strings. -
Embarcadero working with MVPs on (some) Delphi source code
Lars Fosdal replied to Javier TarΓ's topic in Tips / Blogs / Tutorials / Videos
Nice! π -
Organizing enums
Lars Fosdal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
"Do you even SQL?" -
Organizing enums
Lars Fosdal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
You store Enums as strings in the database? -
Organizing enums
Lars Fosdal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Well, it is all about littering the code with comments like "do not remove or reorder elements" π