Jump to content

Uwe Raabe

Members
  • Content Count

    2838
  • Joined

  • Last visited

  • Days Won

    168

Everything posted by Uwe Raabe

  1. Uwe Raabe

    Adding file directories to project

    If you change the dproj file from outside the IDE, you will get a message when the IDE gets focus again. There is a setting somewhere in the IDE options to suppress these messages and silently reload the changed file.
  2. Well, in System.pas from 10.4.1 they are declared like this: {$IFDEF AUTOREFCOUNT} vmtArcOffset = 2 * SizeOf(Pointer); {$ELSE} vmtArcOffset = 0; {$ENDIF} {$IFDEF CPP_ABI_SUPPORT} CPP_ABI_ADJUST = 3 * SizeOf(Pointer); {$ELSE !CPP_ABI_SUPPORT} CPP_ABI_ADJUST = 0; {$ENDIF !CPP_ABI_SUPPORT}
  3. Uwe Raabe

    Selective Debugging propably has a issue

    Can you reproduce that with a plain Delphi installation with only Selective Debugging installed?
  4. Uwe Raabe

    Detecting update versions in defines

    Are you sure? I guess that just boils down to declared(TObject) in both cases.
  5. Uwe Raabe

    Detecting update versions in defines

    If such an update introduces a new identifier you can catch that with an {$IF Declared(<something>)}
  6. Although I am not aware of a way to get this directly, there actually is a function to get the TPersistentClass from the class name: GetClass
  7. The Delphi 10.2 implementation of TRESTClient still makes use of the IPPeerAPI. This has been removed later in 10.3.
  8. Uwe Raabe

    fun coding challenge

    For one memo the result is just that memo. Given the result for n memos, the result for adding another memo is just the combination of that result with the new memo. procedure Combine(Source, Target: TStrings; const Delimiter: string = ';'); var lst: TStringList; S: string; T: string; begin if Target.Count = 0 then begin Target.Assign(Source); end else begin lst := TStringList.Create(); try for S in Source do for T in Target do lst.Add(T + Delimiter + S); Target.Assign(lst); finally lst.Free; end; end; end; The calling part could look like this: var A: TStringList; memo: TMemo; begin A := TStringList.Create; try for memo in [memo1, memo2, memo3] do Combine(memo.Lines, A); memResult.Lines := A; finally A.Free; end; end;
  9. Uwe Raabe

    Delphi with T SQL

    The old dbExpress components were named TSQL<something>
  10. Uwe Raabe

    Two icons are not displayed.

    Found it - well, at least a workaround. Will investigate for the root cause later. The new version is available for download.
  11. Uwe Raabe

    Two icons are not displayed.

    Yes, I noticed that here, too. I am still investigating what change may have caused that.
  12. Search for ParnassusCoreEditor in this forum and you will get some helpful answers.
  13. Thanks to the overloads for AddBody that is not a big challenge: { as Json string } Request.AddBody(TJSON.ObjectToJsonString(aMsg, [joIgnoreEmptyStrings, joIgnoreEmptyArrays, joDateIsUTC, joDateFormatISO8601])); { or as TJsonObject } Request.AddBody(TJSON.ObjectToJsonObject(aMsg, [joIgnoreEmptyStrings, joIgnoreEmptyArrays, joDateIsUTC, joDateFormatISO8601]), ooREST);
  14. Nice! Any reason why you didn't make use of TRestClient instead of the Indy component? That would not only avoid the dependence on the OpenSSL libraries, but make it also work on other target platforms. unit O365WebHook; // Lars Fosdal, 2020 OCT 16 // Simple example without error handling interface uses System.Classes, System.SysUtils, REST.Json, REST.Client, REST.Types; type TWebHookMessage = class end; /// <summary> See https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using /// for examples of how to structure the json for creating advanced formats</summary> TSimpleText = class(TWebHookMessage) private FText: String; public property Text: String read FText write FText; constructor Create(const aText: string); end; type TWebHook = class private FClient: TRESTClient; FRequest: TCustomRESTRequest; FURL: string; protected property Client: TRESTClient read FClient; property Request: TCustomRESTRequest read FRequest; public constructor Create(const aURL: string = ''); destructor Destroy; override; function PostMessage(const aMsg: TWebhookMessage; aOwnsMsg: Boolean = False): Boolean; property URL: string read FURL write FURL; end; implementation { TWebHook } constructor TWebHook.Create(const aURL: string); begin inherited Create; FURL := aURL; FClient := TRESTClient.Create(nil); FRequest := TCustomRESTRequest.Create(nil); FRequest.Client := FClient; end; destructor TWebHook.Destroy; begin FRequest.Free; FClient.Free; inherited; end; function TWebHook.PostMessage(const aMsg: TWebhookMessage; aOwnsMsg: Boolean = False): Boolean; begin try Request.Client.BaseURL := URL; Request.Method := rmPOST; Request.AddBody(aMsg); Request.Execute; Result := Request.Response.Status.Success; finally if aOwnsMsg then aMsg.Free; end; end; { TSimpleText } constructor TSimpleText.Create(const aText: string); begin inherited Create; FText := aText; end; end.
  15. Uwe Raabe

    MMX 15.0.18 - font bug

    Thanks! There are several issues regarding visibility and they are still being investigated. All reproducible steps are valuable.
  16. Not really. People volunteered for it. Some do smaller tasks like testing, but most of the work has been done by the core team. I see it as part of the things MVPs do.
  17. Uwe Raabe

    Delphi 10.4.1 and the IDE FIx Pack

    Perhaps, but one should not forget that Embarcadero actually did offer a full version for free to Andy several times. Even if that version may be time limited for one year, that is just the same with the CE version anyway. So he may have his reasons to decline these offers, which we simply do no know.
  18. Uwe Raabe

    Delphi 10.4.1 and the IDE FIx Pack

    Well, this suggests there will never be a CE for the current version, only for previous versions. This implies that there will be no Fix-Pack for any current version either.
  19. Uwe Raabe

    New funcionality proposal

    The configuration may lead to a big ball of mud quickly. Just your suggestion assumes that anyone uses lower case prefixes in the first place. I have seen some significant number of coding style guides that prefer the capital letter A. While I can see the benefit for your personal case, I expect difficulties to make it suitable for the general audience.
  20. Uwe Raabe

    Delphi 10.4.1 and the IDE FIx Pack

    You can make use of pre-compiled DCUs for these libraries.
  21. Uwe Raabe

    Delphi's code formatter vs. GExperts' code formatter

    Formatter.EXE, the Command Line Formatter
  22. According to the call stack the error is happening way outside of the MMX code, even if we would call VirtualTrees actually a part of MMX. Do you see these crashes even in a vanilla 10.4.1 installation with only MMX as plugin? Can you retry with the latest version 15.0.28? (Note that the map files are already included in the setup) Does anyone else see these crashes?
  23. Uwe Raabe

    Delphi's code formatter vs. GExperts' code formatter

    The Delphi integrated formatter offers that as well.
  24. The current VirtualTree already supports VCL styling. I am talking about IDE styling for IDE plugins, which is somewhat different to the normal VCL styling. On the other hand I just noticed that the latest version still doesn't support per control styling. That would make a good kludge I could contribute.
  25. I already thought of that, but most of the changes are needed to make the control compatible with the IDE styling. That is probably of less interest to the public. Nevertheless, I will see how this might be integrated with minimal footprint.
×