Leaderboard
Popular Content
Showing content with the highest reputation on 09/25/24 in Posts
-
File extension icons all gone with D12.2
Uwe Raabe replied to Andrew Spencer's topic in General Help
Tools > Options > IDE > File Association -
Question about Delphi class (static) constructor
Uwe Raabe replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
CmonLib Initializing provides a way to register a procedure to be called during Application.Initialize. This allows to make adjustments before (f.i. in the dpr file or some units), which would be near to impossible if the initialize code would execute in the units initialization section. -
If it is not bullsh*t (obviously a road map cannot be legal binding especially when they have a "safe harbor" section), then it is sad. Very sad. đ
-
As long as it is a native Windows control, we are limited by its internal functionality. Currently it doesn't support that: Edit Control Styles
-
Question about Delphi class (static) constructor
FreeDelphiPascal replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
Yeah, my interpretation was wrong. It doesn't exactly makes the connection (or disconnection) between the class constructor and the initialization section. The exact quote is: "Note that a class constructor only executes if the class is used. So unlike a normal initialization section of a unit (which always executes), it only executes if the class is used somewhere." Yesterday I was reading more about class conductors, and I see his statement in a new light. I think, to this point, the https://blog.therealoracleatdelphi.com/2009/09/ is still the best resource available about class constructors. https://stackoverflow.com/questions/39471864/delphi-constructor-and-class-constructor -
Correct transition from dcc32.exe to MSBuild.exe.
Uwe Raabe replied to dmitrybv's topic in Cross-platform
Usually it is sufficient to call the rsvars.bat of the required version: call "c:\Program Files (x86)\Embarcadero\Studio\23.0\bin\rsvars.bat" -
Only 2 GB available despite IMAGE_FILE_LARGE_ADDRESS_AWARE
Anders Melander replied to dummzeuch's topic in Windows API
<Also known as throwing sh*t at a wall> -
TParallelArray Sort Performance...
Lajos JuhĂĄsz replied to Steve Maughan's topic in RTL and Delphi Object Pascal
Stefan you should give at least 48 hours to a new version before you break it. It does handle array of 100_000 integers. Maybe for a larger arrays you have to buy a special SKU for sorting. -
Dynamic array used as a queue. Memory fragmentation?
Dalija Prasnikar replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
If you are frequently adding/removing items from array and the maximal occupied memory is not an issue, I would use TList<T> instead of dynamic array which supports Capacity. Set the Capacity to the maximum number of elements you are expecting (if there are more underlying dynamic array will automatically grow). That will prevent frequent allocations/deallocations and improve performance. You may also use TQueue<T> which might be fit for your needs. Whole array needs to be allocated in one place so there will be no memory fragmentation just because of that array reallocations. -
"for i in" goes in reverse
David Heffernan replied to dormky's topic in RTL and Delphi Object Pascal
Code editors telling you stuff is great but the bigger problem is the missing functionality at the fundamental language level. -
A workaround would be to declare the array as a constant or create a dynamic array on the fly: for I in TArray<Integer>.Create(45, 30, 15) do
-
Please keep the profanity out. Delphi treats the constant in that statement as a set. See this.
-
Question about Delphi class (static) constructor
M.Joos replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
From an old blog post from Allen Bauer (https://blog.therealoracleatdelphi.com/2009/09/: " All eligible class constructors and class destructors are invoked in sequence with unit initialization and finalization, respectively. If a given class constructor or destructor is eligible to be invoked (ie. it was linked into your application), it will run immediately before the initialization section for the unit in which the class is implemented. The class destructors will be invoked immediately after the finalization section for the unit in which the class is implemented. Class constructors in a given unit are generally invoked in the same order of declaration, except in cases described below. Class destructors are invoked in reverse order from the class constructors. For an ancestor class declared in the same unit, its class constructor will be invoked before the descendant class constructor and the class destructor is invoked after the descendant class destructor. If the implementation of given class constructor references another class in the same unit with a class constructor, the referenced classâ class constructor will be invoked before the current classâ class constructor. If the references are cyclic (ie. they reference each other in their class constructors), then they are invoked in reverse order of declaration. This means that there can be cases where a class constructor can reference an âunconstructedâ class. Ancestor classes from external units used in the interface section are guaranteed to already have their class constructors run prior to any class constructors on descendant classes within the current unit. Unit cycles can break down the deterministic nature of the above rules in the same manner as unit initialization and finalization. However, for a given unit, it is guaranteed that all the class constructors declared within in it will have already run immediately before the initialization section runs. Congruent to this rule is that it is guaranteed that all the class destructors will run immediately after the finalization section. Dynamically loaded packages, using LoadPackage. Because there is no way to know exactly which classes are going to be used, just like there is no way to know which units are going to be used, all class constructors and destructors along with all unit initialization and finalizations are invoked according to the above rules. Other rules about their use are: You do not have to declare a class destructor if you declare a class constructor, and vice versa. They cannot be virtual, dynamic or message. They cannot be explicitly called. They cannot have any parameters. They do not have to be called Create and Destroy. (ie. Init and Fini are equally valid names). With this implementation, it was easier to leverage the same table that the compiler creates for unit initialization and finalization. It satisfies this requirement: âCalled automatically to initialize the class before the first instance is created or any static members are referenced.â Issues with cycles are also clearly warned against in VB.NET and C#: âAvoid circular references in Shared ⊠since it is generally impossible to determine the order in which classes containing such references are loaded.â Another benefit is that since it is running during the initialization/finalization phases, any threading implications are no different than the existing rules regarding unit initialization and finalization." What we don't know is, if the compiler behavoiur has changed since then. -
Question about Delphi class (static) constructor
Lars Fosdal replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
Circular references create a lot of fun. -
And check out what the other sales guy said: Thank you for reaching out! Unfortunately, both serial keys have not been on active maintenance for more than 365 days. You cannot renew the same licenses or increase the registration limits. Warm Regards, Faraz Khattak Customer Renewals Representative E: faraz.khattak@idera.com