Ian Branch 127 Posted April 29, 2023 Is there a reason the formatter, CTRL-ALT-F, doesn't seem to work in a Unit without any Form? Or is it a Bug? Ian Share this post Link to post
Ian Branch 127 Posted April 29, 2023 I feel a Bug report coming on.... 😉 Share this post Link to post
Ian Branch 127 Posted April 29, 2023 OK. My apologies. It does. Just not on my Function library unit. 😞 Investigating. Apologies again. Ian Share this post Link to post
Ian Branch 127 Posted April 29, 2023 OK. I give up. What is it in the attached that the Formatter doesn't like?? GITLAKLib.pas Share this post Link to post
limelect 48 Posted April 30, 2023 I tried with Gexpert 1.3.11.64 experimental with D10.2.3 and it works OK Share this post Link to post
Ian Branch 127 Posted April 30, 2023 I am using D11.3, GExperts 1.3.23.4026. Share this post Link to post
limelect 48 Posted April 30, 2023 I cannot help only @dummzeuch can help Share this post Link to post
limelect 48 Posted April 30, 2023 (edited) Just a suggestion out of curiosity look with a hex editor if you have a strange character inside Looked with Hex editor sime to be OK Edited April 30, 2023 by limelect Share this post Link to post
Ian Branch 127 Posted April 30, 2023 How would one identify a 'strabge character' out of the multitude? Share this post Link to post
limelect 48 Posted April 30, 2023 Non lfcr or non printable asci but i looked for you and could not find any but maybe I missed one. some times programs do misbehave with unprintable characters like FF and so on there are many more Share this post Link to post
limelect 48 Posted April 30, 2023 Be aware that Gexpert is a full-grown program (by now) so I do not think it has a problem with formatting. Share this post Link to post
Ian Branch 127 Posted April 30, 2023 Agreed, but it still has its quirks. 😉 Share this post Link to post
dummzeuch 1505 Posted April 30, 2023 2 hours ago, limelect said: Be aware that Gexpert is a full-grown program (by now) so I do not think it has a problem with formatting. The GExperts formatter definitely has some serious shortcomings, in particular when it comes to supporting generics. Just have a look at the tickets on this topic on SourceForge. Share this post Link to post
dummzeuch 1505 Posted April 30, 2023 11 hours ago, Ian Branch said: OK. I give up. What is it in the attached that the Formatter doesn't like?? GITLAKLib.pas Formatting that unit works fine for me. Share this post Link to post
Ian Branch 127 Posted April 30, 2023 😞 It works for me on all other units except for this one. 😞 OK. Thanks for your time. It is only a small one so no biggie to keep it formatted manually. Thansk to all for your input & support. Regards, Ian Share this post Link to post
timfrost 78 Posted April 30, 2023 I can reproduce the same problem with your unit (but not with any of my own). My GExperts build reports itself in 'About' as "1.3.22 build 4008". I think I built this from source back when 11.3 first came out (see another topic here) but I see the same issue (and the same build number 4008) in your unit with the installer with the name 2023-03-25. Although no formatting of your unit takes place, either with the keyboard shortcut or the menu, the IDE offers to save it on close, so believes something has changed. If I remove your comment on line 22, the formatter works correctly. Adding a comment at the end of an interface function definition in one of my own units also makes the formatting fail to take place. So this looks a bit like a data-related formatter bug. I will see if I can find 1.3.23.4026 and try that also. 1 Share this post Link to post
dummzeuch 1505 Posted April 30, 2023 Interestingly even with the DLL from the 2023-03-25 release formatting that unit works fine on my computer. I wonder whether the problem is related to a specific processor type. 3 hours ago, timfrost said: I will see if I can find 1.3.23.4026 and try that also. You won't find that version anywhere because it was never released. Iain is probably using a DLL he compiled himself from the current sources, which are revision #4026 in the svn repository. But of course you could update your sources and do the same. Share this post Link to post
timfrost 78 Posted April 30, 2023 My CPU is an Intel core i7-11700, and I can reproduce the same symptoms here with Ian's source file on an AMD Ryzen 7 3700X, where Delphi is 10.4 and GExperts is 1.3.21.3833. But not on Delphi 10.3 with GExperts 1.3.14.80, which runs on a core i7-6700T. On the older machine the formatter runs with or without the comment. My guess is that this may be related to the formatting settings; perhaps both Ian and I have settings that you do not. I tend to copy and review my settings manually from IDE to IDE, but 10.3 might be different. And I do not remember whether there is an easy export/import settings mechanism for me to send you my settings to test. I don't really want to update my own GExperts at this moment. I do not normally put comments at the end of interface lines so the problem does not affect my formatting. I only researched the issue because it seemed an interesting bug, and might have been related to the apparently intermittent 'formatter does not run in 11.3' issue which I fixed in February by building from source, following your suggestion here then. Share this post Link to post
Ian Branch 127 Posted April 30, 2023 (edited) Yup. Confirmed. Remove the comment on line 22 and the Formatter works on mine as well. In fact, if you have a comment on the end of any of the declarations, the Formatter fails. Whether it is a '//' or a '{ }' style comment. A strange thing. Thomas, You want a bug report? [edit] Bug Report submitted. Oooops! It went in as a feature request rather than a bug report. 😞 My Bad. Ian Edited May 1, 2023 by Ian Branch Share this post Link to post
dummzeuch 1505 Posted May 1, 2023 12 hours ago, Ian Branch said: Yup. Confirmed. Remove the comment on line 22 and the Formatter works on mine as well. In fact, if you have a comment on the end of any of the declarations, the Formatter fails. Whether it is a '//' or a '{ }' style comment. A strange thing. Thomas, You want a bug report? [edit] Bug Report submitted. Oooops! It went in as a feature request rather than a bug report. 😞 My Bad. Could you please also submit it as a bug report? I'm looking into that category more often than feature requests and if I create it you won't get notification emails on it. I'll delete that feature request after you have copied it. (I don't understand why feature requests and bug reports are two distinct databases rather than just categories in the same one. If that were the case I could simply change the category and be done.) Share this post Link to post