Jump to content

Anders Melander

Members
  • Content Count

    2205
  • Joined

  • Last visited

  • Days Won

    113

Everything posted by Anders Melander

  1. For example a TMultiReadExclusiveWriteSynchronizer.
  2. 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.
  3. 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.
  4. 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.
  5. Anders Melander

    DelphiCodeToDoc any alternative?

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

    DelphiCodeToDoc any alternative?

    Alternative to what?
  7. 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.
  8. Anders Melander

    XLS 2 XLSX

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

    Casting pointer to TBytes

    No - for the reason Cristian stated.
  10. 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.
  11. Anders Melander

    Inherited on Properties and co.

    Delphi 1
  12. 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.
  13. 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.
  14. Anders Melander

    Splitting existing components to run- and design time packages

    I have no idea about what you are asking. Please rephrase the question.
  15. Anders Melander

    Splitting existing components to run- and design time packages

    I'm not sure what you are referring to there, but I was referring to the statements that: It's wrong to have the TMyButton class and the Register produce in the same unit. You need to have both a design- and a run-time package. This requirement is documented. Yes. I'm sure. In one of the many discussions I've had with Remy on this topic I checked the documentation all the way back to Delphi 1 and nowhere does it state that one must (or should) have both a design-time and a run-time package. I have also failed to find any other authoritative sources for the claim. It's always something that people heard from a friend of their 2nd cousins yoga teacher - or something like that 🙂 My claim is that, unless you link with run-time packages or share code between design-time packages, it's perfectly acceptable to put everything into a design-time package if you can. I.e. you don't need the run-time package. This also makes creating and maintaining design-time packages so much easier.
  16. Anders Melander

    Splitting existing components to run- and design time packages

    Bad idea IMO. Sharing DCUs among projects only leads to problems in my experience. When I do a clean build I want everything built from scratch, with the options I have enabled at that time. I don't want the compiler to link in some old DCUs that were compiled with god knows what options. You don't need to (as I explained) but it's cleaner design to separate design-time code from run-time code.
  17. Anders Melander

    Revisiting TThreadedQueue and TMonitor

    MadExcept has an option to compile with memory overrun/underrun checks enabled. It makes heap allocation really slow and add a lot of overhead but it's good if you suspect a memory overwrite and have no clue about where the problem originates. I don't know if Eurekalog has something similar.
  18. Anders Melander

    Splitting existing components to run- and design time packages

    Waitamoment! You can't make a 64-bit design-time package. The Delphi IDE is 32-bit so design-time packages needs to be 32-bit. Edit: Okay I need pay better attention. I can see you've already figured this out. If you already have all the components registered in the original (design- and run-time) package then why are you even bothering with creating a new package? Are you actually using run-time packages? It sounds more like your project is misconfigured if it needs precompiled dcus (e.g. from compiling a package) in order to compile.
  19. Anders Melander

    Splitting existing components to run- and design time packages

    Yes it's normal that it compiles. RegisterComponents is a regular function located in the classes unit and if you couldn't use classes.pas from a run-time package then you couldn't do much at all. You don't necessarily need to have both a run- and design-time package (yes, there are different opinions on that) but if you have decided to split the packages into run- and design-time then I guess you should move the RegisterComponents into separate registration units and place those in the design time package.
  20. Anders Melander

    Revisiting TThreadedQueue and TMonitor

    Since FQueueLock is instantiated in the TThreadedQueue constructor and destroyed in the destructor my guess would be that you are calling PushItem on a TThreadedQueue instance that has been destroyed - or not yet instantiatred. If you can reproduce in the debugger, try placing a breakpoint on the place where you create the TThreadedQueue and one on the place where you destroy it. This way you should be able to verify that things are called in the order you expect.
  21. Anders Melander

    Splitting existing components to run- and design time packages

    RAM disks... Didn't we stop using those along with DOS and Windows 95? Of course a dedicated physical RAM disk device will always be faster than an SSD but if you're allocating main system memory for use as a virtual RAM disk device then I think it would be better to let the OS manage the memory. It will use the memory to cache files when the memory isn't needed elsewhere.
  22. Anders Melander

    Splitting existing components to run- and design time packages

    Not even the part that's wrong?
  23. And there's a lesson in that.
  24. That doesn't answer the question. The overall category is "Delphi" and the Q doesn't have anything to do with Delphi. You have a better chance of getting a usable answer to stuff like this on stackoverflow.
  25. What does this have to do with Delphi?
×