Jump to content

Anders Melander

  • Content Count

  • Joined

  • Last visited

  • Days Won


Anders Melander last won the day on February 14

Anders Melander had the most liked content!

Community Reputation

660 Excellent


Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Did you start by reading the help?
  2. Anders Melander

    spinlock primitives

    You are writing your own spinlock to get better performance - and then you use Sleep() which is guaranteed to cause a context switch...? Unless you really know what you're doing then you better of using the synchronization primitives provided by the OS. https://devblogs.microsoft.com/oldnewthing/20051004-09/?p=33923 http://joeduffyblog.com/2006/08/22/priorityinduced-starvation-why-sleep1-is-better-than-sleep0-and-the-windows-balance-set-manager/ Apparently this can't be repeated often enough.
  3. For example a TMultiReadExclusiveWriteSynchronizer.
  4. Anders Melander

    DelphiCodeToDoc any alternative?

    I'm using Documentation Insight to generate MSDN-style API documentation. It does pretty much the same as PasDoc but I prefer the format/style of the Documentation Insight output. It also has IDE integration so I can edit the documentation inside Delphi and best of all (for me); It can optionally keep the documentation text external so I don't make the source unreadable.
  5. Anders Melander

    TBCEditor text editor component

    I've never been in contact with Lasse (the original author) but as far as I remember the pieces of SynEdit that I found were significant enough that I could recognize them as coming from SynEdit. As far as I remember it was some of the syntax definitions. I don't know what interaction other people have had with him so I can't speak to that. The code copied might have been trivial and it might not have been that much but I still don't think it's acceptable to remove the license/attribution header and keep the code. Anyway, it's nothing compared to what Niels Hoyer did after he forked the code so regardless of SynEdit/TBCEditor the current TBCEditor forks are definitely in violation of Lasse's copyright. It's a damned pity as the code looked really promising but I can sympathize with Lasse burning out over the amount of pure crazy directed at him.
  6. Anders Melander

    TBCEditor text editor component

    TBCEditor is: In violation the SynEdit license since portions have been copied directly from the SynEdit source but the attribution and all of the copyright and license references has been removed. Buggy as hell. The original repository was hijacked, after the original developer abandoned the project, but later deleted as the hijacker also abandoned it. Abandonware. Don't promote it.
  7. Anders Melander

    DelphiCodeToDoc any alternative?

    Don't quit your day job.
  8. Anders Melander

    DelphiCodeToDoc any alternative?

    Alternative to what?
  9. Anders Melander

    Interface as Const parameter

    3. Leave things as-is but educate the developers of the problem so they don't fall into this trap. I don't know what you criteria for "best" is but, if you have to, use whatever fits the individual case where this occurs. There doesn't need to be One True Way to solve this.
  10. Anders Melander

    XLS 2 XLSX

    http://b2xtranslator.sourceforge.net/index.html Open Source. Written in C++. Precompiled binaries available.
  11. Anders Melander

    Casting pointer to TBytes

    No - for the reason Cristian stated.
  12. Anders Melander

    Delph ERP Help

    First of all you can't just edit the compiled files in an editor. Forget about that. The BPL and DCP files are generated by the compiler when you compile the source code. Since you're trying to do edit the compiled files I'm assuming you don't have the source for this application or can't recompile it for some reason - or have no clue about what you're doing (that's okay too 🙂). If the queries are built in code, and you can't recompile, then you're pretty much out of luck as you would have to patch in the modifications at the assembler level. However if the queries are implemented in TQuery components, or something like it, and stored in DFM resources, then you can use a resource editor to extract the DFM of the form/datamodule where the query resides, change the SQL and then replace the DFM in the resource.
  13. Anders Melander

    Inherited on Properties and co.

    Delphi 1
  14. Don't use the IDE managed version resource. Use an external RC file with a version resource instead and update it with whatever suits your build pipeline best. For example a simple bat or cmd file. I'm sure there are lots of homegrown utilities that can update the version in the dproj, an RC or RES file but I like to keep the number of dependencies down. A utility would just be yet another piece of software to install, maintain, etc.
  15. Anders Melander

    Splitting existing components to run- and design time packages

    Components has nothing to do with it. What I'm saying is that if you have your aeSuperDuperUtilities.pas unit, and you use that unit in different projects, then don't compile it in one project and use the DCU in another. It's okay to share the source file between projects (it would be better if you didn't, but that's another matter) but don't share the DCU files. Let each project have their own DCU output folder and don't use precompiled DCUs (the VCL/RTL being the exception). Even for something as huge as DevExpress (1700 DCU files, ~370 Mb) I never use the precompiled DCUs. I don't care about the minor improvement in compile speed sharing DCUs can give me. I do care about the time that is wasted when I have to track down some obscure problem caused by using out of sync DCUs.