-
Content Count
2919 -
Joined
-
Last visited
-
Days Won
170
Everything posted by Uwe Raabe
-
Custom Control for TDBCtrlGrid showing only active data
Uwe Raabe replied to Hugo Bendtner's topic in VCL
When a control has csReplicatable in its ControlStyle, it signals that it can be copied using the PaintTo method to draw its image to an arbitrary canvas. Perhaps that doesn't hold true for TMyDataLabel? -
{$Defines xxxx} not working at design time..
Uwe Raabe replied to Ian Branch's topic in Delphi IDE and APIs
As this feature is driven by LSP, it looks like the code contains a construct LSP is stumbling about. Do you notice any other problems with Ctrl-Click navigation, error insight or code insight? -
Writing if statement in the Code Editor
Uwe Raabe replied to PeterPanettone's topic in Delphi IDE and APIs
Works here even when monitors are side-by-side. Although the frame and toolbar appear on the main monitor, just clicking into the second one shots the second one. -
Strange bug with string literals in RAD Studio 12
Uwe Raabe replied to luebbe's topic in RTL and Delphi Object Pascal
Either wait that someone adds you to the Embarcadero Customers group or file an issue by yourself, which automatically adds you to the group. -
Strange bug with string literals in RAD Studio 12
Uwe Raabe replied to luebbe's topic in RTL and Delphi Object Pascal
Could be related to String with non-ASCII characters directly attached to a #xx or #$xx literal corrupts the final string Current workaround is to use a + operator to concatenate the parts. -
Writing if statement in the Code Editor
Uwe Raabe replied to PeterPanettone's topic in Delphi IDE and APIs
So, perhaps a dpi issue? Some system information may be helpful here. -
Writing if statement in the Code Editor
Uwe Raabe replied to PeterPanettone's topic in Delphi IDE and APIs
You might file a feature request in the new Quality Portal. -
OT? Forum credentials for C++ builder XE-5 install
Uwe Raabe replied to BruceV's topic in General Help
The credentials for this forum and Embarcadero Licensing are two totally independent things. This forum is not even driven by Embarcadero.- 3 replies
-
- installation
- xe-5
-
(and 1 more)
Tagged with:
-
Writing if statement in the Code Editor
Uwe Raabe replied to PeterPanettone's topic in Delphi IDE and APIs
Probably some setting in your system. This is what happens here: 06-04-2024_23-37-15.mp4 -
Delphi 12 messing up with test project's DPR when using TestInsight and DUnitX
Uwe Raabe replied to John R.'s topic in Delphi IDE and APIs
The inclusion of the units seems to do no harm. The linker probably omits them when no instance is created. It is different with TestInsight as unit TestInsight,DUnitX may not even exist. -
That doesn't guarantee that it turns out as feasible.
-
Ways to add the old reports to the new system is still discussed internally. The presence of two disjunct systems is sub-optimal, but better than the state before.
-
Actually there is: Embarcadero Quality Portal Mor information here: Delphi 12.1 & New Quality Portal Released
-
The compiler setting can be overwritten in code by the {$A and {$ALIGN compiler directive. To avoid irritations it might be better to place an {$A4} directly in front of the record declaration. BTW, I was able to read the file correctly with the declaration shown above with Delphi 12.
-
Did you try Double Word?
-
It is OK. The long name is Delphi 12 Update 1.
-
The data file has 140.748 bytes - that doesn't work well with 971 records, but with 951 records with 148 bytes each. That record size also matches the actual file content. You may get better results with this declaration: lexrec = record root_part: string32; filler: string[2]; case speech_part: valid_range of - 1: (suppletive_type: supp_rec); 0: (nsupp_type: integer); 1, 2, 3, 4, 5: (normal_type: normal) end;
-
Note that the Implicit string operator can make you fall into the same parameter order trap as AddToStock is for NativeInt. To avoid that, you may prefer to replace the operator with a dedicated ToString function, keeping the original call to ShowMessage: type TProductID = record ID: nativeint; public class operator Explicit(A: TProductID): NativeInt; overload; class operator Implicit(A: NativeInt): TProductID; overload; function ToString: string; end; class operator TProductID.Explicit(A: TProductID): NativeInt; begin Result := A.ID; end; class operator TProductID.Implicit(A: NativeInt): TProductID; begin Result.ID := A; end; function TProductID.ToString: string; begin Result := ID.ToString; end; --- procedure TForm6.AddToStock(pid: TProductID; cnt: nativeint); // Both uses internally nativeint begin ShowMessage(pid.ToString); end;
-
One option would be to add some operator overloading to TProductID: type TProductID = record ID: nativeint; public class operator Explicit(A: TProductID): NativeInt; overload; class operator Implicit(A: NativeInt): TProductID; overload; class operator Implicit(A: TProductID): string; overload; end; class operator TProductID.Explicit(A: TProductID): NativeInt; begin Result := A.ID; end; class operator TProductID.Implicit(A: NativeInt): TProductID; begin Result.ID := A; end; class operator TProductID.Implicit(A: TProductID): string; begin Result := A.ID.ToString; end; This allows to write something like this: var cid : TCustomerID; var pid: TProductID; pid := qryGetStockProductID.AsInteger; cid := qryGetStocCustID.AsInteger; --- procedure TForm6.AddToStock(pid: TProductID; cnt: nativeint); // Both uses internally nativeint begin ShowMessage(pid); end; Note that the operator to convert TProductID to NativeInt is Explicit instead of Implicit. That prohibits the use of TProductID as a NativeInt parameter and the compiler throws an error when the parameters to AddToStock are given in the wrong order.
-
Delphi 12 messing up with test project's DPR when using TestInsight and DUnitX
Uwe Raabe replied to John R.'s topic in Delphi IDE and APIs
I guess that is caused by the {$ELSE} part of the TESTINSIGHT conditional. You can safely remove that: System.SysUtils, {$IFDEF TESTINSIGHT} TestInsight.DUnitX, {$ENDIF } DUnitX.Loggers.Console, DUnitX.Loggers.XML.NUnit, DUnitX.TestFramework, -
[Delphi 10.3] wrong DRC file output directory
Uwe Raabe replied to foxters's topic in Delphi IDE and APIs
AFAIK, that Package output directory is only used when you build a package (hence the name). For other projects the Output directory is used. In other words, the DRC file is always placed where the compiled binary goes. -
I have written a couple of applications for CNC machines. The majority are for wood working and those usually have a resolution of 0.001 mm. Therefore the Epsilon used for matching element start/end points is set to 0.0005. When calculating parallel contours there often are cases where very small elements appear that have to be removed and the disjunct neighbors need some trimming to an intersection. These cases need a much finer epsilon than the first one. Side note: Regression tests comparing float calculations created under Win32 can easily fail when executing on a Win64 platform.
-
I beg to differ here. The approach is to have a decent epsilon when no one is given. It doesn't prohibit anyone to give an epsilon appropriate to the current scenario. The default values currently used actually cover a common beginner's mistake assuming that floats can be compared for exact equality. Usually the IsZero implementation works pretty good for the majority of the cases - at least those I encountered myself. Perhaps you just never stumbled about code using them appropriately?
-
Actually, they are not that magic:
-
Use Interbase Developer license on 2 Windows PCs?
Uwe Raabe replied to GrumpyNoMore's topic in Databases
Actually that is not the case. The developer license is needed for the Interbase Server, while the Client doesn't need a license - only access to the Interbase Server (i.e. the server PC has to be up and running and the client needs to establish a connection to it). Regarding the Firebird suggestion: Don't try to install Firebird (Server or Client) on a PC where Interbase already is installed unless you know exactly what you are doing. Most likely you will break at least one of these installations.