Jump to content

Uwe Raabe

Members
  • Content Count

    2545
  • Joined

  • Last visited

  • Days Won

    147

Everything posted by Uwe Raabe

  1. Uwe Raabe

    Updating a JSON file with THTTPClient

    What is written in the documentation for the server how to upload that file? If the request succeeds, what is in the response content?
  2. Uwe Raabe

    Magic numbers (1)

    Fixed in V15.0.49
  3. Uwe Raabe

    Target 64bit Delphi 10.4

    Check your library paths for 64-bit.
  4. Uwe Raabe

    Printing in Dark Mode????

    Most likely printing unit sources has been in no ones mind when dark theme was introduced. I suggest filing a QP report. Otherwise this will for sure never be taken care of.
  5. Uwe Raabe

    DPI and Scaling Discussion

    It only has an effect when VCL styles are used. For plain VCL applications it has no influence.
  6. Uwe Raabe

    C++ Builder Editor Questions

    Unfortunately it was never designed to support C++ Builder. So, while this specific functionality may work, I doubt it would justify to install the whole product with near to none additional benefit.
  7. Uwe Raabe

    DPI and Scaling Discussion

    In Delphi 11 there is an option to speed up VCL styled applications which is probably not commonly known, because it wasn't communicated much: Vcl.Themes.TStyleManager.UseParentPaintBuffers While the linked doc is pretty much useless, the common description gives some more insight: Styles Performance Improvements
  8. Uwe Raabe

    Interface question

    Storing an interface in a pointer stinks right from the beginning.
  9. Uwe Raabe

    REST Request is not working well on Delphi 11

    That is the error described in RSP-35365. Fortunately Embaracdero provided a workaround in the comments to the issue. That makes it pretty sure being included in the next update.
  10. Uwe Raabe

    Interface question

    Well, as I said, I couldn't test it. Fortunately the class helper approach lets us implement a working solution at one place: procedure TListItemHelper.SetSnapTally(Value: ISnapTally); var I: ISnapTally; P: Pointer absolute I; begin P := Data; I := Value; if Assigned(I) then I._AddRef; // because when I goes out of scope the refcount is decremented Data := P; end;
  11. Uwe Raabe

    Interface question

    Assigning an interface to a pointer skips reference counting. Thus the instance behind snap_Tally is destroyed when leaving the scope (that's the end in your code snippet). Next, when you retrieve li.Data, you cast it as TSnapTally despite the fact that you assigned an ISnapTally before (disregarding that the instance is already freed). That won't work either, because assigning nil to a Pointer doesn't trigger the reference counting even if there is an interface instance behind it. I cannot test it in the moment, but you might succeed with the following approach: if not Assigned( ARDomainsLV_ItemWithCaption( deets[n], li ) ) then begin var snap_tally : ISnapTally; snap_tally := TSnapTally.Create( aSnap ); li := AnalysisResultsDomains_lview.Items.Add; li.Caption := deets[n]; li.SubItems.Add( '' ); // #detail recs li.SubItems.Add( '' ); // LM (1,2,3) li.SubItems.Add( '' ); // Org 1-10 li.SubItems.Add( '' ); // Org 11-20 ISnapTally(li.Data) := snap_tally; // this should add the ref count properly end; TallyToListItem( li, dom_deets, aSnap ); . . . procedure TallyToListItem( li : TListItem; aDomDeets : TDomainDetails; aSnap : TLSHMSnapshot ); var st : ISnapTally; begin st := ISnapTally( li.Data ); // proper ref count st.IncNumDetailRecs; . . . ISnapTally( li.Data ) := nil; // proper ref count For simplicity I would introduce a class helper for TListItem that captures all these castings: type TListItemHelper = class helper for TListItem function GetSnapTally: ISnapTally; procedure SetSnapTally(Value: ISnapTally); property SnapTally: ISnapTally read GetSnapTally write SetSnapTally; end; function TListItemHelper.GetSnapTally: ISnapTally; begin Result := ISnapTally(Data); end; procedure TListItemHelper.SetSnapTally(Value: ISnapTally); begin ISnapTally(Data) := Value; end;
  12. I wonder what happens when you click on Code Editor...
  13. I am a bit with @David Heffernan here: As long as I am the only one using the classes or even the team is, I tend to avoid checks for parameters or correct usage - despite documenting it in the comments (like XMLDOC) of course. For myself and the team I expect to take care to do it right, otherwise running the test suite will (should) surface that early enough. In contrary, writing library code exposed to arbitrary users requires a bit more defensive programming, at least for the interface part the user is accessing directly.
  14. Uwe Raabe

    REST Request is not working well on Delphi 11

    The second call seems to have some query parameters inside the URL while the first one does not. This issue has a workaround in the comments: https://quality.embarcadero.com/browse/RSP-35365
  15. Perhaps similar to this one: LSP Ctrl+Click navigation fails when only DCP's referenced
  16. Uwe Raabe

    Missing procedures/functions in lookup??

    Historically the IDE uses several parsers for different functionality. The goal is to move all these to the new LSP approach, but that needs time.
  17. Although that might be the case, I recently turned to form a habit that avoids anything causing exceptions inside constructors. That may also lead to avoid giving parameters to constructors - at least when they are not being handled seamlessly during the lifetime of the instance. That allows to concentrate on the real work to be done instead of figuring out some tricky handling of edge cases. LA := TRaiseOnMinus.Create; try LA.Initialize(AInputA); //<== PossibleRaise LB := TRaiseOnMinus.Create; try LB.Initialize(AInputB); //<== Possible Raise { do the normal stuff with LA and LB } finally LB.Free; end; finally LA.Free; end;
  18. Uwe Raabe

    Missing procedures/functions in lookup??

    Probably something in your code we cannot see that the parser stumbles upon.
  19. Uwe Raabe

    wuppdi Welcome Page for Delphi 11 Alexandria?

    Unfortunately that won't work. High-DPI is not something the plugin initiates, it is the IDE doing that. The plugin just has to support it. The same with VCL styles. The IDE activates it and the plugin just has to cope with that somehow. Given that styling and dpi glitches are usually highly visible, they are the first that get reported. That may render the plugin unusable. That said, I am also a bit disappointed by the delay. On the other hand, I can imagine the challenge behind it.
  20. Uwe Raabe

    IDE Integration: Disable IDE Integration -> How to turn back on?

    Yeah, that's kind of a chicken and egg problem. The simplest approach would be to execute MMX_Setup again.
  21. Uwe Raabe

    IDE being destroyed by new versions

    Yes. it should. It is the search field for IDE Insight and should find almost everything that the IDE is aware of.
  22. Uwe Raabe

    Community edition form designer

    You can open a second edit window and (since D11) put the form designer in that one. That will mimic the former floating designer pretty well.
  23. Uwe Raabe

    Loss of Datasouce??

    Sometimes it helps to rename the datamodule to avoid a name clash with the internal one. Naming a datamodule dmImages may be OK for a standalone application, but for an IDE plugin that seems not to be wise. I made this experience myself.
  24. Uwe Raabe

    Loss of Datasouce??

    This can also happen when the missing DataSource is not located at the same form/frame as the DB components and the IDE fails to open the datamodule (or wherever this datasource resides) for whatever reasons. I had similar experiences with actions located in a datamodule. If by any chance that datamodule shares its name with one of the IDE internal ones (including those in 3rd party modules) that can be the cause of breaking the linkage.
  25. Uwe Raabe

    File-> Open recent: way off the top of the screen

    The settings are in the same dialog as the list of recent files and projects. The default is 10 projects and 15 files.
×