52,553 questions
0
votes
0
answers
102
views
"Could not convert variant of type (Null) into type (OleStr)" - Only one one Dev PC
Using Delphi 10.3, FireDAC, 64 bit application, MySQL. Error:
Could not convert variant of type (Null) into type (OleStr)
Really simple query as a test:
FDQuery1.Close;
FDQuery1.Sql.Clear;
FDQuery1....
Advice
0
votes
5
replies
109
views
Understanding Dataset Controls in Delphi While Using SQLite
My Delphi application uses SQLite for its database. My understanding is that the database connection control TFDConnection has a default row count of 50 records. If true, there should only be 50 ...
Advice
0
votes
1
replies
178
views
Why are double brackets required?
The following minimal example does not compile in Delphi 12.1:
program Project1;
{$APPTYPE CONSOLE}
uses
System.RTTI;
var
Value: TValue;
begin
TValue.Make (0, TypeInfo (TObject), Value);
...
0
votes
0
answers
150
views
Printer selected is not valid
I have installed a new printer (HP Office Jet Pro 9010) and removed all old printers from the list via Windows in the "Printers and Scanners" menu (remove device).
After that, when I try to ...
2
votes
0
answers
135
views
How do i intercept the Back navigation button/gesture in a (Delphi 12) Android 16 app?
How can i intercept the Back navigation button/gesture in the latest Delphi and Android versions?
In the past, with Delphi 11 and Android 12 (maybe 13), i used vkHardwareBack in the Form OnKeyUp event,...
0
votes
0
answers
81
views
How to correctly call an iOS completionHandler block from Delphi without crashing?
I’m trying to implement this iOS delegate method in Delphi:
- (void)URLSession:(NSURLSession *)session
task:(NSURLSessionTask *)task willBeginDelayedRequest:(NSURLRequest *)request ...
1
vote
0
answers
104
views
Delphi FMX Form set parent HWND
I'm trying to write a CLAP plugin - a library that is used by another application. The API provides a parent HWND to embed the form of your plugin into the forms of the host application.
With VCL ...
Best practices
0
votes
3
replies
157
views
Can I modify the Message of a caught Delphi Exception object and then re-raise it?
The title says it, but here is an example:
try
// ...
raise EFileNotFoundException.Create('File not found!');
except
on E: EFileNotFoundException do begin
E.Message := Format('"%s":...
Advice
1
vote
4
replies
132
views
Delphi 2010 How to save a TImage with a TPaintbox drawing overlaid?
I have a TImage bitmap on a form, and a TPaintBox with the same dimensions. The user draws some polylines on the paintbox canvas. Using paintbox means they can "erase" a line if needed and ...
0
votes
0
answers
71
views
Android logcat spam: TransactionCallbackInvoker writeReleaseFence failed. error 32 (Broken pipe) every frame in SurfaceView
I get this log continuously (every render frame):
E/TransactionCallbackInvoker: [SurfaceView(...)(BLAST)]
writeReleaseFence failed. error 32 (Broken pipe)
It comes from the system (SurfaceFlinger), ...
3
votes
1
answer
177
views
if statement with is operator and Generics fails even when debugger shows correct type
I am implementing a message passing mechanism in a multi-threaded Delphi 2010 VCL application. My background threads need to send various DTO records to the main UI thread. I am using a generic ...
Advice
1
vote
5
replies
160
views
Can I make MyDAC update a blob field faster?
So I'm uploading around 50MB into a longblob in a local mysql server.
Using LoadFromStream, setting the param value is near-instantaneous but the execution of the UPDATE statement takes around 2 ...
0
votes
2
answers
176
views
Shopify integration with Delphi
I am trying to use the Shopify GraphQL Admin API from Delphi. Came up with the following code:
procedure TestShopify;
var
Client: TRESTClient;
Request: TRESTRequest;
Response: TRESTResponse;
...
3
votes
1
answer
179
views
How to handle Delphi generic constraint as 'inherits from' class
When trying the following code it will not compile as I receive this error:
Type parameter 'T' is not compatible with type TBase
I want this type constraint to support the Save method being typed to ...
2
votes
2
answers
239
views
In Delphi, is it possible to create a new generic class from the unconstrained generic base class and a provided type?
I want to be able to write a function such as below, but can't get the typeinfo or type reference for the unconstrained generic type of TMyBase<T>.
type
TBase<T> = class
end;
...