-
Content Count
2634 -
Joined
-
Last visited
-
Days Won
91
Everything posted by dummzeuch
-
@Remy Lebeau is there any reason to not use msbuild for Delphi 2007 and later? I'd hate to spend time on figuring out dcc32 parameters only to be told "Why didn't you simply use msbuild?".
-
No, I haven't. Didn't know there is a free version and I already have a batch solution for all my projects which has the advantage of not needing any additional software. And of course that also needs yet another tool to learn. I guess you use Continua CI at work, so you know how to use it. I'll keep that in mind though, it might be worth spending the time (and possibly money).
-
Because I don't want to start all the IDEs to do a compile check (double click, wait, click, click, CLICK ...). I'd rather start a batch file that calls them all, one after another. I'll do a checkout and have a look what needs to be done.
-
I tried, but the call stack didn't give any clue where this call comes from. I guess the IDE is calling that event explicitly as MyPopup.OnPopup(Whatever) somewhere and the parameter isn't used in the original event implementation so it doesn't care what it is. The MenuItem neither has a name nor a caption, which is odd.
-
GExperts Version 1.3.16 dialogs does not consider/set theme when undocked
dummzeuch replied to panie's topic in GExperts
That's correct: GExperts does not do any theming, it simply uses the native VCL classes. The IDE tries to do the theming for these forms. Unfortunately it not only fails in many cases but these partly themed forms look really ugly. Therefore I have explicitly disabled theming for the Grep Results form in the current source code, so at least the form is consistent in itself. I am surprised to hear that the docked from is still themed though, maybe I did these changes after the DLL you are using was built. I won't implement theming. If somebody else cares enough, he is welcome to try and send me patches. I'll be happy to apply them as long as they don't break functionality. -
Not sure what you are trying to tell us. The code in question was: procedure TGotoModificationBaseExpert.HandleOnMenuPopup(_Sender: TObject); var pm: TPopupMenu; begin pm := _Sender as TPopupMenu; if Assigned(FOrigPopupEvent) then begin FOrigPopupEvent(_Sender); end; AppendMenuItem(pm); end; So this already was an 'as' operation which bombed out in Delphi 10.4 because somehow a TMenuItem was passed as Sender. The new code looks like this: procedure TGotoModificationBaseExpert.HandleOnMenuPopup(_Sender: TObject); begin if Assigned(FOrigPopupEvent) then begin FOrigPopupEvent(_Sender); end; if _Sender is TPopupMenu then begin // sometimes Delphi 10.4.1 passes a TMenuItem here, no idea how this can happen, but it caused a runtime error AppendMenuItem(TPopupMenu(_Sender)); end; end; So now I first call the original OnPopup-event and then I check whether the Sender is really a TPopupMenu before adding an item to it. I can't see how this relates to what you wrote. There was no hard unconditional cast (OK, now there is, but only after an 'is'). There is no if .. is .. then else if .. is .. then.
-
WTF? It's a bloody TMenuItem! That doesn't even have a common ancestor with TPopupMenu (apart from TComponent)! Who in their right mind would do that? Fixed in revision #3325
-
How to operate a private field in other unit?
dummzeuch replied to pcplayer99's topic in RTL and Delphi Object Pascal
Not likely, because there is lots of code like this which would break, keeping people from updating which would hurt the bottom line. The best we can hope for is a warning or maybe even a switch to turn 'with' off. And, actually, seeing how many 'with' statements there are even in the RTL / VCL (haven't checked FMX) and even in our own code (where I try to eliminate every 'with' I come across when I edit code), that's probably a good thing. But we digress... -
GExperts Version 1.3.16 Crash on Delphi 10.4.1 when docked
dummzeuch replied to panie's topic in GExperts
Did you already install the fix for Delphi 10.4.1 ? -
How to operate a private field in other unit?
dummzeuch replied to pcplayer99's topic in RTL and Delphi Object Pascal
This is the last (known) remaining class helper loop hole that was overlooked when they closed the previous one that didn't require a 'with' statement. Don't expect this to keep working in future Delphi versions. (OK, I'll shut up with this warning now.) -
Double-dabble to convert binary to decimal
dummzeuch replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
Hm, I always convert to hex as an intermediary step (and actually prefer hex constants in source code). and I can still do binary to hex and back in my head, back from the C64 times. -
Localization inquery
dummzeuch replied to Clément's topic in Algorithms, Data Structures and Class Design
I have done that with dxgettext, so, yes, it can be done. But beware that dxgettext does not support translating FMX forms out of the box, only VCL. As for the translation tool, I prefer Gorm over PoEdit, mostly because it's written in Delphi and I have got the source code and write access to the repository, so I can adapt and extend it (and have done that). -
Com0Com works for me (on Windows XP and 8.1 (haven't tested Windows 7 or 10), or simply a serial null modem cable that connects two serial ports, native or USB serial adapters.
-
Ouch, that sucks. Of course, now telling you you should have made backups doesn't really help. 😉 On the other hand, I have only recently started to make frequent backups of my private computer, which does not include the Delphi installations though, just the ISOs, my personal documents and photos and the source code that isn't in public repositories anyway. So It could happen to me too and I don't know whether I will bother to install many of the old Delphi versions I currently have. Speaking about having no compiler(s): I would be able and willing to do compile tests for Delphi 5 to 10.4 for Indy if you want. But that would need some working compile batch files (the current ones for at least Delphi 2007 are broken).
-
Local string variable value is not assigned for 2nd and following calls
dummzeuch replied to ertank's topic in RTL and Delphi Object Pascal
Using a code formatter might also have highlighted this mistake. Just saying... -
OK, what it boils down to is this: It's a legacy from before Delphi 6 when the LIBSUFFIX feature was introduced. And it took even longer before it was widely used. You are the only developer left, as as happened many Delphi open source projects, and there are just too many things that compete about your time. Other libraries have ignored this too (I specifically mentioned in my blog post that TeeChart does that too, but of course there is also the jcl and jvcl.) It's planned for Indy11. I hereby apologize for using the word "sloppy" in my blog post. I had just spent several hours trying to figure out what the problem was and was quite a bit frustrated. What I don't understand is this: Why should you care whether Embarcadero "is open" to such a breaking change? They are the ones who profit from your work, not the other way around. On the contrary, I would expect them to provide you with some help here. (But my guess is that they only want to make the library work with the latest Delphi version and would love to to drop compatibility to older versions. This has happened to other libraries too.)
-
I have just uploaded a beta version of GExperts 1.3.12 for Delphi 10.3 Rio. NOTE: This is a BETA! Beware of bugs, e.g. the Goto-Dialog enhancements cause redraw problems if theming is enabled, the Run Parameters dialog enhancements (drag and drop for files and directories) don’t work at all. https://blog.dummzeuch.de/2018/11/25/gexperts-1-3-12-beta-for-delphi-10-3-rio-available/
-
GExperts 1.3.12 beta for Delphi 10.3 Rio available
dummzeuch replied to dummzeuch's topic in GExperts
Also fixed the problem reported by David Hoyle by hooking the popup menu's OnPopup event. Apparently every other plugin has done the same by now, if only I had googled for "ecSwapCppHdrFiles" before reinventing the wheel. 😞 But my solution is better: It does not add entries for the breakpoints popup menu. 🙂 -
SpeedButtons have the drawback that you can't select and press them with the keyboard. I wrote a hack for simulating SpeedButtons with BitButtons which gets around this limitation. But on the other hand, if you have a keyboard, you could simply press the appropriate key rather than fiddling with the mouse....
-
Bug and possible fix for GExperts Filter Exceptions expert – testers needed
dummzeuch posted a topic in GExperts
Mahdi Safsafi has proposed a fix for the bug in the GExperts Filter Exceptions expert, which occurs when developing for non Windows targets (first reported on Embarcadero’s quality portal ). I have implemented this fix and it doesn’t have any adverse effects on for Windows targets. But neither he nor I can test it for non Windows targets since we don’t develop for these. That means we need testers. If you want to help, please post a comment here or to the bug report, or contact me via private message. -
How to operate a private field in other unit?
dummzeuch replied to pcplayer99's topic in RTL and Delphi Object Pascal
As I wrote above: So, depending on your Delphi version this may still work, but it won't in the later version(s). -
A fix, or rather workaround was to set the main panel's visibility to False and then True again in the FormShow event. fixed in revision #3312 At least I hope so.
-
Heureka, I finally managed to see this effect on my own computer, and even managed to reproduce it reliably (at least 3 times in a row): Steps: undock the Grep Results window and save the desktop do some Grep search (may not be necessary) Open a different project (the Grep Results window disappears) Open the Grep Results Window -> It's empty, just as described When I dock and undock it, the content comes back. After that I can not reproduce it until I restart the IDE. Then the steps detailed above reproduce the effect. No I idea yet, what causes this, but now I should be able to debug it.
-
How to operate a private field in other unit?
dummzeuch replied to pcplayer99's topic in RTL and Delphi Object Pascal
You cannot access private fields of a class declared in a different unit. [Period] That is, if you play by the rules. There are various ways to still achieve that, but each of them relies on either some compiler quirk (e.g. class helpers could access private fields in some Delphi versions, but that loophole has been closed) or directly use the knowledge about the memory layout of the original class. The latter is done either with pointer arithmetic or by declaring a new class with the same fields and hard typecasting an instance to that class, which then allows accessing the private fields. Of course that would mean this class or pointer arithmetic must be adapted to every change that Embarcadero makes to the original, so the memory layout matches. -
Unit scope names in IDE - possible 2+ lines?
dummzeuch replied to Mike Torrettinni's topic in General Help
Up to Delphi 7 it was easily possible to switch the editor tabs to multline, but with the "new" IDE there is no simple way to achieve that and nobody has yet thought of a complex way and implemented it. It would probably be possible to hack the edit window and insert a TTabSet, if one were so inclined, but I think Ctrl+F12 is much more useful than multiline tabs.