-
Content Count
2838 -
Joined
-
Last visited
-
Days Won
168
Everything posted by Uwe Raabe
-
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.
-
Values for vmtArcOffset and CPP_ABI_ADJUST
Uwe Raabe replied to dummzeuch's topic in RTL and Delphi Object Pascal
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} -
Selective Debugging propably has a issue
Uwe Raabe replied to Jacek Laskowski's topic in MMX Code Explorer
Can you reproduce that with a plain Delphi installation with only Selective Debugging installed? -
Detecting update versions in defines
Uwe Raabe replied to Vincent Parrett's topic in RTL and Delphi Object Pascal
Are you sure? I guess that just boils down to declared(TObject) in both cases. -
Detecting update versions in defines
Uwe Raabe replied to Vincent Parrett's topic in RTL and Delphi Object Pascal
If such an update introduces a new identifier you can catch that with an {$IF Declared(<something>)} -
Create PersistentClass from component name
Uwe Raabe replied to limelect's topic in RTL and Delphi Object Pascal
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 -
How-to: Post a message to Teams using WebHooks
Uwe Raabe replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
The Delphi 10.2 implementation of TRESTClient still makes use of the IPPeerAPI. This has been removed later in 10.3. -
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;
-
The old dbExpress components were named TSQL<something>
-
Found it - well, at least a workaround. Will investigate for the root cause later. The new version is available for download.
-
Yes, I noticed that here, too. I am still investigating what change may have caused that.
-
Parnassus Bookmarks causes 10.3.3 to crash at startup
Uwe Raabe replied to Tom F's topic in Delphi IDE and APIs
Search for ParnassusCoreEditor in this forum and you will get some helpful answers. -
How-to: Post a message to Teams using WebHooks
Uwe Raabe replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
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); -
How-to: Post a message to Teams using WebHooks
Uwe Raabe replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
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. -
Thanks! There are several issues regarding visibility and they are still being investigated. All reproducible steps are valuable.
-
Embarcadero working with MVPs on (some) Delphi source code
Uwe Raabe replied to Javier Tarí's topic in Tips / Blogs / Tutorials / Videos
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. -
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.
-
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.
-
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.
-
You can make use of pre-compiled DCUs for these libraries.
-
Delphi's code formatter vs. GExperts' code formatter
Uwe Raabe replied to dummzeuch's topic in GExperts
Formatter.EXE, the Command Line Formatter -
On Delphi 10.4.1 the MMX Code Explorer is mostly dead/inactive when running Delphi debugger
Uwe Raabe replied to panie's topic in MMX Code Explorer
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? -
Delphi's code formatter vs. GExperts' code formatter
Uwe Raabe replied to dummzeuch's topic in GExperts
The Delphi integrated formatter offers that as well. -
On Delphi 10.4.1 the MMX Code Explorer is mostly dead/inactive when running Delphi debugger
Uwe Raabe replied to panie's topic in MMX Code Explorer
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. -
On Delphi 10.4.1 the MMX Code Explorer is mostly dead/inactive when running Delphi debugger
Uwe Raabe replied to panie's topic in MMX Code Explorer
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.