-
Content Count
2977 -
Joined
-
Last visited
-
Days Won
106
Everything posted by dummzeuch
-
Contributing to projects on GitHub with Subversion
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Yes, the was the first one I tried. -
A while ago I blogged about my problems with installing TeeChart pro in Delphi 2007, which failed because it assumed the Indy packages to be the ones originally shipped with Delphi 2007 while I had updated to a much later version from GitHub. The problem was that the Indy packages do not adhere to the standard packages naming convention in Delphi. I would like to know why that is so: Is there a specific reason why the packages (e.g. for Delphi 2007) are called IndyProtocols110.dpk rather than simply IndyProtocols.dpk and configured the version specific 110 suffix to be added by the IDE? The difference is that the generated .dcp file is called IndyProtocols110.dcp rather than IndyProtocols.dcp. The .bpl file would still be IndyProtocols110.bpl. This would have the advantage that the entries in the required section would also not be version specific, so less changes were required for updating for a new Delphi version.
-
I got two 4K monitors and placed them side by side. And I discovered some interesting effects in Delphi 10.4.1: on the left a 32" monitor with 3840x2160, scale set to 125%, secondary monitor on the right a 27" monitor with 3840x2160, scale set to 150%, primary monitor IDE moved to full screen on the left monitor one undocked window on the right monitor (e.g. the refactorings window) When I now try to select any entry from the main menu, regardless if with the keyboard or the mouse, it is drawn far to the left. The "File" menu is outside the screen, only when the "Recent Files" entry is selected, this submenu becomes visible. The other main menu entries are moved to the left. It probably takes quite some skill to get this effect. 😉 https://quality.embarcadero.com/browse/RSP-31126 But as I discovered during the last week, programming for multiple monitors with different resolutions and scaling is far from easy, especially in older Delphi versions (2007) where Windows is lying about the settings unless you modify the manifest. Add Remote Desktop with Windows 10 client + Windows 8.1 host to the mix and it becomes impossible. What I got to work fairly well is Remote Desktop with Windows 10 on both sides with Delphi 10.2.3. I haven't tried more recent Delphi versions. I was surprised though, that GExperts didn't show any issues. Probably just luck so far.
-
Contributing to projects on GitHub with Subversion
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Ouch! What was I thinking? And of course now I don't have access to my blog to correct this mistake. -
Contributing to projects on GitHub with Subversion
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
If that decision has been made, you'd probably better learn to use git. For me, there is no such external decision maker involved. Really to GitHub or rather to a self hosted git repository? Is your current SVN repository also hosted off-site? -
As it stands, I'm not a big fan of Getit. From the few packages i have tried to install, several didn't install currently. And don't get me started about the 10.4.0 patches... Anyway: Did you have a chance to look at the pull requests? Is it OK with you to continue in that direction for the time being (for Indy10). Working compile scripts make it simpler to compile the packages, that's all I want to achieve for now. I've got some ideas to improve them further, but before I invest the time, I'd like to get your approval.
-
What do you mean by "more streamlined"? Does getit provide a mechanism to compile and install packages? As far as I know it doesn't.
-
I got a bug report that the C++ code generated by the Components to Code expert to free a component is wrong. Currently it generates this: TEdit *Edit1; Edit1 = new TEdit((TComponent *)NULL); Edit1->Name = "Edit1"; Edit1->Parent = ParentPanel; Edit1->Left = 56; Edit1->Top = 8; Edit1->Width = 121; Edit1->Text = "Edit1"; delete[] Edit1; According to David G. Hoyle it should be done like this: delete Edit1; but according to the bug report it should be: Edit1->Free(); I tend to believe Dave, but since I don't do any C++ Builder programming, I don't know which syntax is correct.
-
I have just created a pull request (*1) for an updated build script for Delphi 2007. Apart from general cleanup and testing (the original simply didn't work) there is one notable change: It does not try to copy the generated *.bpl files to c:\windows\system32 This was a bad idea anyway and would not work nowadays. Also, no output files are generated in the source directories any more, everything goes into ..\d11, dcu files into ..\d11\dcu. There is one part in there that I don't understand: Why was there a special call to dcc32 to compile the unit IdCompressionIntercept.pas ? It's part of IndyProtocol110.dpk anyway, so why compile it separately? Does it require special compiler flags? @Arnaud Bouchez If you think that's the way to go, please give me a go ahead and I'll have a look at the other scripts. (*1: I hope I finally figured out how to correctly create pull requests on GitHub)
-
WTF? How did that happen? Sorry!!! Yes, I meant @Remy Lebeau
-
@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...