Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/11/22 in all areas

  1. 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.
  2. I fixed a bug in the dxgettext executable which made it add wrong ressource string names to the po files which in turn made the msgmergePOT tool select wrong translations. You will have to compile your own executable to get this bugfix. The source code is in the project’s svn repository on SourceForge. Also I added scripts to generate partial German and French translations for Delphi 10, 10.1, 10.2, 10.3 and 10.4 and even added those partial translations for Delphi 10, 10.1, 10.2 and 10.4 (note that 10.3 is missing) to the repository. Warning: These translations may still be faulty.
  3. Anders Melander

    Parallel Resampling of (VCL-) Bitmaps

    I had to reread the source 3 times before I spotted the place it occurs. "with" strikes again: ClusterWeight := ClusterX[X].Weight; with HorzBuffer[ClusterX[X].Pos - MapXLoPos] do begin Inc(Cb, B * ClusterWeight); // Note: Fixed precision multiplication done here Inc(Cg, G * ClusterWeight); Inc(Cr, R * ClusterWeight); Inc(Ca, A * ClusterWeight); end; As you can see I have now added a comment to make it obvious 🙂 Anyway, your changes has now been committed. Please verify that the comments I've added in the source are correct. I will continue working on correcting the alpha handling (i.e. do premultiplication).
  4. Dear visitors,  We are offering excellent opportunity to get 35% off on our Next Suite Delphi (VCL) Components. Just use EASTER coupon code on the checkout page to get 35% off. Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. new Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code.   and many more.  Few screenshots:     Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip  Best regards  Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: bms.bergsoft.net Articles and Tutorials: developer.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too.
  5. PeterBelow

    Delete unicode non-breaking space

    You are approaching this from the wrong angle. The data you showed pasted into notepad looks like a semicolon-separated CSV format. To dissect this you can use TStringlist. Something like this: var LText, LLine: TStringlist; i: integer; begin LText := TStringlist.Create; try LText := Clipboard.AsText; // This splits the data into lines LLine := TStringlist.Create; try LLine.StrictDelimiter := true; LLine.Delimiter := ';'; for i:= 0 to LText.Count - 1 do begin LLine.DelimitedText := LText[i]; if i = 0 then ProcessHeaderLine(LLine) else ProcessDataLine(LLine); end; finally LLine.Free; end; finally LText.Free; end; end; Untested, just typed into the post directly. The two Process routines are something you would write yourself. For each the passed stringlist should hold 5 lines, the column captions for the header and the column values for the data. If you really want to replace a non-breaking Unicode space it is a single character with the code #$00A0, not a two-character string. Your hex viewer probably pastes the clipboard content as ANSI text, while Notepad pastes it as Unicode (UTF-16).
  6. Your first point may be to read the posting on Delphipraxis below. Around July 2021 there is a link to my blog about using google tests with 10.4.2. (and later a link to my blog about using it with 11.1). I did get it to work ok with 10.4.2 - be aware that the packages as downloaded by getit come with some of the projects set to clang32 and some set to clang64 (a mess - might have been fixed by now, but unlikely) so before you try to build all the packages downloaded by getit you need to manually set them all to clang32 or clang64 according to which you want to use. I have a licensed version of RAD Studio but I don't see any reason why you can't get it to work with 10.4.2 community edition. Be aware also that it never did work with 11.0 ! - but all is good with 11.1 It's always wise to search DelphiPraxis before posting as you may find (as in this case) that your question has already been answered. Also it's best to post C++ related questions in the C++ section of DelphiPraxis. Hope this helps....
  7. Dalija Prasnikar

    Weak reference is dangerous

    No. While unsafe can also be used to break reference cycles, it cannot be used interchangeably with weak, meaning unsafe used in wrong place can lead to dangling pointers. Again, using weak is perfectly fine. If you read my book example again, you will see that you cannot even safely take strong reference from strong reference if original has been written to. So now what? Don't use interfaces at all because they are not thread safe. Don't use strings and dynamic arrays because they are not thread safe?
  8. Dalija Prasnikar

    Weak reference is dangerous

    You are mixing apples and oranges. Weak references work fine and have their purpose when used in single thread scenario. Their purpose is not achieving some magical thread safety, but breaking reference cycles. I will say it again, assignment of any non trivial type in Delphi is not thread safe. Never has been. As soon as one thread is writing some data, all access to that data must be protected. There is no way around it.
×