-
Content Count
2750 -
Joined
-
Last visited
-
Days Won
162
Everything posted by Uwe Raabe
-
Actually I don't know the rules. You can always pass a FormatSettings parameter fitting your needs.
-
Why is that nonsense? It is probably used to get the MSec part.
-
That may indeed be possible, but will probably turn out a bit tedious. It also doesn't have the flexibility to choose between both options. A more simple way could be to edit the compatibility settings for bds.exe and force high dpi support to one of the System values, but that also misses the flexibility. My personal favorite are the mentioned desktop links. Not only does it allow to quickly start Delphi in the desired mode, also dragging a Delphi file onto one of those also opens the file with the appropriate settings. Besides the dpi selection, I use this scheme for quite a while to handle different registry keys for Delphi.
-
You can do that with the command line parameter "/highdpi:unaware". That won't work with just a double click from Explorer, though. I have different links on my desktop to quickly choose between both behaviors.
-
I didn't say you need no query - you don't need the array.
-
Why the array? What hinders you to iterate through the dataset directly? Besides being easier it also avoids the memory problem when copying the complete query result into an array.
-
New Behaviour Weird: My new VCL Forms (ALL) (in new projects) using "SHOW" procedure always in TOPMOST on ZOrder after SetWindowPos usage
Uwe Raabe replied to programmerdelphi2k's topic in VCL
This behavior exists for quite some versions and is usually bound to the Application.MainFormOnTaskbar := True; command in the project file. -
Access Violation when Enabling TTimer in TComponent
Uwe Raabe replied to egnew's topic in RTL and Delphi Object Pascal
IIRC, the compiler emits a warning W1010 Method 'Create' hides virtual method of base type 'TComponent' for a construct like this: type TMyCom = class(TComponent) public constructor Create; end; That seems sufficient to fix the bug before the component is even registered in the IDE. -
Offline Help updates available from Embarcadero
Uwe Raabe replied to DelphiUdIT's topic in Delphi IDE and APIs
The former one. I was pretty sure I made that public a while ago, so that may indeed fall under the dream thing. -
Offline Help updates available from Embarcadero
Uwe Raabe replied to DelphiUdIT's topic in Delphi IDE and APIs
No: https://github.com/UweRaabe/CompressPath -
Offline Help updates available from Embarcadero
Uwe Raabe replied to DelphiUdIT's topic in Delphi IDE and APIs
Also this list from Darian Miller may give a rough overview: Delphi Master Release List -
Offline Help updates available from Embarcadero
Uwe Raabe replied to DelphiUdIT's topic in Delphi IDE and APIs
I use my build VM for that. It has Delphi versions 5, 7, D2007 up to 11 installed side by side and there still is plenty of room for more. When someday it will run out of disk space I can simply extend that. BTW, having all versions on the same machine simplifies multi-version builds a lot. My working environment is different, though. There I have several VMs for each of my customers to avoid problems with different needs and security. The Delphi versions on those may change during time. The physical host is reserved for my own projects and has only Delphi versions 10 to 11 installed. Usually it is cleaned after some years - latest when the hardware changes. -
Offline Help updates available from Embarcadero
Uwe Raabe replied to DelphiUdIT's topic in Delphi IDE and APIs
The Alexandria Wiki page has links to Previous Versions on the left. -
Ate least I cannot reproduce.
-
This can also be a side effect of installing some design time package.
-
Compiling Delphi Apps on Azure DevOps Pileline
Uwe Raabe replied to Tommi Prami's topic in General Help
Perhaps this may help a bit: Azure DevOps and Delphi – Build Agents -
Because they prohibit the formatter from concatenating the lines.
-
Isn't that what I just wrote?
-
The interesting part would be the declaration of PanelResize in the base class.
-
Actually I use these quite often. In the case of your SQL, which could as well come from the FireDAC query editor, I just copy the whole code, create a string array constant with a simple template, multi-paste the SQL and format the results: const cArr: TArray<string> = [ // 'SELECT', // 'DATE_FORMAT(co.order_date, ''%Y-%m'') AS order_month,', // 'DATE_FORMAT(co.order_date, ''%Y-%m-%d'') AS order_day,', // 'COUNT(DISTINCT co.order_id) AS num_orders,', // 'COUNT(ol.book_id) AS num_books,', // 'SUM(ol.price) AS total_price,', // 'SUM(COUNT(ol.book_id)) OVER (', // ' ORDER BY DATE_FORMAT(co.order_date, ''%Y-%m-%d'')', // ') AS running_total_num_books', // 'FROM cust_order co', // 'INNER JOIN order_line ol ON co.order_id = ol.order_id', // 'GROUP BY ', // ' DATE_FORMAT(co.order_date, ''%Y-%m''),', // ' DATE_FORMAT(co.order_date, ''%Y-%m-%d'')', // 'ORDER BY co.order_date ASC;', // '']; procedure UseSQL; begin var qry := TFDQuery.Create(nil); try qry.SQL.AddStrings(cArr); // ... finally qry.Free; end; end; The same scheme also works for JSON or XML. Interesting, that you bring up the SQL text, which is neatly split into multiple lines - probably for better readability. Despite allowing string constants with more than 255 characters in one line, it would be more helpful to have string constants over multiple lines preserving linefeeds. Then it wouldn't even matter if the lines are limited to 255 characters each, although I expect this limit being lifted anyway whenever such a feature will be implemented.
-
You probably meant w := Use.When<Word>(Cond, 1, 32000);
-
Why is Url an undeclared identifier here?
Uwe Raabe replied to dummzeuch's topic in RTL and Delphi Object Pascal
In fact they are: type TStringArr = array of string; const cStringArr: TStringArr = ['Hello', 'World']; Just not with the record element type, because the record constants are not accepted as true constants. -
Delphi 11.3 unusable due to full-build-requiring onslaught of F2084 "Internal Compiler Errors" from minor source modifications
Uwe Raabe replied to PaulM117's topic in Delphi IDE and APIs
That is not needed when the dcu folder is configuration and platform specific using something like $(Platform)\$(Config). That way the existing dcu files in that folder are compiled with the last settings for that platform and configuration. If working with several projects it also helps to have separate dcu folders for each. Some use $(SanitizedProjectName) for that. With this approach I have no problems switching platforms, configurations or projects. I very rarely make changes to the directives in a project configuration. If that turns out to be necessary I'd rather add another (child-)configuration with separate dcu folders. BTW, avoiding circular unit dependencies gives a significant performance boost for Code Insight. -
Move the event to the private section, so the Form Designer won't fiddle with it. At the appropriate code determine which of the eligible methods must be used and assign it to the TDataSource OnDataChange event. // assuming this code runs inside the datamodule. Otherwise myDataSource must be qualified begin if SomeCondition then myDataSource.OnDataChange := MyEventHandler else myDataSource.OnDataCHange := MyOtherEventHandler; ... Personally I would rather extract the code from inside the event to a separate method or different separate methods. Then you can make the decision inside the hard-wired event: procedure TdmC.dsJobTicketsDataChange(Sender: TObject; Field: TField); begin if SomeCondition then MyEvent(Sender, Field) else MyOtherEvent(Sender, Field); end;
-
Seems like a feature request in QP would be appropriate.