Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 06/27/24 in all areas

  1. This is still a work in progress, but I'm really happy with how it is going so far so I thought I would share... https://github.com/jimmckeeth/FMXColorDialog There are a few custom components in the dialog, and there is a palette code library, plus there is a new CMYK color record. Just fun project to mess around with on vacation. FMXColorDialogSample_PseA8aEaZC.mp4
  2. That post is extremely difficult to understand. Documentation is here: https://docwiki.embarcadero.com/RADStudio/Athens/en/Methods_(Delphi)#Overriding_versus_Hiding No, the purpose of reintroduce is to suppress the compiler's warning that you are hiding the inherited method. It is a way for you to tell the compiler that you know what you are doing and to not bother you about it.
  3. I guess there are people with differing levels of ability. And while I don't intend to post links to all videos, today's video is a real-world example of adding code to a word search game and squashing those pesky bugs along the way! Hopefully, it will inspire you to tackle your own coding challenges and share your creations in the comments! https://youtu.be/K1iJIYtBPaw
  4. Patrick PREMARTIN

    Cross platform color picker and palette library

    In that case, perhaps adding https://www.whocanuse.com/ could be fun ?
  5. Dalija Prasnikar

    Thread leaks report (FastMM4)

    Raising exceptions in constructor never ever lead to memory leaks. Only if the code in destructor is bad and is not able to clean up partially initialized object instances. such situations may look like raising exception in constructor is at fault, while actually it is the destructor that needs to be fixed in such case.
  6. Dave Novo

    Parallel.For optimization

    There is also FastMM5. However, I would suggest looking at your code and figuring out a way to allocate required memory (even if you have to overallocate) and minimize/eliminate heap memory allocations during the threading code.
  7. Uwe Raabe

    Minor Uninstaller bug

    This usually happens when MMX has been installed for all users, i.e. as an admin. That will use HKLM for the Experts entry, which will be copied to HKCU when a user starts Delphi. As the installer didn't add these registry entries, it refuses to remove them when uninstalling (this is standard behavior of InnoSetup). Actually, these kind of quirks are the reason why Install for me only is recommended. If you are the only user at the system it doesn't matter at all and if you are not, each user will have its own copy of MMX installed (they can even have different versions). I always try to clean up as neatly as possible when uninstalling, but I didn't find a reliable way to do that without jumping through hoops with the registry and several user folders.
  8. Leif Uneus

    Thread leaks report (FastMM4)

    Barry Kelly explains it rather good in a comment: https://herbsutter.com/2008/07/25/constructor-exceptions-in-c-c-and-java/
  9. msohn

    Thread leaks report (FastMM4)

    You're missing TObject.InitInstance which ensures all fields are initialised before the constructor is called. Edit: link for convenience https://docwiki.embarcadero.com/Libraries/Athens/en/System.TObject.InitInstance
  10. Jim McKeeth

    Cross platform color picker and palette library

    I made the different color system boxes collapsible. When I add more I'll default to collapsing the less common ones, and make it based on preference. Yes it is. I'm working on named colors and more palette options now.
  11. pyscripter

    PyScripter - Integration with LLM

    @Stéphane Wierzbicki PyScripter with LLM support was released. See LLM_Support · pyscripter/pyscripter Wiki (github.com) for details.
  12. Dalija Prasnikar

    Thread leaks report (FastMM4)

    The above code is fine. Free can be called on nil object reference. Testing whether it is assigned before calling Free is redundant.
  13. dummzeuch

    Thread leaks report (FastMM4)

    I see no problem with raising an exception in a constructor, provided you write the destructor in a way that can handle a partly constructed instance. Since you can't prevent any system or RTL exception to be raised from within the constructor, you'll have to handle that case anyway. Always keep in mind that an exception in a constructor will cause the destructor being called immediately. So don't do this: constructor TBla.Create; begin inherited; FSomeHelperObject := TSomeClass.Create; end; destructor TBla.Destroy; begin FSomeHelperObject.Free; // <== this might cause an AV if FSomeHelperObject hasn't been assigend inherited; end; But do this instead: destructor TBla.Destroy; begin if Assigned(FSomeHelperObject) then FSomeHelperObject.Free; inherited; end; (Or use FreeAndNil, which basically does the same internally.) You can easily test if your destructor can handle this case by temporarily putting a raise exception.Create('test') as the first statement in your constructor (before even calling inherited Create). I'm sure we are all guilty of writing wrong destructors at some time though.
  14. Der schöne Günther

    Thread leaks report (FastMM4)

    I am absolutely bewildered. That is absolutely not true. See: Methods (Delphi) - RAD Studio (embarcadero.com) or: https://stackoverflow.com/a/39110161 This is the first time I ever heard something like this.
  15. dummzeuch

    Release or Debug?

    I am taking yet another different approach: The "If you download the sources, the buildnumber will 0. Live with it." approach.
  16. Darian Miller

    Is there a Delphi "subprocess" library?

    There's quite a few options out there. I wrote a related blog post and provided some example code: https://ideasawakened.com/post/use-createprocess-and-capture-the-output-in-windows
  17. Angus Robertson

    ICS V9.2 announced

    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
  18. I still have not a smooth workflow under iOS, as before. With the injection of the current lldb SymLink into the PAServer package, I could at least start an app on a device. It behaves as follows: Compile and RunNoDebug - Deploy and Launch after compile - iOS app gets loaded - After deployment, the app tries to start but immediately fails (due to missing debug support) - The app pops up shortly, then crashes immediately - At least I can start the app manually Compile and RunWithDebug - Deploy and Launch after compile - After deployment, the process stucks (due to missing lldb), PaServer messages look as below - The problem is, that the IDE crashes too and must be restarted, same as PaServer. The PaServer process seems to continue even after close. - I used to kill all PaServer processes ( can be more than one ), by shell command, but thats an ugly solution. - I've found a possible solution by PaServer command s ( stop server = kill the process ) and restart PaServer again - But that doesn't prevent the IDE crash. It is really a messy workflow now, if pressing the wrong button it crashes, debugging is no longer possible. XCode_1540, RadStudio 12.1 Upd 1 Does this behave now same on all machines, or is it only here? I really hope for a fix, that bring back normal debugging soon, I hope by patch of IDE & PaServer. Is there anything I still can improve by myself?
  19. David Heffernan

    DelphiVCL4Python

    For loads of scenarios the interpreter doesn't matter for performance.
  20. JonRobertson

    Using same form for adding and editing data

    I wouldn't use a separate flag unless necessary. If you are using a TDataSet descendent, you can look at the State property to determine whether the record is being inserted (State = dsInsert) or edited (State = dsEdit). If it is necessary to call Post in code, you can use if ds.State in dsEditModes to determine if the current record needs to be posted.
  21. David Schwartz

    OpenAPIClientWizard

    This looks awesome, long awaited option for Delphi. What Delphi versions does this support?
  22. You could use: Label1->Caption = oss.str().c_str();
  23. Hey Gus, It seems like a fun challenge that people who have time and interest will look at and participate. We've got a couple of months, so plenty of time to get involved if you're so inclined. One question: the .CSV in the repository has only 44,691 entries. So, the idea is that we need to run the generator program first to generate the 1B file, right? I suppose this could also, then, be used to generate smaller files for development testing. Thanks for the links and for bringing it to the Delphi community!
  24. DelphiUdIT

    What's the general opinion on v12?

    Apart from the fact that we are in the section: nothing else.
  25. Primož Gabrijelčič

    Recursive anonymous functions

    Of course it is! You can do this: for i := 1 to 10 do Writeln(MakeFib()(i), ' '); As Stefan noted on a side-channel, calling MakeFib causes a memory leak because the anonfunc interface now contains a cyclic reference to itself.
×