Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/11/25 in all areas

  1. Anders Melander

    Component with sub-property event

    Okay, so I got it working using the same method as DevExpress: The code required is pretty crazy. I'll post a link to it once it makes into the Graphics32 repository. Functionality like this is really something that ought to be standard.
  2. Anders Melander

    Component with sub-property event

    Yes, I know I could just use TComponent but nope; I'm not letting a deficiency of the IDE dictate my class design.
  3. Remy Lebeau

    Component with sub-property event

    The Object Inspector does not display events for nested sub-properties. It can only display the events that are directly members of the selected object(s), which in this case is your TTest component, not the TTestSub nested sub-object. All of the events need to be exposed only at the top-level of your TTest component. If you have sub-property events you want to expose in the OI, you will have to propagate them accordingly, eg: unit FooBar.Reg; interface uses Classes, DesignIntf; type TTestSub = class(TPersistent) private FOnEvent: TNotifyEvent; FTest: string; public procedure Assign(Source: TPersistent); override; published property Test: string read FTest; property OnTestEvent: TNotifyEvent read FOnEvent write FOnEvent; end; TTest = class(TComponent) private FSub: TTestSub; procedure SetSub(const Value: TTestSub); function GetOnTestEvent: TNotifyEvent; procedure SetOnTestEvent(AValue: TNotifyEvent); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; published property Sub: TTestSub read FSub write SetSub; property OnTestEvent: TNotifyEvent read GetOnTestEvent write SetOnTestEvent; end; procedure Register; implementation procedure Register; begin RegisterComponents('FooBar', [TTest]); end; { TTest } constructor TTest.Create(AOwner: TComponent); begin inherited; FSub := TTestSub.Create; FSub.FTest := 'Hello world'; end; destructor TTest.Destroy; begin FSub.Free; inherited; end; function TTest.GetOnTestEvent: TNotifyEvent; begin Result := FSub.OnTestEvent; end; procedure TTest.SetOnTestEvent(AValue: TNotifyEvent); begin FSub.OnTestEvent := AValue; end; procedure TTest.SetSub(const Value: TTestSub); begin FSub.Assign(Value); end; { TTestSub } procedure TTestSub.Assign(Source: TPersistent); begin FOnEvent := TTestSub(Source).OnTestEvent; end; end. I could be wrong, but I don't recall this ever being possible. Apples and Oranges. What you are asking for is simply not supported by Delphi without propagating the events manually, or maybe by writing a custom property/component editor that exposes nested events at the top level.
  4. Wak

    Styles bloating final packages

    I have never used Datamodules and wonder if it is compressed after compilation? Yes, Patrick's method is better because compression is unnecessary for IPA and APK files, which are also Zip-compressed. For the Mac and Windows apps, compressing them and using conditional resources should help. Including eight styles resulted in a size increase of 965 KB for the Mac app and 3.24 MB for the Windows app. They are 8 MB and 15.5 MB without compression. {$IFDEF MSWINDOWS} {$R 'Styles\Polar.Win.res'} {$ENDIF} {$IFDEF MACOS} {$R 'Styles\Polar.Mac.res'} {$ENDIF}
  5. Pointers are implicitly convertible to bool. A string literal is not itself a pointer, but it does decay into a pointer, which is then convertible. Note that NULL is not a pointer. It is an alias for a null pointer constant, either nullptr or integer literal 0 (depending on implementation), which can be assigned to any pointer.
  6. Remy Lebeau

    OpenSSL version questions...

    Indy in general (not just TIdSMTP specifically) indeed natively supports only up to OpenSSL 1.0.2, not OpenSSL 1.1.x and later. This is a LONG standing problem with no resolution in Indy itself at this time. But, there are a few 3rd party implementations available that add support for those versions, such as TaurusTLS: https://github.com/JPeterMugaas/TaurusTLS
  7. OpenSSL has released a new feature version 3.5.0 (no security fixes). It includes support for new Post Quantum Cryptography (PQC) algorithms (ML-KEM, ML-DSA and SLH-DSA) and for server side QUIC (RFC 9000). ICS has no plans for QUIC support, not yet investigated PQC, don't believe any low level changes are needed, maybe changes to the cipher lists. There are other TLS/SSL changes due for IVS V9.5, so will investigate shortly. This is a long term support release with fixes and security updates for five years, until April 2030. Windows binaries are available in SVN and the overnight zip file and separately from https://wiki.overbyte.eu/wiki/index.php/ICS_Download or https://www.magsys.co.uk/delphi/magics.asp In addition to the three DLL files, the zips include compiled RES resource files that contain the same DLLs, text files and version information, see the RC file. The RES file may be linked into application EXE files and code then used to extract the DLLs from the resource to a temporary directory to avoid distributing them separately. ICS V9.1 and later optionally support loading the resource file. These OpenSSL versions are included with ICS V9.5 beta available from SVN and the overnight zip. ICS V9.5 beta now defaults to using OpenSSL 3.5.0, provided the new OverbyteIcsDefs.inc files is installed, or you undefine OpenSSL_35 and suppress an earlier version. . Angus
  8. Patrick PREMARTIN

    Styles bloating final packages

    I've just created a sample project to illustrate what you can do. Check https://github.com/DeveloppeurPascal/Delphi-samples/tree/main/FireMonkey-Samples/027-StylesAndEXESize Screen samples are good for understanding how to use visual component stacking, layout and alignment, but not necessarily for organising things. Never put styles on forms but rather on data modules, like database components or image lists used by several files. This is something you learn as you use it, which you can read about in certain corners of the documentation or in the many books full of good practices. Unfortunately, it's difficult to add a comment in the examples, but a good idea for improvement.
  9. Thank you for your feedback! Security is a key concern, and I have planned to secure all communications using TLS encryption. This is precisely why I chose TCP instead of UDP—to leverage TLS easily and ensure message integrity and authentication. With TLS, only authorized clients will be able to send and receive commands securely, preventing unauthorized shutdowns or deployments. UDP could be useful for discovery, but for executing critical commands, TCP with TLS provides much stronger protection. That being said, if a malicious actor has already gained access to the network, their primary goal would likely not be just shutting down applications but rather compromising systems, exfiltrating data, or escalating privileges...
×