-
Content Count
12 -
Joined
-
Last visited
Posts posted by TheDelphiCoder
-
-
Thanks for your suggestions, Uwe
-
Hi,
is there an option to convert a local variable of a method to a field of the current class or record?
I can only find AddField, and the context menu option "Conversion -> convert to Field" is disabled...
-
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!
-
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).
-
7 hours ago, Uwe Raabe said:Is that with all units of that project or only with some of them?
Only unit Forms is affected.
Thanks for the link, I'll have a closer look what is going on there!
-
I can confirm it works as intended in a new project! 👍
Do you have any ideas what could cause the behaviour I'm expieriencing in my project?
-
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
-
@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.
-
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?
-
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?
-
Hi @dummzeuch,
in case you missed it, I submitted a patch file for FR #93 on the SF repository.
Best regards,
Thomas
- 1
Formatting method
in MMX Code Explorer
Posted
@Sonjli You could also just add the new paramater(s) in either the declaration or the implementation of the method. Then hit STRG + ALT + Shift + P and the other one will be updated to the just made changes!