Jump to content

dummzeuch

Members
  • Content Count

    3070
  • Joined

  • Last visited

  • Days Won

    112

Posts posted by dummzeuch


  1. 8 hours ago, Attila Kovacs said:

    Does any of them keep the bookmarks?

    It used to be a big disadvantage that the bookmarks disappeared. (Many many years ago)

    GExperts tries very hard, but is not perfect. The same for Breakpoints.

    I updated that code "recently" (a year ago?) so it became a lot better, but still not perfect.

    • Like 1

  2. 1 hour ago, Brandon Staggs said:

    Someone forgot to tell the guy who made the splash screen then.

    That guy seems to be colour blind anyway, so maybe he overlooked the 13 because it has the wrong colour?

     

    Edit: Sorry, I was referring to the guy who made the Welcome Page, not the splash screen.


  3. 5 hours ago, Joseph MItzen said:

    Well, that right there is some low-hanging fruit FOR AUTOMATIC CODE FORMATTING. :classic_biggrin:

    Not sure about the automatic part: Assume you have some legacy code to work on from an era that used a different formatting style. Do you really want it to be automatically reformatted? How do you track the changes you make? The only option is to do the reformatting and commit that change, before you make any manual changes, but that breaks the blame functionality (or whatever your SCM calls it) for older changes. So I usually only format the parts of the code I actually work on and leave the rest as is.

    • Like 2

  4. 6 hours ago, Stano said:

    It's been mentioned several times. These things are handled by MMX. And good.

    I tried MMX but it's a lot less convenient than the integrated refactoring. I don't remember the specifics, but I think e.g. you have to enter / select the type for a new variable / field rather than have the tool infer it from what is assigned to it.

    • Like 1

  5. 40 minutes ago, Lars Fosdal said:

    Examples:

    
    // if then / if then else single statements
    
    if Condition
     then Action;
     
    if Condition
     then Action
      else Alternative;
    
    if Condition // sometimes I use these variation - yeah I know, not 100% consistant.
     then Action
    else begin
      Alternative; 
    end;
     
    if Condition
    then begin
      Action;
    end
     else Alternative;
    
    if Condition
    then begin
      Action;
    end
    else begin
      Alternative;
    end;
    
    // for / while
    
    for var x in Collection
     do Something(x);
     
    for var x in Collection
    do begin
      Something(x);
    end;
    
    while Condition
     do Action;
     
    while Condition
    do begin
      Action;
    end;

    The purpose is to really hi-lite the if/then/else on separate lines, using indentation for breaking the visual pattern when only using simple statements and not blocks.

     

    Hm, interesting. Some of it could be easily done with the GExperts code formatter, but not all of it.

    Care to write a feature request? (I'm not promising anything! But having a formal feature request would definitely increase the likelihood of somebody implementing it.)


  6. On 9/14/2025 at 8:49 PM, Mark NZ said:

    The refactoring removal is actually the biggest benefit of Dephi 13.0 for me so far.  It only ever worked on a trivially small project and on our large projects just moving the mouse past the menu option not fast enough caused minute+ freezes, that was VERY frustrating for me when debugging and trying to jump to statement.

    These refactoring methods worked for me quite well, most of the time:

    • Declare a variable or field
    • Rename an identifier (that one always worked fine within a single unit and most of the time even for the whole project)
    • Extract selected code to a method

    I have been using them since they were introduced in Delphi 2007 and I already miss them.

    • Like 1
    • Sad 1

  7. 10 hours ago, Uwe Raabe said:

    Even a TMainMenu is drawn according to the current VCL style. A simple test confirms that. 

     

    So, what class type has the form and is that class registered to the ThemingServices?

    The form is a TfmClassBrowser, which descends from TfmBaseForm which in turn descends from TForm.

     

    It calls this function passing Self as parameter:

    function GxOtaInitTheming(AForm: TCustomForm): Boolean;
    var
      LService : IOTAIDEThemingServices;
    begin
      Result := False;
      LService := GxOtaGetIDEThemingServices;
      if Assigned(AForm) and Assigned(LService) and (LService.IDEThemingEnabled) then
      begin
        LService.RegisterFormClass(TCustomFormClass(AForm.ClassType));
        LService.ApplyTheme(AForm);
        Result := True;
      end;
    end;

    Which is what I think you mean by "registered to the ThemingService".

     

    I also tried explicitly calling IOTAIDEThemingServices.ApplyTheme for the TMainMenu, but it didn't have any effect.


  8. I am trying to fix the remaining glitches in GExperts to follow the IDE's dark/light mode setting (which was implemented by @Achim Kalwa, Thanks a lot Achim!). One thing that does not work is dark mode for a TMainMenu. The menu bar itself is not themed, but its sub menus are themed as expected.

     

    Is that a bug in the VCL? A problem that only happens in IDE plugins? Or PEBKAC ?

     

    image.thumb.png.60fce77d871a2be13a5aea73b275ddfa.png


  9. 2 minutes ago, Dave Novo said:

    By this logic, if someone has posted the code above on StackOverflow and it popped up someone's first stack overflow query, and they used it, and it worked as far as they needed it to, would that person still have forgotten how to think?

    Simple answer: Yes.

    You don't take any code from the web and use it without understanding it.


  10. 2 hours ago, David Heffernan said:

    I don't "get some source code to work on". It's all our own code and we all follow the house style, obviously. 

    So you are a lucky one. For me it's also mostly our own code, but some of it is so ancient that it did not follow the our current style. Of course that's only at work, my hobby projects are a different story all together: Many different styles from many different authors. Some even from past me.


  11. 1 hour ago, Anders Melander said:

    Apart from the AI stuff, you do know how to determine the IDE version and build number, right?

    Yes, I do. When I test AIs I tend to ask things I already know so I can easily spot whether the answers are any good. In this case I had just updated the version detection in GExperts to support Delphi 13 so this was the first question that came into my mind.

    • Like 1

  12. 48 minutes ago, PeterPanettone said:

    Technically, this does not explain the striking jump in the folder name's version number from 23 to 37. Perhaps they wanted to avoid any connection to the unlucky number 13?

    That's a joke right? They gave the version the number 13 and you suppose they jump in the BDS version from 23 to 37 in order to avoid 13?

    • Like 1
    • Haha 1

  13. 39 minutes ago, david berneda said:

    Manual formatting for me is the best way to make sure the code is well done, calmly, as a final double-check there are no big bugs or something missing. I'd never do auto format, a headache to configure the many ways format can be done.

    Autoformat has one huge advantage (apart from laziness, of course): It catches wrong indentations that suggest wrong code flows:

    if Condition then
      doX;
      doY;
    doOtherStuff;

     

    • Like 3

  14. I just tried the new RAD AI companion:

     

    Quote

    How can I detect the Delphi version and build number from within an IDE plugin?

    Quote

    To detect the Delphi version and build number from within an IDE plugin, you can use the IOTAVersionSKUInfoService interface provided by the Tools API. This interface allows you to query the list of installed platforms, SKU, and if the running IDE is a Trial version. Here is a basic example of how you might use this interface:

    
    
    uses
      ToolsAPI;
    
    procedure GetDelphiVersionInfo;
    var
      VersionService: IOTAVersionSKUInfoService;
      SKU: Integer;
      IsTrial: Boolean;
    begin
      if Supports(BorlandIDEServices, IOTAVersionSKUInfoService, VersionService) then
      begin
        SKU := VersionService.SKU;
        IsTrial := VersionService.IsProductTrial;
        // Use SKU and IsTrial to determine the version and build number
        // You can also use PlatformAPI.PlatformIDToName to convert platform IDs to human-readable names
      end;
    end;
    

    This code checks if the IOTAVersionSKUInfoService is supported and then retrieves the SKU and trial status, which can help you determine the version and build number of the Delphi IDE. For more detailed information, you may need to refer to the ToolsAPI.pas file where the interface is defined.

    Give me example code that returns the IDE's version number plus build number as a string from within an IDE plugin

    Quote

    To return the IDE's version number plus build number as a string from within an IDE plugin, you can use the IOTAVersionSKUInfoService interface. Here's an example of how you might implement this in Delphi:

    
    
    uses
      ToolsAPI, SysUtils;
    
    function GetIDEVersionAndBuild: string;
    var
      VersionService: IOTAVersionSKUInfoService;
      SKU: Integer;
      IsTrial: Boolean;
    begin
      Result := 'Unknown Version';
      if Supports(BorlandIDEServices, IOTAVersionSKUInfoService, VersionService) then
      begin
        SKU := VersionService.SKU;
        IsTrial := VersionService.IsProductTrial;
        // Construct the version and build number string
        Result := Format('Delphi SKU: %d, Trial: %s', [SKU, BoolToStr(IsTrial, True)]);
      end;
    end;

     

    This function checks if the IOTAVersionSKUInfoService is available and retrieves the SKU and trial status. It then formats these values into a string. You can expand this example to include more detailed version and build number information if needed, based on the available properties and methods in the IOTAVersionSKUInfoService interface.

     

    Not impressed.

    • Confused 1

  15. 4 hours ago, Javier Tarí said:

    I'm not talking of predictions of a distant future: I'm talking of my daily experience with, my own work on my own code. According to what I'm doing as of today:


    They will be unemployed because right now AI is able to program by itself a lot of Delphi code, and even refactor a lot of production code, just with human supervision on the final result, and a single senior developer can supervise a lot of agents coding in parallel.

     

    And if your experience is other: if your experience does not include Claude Code, then your experience is zero; you have been visiting the wrong planet

    My experience does indeed not include Claude Code. If you say its awesome, I believe you. I still severely doubt that it could take over my daily work, so I'm not worried.

     

    As for the wrong planet: I have had the nagging feeling for years that I am on the wrong planet. Usually when listening to Frankie goes to Hollywood's "Two Tribes"

    • Like 1

  16. Currently I am mostly with the "I don't use AI" faction because it did not work for me when I tried it. But I will look into it again regularly and maybe I will actually find a use for it.

     

    Given that Delphi Praxis is a lot less active than it used to be - did all those people die? Have they switched to other programming languages? Or a different Forum? - I don't see much use for yet another sub forum.

     

    And apart from this: I am reading Delphi Praxis via the unread content filter, so it doesn't matter for me, where that unread content is.

×