Jump to content

Uwe Raabe

  • Content Count

  • Joined

  • Last visited

  • Days Won


Uwe Raabe last won the day on October 21

Uwe Raabe had the most liked content!

Community Reputation

805 Excellent


About Uwe Raabe

  • Birthday 09/30/1956

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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}
  2. Uwe Raabe

    Selective Debugging propably has a issue

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

    Detecting update versions in defines

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

    Detecting update versions in defines

    If such an update introduces a new identifier you can catch that with an {$IF Declared(<something>)}
  5. 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
  6. The Delphi 10.2 implementation of TRESTClient still makes use of the IPPeerAPI. This has been removed later in 10.3.
  7. 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;
  8. Uwe Raabe

    Delphi with T SQL

    The old dbExpress components were named TSQL<something>
  9. 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.
  10. Uwe Raabe

    Two icons are not displayed.

    Yes, I noticed that here, too. I am still investigating what change may have caused that.
  11. Search for ParnassusCoreEditor in this forum and you will get some helpful answers.
  12. 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);
  13. 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.
  14. 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.
  15. 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.