Jump to content

dummzeuch

Members
  • Content Count

    2685
  • Joined

  • Last visited

  • Days Won

    93

Posts posted by dummzeuch


  1. I just found a typo in the TWMDPI record declaration in the Delphi 10 Winapi.Messages unit:

      TWMDpi = record
        Msg: Cardinal;
        MsgFiller: TDWordFiller;
        YDpi: Word;
        XDpi: Word;
        WParamFiller: TDWordFiller;
        ScalledRect: PRECT; // <- here
        Result: LRESULT;
      end;
    

    ScaledRect is misspelled as ScalledRect.

     

    I am not sure whether this spelling error was in the original installation or whether I might have changed this declaration by accident (No, that unit is not readonly on my system.) Since this record was introduced with Delphi 10 it might just have been a typo that was corrected in later versions.

     

    Could somebody with an unchanged installation please check?


  2. 15 hours ago, dummzeuch said:

    I just tried to use AddImages instead. Unfortunately this doesn't work either in Delphi 12 but works fine in older versions (those that support it).

    Maybe it doesn't like being used in addition to AddMasked, or I am doing something else wrong.

    It was the additional calls to AddMasked. If I comment these out, the images are assigned correctly to the actions. So now I have to figure out a way to avoid these calls. And then ifdef the whole stuff to only run on Delphi 12 (and possibly later, or maybe starting with the first Delphi version that supports AddImages) ...


  3. I just tried to use AddImages instead. Unfortunately this doesn't work either in Delphi 12 but works fine in older versions (those that support it).

    Maybe it doesn't like being used in addition to AddMasked, or I am doing something else wrong.

     

    Another day wasted on broken IDE functionality. 😞


  4. 43 minutes ago, wxinix said:

    I am looking for a Delphi subprocess library, something like Python's subprocess -  is there one?

    If I understood this correctly, a Python subprocess starts an external program, connects its stdin/out/err to pipes and gets the return code when it exits.

     

    There is nothing like this in the standard Delphi RTL but there are multiple third party options. If I remember correctly one is in the JCL, another is my own TAsyncExec class in unit u_dzAsyncExec which is part of my dzlib library.

    • Thanks 1

  5. 18 hours ago, Uwe Raabe said:

    I have dropped using AddMasked for quite a while in favor of AddImages using a T(Virtual)ImageList and TActionList in dedicated datamodules. You can find that approach in https://github.com/UweRaabe/DelphiCodeCoveragePlugin.

    Thanks for the hint. I thought about that approach too, but unfortunately that's very difficult to do with the current way GExperts works: Each expert registers its own action / image with the IDE, removes the action when the expert is disabled and adds it again when the expert is enabled. All this without restarting the IDE. On top of that this API was introduced at some time after Delphi 6 (haven't checked when exactly), so I'd need to use two different ways to still support all currently supported Delphi versions.

     

    Btw: Are you aware that Project Magician registers an action without a name? That means it cannot be added reliably to a toolbar. I found that today while investigating an issue with the GExperts Editor Toolbar.


  6. After wasting two days trying to find a solution for this issue, I just filed a bug report with Embarcadero:

     

    RSP-44007: Actions / menus display wrong images for plugins

     

    Description

    When a plugin (both, package or dll based) adds actions / menu entries with images using INTAServices.AddMasked and assigns the index of this call to the ImageIndex property of an action, the menu entries associated with these actions do not display the correct image but apparently some random image of the plugin.

    The same issue also exists in the Customize Toolbars dialog where it also schows the wrong images.

    I will attach the source code for a plugin based on David Hoyle's example in his book, so I am pretty sure there isn't a mistake. But the first time I noticed this problem was in GExperts. The same code that worked fine in all older Delphi versions now also shows the wrong images.

     

    This corresponds to the GExperts bug report #331: Editor Toolbar Configuration buttons

     

    Please vote for it.

     

    If any of the other plugin developers has got an idea how to work around this issue, I'm open for suggestions.


  7. 14 hours ago, cupwalker said:

    It doesn't stand anywhere that after 5 installations/registration and a year, you can send the perpetual license to trash. And as stated below they know what an annual license is and what a perpetual is.

    Just curious that there is no delphi "pro term license" and rad studio.

     

    image.thumb.png.d14bced86a03c3ca2ac4009774585204.png

    If that's the case, take them to court. I'm pretty sure that's illegal in most countries.

    • Like 1

  8. 34 minutes ago, shineworld said:

    I have a lot of very big projects made with Sydney and moving them to Athens will be a long path ( a lot of 3rd parties libraries to install).
    Can I install Athens on the same PC where Sydney works ?
    If YES, are there some types of attention to be kept?

    You can install all main versions of Delphi in parallel. Since Delphi 10.4 (Sydney) and Delphi 12 (Athens) are both main versions, you are fine.

    Note though, that Delphi 12 will register itself for opening all Delphi related files so double clicking on a project will open it in Delphi 12 which might not be what you want.

     

    (All 10.x Versions (10.0 .. 10.4) were main versions, 10.x.y versions were updates to 10.x. Fortunately Embarcadero has stopped this silly numbering scheme now, but we have to live with that legacy.)

    • Like 1

  9. 34 minutes ago, PeaShooter_OMO said:

    Pointers should not be avoided and I highly suggest programmers should learn to use them properly and embrace them. They can make life so much easier.

    Pointers have their uses, but they come with risks.

     

    Skilled programmers know how and when to use them, but most important, they don't use them when they are not necessary. They also know that pointers can make debugging hell.

     

    Unfortunately there are many programmers who use pointers where they are not necessary. Of course they still think they are skilled, because they use pointers.


  10. 3 hours ago, Remy Lebeau said:

    I would do something like this:

    
    [mru]
    count=N
    path1=...
    path2=...
    ...
    pathN=...

    Keep adding new paths to the front of the list until the desired count is reached, then remove the oldest path from the end of the list each time a new path is added.

    Alternatively omit the Count entry and simply read all entries in the section [mru].


  11. Are you talking about just the tabs for Code, Design and History? No, these cannot be hidden.

     

    But if you are talking about the docked windows below that, containg messages, refactoring etc, you can undock that window and dock it somewhere else (I dock most of these on the right hand side) or simply close it. Don't forget to save the desktop otherwise it will pop up again any time the desktop is loaded.


  12. Is that just me or is Delphi adding itself to the main list of the Windows Start menu every time the IDE is started?

     

    Is there an option to disable this annoying behaviour? My start menu is full enough, I don't need additional entries that come back even when deleted.

     

     

×