-
Content Count
2857 -
Joined
-
Last visited
-
Days Won
101
Everything posted by dummzeuch
-
Parnassus Bookmarks for Delphi 11 Alexandria?
dummzeuch replied to PeterPanettone's topic in Delphi IDE and APIs
The easiest solution for that would be to disable the plugin if the IDE was not started with /highdpi:unaware and document that restriction. That would help those who miss the plugin but can live without high dpi support in the IDE. Of course there would still be a lot of moaning about this but maybe less than about the total absence of this plugin and any communication about the reason for that. (But that's not going to happen anyway ...) -
Sorry, I currently haven't got the time to check. Your best bet is to file a bug report on sourceforge as described in the FAQ which is pinned to this topic. I will eventually get to look there but probably will have forgotten this post by that time.
-
The following code is supposed to create a TBitmap in 8 bit greyscale: function MakeGrayPalette(_NumColors: TNumColors = 256): HPALETTE; var i: Integer; lp: TMaxLogPalette; Grey: Byte; begin lp.palVersion := $300; lp.palNumEntries := _NumColors; for i := 0 to _NumColors - 1 do begin Grey := i * 255 div _NumColors; lp.palPalEntry[i].peRed := Grey; lp.palPalEntry[i].peGreen := Grey; lp.palPalEntry[i].peBlue := Grey; lp.palPalEntry[i].peFlags := PC_RESERVED; end; Result := CreatePalette(pLogPalette(@lp)^); end; // to be used like this: bmp := TBitmap.Create; bmp.PixelFormat := pf8bit; butBmp.Palette := MakeGrayPalette(); I think I got it from here (stackoverflow) but there are several Google hits for the same code, e.g. here (book "Delphi in a Nutshell") or here (DelphiPower), but I guess the book is the original source. Since it looked fine I never questioned it until I used it today to load a bitmap from a file, modify a part of it and save it again. When I checked the result, I found that in addition to the expected changes there were subtle differences in gray shades varying by a few values. Looking at the code again now, I think there is a bug in the line assigning Grey: Grey := i * 255 div _NumColors; Shouldn't that be ... Grey := i * 256 div _NumColors; ... instead? If I change it like that the bitmaps only contain the expected differences. Or am I missing something here?
-
Ouch! Yes, of course.
-
I'm not sure what you're trying to tell me. I had such an example in my test: var X := 0.5; and it seems to work. This was with the "twm" settings because that's what I use. I haven't tried any of the others.
-
The one in GExperts apparently can do that. I didn't really know but just tested it with: procedure bla; begin for var i: Integer := 0 to List.Count - 1 do begin end; for var i := 0 to List.Count - 1 do begin end; var blub: Integer = 5; Inc(blub); var X := 0.5; var Y := X - 3; end; And this looks fine to me.
-
You may remember that I was forced to reduce GExperts support for Delphi 6 a while ago, because the IDE no longer started on my computer. It turns out that it was a GExperts bug after all. The fix was simple once I knew what the problem was. And I only found out because carrchri, one of the few GExperts for Delphi 6 users, debugged it and told me. Thanks a lot! When I was able to use the Delphi 6 IDE again I also fixed incompatibilities in the DFMs that prevented some of the dialogs open in Delphi 6. So here is a new release. Apart from these two Delphi 6 related bug fixes there are some improvements ... read on in the blog post.
-
Committed to revision #3830. I had to fix two event handlers for checkboxes that no longer dis/enabled other checkboxes when (un)checked. Apart from that it seems to work fine. Thanks a lot @TheDelphiCoder!
-
What is the advantage of doing that?
-
Legacy (bad) code issues on Delphi 11.1 on 64bit VCL apps related to new ASLR linker flags
dummzeuch replied to Davide Angeli's topic in Delphi IDE and APIs
No, because that might crash other badly written programs. -
Looking for photography enthusiasts for continuing a camera calibrator project (CoCa)
dummzeuch replied to hurodal's topic in I made this
Is the source code available in an SCM somewhere? That would be the very first step. (No, I'm not a photography enthusiast and I haven't got the time for yet another open source project.) -
They are indeed. I'm looking forward to using them one day when my main development environment will have caught up. Currently I'm stuck with Delphi 2007 compatibility at work, just to cater for the two remaining Windows XP computers our programs must run on (Yes, I could upgrade to Delphi XE<LastXpCompatible> but that won't help much.)
-
Unfortunately not. At least I'm not aware of any and I never wrote one. It's possible that Eric wrote something when he was maintaining the project, but I'm not sure. The part about Delphi 6 compatibility should be obvious, but on the other hand even I tend to forget it once in a while and find out the hard way when the code stops compiling.
-
I added this message (and the files) exactly because this happens so frequently but still with a time difference long enough that I had forgotten about it every single time. (And I had also already forgotten that I did this. I hope that I will never be the suspect in a crime, because I would have to answer "I don't remember" to most of the questions asked.)
-
GExperts Grep is always case sensitive when regular expressions are enabled
dummzeuch replied to David Hoyle's topic in GExperts
OK, I can reproduce that one with Delphi 10.4 but not with Delphi 2007. This might therefore be some kind of Unicode issue, even though I can't figure out how. btw: It also happens with a much simpler regex: "ix" is enough. If you can fix it, I'll gladly accept a patch of course. If you can't, please create a bug report and include these screenshots. -
I have just checked in a slightly modified version of your patch. The modifications were: removed inline variable with type inference because this is not supported by Delphi 6 fixed tab order issue in configuration dialog set the options to False in the Borland and DelForEx default configurations so they are not automatically turned on for existing configurations Thank you for your contribution.
-
GExperts Grep is always case sensitive when regular expressions are enabled
dummzeuch replied to David Hoyle's topic in GExperts
It should, and it does, at least in my test in Delphi 2007: Seaching for "Then", whole word, not case sensitive as a regular expression, found several instances of "then": Have you got an example where it doesn't work? And in which Delphi version does it fail? 10.4 ? 11.1 ? -
GExpert current source fails to build (03/Apr/2022)
dummzeuch replied to David Hoyle's topic in GExperts
As said in the other post: I just did a fresh checkout of the sources, I even went so far and deleted my original sources (after ziping them of course, you never know ...) and ran the compile scripts for all supported Delphi versions. No compile error, not even a warning or hint (as it should be). Since you mention git in your other post, my first idea is a line feed issue. Delphi has various problems if the line feed style does not match the one it expects, which is usually CR+LF and one of my gripes with git is the way it handles line feeds. -
GExperts current source does not contain a build package for RS 11.1 (03/Apr/2022)
dummzeuch replied to David Hoyle's topic in GExperts
It's definitely in the repository under projects\DelphiXx110Alexandria. I just did a fresh checkout and it was there. No idea why you don't get it checked out, maybe a git issue? -
Given a simple VCL project with an empty VCL form with only the following properties changed from the default: ClientHeight = 200 ClientWidth = 200 Scaled = False The dfm looks like this: object Form2: TForm2 Left = 0 Top = 0 Caption = 'Form2' ClientHeight = 200 ClientWidth = 200 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -12 Font.Name = 'Segoe UI' Font.Style = [] Scaled = False PixelsPerInch = 96 TextHeight = 15 end and the following code: type TForm2 = class(TForm) private public procedure Loaded; override; end; var Form2: TForm2; implementation {$R *.dfm} procedure TForm2.Loaded; begin Caption := Format('%dx%d', [ClientWidth, ClientHeight]); inherited; end; The project's manifest is configured for auto generate, runtime themes enabled and Per Monitor v2 DPI awareness. I would have expected the form to show with a Caption of '200x200' regardless of screen resolution or DPI. But I get this: And the form has indeed these dimensions. But why? Even if some scaling took place, I would have expected a client width of 300 rather than 618 This is Delphi 11 with Patch 1 applied. That's the latest oddity which is driving me crazy.
-
That is not necessarily related to Deputy IDE expert. It also happens (sometimes) with only GExperts installed when closing the IDE. I could never figure out what causes it. It's an assertion in a destructor in SynEdit.
-
Converting code source in R to Delphi
dummzeuch replied to de la Mancha's topic in Algorithms, Data Structures and Class Design
To be fair: David also tends to be - lets say "terse" - in his answers. That can also be interpreted as rude, in particular by people for whom English is a foreign language. -
I have seen the ticket, but haven't yet found the time to actually look at the code. But I definitely will. I'm grateful for any contribution to GExperts, in particular for patches that fix bugs or improve the tool.
-
Yes. 😢
-
Who is resposible for updating SynEdit in Getit? Embarcadero?