

Lajos Juhász
Members-
Content Count
1063 -
Joined
-
Last visited
-
Days Won
15
Everything posted by Lajos Juhász
-
F2084 Internal Error in Delphi compiler
Lajos Juhász replied to Kryvich's topic in Delphi IDE and APIs
No, it is not fixed. -
q.SQL.Add('DECLARE @MinEffDate date = DATEADD(DAY, :dys, getdate())'); q.ParamByName('dys').AsInteger := -30; or q.SQL.Add('DECLARE @MinEffDate date = DATEADD(DAY, -1*dys, getdate())');
-
Guidance on FreeAndNil for Delphi noob
Lajos Juhász replied to Paul Dardeau's topic in RTL and Delphi Object Pascal
-
In Delphi it would be: nhc.CustHeaders.Clear;
-
In my case the itemindex was already 0 that made the selection. You can do it: if key=vkDown then begin ComboEdit1.ItemIndex:=0; ComboEdit1.DropDown; end;
-
To achieve that you can call the DropDown method of the comboedit. procedure TForm4.ComboEdit1KeyUp(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState); begin if key=vkDown then ComboEdit1.DropDown; end;
-
I can see them. A small test VCL application shows that on TStringGrid MouseDown and MouseMove is working as expected.
-
You are overlooking that a field in a 32 bit can be TStringField on a 64 bit it is TWideStringField. Bitness has nothing to do if a field is ansi or unicode. Your connection during design time and runtime 32/64 have different settings. You can add a mapping rule to a 32 bit connection to convert stringfield to widestringfield to solve your problem.
-
TDirectory - file lock out on Win 10 LTSC
Lajos Juhász replied to Roger Cigol's topic in General Help
My bet is on file handles? -
There is no need for that anymore. Train an AI for your coding style then you can use it as a free code formatter.
-
every version have an iso with updates.
-
I doubt that 64 bit version of the IDE is going to be available in a minor release. We can only hope. IBM is also catching up and deprecates the 32 bit drivers for Informix, I do need a 64 bit IDE. (The source code for application is prepared to be compiled as a 64 bit due to poor debugging we did not made the change yet. On the other hand I am a bit afraid as users are going to load 3-4GB data from the database)
-
Default() and subrange types
Lajos Juhász replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
It is not (yet) addressed in Delphi 12.2 it still defaults to 0 instead of 1. -
In my case the timer continues to fire after sleep. The following sleep states are available on this system: Standby (S0 Low Power Idle) Network Connected Hibernate Fast Startup
-
How to know when TIdHTTPServer threads are done
Lajos Juhász replied to narag's topic in Network, Cloud and Web
At procedure TIdCustomTCPServer.Shutdown before the threads are terminated StopListening is called: //APR-011207: for safe-close Ex: SQL Server ShutDown 1) stop listen 2) wait until all clients go out -
How to know when TIdHTTPServer threads are done
Lajos Juhász replied to narag's topic in Network, Cloud and Web
It should be done as the SetActive returns. If You look at the source code SetActive will call Shutdown that will call TerminateAllThreads. -
Uses clauses and ide performance - does it make a difference?
Lajos Juhász replied to ventiseis's topic in RTL and Delphi Object Pascal
Or make fewer circular references. Moving everything in the code to interface section is wrong. It is well known fact that the uses are only for those units that are required in the interface section, everything else must go into the implementation section. Other crucial thing is to remove the Unit Scope names and in code use only fully qualified unit names. This was important in older versions of Delphi (there were problems with unit name caching). -
FMX or VCL does not matter as Json implementation does not depend on the visual library.
-
It does not in my case using Task manager. Before the string is read the working set is 3,752K. Read the string: 4,652K, parsing the json 7,280K, freeandnil - 4676K, when the click method is finished the memory set is back at 3,660K.
-
I cannot reproduce the leak using Delphi 12.2
-
How do I close a modal form without ModalResult being set to mrCancel ?
Lajos Juhász replied to dormky's topic in VCL
Delphi in order to survive must ASAP include the method to close a modalForm or we will die. As a Quick Fix they should include the class helper for all the existing versions: type TFormHelper = class helper for TCustomForm public procedure EndDialog(PModulResult: TModalResult); end; { TFormHelper } procedure TFormHelper.EndDialog(PModulResult: TModalResult); begin modalResult:=PModulResult; end; I can only hope that somebody from Embarcadero will read this thread and will push these changes directly to the TForm not to require a class helper for such an important issue to be fixed. (For years I was using the modalResult to close modal forms without a single issue. This thread made me realize that Delphi is dying because it does not have such a method.) -
Recently I have a different problem when debugging using Delphi, Windows freeze completely. Even the task manager cannot be activated, the only solution is to turn off the laptop using the power button.
-
How do I close a modal form without ModalResult being set to mrCancel ?
Lajos Juhász replied to dormky's topic in VCL
Instead of running away from this terrible problem. Anders you should write a class helper to help to solve this gigantic bug in the design. I mean how can we live and use Delphi knowing that it has this very poorly design in the fundamental part of the VCL. -
How do I close a modal form without ModalResult being set to mrCancel ?
Lajos Juhász replied to dormky's topic in VCL
You should write: procedure TTestForm.DBGrid1DblClick(Sender: TObject); begin ModalResult := mrOK; end; There is no need to call Close at all. You can thank later to Delphi for implementing correctly. -
Does it change if you change the CharCase from ecUpperCase to ecNormal?