-
Content Count
443 -
Joined
-
Last visited
-
Days Won
5
Posts posted by Cristian Peța
-
-
1 hour ago, LennyKrost said:As you can see, in socket creation I set Proto property to “udp” and compiler does not report any warning.
It is just a string property. What can compiler complain? But documentation for TWSocketServer says:
QuoteProto Protocol used. Must be 'tcp'.
-
35 minutes ago, A.M. Hoornweg said:When large numbers of fields are accessed by name, the legibility of a CASE is much better than if/then.
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;
-
1 hour ago, A.M. Hoornweg said:A case statement for strings can be created using generics.
And what is the benefit? if-then-else is more readable than this.
-
12 minutes ago, Anna Blanca said:my DLL is main application
A DLL is a library and it can run only in the processes of a main application (rundll32 or other app).
-
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.
-
-
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;
-
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 -
1 hour ago, domus said:It is doing this with all controls, right, not just TRectangles?
More or less all Form.Children.
AlignObjects().DoAlign() enumerates all Form.Children but it depends a little if the object supports IAlignableObject interface.
-
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)
-
1
-
-
Can you reproduce in a small project that you can post here?
-
1
-
-
1 hour ago, domus said:I'll keep investigating, but I lost quite a bit of time trying to pinpoint this thing, so it'll be in (obsessed) background mode.
Have you tried with a profiler?
-
-
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) -
Reading again I'm asking myself if you know what MasterData is. You connect MasterData to a table and MastedData will be printed for every line in that table.
To put a TableObiect into a MasterData is somehow strange for me. You will print a table for every record of a table.
-
On 6/13/2025 at 2:43 PM, Squall_FF8 said:And it didnt work:
- The TableObject is not shown!What didn't work?
The MasterData is not shown or only TableObiect?
Have you set MasterData.DataSet? Do you have something in that table?
And you want to print that RishText for every line in that MasterData table?
-
On 1/9/2025 at 3:47 AM, Vincent Parrett said:Note that to use Yubikeys with Signtool - you need to have the MiniDriver installed (you will get the smartcard pin prompt when calling sign tool)
Then you need to enter the pin every time you use Signtool with Yubikey?
-
- b8_1 := P8^ shl ShiftAmnt; + b8_1 := Byte(P8^ shl ShiftAmnt); //(3 shl 7) do not fit into Byte - b8_1 := P8^ shl ShiftComp8; + b8_1 := Byte(P8^ shl ShiftComp8); - PoweredFactor, Power, iFactor: integer; + PoweredFactor, Power, iFactor: uint32;
After some changes in /run/utilities/uTPLb_HugeCardinal.pas no more errors... but it works?
If it worked with range checking OFF then probably it will work.
-
Maybe using SameValue(number, 0.965, 0.001)?
Or if you need all the precision the test binary.
-
DataSnap uses Indy and Indy does not work with Windows SChannel.
A solution would be to statically link OpenSSL library into executable like it was done for Android.
-
Just now, Rollo62 said:Germany has B2B only too.
It was a fast forward for us. There was many disruptions. For some electricity companies it was impossible to use it at beginning because it was incompatible with what our energy regulatory authority asked.
-
1
-
-
3 minutes ago, Attila Kovacs said:Okay, which format do you use there?
This is from an invoice B2C:
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"> <cbc:UBLVersionID>2.1</cbc:UBLVersionID> <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:efactura.mfinante.ro:CIUS-RO:1.0.1</cbc:CustomizationID>
-
9 hours ago, Attila Kovacs said:(Interesting that there is a B2C implementation in NO, whereas in the EU it's only for B2B, as you can't pass the gross prices, only the net.)
In Romania B2C is mandatory. It's working already.
-
5 minutes ago, Rolphy Reyes said:But I found the right way to send the file.
How I supposed, as a field and not directly into the body.
-
1
-
Need help investigating an app crash
in General Help
Posted
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.
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.