Jump to content

dummzeuch

Members
  • Content Count

    3019
  • Joined

  • Last visited

  • Days Won

    108

Posts posted by dummzeuch


  1. 56 minutes ago, David Schwartz said:

    I cannot imagine how old and slow of a computer you'd have to be running where calls to FileExists would take a noticeable amount of overhead.

    Actually, I had a case where FileExists took more time than I wanted it to because I was processing a huge number of files (the record was 70000 files in 8000 folders. It took forever (about 60 seconds) the first time.

     

    See my question here:

     

    I managed to cut the original time into a quarter by in addition to finding out if the file exists also getting its file age (which FileExists already retrieves and which I needed later on anyway) and caching it myself. Now the time is down to about 10 seconds on the first call which still sometimes feels like eternity.

     

    But as you already said: Every additional call just hits the file system cache and is done in no time.

    • Like 1

  2. An URL label is a TLabel on a form which displays some blue, underlined text which, when clicked with the mouse, opens a web page.

    This kind of labels is nothing new in Delphi, I remember using them even back in the 1990s, but they always were a pain in the lower back to create:

    • Write the URL into the caption.
    • Set the font color to blue
    • Set the font to underlined
    • Set the cursor to crHandPoint
    • Write an OnClick event handler that opens the desired URL

    Lots of boring and repetitive work and on top of that a Windows API call which I kept forgetting.
    This led me to simply not use them. [...]

     

    https://blog.dummzeuch.de/2019/04/19/a-simple-way-to-create-an-url-label-in-delphi/


  3. It could be an option to have a (restricted access) repository somewere with the RTL/VCL code where "the community" collects patches for everybody to use.

    But that poses several questions:

    • Which versions of the RTL/VCL are maintained there? Only ever the latest one? But what about people who are stuck with older versions for whatever reason?
    • What about forward- and backporting fixes if multple RTL/VCL versions are maintained?
    • Who maintains it? This/ese person(s) would be the gate keeper(s) to proposed patches.
    • Who grants / revokes access and on which criteria? Is every Delphi customer allowed access, even if he only ever bought Delphi 1? Or is it restricted to the version(s) he bought? How does he prove that?
    • Even if only the latest RTL/VCL is maintained, what about the .x.y Delphi releases? These are of lately only available to customers with subscription.

    I think that could be quickly become a nightmare for the maintainer(s), not just the technical issues, but even more the legal issues.

    • Like 3

  4. 1 hour ago, Attila Kovacs said:

    There is a bigger problem with this form, you can't select and copy the path on the bottom.

    Both could be done from an expert, and would be the preferred way, before someone redesigns the whole thing.

     

    (No, it's a Label with the path <o>)

    GExperts adds a button which opens an explorer window. You still can't copy the full file name though, just the directory.

    But adding a read only edit field would be possible too...

    • Like 1

  5. 5 minutes ago, PeterPanettone said:

    Uwe, I don't think that this is a smart comment.

     

    The bug mentioned in the comment is stupid because it has been introduced by a programmer who could have done better.

    Scaling bugs are sometimes hard to track down because they can depend on hardware (number of monitors and their resolution), operating system (Do you test your programs on Windows 7, 8.1 and the various current versions of Windows 10?) and user settings.

     

    I have been bitten by these several times and most of my programs only run on Windows XP, 7 and 8.1 (I develop on 8.1). Windows 10 was only recently added to the mix and has caused quite some headaches (The parent company switched to Windows 10 and nobody bothered to check whether our programs are compatible to Windows 10. In contrast they were worried if the measurement hardware's power consumption might overload the new notebook computers. That was never an issue. </rant>).


  6. Does anybody know what happened to the DIBControls by Droopy Eyes Software?

     

    Their website vanished in 2007, but the Wayback Machine remembers it:

     

    https://web.archive.org/web/20071009172906/http://www.droopyeyes.com/default.asp?mode=ShowProduct&amp;ID=3

     

    I was able to even download the sources (Haven't looked at them yet).

     

    Have these components maybe been included into any other component packs?

    Does anybody have experience using them?

     

    twm


  7. 9 minutes ago, Uwe Raabe said:

    Indeed, and you can as well send that patch via email to the person supposed to take care of it. On the other hand, if you want to use a Pull Request

    That's just the thing: I don't really want to use a pull request, I'd rather send a patch. But I was told by one of the maintainers that he won't accept a patch but only pull requests.

    So I tried, and after realizing how much work that involves for even a one liner, I will probably no longer bother and phase out or at least reduce the use of the Jedi code at work.


  8. Or in other words: In order to create a pull request, you must first become a master of git.

     

    It's really annoying that it is that complicated. A pull request basically is a patch, with a comment. Something that would be possible to create with a text editor (at least for the simple cases I am talking about).

     

    Today I found lots of issues which I fixed with my local copy of jvcl / jcl years ago. I am sure I filed bug reports including patches back then. Aparently nobody ever looked at them, because they are still there in the current version.

     

    Examples:

    * Missing raise for a ESomeException.Create

    * missing Create in raise ESomeException(SomeString)

     

    I get the impression that "Project Jedi" nowadays is down to a single person or maybe two (I see commits by obones and ahausladen) who are simply swamped with requests.

     

    And that's not just Jedi, there is also dxgettext which is unmaintained for all practical purposes (I have been the only contributor for years and that's only because I still have got write access to the repository, which is more of an accident than planned, and I only sometimes make changes to it because that's the tool we use at work). Other projects are obviously unmaintained.

     

    My impression is that there may still be many Delphi developers, maybe their number is even raising, but the "Delphi Community" of 20 years ago no longer exists.

     

    </rant>

    • Like 2

  9. Hm, my pull request is still open, but at least it has gotten some comments. JVCL seems rather inactive nowadays.

     

    Now, I would like to add another pull request for the same file but an unrelated change. Again I seem to be too stupid to do that. Every time I try it I end up with the existing pull request.

     


  10. 12 hours ago, David Schwartz said:

    In C/C++ that could be done as follows:

    
    for (qry.Open; not qry.EOF; qry.Next) {
      . . .
    }

    I think this is much nicer.

     

    Actually, since qry.next will be executed at the end of the loop, I think the C style for loop syntax is inconsistent.

     

    (For whatever reason I cannot delete the first code section of the quoted text on mobile.)


  11. There is also the GExperts Convert Strings editor expert. Unfortunately I just realized that it does not cover this excact case. Hm, time for an improvement: Add a suffix in addition to the existing prefix option for each line.

     

    Btw: Another solution would be to create a keyboard macro for this case. I would require one Shift+Ctrl+P keypress per line though (still better than repeating the required key sequences for every line). I have attached such a macro in case anybody is interested. It can be imported into the Keyboard Macro Manager.

     

    AppendComma.gxm


  12. 5 hours ago, Rollo62 said:

    Unfortunately 99.99% of the people out there are NO engineers, so that these clear and straight concepts doen't work most of the time.
    It seems we have to sit on the users chairs sometimes, and have a look from their perspective.
    This catches me also from time to time, if some customer came up with a brilliant simplification idea.
    I would propose that all engineers should be forced to work for 2 weeks with their own apps and real data, before launching a product.

    This is not embracing designers work here (sure they do their own mistakes), but I praise the "sitting one somebody elses chair" method.

    I won't disagree here.


  13. 6 hours ago, Dany Marmur said:

    they refuse for years to do anything about it because it was "the vision of the designer". Such important functionality. If corrupt legislation and greed won't kill IT, designers will.

    Not only IT-designers. It's designers <period>. Show me an unusable product and in 90% it will turn out that it was perfectly usable when the engineers finished. And then the designers ruined it.

    There used to be a credo "form follows function", but today it's "it doesn't matter whether it works, let's make it flashy."

     

    </rant>

    • Like 5
×