-
Content Count
2750 -
Joined
-
Last visited
-
Days Won
162
Everything posted by Uwe Raabe
-
FireDAC - TFDQuery - How to default calculated fields in the dataset to ReadOnly=False
Uwe Raabe replied to JonathanW's topic in Databases
In that case changing that field value inside the program seems a pretty rare case. The shown queries give the impression that some dummy fields are returned with no relation to the data in the database. As there are better ways to create such fields in the program it makes the query the wrong place for it. -
FireDAC - TFDQuery - How to default calculated fields in the dataset to ReadOnly=False
Uwe Raabe replied to JonathanW's topic in Databases
Exactly! The approach used in the query is just the wrong one. -
That's correct. So we need to know the Delphi version being used.
-
What about using TDBImage instead of TImage?
-
Reinstalling Delphi: Use Installer for 11.1 or 11.1.5?
Uwe Raabe replied to Achim Kalwa's topic in Delphi IDE and APIs
As mentioned in this blog post: Available Today: the C++Builder and RAD Studio 11.1.5 C++ Code Insight Update (emphasizes by me): -
Ask for comments to improve this code
Uwe Raabe replied to Berocoder's topic in Algorithms, Data Structures and Class Design
procedure TForm1.SomeControlEvent(Sender: TObject); begin var myLabel: TLabel; if Sender.Supports<TLabel>(myLabel) then myLabel.Caption := 'handled'; end; -
Ask for comments to improve this code
Uwe Raabe replied to Berocoder's topic in Algorithms, Data Structures and Class Design
Thinking out of the box here: type TSupport = class helper for TObject public function Supports<T: class>(out ResObj: T): Boolean; end; function TSupport.Supports<T>(out ResObj: T): Boolean; begin ResObj := nil; if Self is T then begin if not ((Self is TBoldObject) and TBoldObject(Self).BoldObjectIsDeleted) then ResObj := T(Self); end; result := ResObj <> nil; end; -
Ask for comments to improve this code
Uwe Raabe replied to Berocoder's topic in Algorithms, Data Structures and Class Design
That would require to pass a TObject variable to that parameter, which is not helpful. An out parameters works like a var parameter, where the types must match exactly. -
Ask for comments to improve this code
Uwe Raabe replied to Berocoder's topic in Algorithms, Data Structures and Class Design
Which version of Pascal Analyzer do you use? I couldn't reproduce it here. -
The best way to handle undo and redo.
Uwe Raabe replied to skyzoframe[hun]'s topic in Algorithms, Data Structures and Class Design
You might be interested in the Delta property of TFDQuery. -
Function with 2 return values ?
Uwe Raabe replied to Henry Olive's topic in RTL and Delphi Object Pascal
Hey, we also have TPair<Double, Double>. -
Function with 2 return values ?
Uwe Raabe replied to Henry Olive's topic in RTL and Delphi Object Pascal
According to that list, that would be better named TDouble? -
Function with 2 return values ?
Uwe Raabe replied to Henry Olive's topic in RTL and Delphi Object Pascal
You can return a TArray<Double>: function GetBomCosts(const ItemCode : String) : TArray<Double>; begin { Retrieve values } ... { Return values as array } SetLength(Result, 2); Result[0] := value1; Reuslt[1] := value2; end; -
IIRC, that separation has been suggested since Delphi 6.
-
Converting a very long text to concatenated strings?
Uwe Raabe replied to PeterPanettone's topic in GExperts
Not quite. The MultiPaste expects some text containing multiple lines. -
You need separate packages for runtime and design.
-
It works as expected when I place the following code in FormCreate: var displayIndex := Screen.DisplayCount - 1; var display := Screen.Displays[displayIndex]; SetBoundsF(display.Workarea.Left, display.Workarea.Top, Width, Height);
-
You cannot directly set a specific display. Instead you position the form so that it is shown on the desired display.
-
I would rather like to know which magic makes your system behave different than most others.
-
How do I update the sqlite dll in RAD Studio?
Uwe Raabe replied to Der schöne Günther's topic in Databases
You know that there is a place for such wishes? -
Updating TPolygon items in generic List is difficult?
Uwe Raabe replied to Gustav Schubert's topic in RTL and Delphi Object Pascal
https://quality.embarcadero.com/browse/RSP-16511 -
How do I update the sqlite dll in RAD Studio?
Uwe Raabe replied to Der schöne Günther's topic in Databases
The Client info mentions <sqlite3_x86.obj statically linked> That means the SQLite engine is part of the exe or bpl. You cannot change that for the IDE. -
If such an API would wrap things like "provide LSP with all necessary code for the current project" and "notify this interface with the requested results" that would make things easier. Even not trivial, though.
-
The LSP protocol is documented, but one has to implement the complete client code from the ground up and that is a pretty complex task. Currently there is no ready to use API provided by the IDE.
-
11.1 IDE woes with multiple monitors and different dpi.
Uwe Raabe replied to Damon's topic in Delphi IDE and APIs
That is a scenario known not to work. Especially it is the driver behind RSP-35301