Leaderboard
Popular Content
Showing content with the highest reputation on 06/11/24 in all areas
-
A new Delphi plug-in for automatically implementing the client side of a Rest API is now available in beta version. Repository: https://github.com/AliDehbansiahkarbon/OpenAPIClientWizard Demo video: https://www.youtube.com/watch?v=7B7nSHIsV64
-
F2047 Circular unit reference.
Uwe Raabe replied to dmitrybv's topic in RTL and Delphi Object Pascal
The plethora of working Delphi programs are proof that there already exist concepts to eliminate dependencies between units. They may differ from those available in other programming languages, though. IMHO, circular dependencies should be eliminated even if they appear in implementation sections and thus making the code compile. I wouldn't support any request to extend that in any way leading to more circular dependencies. -
F2047 Circular unit reference.
Remy Lebeau replied to dmitrybv's topic in RTL and Delphi Object Pascal
You need to de-couple the classes so they don't refer to each other directly anymore. Use interfaces or events/callbacks instead. -
ICS V9.2 has been released at: https://wiki.overbyte.eu/wiki/index.php/ICS_Download ICS is a free internet component library for Delphi 7, 2006 to 2010, XE to XE8, 10, 10.1, 10.2, 10.3, 10.4, 11 and 12 and C++ Builder 10.4, 11 and 12. ICS supports VCL and FMX, Win32, Win64 and MacOS 32-bit targets. Beware Mac OS-X and C++ have not been tested recently due to lack of support from such users. The distribution zip includes the latest OpenSSL 3.0.14. 3.2.2 and 3.3.1, for Win32 and Win64. Changes in ICS V9.2 include: 1 - V9.2 is a minor release, fixing a few issues introduced in the last major release, and other bugs located since. There are no breaking or installation changes from V9.1, but if updating from earlier releases please read https://wiki.overbyte.eu/wiki/index.php/Updating_projects_to_V9.1 2 - TIcsMailQueue can now queue a prepared EML file created by another application, or perhaps received by the SMTP Server. Added optional SkipEmpty argument to StartMailQu method so queue is not started unless there are pending emails waiting to be sent. The sample has 'Send Prepared EML File' to queue an existing EML file rather then preparing email with properties. 3 - Improved email MIME decoding by supporting embedded boundaries, usually for multipart/alternative parts, within a multipart/mixed message, using code written 20 years ago but suppressed for some reason. Previously these parts were sometimes left encoded within a part. There is a new property LooseRFC to allow decoding if the boundaries in the body are missing the two required hyphens, usually because the boundary also begins with hyphens. TMimeDecodeEx should now always return the body if no MIME parts are found, and TPartInfo has PLevel which is Part Level, and PInfo which is displayable part information for logs. The MimeDDemo sample has various improvements to test these features. 4 - Fixed a nasty Win64 problem reading EC certificates from the Windows Store, which may have caused server crashes, also reproducible in the PemTool listing the Windows Store. This was due to Win64 bad initialisation of a buffer used for a Crypto API call that failed. 5 - The HTTP client now checks the URL always has / at start of the path, ie add it for test.com?query. In the REST client, added a sanity check for RawParameters to encode any spaces, which can break the HTTP request. After a file download completed, check actual file size against response size. The multipart/form-data MimeBoundary no longer includes extra -- at start that are required preceding boundaries within parts, some web servers may have been unable to decode our MIME encoding. 6 - The HTTP server has a new method AnswerRedirect for various redirection responses to a new URL. When accessing the default document in a path without a trailing path delimited /, redirect using 301 to the correct path with delimiter instead of adding it locally and displaying the document which will then incorrectly link to pages in a higher level directory. Using the THttpOption hoAddMissPath redirects if the default document is missing perhaps a template or virtual document. Fixed a bug where authenticated POST/PUT requests always returned a 404 error. Added AnswerBodyTB client response with TBytes binary, similar to AnswerString, tested in the sample by supporting favicon.ico request. Check if the request HTTP version gets corrupted due to spaces in the URL, which are not allowed. The SslMultiWebServ sample has new web pages to test POST/PUT and template authentication. 7 - TSslX509Certs has a new function CertResetDomain to reset a certificate order state to None, if the order process stalls or gets confused due to errors. If AcmeV2StartChallgs fails because there are no pending challenges, reset to order to None so it starts again next time and does not loop. 8 - ICS not longer tries to load OpenSSL RAND_screen function that may be missing from recent DLLs. 9 - TIcsHttpMulti fixes a bug introduced in V8.66 that stopped the application setting authentication, rather than adding it to the URL, and a Win64 free stream bug. 10 - TIcsIpStrmLog correctly counts failed client connection attempts if ping is not used first to check the remote IP address. The sample has a new client Retry Attempts box to test this. 11 - Updated the Snippets sample to use authentication to access some the hardcoded URLs, which started failing after authentication was added to test web server bugs (see above). 12 - Added OverbyteIcsHttpThrd sample to show how to use TSslHttpRest component in a multi-threaded program. 13 - Improved Posix support for Linux and Android, not tested or supported yet. Beware SSL does not correctly load for Posix at the moment. 14 - Added support for a new feature release of OpenSSL 3.3 with {$DEFINE OpenSSL_33} in the Defs.inc file, ICS includes new versions of the active versions, 3.3.1, 3.2.2 and 3.0.14, but no longer includes 3.1 since there are two newer feature versions. 15 - Updated the 'ICS Intermediate Short' SSL certificates, used by ICS to generate temporary server certificates to allow SSL servers to run until a Let's Encrypt or commercial certificate is installed. It now expires after 200 days, 21st December 2024, after which self signed certificates will be used instead, unless a newer 'short' is installed. 16 - Only Delphi 10.41 and 10.42 (10.4 with updates 1 or 2) will install correctly with the new install packages, the original RTM version does not support the package LIB suffix: $(Auto) so you must change it manually for each package to 21.0. The release notes for V9.2 are at https://wiki.overbyte.eu/wiki/index.php/ICS_V9.2 All ICS active samples are available as prebuilt executables, to allow ease of testing without needing to install ICS and build them all. There are four separate zip files split into clients, servers, tools and miscellaneous samples which can be downloaded from https://wiki.overbyte.eu/wiki/index.php/ICS_Samples Angus
-
Current version is available on GitHub: https://github.com/UweRaabe/CompressPath
-
@Uwe Raabe Has written a nifty tool to circumvent this: https://www.uweraabe.de/Blog/2014/09/09/the-garbled-path-variable/
-
Recovering Connection (FireDAC)
-
Anything in real production I purchase a license. But I'd like to play around with new Change Views - got me thinking I should setup something with latest IB version.
-
delphi 12 migration Upgrade from delphi 6 to delphi12
corneliusdavid replied to Sanu's topic in General Help
Code Compatibility. Delphi is nicely upwards compatible. There may be a few things where Unicode or AnsiString types are concerned but the code itself is surprisingly simple to upgrade. Third-Party Components: This may be the biggest challenge. Many small third-party component vendors are no longer around and there are some new ones. If you used Woll2Woll, you're in luck; if you used AddictSpell for spell-check, you'll need to look at TMS or DevExpress. If you used Raize Components, they now come with Delphi as Konopka Signature VCL Controls. TurboPower components are now open source with a few of them forked off to new products. You will have to do a lot of research to figure out which ones you can upgrade, which ones you'll have to replace. Database Connectivity: This will be highly dependent on what database you're connecting to. If you used a dBASE or Paradox type connection through the BDE, you would be advised to migrate to a SQL-based engine. If you used a BDE-replacement database, like DBISAM or one of the many others that are still in business, you can likely just upgrade. There are a few, like Firebird or Advantage, that FireDAC actually supports today. User Interface: Monitors are much bigger and have much higher resolution today, so a program that looked fine on 800x600 yesteryear will look tiny and outdated today. Increase the font size, use TGridPanel in some cases, add styles, use AlignWithMargins, and study webinars on the subject. A lot of the answers you're seeking will depend a lot on what you have. For example, the database update could be simple or difficult depending on what you're using. I'm involved in a large migration from Delphi 5 to Delphi 12 and the database back end is SQL Server which makes it simpler in some ways but going from BDE to FireDAC is not easy. If we were using a well-established database alternative that existed for D5 and is still around today, we probably wouldn't have to change quite so much--but then again, it all depends on how it was originally written: iterating through table components, no matter what database technology or components are in use, should be tossed in favor of writing queries--which could've been done in D5 or D6. Lots of other good answers here too, but with vague questions, you'll get vague answers. -
Is there a way to check is the "user Idle" (no interaction)
JohnLM replied to Tommi Prami's topic in Windows API
I played around with the routine from James Campbell's (Feb 6, 2020) answer from @Lars Fosdal's posted link, and posted again, below. https://stackoverflow.com/questions/2212823/how-to-detect-inactive-user Note: To make testing/debugging easier, I made this change: FormStyle=fsStayOnTop in the Object Inspector area so that I could better observe the app's behavior. And, while the app does work as expected, when I minimize the app and go into another running app or use keyboard/mouse activity outside the said app, it would continue to work--that is, in the timer section it would continue. I modified the code to: detect the app's active status and check if it is minimized. procedure TForm1.Timer1Timer(Sender: TObject); begin if (application.Active=true) and (WindowState = wsMinimized) then else if application.Active=true then begin Caption := Format('System IDLE last %d seconds', [SecondsIdle]) ; end; end; And now it seems to work as expected when it is minimized the counting in the timer event is ignored, and if the app is active in the foreground, the counting continues. -
F2047 Circular unit reference.
Brandon Staggs replied to dmitrybv's topic in RTL and Delphi Object Pascal
I don't think circular references need to be solved by the compiler. In my experience, this has always been a signal that two things which shouldn't be are coupled too tightly and some refactoring is in order. -
F2047 Circular unit reference.
David Heffernan replied to dmitrybv's topic in RTL and Delphi Object Pascal
Hard to answer without seeing how the classes and types are defined -
delphi 12 migration Upgrade from delphi 6 to delphi12
PeterBelow replied to Sanu's topic in General Help
Emba Blog: https://blogs.embarcadero.com/upgrading-and-maintaining-delphi-legacy-projects/ https://blogs.embarcadero.com/a-roadmap-to-migrate-your-legacy-delphi-and-c-applications-to-the-latest-blazing-fast-version/ Book review: https://dalijap.blogspot.com/2022/06/book-review-delphi-legacy-projects.html I hope you have plenty of unit tests etc. for your project. With a jump that large and a project using many 3rd-party components this will probably amount to a major rewrite... -
Just some general thoughts about such an upgrade: - what exactly is the reason for upgrade? Is there a real business case to port? Or is it just because someone wants to use the new fancy things from newer Delphi versions? - as you are asking for a large-scale EHR system: do you and your team have the resources to do it over probably several months or even years? - if the current system is actively developed: can you handle two source branches that may differ heavily over months/years? - as a port to Unicode is involved: what about your existing database? Can it handle Unicode already or is it necessary to upgrade database too. Are existing data ready for Unicode or does it need to be updated too? - check, how good or bad the separation between UI / logic / database already is. Can it be improved on the current D6 system? If so: do it there, where applicable, so that you can see any problems soon and under real conditions. - 3rd party: try to consolidate if there are too much different component collections involved. - new UI features: forget about them at least for the moment. First try to port your application(s) to D12 and then introduce new UI. Only if a new UI components will help you to reduce/replace a lot of existing code or are unavoidable for port, consider adding it. But make sure, that new UI is consistent regarding user input with remaining older UI system. Your end users will be grateful. Depending on who the end users are: are they willing to accept larger changes on UI? Have in mind that training for them may be necessary and who has to pay for it.
-
He already mentioned before: As I already own a license for HTML Components there is a good chance that it may be included as an extension to the Unit Dependency Analyzer in MMX.