-
Content Count
443 -
Joined
-
Last visited
-
Days Won
5
Cristian Peța last won the day on August 15 2024
Cristian Peța had the most liked content!
Community Reputation
122 ExcellentTechnical Information
-
Delphi-Version
Delphi 11 Alexandria
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Need help investigating an app crash
Cristian Peța replied to Der schöne Günther's topic in General Help
I second this. Here I don't see line number in IdTask.TIdTask.DoBeforeRun. I suppose it is the first line. Also the call stack is not what it should. I would like also assembler code and register values. Address 00000004 is FBeforeRunDone in TIdTask.DoBeforeRun. TIdTask = class(TObject) protected FBeforeRunDone: Boolean; .... end; procedure TIdTask.DoBeforeRun; begin FBeforeRunDone := True; <-- "Access violation at address 0098638C in module 'MyStuff.exe'. Write of address 00000004" BeforeRun; end; So a reference to TIdTask object is nil but we don't see the call stack to know who is calling this nil reference. A proper call stack is missing. -
ICS 8.71 UDP ServerScoket inside a Thread
Cristian Peța replied to LennyKrost's topic in ICS - Internet Component Suite
It is just a string property. What can compiler complain? But documentation for TWSocketServer says: -
A smart case statement in Delphi?
Cristian Peța replied to PeterPanettone's topic in RTL and Delphi Object Pascal
I prefer something like this: type TMyStrings = (zero, one, two, three, four); function StrToMyString(AString: String): TMyStrings; begin if AString = 'zero' then Result := TMyStrings.zero else if AString = 'one' then Result := TMyStrings.one else if AString = 'two' then Result := TMyStrings.two else if AString = 'three' then Result := TMyStrings.three else if AString = 'four' then Result := TMyStrings.four end; var s: String; begin s := 'three'; case StrToMyString(s) of zero: writeln('zero'); one: writeln('one'); two: writeln('two'); three: writeln('three'); four: writeln('four'); end; //or, if you want interger case Integer(StrToMyString(s)) of 0: writeln('zero'); 1: writeln('one'); 2: writeln('two'); 3: writeln('three'); 4: writeln('four'); end; -
A smart case statement in Delphi?
Cristian Peța replied to PeterPanettone's topic in RTL and Delphi Object Pascal
And what is the benefit? if-then-else is more readable than this. -
A DLL is a library and it can run only in the processes of a main application (rundll32 or other app).
-
programmatically determine the edition of RAD Studio 12.3
Cristian Peța replied to dmitrybv's topic in Delphi IDE and APIs
I don't have an answer but the edition is in the license. And I don't think there is a public API to read it. But if you run ddc32 with different small projects the messages can tell you something about this. -
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Cristian Peța replied to domus's topic in FMX
I updated the report https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-3711 -
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Cristian Peța replied to domus's topic in FMX
Just wanted to try a fix in FMX.Forms and I found it already there but commented 🤔. First two lines will exit and AlignObjects() will not be called if used Form.BeginUpdate. The Realign will be done anyway after Form.EndUpdate. procedure TCustomForm.Realign; begin // if FDisableAlign or (FUpdating > 0) then // Exit; ... more code if FCanvas <> nil then begin AlignObjects(Self, Padding, FCanvas.Width, FCanvas.Height, FLastWidth, FLastHeight, FDisableAlign); RecalcControlsUpdateRect; InvalidateRect(ClientRect); end; end; -
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Cristian Peța replied to domus's topic in FMX
Using arrRect.SetBounds() you avoid a call to AlignObjects because TControl.SetBounds is checking some things before a call to AlignObjects Avoid setting TPosition.X -
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Cristian Peța replied to domus's topic in FMX
More or less all Form.Children. AlignObjects().DoAlign() enumerates all Form.Children but it depends a little if the object supports IAlignableObject interface. -
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Cristian Peța replied to domus's topic in FMX
FMX.Types.AlignObjects is taking the most time: 97.4% (from VTune) AlignObjects is not called from TControl.Realign and is going fast when rectangles are on TLayout. But when rectangles are on a form, AlignObjects is called from TCustomForm.Realign and is taking the most time FMX.Types.AlignObjects($4BD50A0,$4C4C860,640,480,640,480,False) FMX.Forms.TCustomForm.Realign FMX.Controls.TControlHelper.PositionChanged(???) FMX.Types.TPosition.DoChange FMX.Types.TPosition.SetX(1) Unit1.TForm1.Button1Click($4BEFDE0) -
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Cristian Peța replied to domus's topic in FMX
Can you reproduce in a small project that you can post here? -
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Cristian Peța replied to domus's topic in FMX
Have you tried with a profiler? -
I have 12.2 and it was installed by default in C:\Program Files\Eclipse Adoptium\jdk-17.0.9.9-hotspot All is working for me.
-
I suppose you want something like this: * ReportTitle (logo + ...) * Header - RichText - Column names (if you need them) * MasterData connected to the table - table fields that will be printed for every table record * Footer - RichText * PageFooter (for Page Numbers)