Jump to content

TheDelphiCoder

Members
  • Content Count

    12
  • Joined

  • Last visited

Posts posted by TheDelphiCoder


  1. I found out what caused that issue! 🎉

    The unit was declared only as "Forms" (not "Vcl.Forms") in the dpr file. As soon as I changed it to its fully qualified name there, the Vcl prefix got added to the Forms entry in another units uses clause when formatting it with MMX!


  2. 9 hours ago, Uwe Raabe said:

    Can you check if you have some file named Forms.pas or Forms.dcu anywhere in your search paths?

    A quick search revealed indeed a unit Forms.pas in the path C:\Program Files (x86)\CnPack\CnWizards\PSDecl\ !

    But this this path seems not be included in the PATH nor the library path nor the search paths (global and project).


  3. Here is an example:

    uses
      Forms, Graphics,
      Vcl.Menus, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Controls, System.Classes, Dialogs, Windows, SysUtils;

    becomes

    uses
      System.Classes, System.SysUtils,
      Winapi.Windows,
      Vcl.Graphics, Vcl.Menus, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Controls, Vcl.Dialogs,
      Forms;

    Use clause sorting is

    System.Win;System;WinApi;Data;IBX;id*;Vcl

    "Group and sort uses" is checked in the options


  4. @Uwe Raabe Another issue: While sorting and grouping the uses clause the unit names are expanded to their full name, e.g.

    SysUtils

    becomes

    System.SysUtils

    This does NOT work for the Forms unit, it should become Vcl.Forms (in a VCL project, of course)! Other VCL units do not have this problem.


  5. 19 hours ago, Uwe Raabe said:

    No, that is intended. Sorting is only done on the group level, but keeps the order inside that group intact. That still allows for some control over the unit order - at least inside a group.

    What about making that an option?


  6. Hi Uwe,

    any news regarding the global setting already?

     

    I recognized that units not belonging in a group get correctly placed after the groups, but are not sorted in alphabetical order. Is this a missing case?

×