Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/29/23 in all areas

  1. Hi everyone, more than twenty-one years ago, I started the German-language part of this forum and could not even begin to imagine what it would become. Thanks to the tireless support of many moderators as well as your thirst for knowledge and willingness to answer other people's questions, it has become a pillar of the virtual Delphi community - even far beyond the German-speaking world. Since 2018, this English-language part of the forum has also been available, with considerable support from Lars. With an online presence of this size comes the obligation to take proper care of it. I have always been very happy to do this, but over twenty-one years is a very long time and life and its priorities change. I can't help but realize that my daily/weekly time has become less available and the time has come for me to hand over the management of the forum to someone else. Thankfully, Thomas B. ("TBx") has agreed to take over the Delphi-PRAXiS and continue it in good hands - together with Lars, of course. You know Thomas as a longtime moderator of this forum and now he will take over my previous role. I myself will of course remain part of the Delphi community - not least because I continue to work a lot with Delphi in my job. I will also remain a part of this forum. Thank you all for over 21 great years!
  2. Dalija Prasnikar

    Custom managed records with String List causing memory leak

    It is very likely that you would have less issues with interface based class and then you would be able to pass around interface reference without having to worry about memory management too much. If you still want to use record, you need to fix your Clear procedure. You are calling CustomButtons.Free there which will destroy CustomButtons instance and then you would have crash in Finalize which would try to destroy that same instance. You should just clear the list and not free it there. So that memory management happens solely within Initialize and Finalize methods. procedure TTaskDialogParams.Clear; begin CustomButtons.Clear; end; class operator TTaskDialogParams.Finalize(var Dest: TTaskDialogParams); begin Dest.CustomButtons.Free; end;
  3. Alexander Halser

    Zoom gesture on macOS not working

    IMO the gestures are designed for real touchscreens and not for touchpads. I believe this has never worked with touchpads. Anyway, I have implemented a solution for myself by patching FMX.Platform.Mac, which was already patched anyway to work around the Sonoma scaling bug on MacOS. This is certainly not for everyone, but works like a charm. It uses the Angle parameter for an alternative zoom gesture (Angle is used in rotation gestures, for zoom it's always zero). Your app needs to respond to this accordingly. Most importantly, it doesn't break regular zoom gestures coming from real touch screens. procedure TFMXViewBase.magnifyWithEvent(event: NSEvent); var ... begin ... if FGestureControl <> nil then begin LTouches := event.touchesMatchingPhase(NSTouchPhaseTouching, NSView(Super)); if LTouches.count >= 2 then begin LTouchesArray := LTouches.allObjects; LTouch := TNSTouch.Wrap(LTouchesArray.objectAtIndex(0)); LDeviceSize := LTouch.deviceSize; FEventInfo.Distance := 0; //reset the distance // Find the greatest distance between the touches. for I := 0 to LTouches.count - 2 do begin LTouch := TNSTouch.Wrap(LTouchesArray.objectAtIndex(I)); LPoint := LTouch.normalizedPosition; for J := 1 to LTouches.count - 1 do begin LTouch := TNSTouch.Wrap(LTouchesArray.objectAtIndex(J)); LPoint2 := LTouch.normalizedPosition; Distance := Round(Sqrt(Sqr(LPoint.x * LDeviceSize.width - LPoint2.x * LDeviceSize.width) + Sqr(LPoint.y * LDeviceSize.height - LPoint2.y * LDeviceSize.height))); if Distance > FEventInfo.Distance then FEventInfo.Distance := Distance; end; FEventInfo.GestureID := igiZoom; if Supports(FGestureControl, IGestureControl, GestureObj) then GestureObj.CMGesture(FEventInfo); FEventInfo.Flags := []; end end {ECS/ALEX} else if LTouches.count = 0 then begin FEventInfo.Distance := 0; FEventInfo.Angle := event.magnification; FEventInfo.GestureID := igiZoom; if Supports(FGestureControl, IGestureControl, GestureObj) then GestureObj.CMGesture(FEventInfo); FEventInfo.Flags := []; end; end {ECS/ALEX} else //send the message up the responder chain NSView(Super).magnifyWithEvent(event); end;
  4. https://learn.microsoft.com/en-us/visualstudio/ide/ai-assisted-development-visual-studio You can use GitHub Copilot with VS Code. My current problem with those AI tools is accuracy (which is less of a problem if you know what you are doing and you are using it for small code snippets completion), potential legal issues (they trained on open source, but that does not mean that they haven't violated open source licenses), and next question is how much of my code ends up in training data which may leak security sensitive data.
  5. I've found the source of the problem. It turned out to be third-party components - ESBPCS for VCL. If they are disabled, then the problem disappears. As @balabuev rightly pointed out, here's what's to blame: "Non-standard property editors are installed. More technically, this happens when a property editor implements the ICustomPropertyDrawing interface but does not implement the more recently introduced ICustomPropertyDrawing80 interface." The developer of these components has already been notified.
  6. Features missing in the Delphi editor: Proper Unicode handling . It does not even support combining characters. Multi-cursor/selection editing Modification (track changes) bar that works with undo. Accessibility support Drag & drop editing triple and quadruple click support double/triple click and drag support Enhanced scroll bar as in VS Code ...
  7. I am used to named parameters in Swift (which you have to explicitly write), so once you get used to the fact there there is more information in code, you learn to easily ignore it when you don't need it, but when you do need it is extremely helpful when you are going through code you are not familiar with or your own old code. Yes, you could also hover over the method to see the names and types, but that significantly slows down reading the code. I even find it helpful for the code I know well. I guess my brain likes the extra information being served on a plate.
  8. Inlay parameter hints. It is extremely useful for reading and understanding the code https://www.jetbrains.com/help/idea/inlay-hints.html#change-inlay-hints-appearance Excluding things that Delphi offers but don't work is tough restriction 😉 Well working code completion and refactoring are next.
  9. Uwe Raabe

    Best way to prevent multiple instances? Mutex not working

    If a mutex is not working you are probably doing something wrong.
×