Leaderboard
Popular Content
Showing content with the highest reputation on 03/18/19 in all areas
-
Check for override
Stefan Glienke replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
"Backwards compatibility" is the ultimate excuse to pile up garbage in your backyard ... It is used or ignored whenever convenient - moving forward also includes getting a compile error in your face but with a clear guide at hand how to solve it. If you ever inherited from a TDataSet and used one of its method that have TBookmark or TRecordBuffer arguments while writing code for different Delphi versions since 2010 or so you know what I mean. But some developers seem to rather want to save an hour when moving their code to a new version and waste hours or days later hunting down a bug. 😉 -
Check for override
Dalija Prasnikar replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
YES, backward compatibility matters. But in cases where backward compatibility causes more trouble down the road, then it is not worth the price. In this case, maintaining backward compatibility also opened TStream and descendant classes to subtle bugs when working with streams larger than 2GB. -
GExperts Grep can use the MAP file
PeterPanettone replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Thomas, that is an important addition, thank you very much! You wrote in your blog: There could be cases where the fallback is not evident because the map file creation has failed for some reason while the user believes the map file is being used because he has checked that option in the Options dialog. Therefore, I feel it would be better having a checkbox directly in the Grep Search dialog: "Indirectly used units" in the "Delphi Code Content Types" group-box: This checkbox would be automatically disabled in the case no map file exists so the user is AWARE that no indirectly used units (I call them implicit units) can be searched. -
I would not have done that. I would have let the code break.
-
I replied there. Couldn't find my old account information, so I had to make a new one. As can be seen there this is not related to MMX, and I did not make a wrong bug report @timfrost.
-
Check for override
Stefan Glienke replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
If the method you avoid to call would do heavy work... but even using the fastest approach to check if the method is overridden will be slower than just doing a virtual call on a method that just returns False. And even if you perform that check only once and store it in a boolean field it's just not worth it imo. -
List of all uses clause items in the whole project
dummzeuch replied to PeterPanettone's topic in GExperts
Was already used, that was the first thing I checked. -
List of all uses clause items in the whole project
dummzeuch replied to PeterPanettone's topic in GExperts
Done. I even improved performance of the indirect list by a factor of about 5 to 10 (I didn't do any exact timing on the original code, so I don't know. But it now takes less than 2 seconds for the GExperts project where before it took more than 10.) Note to self: If the performance of some code is bad, check whether it stores and accesses data in the UI all the time. Remove this access and watch the performance skyrocket. Another note to self: TListView is one of the worst performing controls out there. If you want to improve performance further, use a TStringList or maybe even better a virtual string list. -
ANN: CrossVCL 1.08, FmxLinux 1.39 and new annual subscription option
Eugene Kryukov posted a topic in Delphi Third-Party
Dear Sirs, We are happy to announce new version of our tools: CrossVCL 1.08 and FmxLinux 1.39. https://fmxlinux.com/ https://crossvcl.com/ Also we've just released new annual subscription option: https://ksdev.com/order.html Eugene -
Lib does not work on a system with decimal separator different than point "."
-
New feature suggestion for MMX: implementation marking in Find Identifier window
Uwe Raabe replied to PeterPanettone's topic in MMX Code Explorer
As I said: those two icons are already used elsewhere to mark the interface and implementation section and should thus be immediately recognized. Why should I introduce alternative icons here? -
There are now two experimental options for searching forms that address these issues at least for standard components. The output still needs some polishing.
-
To expand on Anders' comment - the TStream.Seek() method has two overloads, one for 32-bit seeks and one for 64-bit seeks. By default, the 32-bit Seek() calls the 64-bit Seek() and vice versa. Descendants must override one of the Seek() methods and the override must not call the inherited method. To avoid an endless recursive loop, the 32-bit Seek() validates that the 64-bit Seek() method has been overridden before calling it. This is the technique that it uses for that validation: procedure TAncestor.Do(); type TMethodXType = procedure of object; // must match the signature of MethodX... var Impl: TMethodXType; Base: TMethodXType; ClassTAncestor: TClass; begin Impl := MethodX; // points to descendant's implementation of MethodX... ClassTAncestor := Self.ClassType; // get object's actual class type... while (ClassTAncestor <> nil) and (ClassTAncestor <> TAncestor) do // find the TAncestor base class... ClassTAncestor := ClassTAncestor.ClassParent; Base := TAncestor(@ClassTAncestor).MethodX; // points to TAncestor's implementation of MethodX... if TMethod(Impl).Code = TMethod(Base).Code then // which MethodX implementation is the object actually using? begin // MethodX is NOT overriden... end else begin // MethodX IS overriden... end; end;
-
The newest development snapshot should fix this bug. http://andy.jgknet.de/fixpack/dev
-
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.