Jump to content

dummzeuch

Members
  • Content Count

    2857
  • Joined

  • Last visited

  • Days Won

    101

Everything posted by dummzeuch

  1. I got a bug report for GExperts and Delphi 10.4 that’s really curious: When a secondary editor window is open in the IDE and the FMX form designer is active, trying to insert a component from the clipboard into the form inserts the textual description of that component into the editor windows instead. I could immediately reproduce this but finding the culprit took quite a bit longer. (Read on in the blog post) TLDR: The workaround is to disable the "Goto Previous / Next Modification" editor experts.
  2. It seems that disabling two editor experts (and restarting the IDE) fixes this problem: Goto Previous Modification Goto Next Modification No idea yet, what causes it. Could you please confirm this @Diego Simonini ? I guess it's the way these experts add themselves to the editor popup menu. This probably makes Ctrl+V always call the editor popup menu's Paste entry (or the associated action) even if the editor window does not have the focus.
  3. dummzeuch

    List of usable RegEx for source code

    No, it's actually pretty easy. Unfortunately I know of no existing way to call an external tool and put its output into such a list view. But it might be worth writing one.
  4. dummzeuch

    List of usable RegEx for source code

    I'd use GExperts Grep, of course. But the question was: I would prefer the IDE search over more powerful external tools if it can somehow still fit the bill for the convenience of easily navigating to the found lines.
  5. dummzeuch

    List of usable RegEx for source code

    Because many of us like to work in the IDE and prefer it to use tools that integrate with it. Of course one could add a commandline grep to the IDE's tools menu to automatically run it on the current unit, but even that would not result in a clickable list of possible offending lines.
  6. COVID-19 got us all down a bit and even with the vaccines theoretically available now, the light at the end of the tunnel seems very far away. My own turn for a jab will probably not come before fall 2021, so I can only hope that summer will reduce the infection rates as much as it did last year, but the new mutants that spread around the world definitely aren’t good news. Maybe I can lighten up your mood a bit with a new GExperts release. There are a few bug fixes and an also a few new features in the new version, but nothing really exciting. read on in the blog post.
  7. dummzeuch

    I will be less active for a few weeks

    Get well and I hope you won't get any of the Long Covid symptoms I read about. I plan to get vaccinated the first chance I get. Unfortunately that will likely not be before fall, given the current availability of the vaccines here in Germany, NRW. Too old to not be afraid, too young to get priority and no important job either. OTOH I can work from home 99.9% so it's OK.
  8. Workaround for the moment: Use the context menu entry "Edit -> Paste" of the form designer.
  9. Interesting, I can reproduce it. Happens with GExperts installed, doesn't happen without. I also tried to disable the automatic popup for the Rename Components expert dialog, didn't help. I haven't tried to disable that expert altogether yet. Please file a bug report on Sourceforge for that.
  10. dummzeuch

    Decrease Your Build Time

    Why should programmers care about building times? https://xkcd.com/303/
  11. dummzeuch

    Introducing Delphi Uses Helper

    @osterhaegar I got the time until the list is shown and filtered down further. Consistently to about a second with my largest project (>5000 units, 140000 identifiers) on Delphi 2007. Reading the cache files for the units takes the longest time now. They are on an SSD, so there isn't much I can do unless I add them all to one project specific cache file, which I'm considering. With Unicode Delphis it's significantly worse though, there the sorting part takes more than half a second rather than 100 milliseconds. Again having a pre-sorted project specific cache file would help. One unexpected cause for the delay was that I had set the timer, that checks whether the unit parser thread has finished, to 500 milliseconds. Reducing this to 50 milliseconds shaved off another 400 milliseconds from the total time. (Yes, I timed it. I know that I claimed it took 1 second on my machine even before Osterhaegar's an my optimizations. That was wrong, it was more like 2.5 seconds for the above mentioned largest project. Smaller projects (like GExperts itself) took about 1.5 seconds.) But at least I know now where the 3 seconds that Stefan experienced came from.
  12. dummzeuch

    Introducing Delphi Uses Helper

    Opps, I missed the part about the standard defines. Sorry.
  13. dummzeuch

    Introducing Delphi Uses Helper

    Since I just stumbled over the following declaration in Toolsapi.pas: type TGetSrcLinesFunc = function (LineNum: Integer; ClientArg: Pointer): Integer {$IFDEF LINUX} cdecl; {$ENDIF} {$IFDEF MSWINDOWS} pascal; {$ENDIF} IOTAProcess90 = interface(IOTAProcess70) ['{BEBD67CA-F6FC-44A7-ACBF-E314DB085827}'] { Indicates if process properties can be set on this process (via the thread view) } function CanSetProperties: Boolean; { Called when the user asks to set properties for this process (via the thread view) } procedure SetProperties; Which breaks the GExperts unit exports parser because the code is invalid, if neither LINUX nor MSWINDOWS is declared, but I just tested your tool and it works: I wonder how your tool handles this. Do you add one of these symbols to the parser? If yes: It only has one index independently of the platform, so how does it decide which one to use while creating that index?
  14. We have lots of legacy code that still uses "with" and I'm hesitant to touch this code because of this (Guess what's also missing? Unit tests. I add them when I find the time, but progress is slow.) A tool that reliably removes "with" statements would be awesome. Unfortunately it's also far from trivial.
  15. dummzeuch

    List of usable RegEx for source code

    Yes. Hm, thinking about this, It should better be raise [a-z]*\( Because there might be exception names that do not start with an "e". And of course the match should be case insensitive.
  16. dummzeuch

    List of usable RegEx for source code

    Greping for “raise e[a-z]*(” and ” e[a-z]*\.Create\(” will find bugs with (not) raising exceptions.
  17. dummzeuch

    QueryPerformanceCounter precision

    There aren't any options with QPC. It just returns a 64 bit int. Which TStopwatch passes on to you. And the performance counter frequency is also available. There are alternative options to using TStopWatch, that's what I meant, e.g. using GetSystemTimeAsFileTime, GetTickCount, GetTickCount64. I'm not suggesting to use these for high precision timing in general, they are just options for some particular cases, e.g. if you don't want an Int64 but an Int32 for whatever reason.
  18. dummzeuch

    QueryPerformanceCounter precision

    Yes, I was wondering the same. There are only two reasons not to use TStopWatch: You are using a Delphi version that didn't have that yet (e.g. Delphi 2007) You want to play with various options.
  19. dummzeuch

    QueryPerformanceCounter precision

    None of these sources claim that QPC used together with QPF was imprecise. Just that they are based on different time sources, depending on hardware and operating system and therefore the resolution and overhead for the calls vary. As far as I understand it, there is a guaranteed resolution of at least 1 microsecond for all those cases. There are other factors that affect timing much more than these, e.g. what else is running in parallel and whether there are context switches. Also, they cannot be relied on for high precision timestamps that must be consistent between multiple CPUs, but that has nothing to do with performance measurements.
  20. dummzeuch

    Delphi 10.4 Portable

    I didn't know that there was a context menu available when pressing the ctrl key - thanks for that - but ... ... unfortunately my smart phone does neither have a mouse nor a ctrl key. I already failed to add any text to the post before or after the quote construct, after I had deleted the text from the post. There simply isn't any way to set the cursor outside the quote.
  21. dummzeuch

    Delphi 10.4 Portable

    I accidentally started replying to your post and then found no way of deleting a quote once inserted into a post on a mobile browser. Deleting the contents of a quote is possible - thus the empty quote, but not the quote itself. Even cancelling a reply and starting a new one will not work. The quote is somehow preserved and automatically inserted into the new post. So the only way to actually post a new reply was posting the empty one first. Sorry about that. With a desktop browser this problem does not occur, but that doesn't help if all I have available is a smart phone.
  22. dummzeuch

    Introducing Delphi Uses Helper

    I just installed and tried it. It is indeed much faster than GExperts. One observation: When no match is found, the error message is shown in the middle of the monitor. I would have expected it near the current cursor position like the other dialog.
  23. dummzeuch

    Delphi 10.4 Portable

    For a while I played with a tool called Portable Delphi (on SourceForge) which made an existing (legal) Delphi 7 installation portable by reading all registry entries and adding a start program that created these entries before starting the IDE on a new computer. This will not work with newer Delphis as the copy protection has become much more sophisticated. I wonder thought whether this approach might be possible when using a network license. Under these licenses you can have as many installations as you want, but they need a license provided by the license server in order to start the IDE. It would probably even be legal as I can't see any significant difference between a regular installation and such a copy of the files. But I'm a software developer, not a lawyer, so I might be wrong here (as I'm often wrong as a software developer too).
  24. dummzeuch

    Delphi 10.4 Portable

  25. dummzeuch

    Application.MessageBox in multiples monitors

    That's one of my major gripes with Windows. The only solution I know is to roll your own or use an existing library. So I wrote my own. You can find it here; https://osdn.net/projects/dzlib-tools/svn/view/dzlib/trunk/forms/?root=dzlib-tools in Unit w_dzDialog.
×