Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 07/26/20 in all areas

  1. Fr0sT.Brutal

    Book: Delphi Quick Syntax Reference

    Yep, I always wondered why so many people use concrete version defines that make the whole code unusable when a new version arrives. I personally prefer minimizing usage of version defines replacing them with defines that declare the very feature. F.ex., RAD_2010 => GENERICS_OK (non-buggy generics). It's like using logically named identifiers instead of i1, jj3 etc
  2. salvadordf

    CEF4DELPHI - How to get permisions to use Webcam and Microphone ?

    Hi, I added GlobalCEFApp.EnableMediaStream := True; to the DPR file of the SimpleBrowser2 demo and I could see the video from my cheap webcam in webcamtoy.com About the registration issue, send me a PM with your username and I'll activate it manually.
  3. Anders Melander

    Book: Delphi Quick Syntax Reference

    Spotted a copy/paste bug in CompilersDecl.inc : const RAD_Rio = 32; RAD_10_3 = 33; RAD_Tokyo = 32; RAD_10_2 = 32 Of course it can't detect capabilities that were introduced after it was written but if you are using those then you must be already using a newer version of Delphi and thus be aware that you need to update the file. I guess it depends on how and what you use it for. Contrary to many other similar version include files this one appears to be forward compatible if you use the capability or XXX_UP symbols; For example even though it doesn't explicitly contain defines for Delphi 10.4 it will define the RAD_10_3_UP correctly on Delphi 10.3 and later: {$IF CompilerVersion >= 33} {$DEFINE RAD_10_3_UP} {$DEFINE RAD_RIO_UP} {$IFEND} Many libraries still use the practice of testing directly against the VERXXX defines, with no fallback, and thus break when a new version of Delphi is released, for no other reason that the shortsightedness of the authors. For example the following is from a well know charting library: {$IFDEF VER330} // RAD Studio XE v12.0 Rio (Carnival) 2018 (v 20.0) 32bit / 64bit / OSX / iOS 32-64 FMX / Android & C++ / Linux 64bit {$DEFINE D3} {$DEFINE D4} {$DEFINE D5} {$DEFINE D6} {$DEFINE D7} {$DEFINE D8} {$DEFINE D9} {$DEFINE D10} {$DEFINE D105} {$DEFINE D11} {$DEFINE D12} {$DEFINE D14} {$DEFINE D15} {$DEFINE D16} {$DEFINE D17} {$DEFINE D18} {$DEFINE D19} {$DEFINE D20} {$DEFINE D21} {$DEFINE D22} {$DEFINE D23} {$DEFINE D24} {$DEFINE D25} {$DEFINE D26} {$ENDIF}
  4. Fr0sT.Brutal

    Book: Delphi Quick Syntax Reference

    I gathered most valuable ones of them in https://github.com/Fr0sT-Brutal/Delphi_Compilers (intended for library devs that have to support many compiler versions)
×