Registration disabled at the moment Read more...
×


EugeneK
Members-
Content Count
113 -
Joined
-
Last visited
-
Days Won
1
Everything posted by EugeneK
-
A Conditional Ternary Operator for the Delphi
EugeneK posted a topic in RTL and Delphi Object Pascal
Conditional operator coming in Delphi 13 https://blogs.embarcadero.com/coming-in-rad-studio-13-a-conditional-ternary-operator-for-the-delphi-language/ It is not clear from blog post are both expressions evaluated every time or based on condition? I think is most important thing about this feature. -
A Conditional Ternary Operator for the Delphi
EugeneK replied to EugeneK's topic in RTL and Delphi Object Pascal
It is true at least based on votes in old quality.embarcadero.com portal. -
Hi In OverbyteIcsWebSocketCli.pas there are many instances of this if Obj <> nil then Obj.Free; I think it should be simplified to just Obj.Free;
-
According to https://stackoverflow.com/a/8591357/1325672 if FField <> nil then FField.Destroy;
-
If you have license Delphi 7 is available for download on Embarcadero website, you can check source code there.
-
Free on nil works in Delphi 7 as well.
-
Delphi 13 beta announced https://blogs.embarcadero.com/update-subscription-customers-invited-to-join-rad-studio-ganymede-beta/ Have anyone received invites? Apparently they sent to premium and regular subscription licenses this time. I'm on regular subscription and did not get any. Getting regular marketing emails, though.
-
I'm using DDetours to intercept Windows functions for unit testing purposes, but don't know how to intercept UuidCreate function because its declaration is hidden in implementation section of System.SysUtils unit. Is there a way to do it?
-
Thanks! I did not know that you can use this form of InterceptCreate
-
I mostly use abstractions, but using abstractions for Now feels like an overkill, that's the only one I use DDetours for so far. Also until Spring4d uses namespaces I'm not using it.
-
Hi Does anyone have example of working with Azure Relay in Delphi?
-
Looks like there is commercial solution that implements AMQP 1.0, https://www.esegece.com/websockets/protocols/amqp/amqp-1-0-0 I wonder if anyone tried it?
-
It seems to be for AMQP v0.9.1, there is Delphi implementation for it here https://github.com/felipecaputo/delphi-amqp
-
No, I'm trying to reverse engineer it. It uses AMQP 1.0 over WebSockets
-
In Dalija Prasnikar's smart pointer unit here https://github.com/dalijap/code-delphi-mm/blob/master/Part5/SmartPointer/uSmartPtr.pas#L8 following code is used ISmartPointer<T> = reference to function: T; TSmartPointer<T: class, constructor> = class(TInterfacedObject, ISmartPointer<T>) basically anonymous method declaration is equivalent to interface. Is it documented somewhere? I tried looking at Interfaces and Anonymous method sections in documentation but can't find anything.
-
Hi Does my.embarcadero.com works for anyone right now? Cannot login to it.
-
Yes getIt was down, it hanged IDE when I tried to open it, I killed IDE from taskmanager and it somehow completely deleted my license, so now I can't use IDE at all, and can't login to the portal to get my license number.
-
[dcc32 Error] Type parameter 'T' must be a non-nullable value type
EugeneK posted a topic in RTL and Delphi Object Pascal
Hi Anyone else have this error in 12.3 [dcc32 Error] Type parameter 'T' must be a non-nullable value type Works fine in 12.2, trying to isolate it now, seems to work in some places but not the others. -
I think more consistent with Embarcadero style will be following, since there could be multiple consts/types/vars TClass = class(TObject) private FSomeField: integer; private const SomeConstant = 5; SomeOtherConstant = 6; private type SomeType = integer; SomeOtheType = string; private class var SomeClassVar: integer; SomeOtherClassVar: string; end;
-
[dcc32 Error] Type parameter 'T' must be a non-nullable value type
EugeneK replied to EugeneK's topic in RTL and Delphi Object Pascal
But this is simply not true because managed records can be used for generics restricted to records in 12.2 and before. I had a lot of code broken because of this change that worked perfectly fine. -
[dcc32 Error] Type parameter 'T' must be a non-nullable value type
EugeneK replied to EugeneK's topic in RTL and Delphi Object Pascal
Can anyone explain rationale why the suddenly change this and closed my ticket about this as by design? https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-3043 This pisses me off they they randomly change compiler behaviour and not even in major version. And don't provide any explanation. -
[dcc32 Error] Type parameter 'T' must be a non-nullable value type
EugeneK replied to EugeneK's topic in RTL and Delphi Object Pascal
Yes I'll probably use it as a workaround, but that kind of defeats the purpose -
[dcc32 Error] Type parameter 'T' must be a non-nullable value type
EugeneK replied to EugeneK's topic in RTL and Delphi Object Pascal
Happens when record field has an attribute unit UTestGenericsBug; interface uses System.Rtti, Data.DB; type DBField = class(TCustomAttribute) strict private FFieldType: TFieldType; FLength: Integer; public constructor Create(const AFieldType: TFieldType = ftUnknown; const ALength: Integer = 0); property FieldType: TFieldType read FFieldType; property Length: Integer read FLength; end; TTestRecord = record private [DBField(ftString, 20)] FTerminalName: string; public end; TRecordLoader<T: record> = class sealed class function Get: T; static; end; implementation constructor DBField.Create(const AFieldType: TFieldType = ftUnknown; const ALength: Integer = 0); begin end; class function TRecordLoader<T>.Get: T; begin Result := Default(T); end; function Get: TTestRecord; begin // error here Result := TRecordLoader<TTestRecord>.Get; end; end. 😒 -
Hi It would be nice to add keylog callback functions to OpenSSL interface, https://docs.openssl.org/master/man3/SSL_CTX_set_keylog_callback/ OverbyteIcsSSLEAY.pas.patch
-
Yes, for Wireshark, in next release OpenSSL adds logging directly in the library, but you need to configure it at build time, with these callbacks you can log it with regular build