Jump to content

Alexander Elagin

  • Content Count

  • Joined

  • Last visited

  • Days Won


Alexander Elagin last won the day on October 30 2019

Alexander Elagin had the most liked content!

Community Reputation

99 Excellent

1 Follower

About Alexander Elagin

  • Birthday September 20

Technical Information

  • Delphi-Version
    Delphi 10.1 Berlin

Recent Profile Visitors

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

  1. Alexander Elagin

    VMWare Workstation PRO vs MS Hyper-V

    Have been using paid VMware Workstation since its version 5, no problems thus far. Easy to carry VM (on a eSATA or USB3.1 external SSD drive) between different computers, no problems with USB devices in the guest OS (I stick with W7 Pro as the guest OS). Graphics is a bit slower in the guest compared to the host, otherwise no speed differences.
  2. Alexander Elagin

    Developer Express gave up on FMX

    FMX might be good for mobile OSes, but not for heavy desktop applications. If one needs a Linux version of an existing VCL application with years of manpower already invested in its development, then going the FMX way means the total rewrite of the UI in the best case, or even some internal logic if the application does not have some ideal architecture (trust me, this is the most common case). Meanwhile, Lazarus clearly demonstrates that it is easy to make a crossplatform (Windows/Linux) desktop application with a single VCL-like codebase, and even convert an existing Delphi VCL project if it does not use complex third-party components. Alas, DevExpress suite is too complex and too Windows-rooted... I understand that Embarcadero decided to make its cross-platform framework from scratch thinking primarily about the mobile OSes. The Linux support arrived many version later, without any desktop support and only in the very expensive edition - as if they decided that Linux is something used on servers only. This is obviously not the case, but I think they have already lost the race to Lazarus. If only Embarcadero had decided to sublicense CrossVCL instead of FMXLinux... but they chose the wrong path.
  3. Alexander Elagin

    50 Years of Pascal

    I remember compiling a (then) large FoxPro program with a text windows interface on PC XT. It even would not link at all - the linker crashed after a half of an hour - unless I replaced the linker with another (probably Watcom but I do not remember the detail) which could finally produce a working executable in just 40 minutes of heavy work. Those were the days...
  4. Alexander Elagin

    Problems making a calculator with DELPHI in RAD STUDIO. (Tan, Cos, Sin)

    Mainly for the historical reasons. Turbo Pascal back in 1980's implemented a set of mathematical functions as a part of its standard (default) library which was implicitly used by any project (and still is in Delphi). This set included among others sin, cos, arctan but not tan, because it is simply sinus divided by cosinus. Now, decades later, Delphi significally extended the function list, which are now implemented in a separate unit System.Math. But the original functions are still available by default without using this module.
  5. Alexander Elagin

    Problems making a calculator with DELPHI in RAD STUDIO. (Tan, Cos, Sin)

    In Delphi, trigonometric functions (along with other mathematic routines) are implemented in the module (unit) System.Math. Do not forget to add this unit manually to the uses section of your module where you use them: uses System.SysUtils, (...other units), System.Math;
  6. Alexander Elagin

    Inherited on Properties and co.

    In fact, this was a pretty common trick when implementing ccustom lists before generics.
  7. Alexander Elagin

    Inherited on Properties and co.

    Because Data property is re-introduced with a new signature, thus it is necessary to explicitly use the inherited property and not the new one.
  8. Alexander Elagin

    Inherited on Properties and co.

    From the very beginning, i.e Delphi 1. What's the problem?
  9. Alexander Elagin

    Uniqueness and Security of domain name

    I do not know how secure it is, but function NetWkstaGetInfo can provide some information about the domain. There is also some code on the StackOverflow .
  10. Alexander Elagin

    I got bitten by an interface!

    The third one is QueryInterface: .... protected function QueryInterface({$IFDEF FPC}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): HResult; stdcall; function _AddRef: Integer; stdcall; function _Release: Integer; stdcall; .... function TMyClass.QueryInterface({$IFDEF FPC}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): HResult; stdcall; begin if GetInterface(IID, Obj) then Result := S_OK else Result := E_NOINTERFACE; end; function TMyClass._AddRef: Integer; stdcall; begin Result := -1; end; function TMyClass._Release: Integer; stdcall; begin Result := -1; end; Implement these three functions and you have a nice class with interfaces and without any reference counting.
  11. Alexander Elagin

    I got bitten by an interface!

    Or better inherit from TSingletonImplementation (I wonder who decided to give the base non-ARC interfaced object this misleading name...)
  12. Alexander Elagin

    Customizing source editor

    I use a custom colour scheme based on the Solarized Dark from Notepad++:
  13. Alexander Elagin

    Example of wasteful, innefficient string manipulation

    If you want to get the most of FastMM (different configurations for debug/release, fine tuning of settings) you still need the standalone version. The bundled one is a "good middle ground" but there always are options to get more...
  14. Alexander Elagin

    TeeChart with vertical bar?

    TeeChart Pro has TColorLineTool exactly for this purpose (in TeeTools.pas). I have no idea whether it is in the bundled Embarcadero edition of TeeChart or not.
  15. Alexander Elagin

    gem found in vcl.forms

    This function exists also in 10.1, but for obvious reasons there is no trace of this code in Delphi XE. Somebody probably used some black magic to force scaling engine into the two decades old and pretty stable code of the Forms unit, but had to put duct tape here and there to make it work. No doubt that the IDE theming used even more glue and tape, that's why the themed IDE is a slow monster.