Jump to content


Popular Content

Showing content with the highest reputation on 03/02/19 in all areas

  1. Martin Sedgewick

    IDE Fix pack for Rio

    https://andy.jgknet.de/blog/2019/03/ide-fix-pack-6-4-released/ Changelog Fixed: Packages with duplicate units may not have caused a fatal compiler error. Added: Support for Delphi 10.3 Rio Added: StyleUtils.inc performance optimizations for faster UI rendering (D10.3) Added: Infinite loop detection in TDebugger.UpdateEventLog Added: Fix for TStringList.IndexOfName bug (RSP-21633) Added: Fix for access violation in the Welcomepage JScript9.dll binding Added: TCustomListBox.ResetContent is skipped if the handle isn’t created yet Added: More STRINGCHECKS-free RTL code (2009/2010) Added: More DFM Streaming optimizations Added: RTL and DFM streaming patches to remove STRINGCHECKS (2009/2010) Added: Removed VclFixPack OutputDebugString calls (2009) Added: FillChar uses Enhanced REP MOVSB/STOSB cpu feature if available for large sizes. Added: Enabled CPU LOCK string assignment optimization for local variables Added: -Oe (experimental optimizations) and -x-cgo compiler option extension Added: CodeGen: Remove of some unnecessary push/pop operations Added: Expression Evaluator allows array access to pointers even if the type wasn’t declared with {$POINTERMATH ON} Added: Max number of constants in a function was increased from 64K to 16M (2009-XE3) Added: New compiler option extensions: -x–compileonly, -x–reslist, -x–depfile, -x–unitstats Added: More performance optimization for the DCC64 compiler Added: TStringBuilder.SetLength optimization [RSP-19178] (XE+) Added: TStrings.GetDelimitedText optimization Improved: Slight faster TStringList.IndexOfName optimization for sorted string lists.
  2. When facing terminology that you don't recognise I cannot recommend the use of websearch highly enough. https://enterprisecraftsmanship.com/2016/07/27/what-is-an-implementation-detail/ https://stackoverflow.com/questions/1777719/what-is-the-definition-of-an-implementation-detail And no, it's the second excerpt that relies on leaking implementation details, which is why it should not be used.
  3. Alexander Sviridenkov

    ANN: HTML Library 3.9 released

    What's new HCL/Core Added support for TVirtualImageList Improved rendeing of images and text (align to pixel) HtPanel: added AllowScaling property. SVG: added support for "use" element. Added support for external SVG images Improved RTL support Automatic detection of RTL blocks Virtual image source for image lists on other forms, f.e. src="_forms/DataModule1/ImageList2/5" Improved emoji symbols support for VCL and FMX. Improved resize hint Added TCSSStyleSheet.GetAllClasses/GetAllIds Improved SVG rendering Added OnElementEnter/Exit event for HtPanel Added THtDocument.LoadfromStream Added THtDocument.ElementsFromPoint method returning all elements located at specified point. Empty attributes with no value now preserves their format Added support for ForeignObject tag which allows use of HTML blocks inside SVG. FMX: improved text baseline calculation Scripter: added support for list of values in case statement: case a of 1,2,3: Editor Fast Report component with visual editor and page split support (included in bundle). https://www.youtube.com/watch?v=DNAK_KR8fB0 https://delphihtmlcomponents.com/fastreport2.gif Added TDBHTMLEditor.UseOuterHTML property Added TDBHTMLEditor.NewDocumentTemplate Editor:Column widths are not preserved when copy/paste part of a table SQL Optimized schema loading queries for Oracle. Added TSQLSelectQuery.ChangeRowLimit class function. Added TSQLSelectQuery.AddJoin function https://delphihtmlcomponents.com
  4. On the contrary: it is not preferred not to rely on implementation details. Implementation details are things you know about how a piece of software currently works, but which are not documented (although sometimes they are) and/or which may change in later versions. Do not rely on such details. Rather rely on public interfaces and documented traits of the software. The latter of your examples is an implementation detail, i.e. that internally, the virtual tree uses Node.States. It may one day have a different way to denote that a node is expanded.
  5. Thanks, I think I got it. So to prevent leaking implementation: - all class fields should be accessed through property read/write or methods, so make all fields Private - " What matters is how many steps the client code must take in order to make the class do something useful for the client. If it's more than 1, it's a smell, and might be a sign of an implementation detail leaking out. " - I probably need more experience with classes to have this down to single method/property call And in the example above, the second example accesses States field directly, which is leaking implementation details. Of course, I have 'vsSelected/vsExpanded in Node.States' everywhere in my project :) Oh, I had no idea that implementation detail is a real technical term, so didn't even think about searching for it. Thanks!
  6. Attila Kovacs

    Issue with IDE Nav Bar..

    It's a "known bug". Only the compiler supports the new inline syntax, the IDE still doesn't.
  7. FredS

    IDE Fix pack for Rio

    A little early to be sure but it appears to have solved my painting problem: Thanks Emba.. err.. Andy..
  8. Attila Kovacs

    IDE Launchpad

    Well, let's do the math!
  9. Allen@Grijjy

    TIdSSLIOHandlerSocketOpenSSL and TLS 1.3 ?

    Some thoughts on OpenSsl 1.1.1....We recently finished porting the OpenSsl 1.1.1a headers to Delphi for all platforms (Windows, macOS, Android, iOS and Linux, 32 and 64-bit where appropriate) and may write an article for our grijjy blog on that sometime soon. The challenge is building in a way that works for each Delphi platform, which we also did in the process. Deploying OpenSsl with your app in a way that is uniform for all platforms but does not interfere with legacy OpenSsl that is sometimes part of the OS is also a challenge. The libraries for LibSsl and LibCrypto often cause dynamic linking issues on POSIX platforms when they attempt to reference one another. We solved this with some creative linking that is platform specific. Also it isn't wired into Indy, because we don't use Indy internally, but it shouldn't be too hard (for someone else to do). The other challenge is TLS 1.3 isn't really completely working in OpenSsl 1.1.1 and has a few outstanding issues. You probably don't want to use TLS 1.3 at this time.
  10. Remy Lebeau

    What is the fastest way to check if a file exists?

    Why is GetFileAttributes the way old-timers test file existence?
  11. Arnaud Bouchez

    What is the fastest way to check if a file exists?

    FindFirst is definitively the slowest. It needs at least two calls (+ FindClose), and maintain some state in-between. GetFileAtributes() is the fastest under Windows, and fpaccess/euidaccess on POSIX systems. Note that a fallback to FileAge() is needed in case of sharing violation: function FileExists(const FileName: string): Boolean; {$IFDEF MSWINDOWS} // use GetFileAttributes: much faster than original, which uses FileAge=FindFirst var Attr: Integer; LastError: Cardinal; begin Attr := Integer(GetFileAttributesW(pointer(FileName))); if Attr <> -1 then Result := Attr and FILE_ATTRIBUTE_DIRECTORY = 0 else begin LastError := GetLastError; Result := (LastError <> ERROR_FILE_NOT_FOUND) and (LastError <> ERROR_PATH_NOT_FOUND) and (LastError <> ERROR_INVALID_NAME) and // (use FileAge to test SHARE_EXCLUSIVE files) ((LastError = ERROR_SHARING_VIOLATION) or (FileAge(FileName)<>-1)); end; end; {$ENDIF} {$IFDEF LINUX} begin Result := euidaccess(PChar(FileName), F_OK) = 0; end; {$ENDIF} (extracted from our Enhanced RTL source code) But the version currently included in Delphi 10.3 Rio SysUtils.pas is just as fast on Windows. On POSIX, it uses stats, which is slower than euidaccess().