

Lajos Juhász
Members-
Content Count
1078 -
Joined
-
Last visited
-
Days Won
15
Everything posted by Lajos Juhász
-
upcoming language enhancements?
Lajos Juhász replied to David Schwartz's topic in RTL and Delphi Object Pascal
It's not obsolete I received as the answer from Embarcadero a couple of months ago when asked on a webinar. They feel there is no need to inform us ahead. I wonder do they actually have a plan what they would like to deliver in Delphi 11? -
The default should be populated with the values that are supplied by the OS - http://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils.TFormatSettings.Create
-
I cannot test this but should be: select M.LMoth, sum(Case When I.TNAME='Sell' then I.TOTAL else 0 end) as TOTALSELL , sum(Case When I.TNAME='Buy' then I.TOTAL else 0 end) as TOTALBUY FROM INVOICE I JOIN MONTHS M ON M.SMONTH=I.SMONTH WHERE CUSTNO=20 GROUP BY M.LMONTH
-
My first guess is that you're comparing the result of a 32 bit and 64 bit applications. In 64 bit Extened = Double.
-
var ldt: TDateTime; lFormat: TFormatSettings; begin lFormat:= TFormatSettings.Create; lformat.DateSeparator:='-'; lformat.ShortDateFormat:='yyyy-mm-dd'; ldt:=strtodatetime('2021-06-25 08:04:09', lFormat); ShowMessage(DateTimeToStr(ldt)); end;
-
A quick find in files returned that TJSon is implemented in the REST.Json.pas and it is not in your uses.
-
selected cell in a stringgrid FMX vs. VCL
Lajos Juhász replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
You should learn to use the help. aStatusBar.SimpleText := 'selected cell -> ' + strngrd_Point3D.Row.ToString + '/' + strngrd_Point3D.Col.ToString; -
Disable & re-Enable a Procedure
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
But you references the object as dm.Orders.Docno with dm that would suggest that it was from outside. In this case it should be: OrdersDOCNO.OnChange := nil; OrdersDOCNO.OnChange := OrdersDOCNOChange; -
Disable & re-Enable a Procedure
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
OrdersDOCNOChange is part of the datamodul: dm.Orders.DOCNO.OnChange := dm.OrdersDOCNOChange; -
Alfabetical order of a letter
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
ord('C')-ord('A')+1, ORD('E')-ORD('A')+1, ... -
SQL expression evaluation not supported
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
Most probably the problem is the group by part. You've there O.Delvdate that is not in the select list. Interbase 2017 Update 1 (http://docwiki.embarcadero.com/InterBase/2020/en/Enhancements_to_GROUP_BY_and_ORDER_BY) introduced the extended syntax. If you're using a version that support you can write: SELECT O.DELVTYPE, SUM(OD.REMAINQTY) QTY, (Case O.DELVTYPE When 'Sea' then O.DELVDATE + 45 else O.DELVDATE + 15 end) as DELVDATE FROM ORDETAIL OD JOIN ORDERS O ON O.RNO=OD.RNO WHERE OD.ITEMNO = 'ABX22' GROUP BY O.DELVTYPE, 3 HAVING SUM(OD.REMAINQTY) > 0 -
Delphi compatibility with Windows 11?
Lajos Juhász replied to PeterPanettone's topic in General Help
I wonder how hard it will be to turn on UEFI on a laptop. -
The first one will create TMyForm instance with no owner. While the second one creates an instance of TMyForm owned by the application object. In case the form is the first form created by the application it will make it the mainform of the application. For more detail open VCL.Forms.
-
A Curious Inheritance Problem... what pattern solves it?
Lajos Juhász replied to David Schwartz's topic in RTL and Delphi Object Pascal
There is no data type TxQuery it's TxQuery<T: TDataset>. Unfortunately in Delphi you cannot have a class reference to a generic class. I've even tried this: type TFDxQuery = TxQuery<TFDQuery>; TxFDQueryClass = class of TFDxQuery ; an it also fails with [dcc32 Error] Unit1.pas(43): E2021 Class type required I would expect that TFDxQuery is a class. -
There is a bug in the code it will round up 5 to 10 so it should be: function RoundUpToFive (AValue : Double) : double; var lTrunc: integer; lMod5: integer; begin lTrunc:=Trunc(Avalue); lMod5:=lTrunc mod 5; if lMod5 = 0 then result:=lTrunc else result:=lTrunc + 5 - lMod5; end; Another interesting case would be how to round up 5.99 should it be $5 or $10?
-
base64 encode/decode TStringDynArray
Lajos Juhász replied to borni69's topic in Network, Cloud and Web
You can read a file as a string: TemplateLines := TFile.ReadAllText(afilepath,Tencoding.UTF8 ); -
You can find information here: https://www.indyproject.org/2005/08/17/html-messages/
-
I do hope that you're aware that the IDE is still a 32 bit application and can't use additional memory.
-
Delphi 10.4 was unstable however it never failed to load. Something that you've installed made the IDE unstable. As @Vandrovnik wrote you should try bds.exe -r foo.
-
Place a break point in the DataModule most probably you didn't excecuted the code there and fdmAdmin.FieldDefs remains empty. That's the only way you get this error message.
-
JCL installation problems in D10.4.2
Lajos Juhász replied to TurboMagic's topic in Delphi Third-Party
Before next time just send a pull request. -
JCL installation problems in D10.4.2
Lajos Juhász replied to TurboMagic's topic in Delphi Third-Party
There is a simple solution for this problem. Reorder the packages in the group, move the design time packages to the bottom. -
StackOverflow annual developer survey needs Delphi developers answering the survey
Lajos Juhász replied to FPiette's topic in General Help
Is it valid to name en.delphipraxis.net as a platform where you can find answers to your Delphi related problems? -
Problem with Logging on to my.embarcadero.com
Lajos Juhász replied to MikeMon's topic in General Help
Now it's also working for me.