Jump to content

Lajos Juhász

  • Content Count

  • Joined

  • Last visited

Community Reputation

11 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Lajos Juhász

    TTreeNode leak when VCL styles are active

    You forgot to remove the build event. I've tested with Delphi 10.4.2 and the bug is still there: --------------------------- Unexpected Memory Leak --------------------------- An unexpected memory leak has occurred. The unexpected small block leaks are: 13 - 20 bytes: UnicodeString x 2 21 - 28 bytes: UnicodeString x 4 45 - 52 bytes: TTreeNode x 6 --------------------------- OK --------------------------- PS. It looks like that seBorder in the TListView's Styleelement is the problem. Remove it and the leak dissapear!
  2. Lajos Juhász

    loop a table field

    while FDTableTask.EOF do begin FDTableTask.First; end; This is not correct first will move the cursor to the beginning of the query. You should call FDTableTask.Next, also if the loop contains only the call for the next record you can replace the loop with FDTableTask.Last to jumb to the last record.
  3. Lajos Juhász

    TIdSSLIOHandlerSocketOpenSSL.MaxLineAction issue.

    The source of Indy is delivered with Delphi so you can find it easily. It's in IdGlobal.pas.
  4. Lajos Juhász

    Quickly zero all local variables?

    IMHO it's not the sam RSP-24383 is about var parameters. The parameter intToStr is not a var parameter. For example: procedure TForm1.FormCreate(Sender: TObject); var i: record a,b,c: integer; end; a: integer; begin i.a:=i.b; IntToStr(a); IntToStr(i.c); end; I have only one warning: [dcc32 Warning] Unit1.pas(35): W1036 Variable 'a' might not have been initialized
  5. Lajos Juhász

    Quickly zero all local variables?

    I have found a case that there is no warning for records: procedure TForm1.FormCreate(Sender: TObject); var i: record a,b : integer; end; begin showmessage(IntToStr(i.a)); showmessage(i.a.ToString); end;
  6. Lajos Juhász

    Convert two Integers to a DateTime??

    If you have enough decimals you can do: Hours + minutes / 60
  7. Lajos Juhász

    Sidney, RestDebuger and REST

    Only if the QP entry is entered for released version of Delphi. The entries for beta versions are usually locked and can be seen only by the beta testers.
  8. Lajos Juhász

    When will IDE Editor support more fonts?

    Now I understand Unicode for now is only the subset of the Unicode that the Delphi IDE can display correctly and that's not the definition of a Unicode editor. The editor in the IDE can display only the subset of a Unicode.
  9. Lajos Juhász

    When will IDE Editor support more fonts?

    Are you sure about that? Pleas try to paste this to the IDE (example from: https://en.wikipedia.org/wiki/Precomposed_character) Åström (U+0041 U+030A U+0073 U+0074 U+0072 U+006F U+0308 U+006D) The result is: It doesn't render it well. If you assign this string to a label.caption then Windows will display it correctly: Even if I paste the code from Delphi here the forum can display it correctly. procedure TForm4.FormCreate(Sender: TObject); begin label1.Caption:='Åström (U+0041 U+030A U+0073 U+0074 U+0072 U+006F U+0308 U+006D)'; end;
  10. Lajos Juhász

    Filter on InternalCalc field

    My code is simple type TForm1 = class(TForm) FDConnection1: TFDConnection; FDQuery1: TFDQuery; FDQuery1field1: TStringField; FDQuery1calcfield: TStringField; DBGrid1: TDBGrid; DataSource1: TDataSource; Button1: TButton; procedure Button1Click(Sender: TObject); procedure FDQuery1CalcFields(DataSet: TDataSet); procedure FDQuery1FilterRecord(DataSet: TDataSet; var Accept: Boolean); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin FDQuery1.Filtered:=true; end; procedure TForm1.FDQuery1CalcFields(DataSet: TDataSet); begin dataset['calcfield']:=varToStr(dataset['field1'])+' data'; end; procedure TForm1.FDQuery1FilterRecord(DataSet: TDataSet; var Accept: Boolean); begin Accept:=copy(varToStr(dataset['calcfield']),1,1)='1'; end;
  11. Lajos Juhász

    Main Form appearing issue..

    I was able to reproduce this behavior when Application.MainFormOnTaskbar := false and the third form is modal with PopupParent is the mainform.
  12. Lajos Juhász

    Filter on InternalCalc field

    I've tried with calculated field to use in OnFilterRecord and it worked, the grid displayed only the filtered records.
  13. Lajos Juhász

    Filter on InternalCalc field

    Calculated fields are working in FireDAC and you can use them to display data. However, in order to filter data instead of filter property you can use the OnFilterRecord event. For Example: myQuery.Filter:='cTaxYear = ' + QuotedStr( '2008-09' ); myQuery.Filtered:=true; You can use: For query myquery and form myFormFRM you can write: myQuery.OnFilterRecord:=FilterTaxYear; myQuery.Filtered:=true; procedure myFormFRM.FilterTaxYear(DataSet: TDataSet; var Accept: Boolean); begin Accpet:=VarToStr(DataSet['cTaxYear'])='2008-09'; end;
  14. Lajos Juhász

    Filter on InternalCalc field

    According to my test with calculated fields you can use only the OnFilterRecord event to filter the data. In my test calculated field didn't worked as expected with the filter property. Is it a bug or buy design I have no idea only @Dmitry Arefiev could give an answer.