Jump to content

Lajos Juhász

Members
  • Content Count

    812
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Lajos Juhász

  1. Lajos Juhász

    How to remove metadata from Word document (using OLE)

    I believe you would have to do that in Word: (WINDOWS) Microsoft Word 2010, 2013, 2016: Go to “File” Select “Info” Click on “Check for issues” Click on “Inspect document” In the “Document Inspector” dialog box, select the check boxes to choose the types of hidden content that you want to be inspected. Click “Remove All” Click “Close” Save the document.
  2. Lajos Juhász

    Async/Await with updating visual controls

    Today it's an example. Tomorrow you or somebody else sees the code and use it in a real application. Copy paste errors are always a fun thing to search for or debug.
  3. Lajos Juhász

    Delphi 11.3 is available now!

    Same for me, it would be easier to create bug reports.
  4. Lajos Juhász

    Delphi 11.3 is available now!

    My bet is on stack overflow. You should try to debug the IDE to catch the reason.
  5. Lajos Juhász

    Delphi 11.3 is available now!

    It's also bad idea that they've changed the install folder for KonopkaControls when installed from GetIt. If you have multiple registry entries you have to update them manually (IMHO there should be options when downloading from GetIt to update it).
  6. Lajos Juhász

    GExperts formatter in 11.3

    Didn't noticed it's Gexpert....
  7. Lajos Juhász

    Delphi 11.3 is available now!

    GetIt worked ok 4.5 hours ago.
  8. Lajos Juhász

    FreeAndNil 10.4 vs 10.3.1 and Pointers

    Nice catch, first read the full documentation of the procedure: Embarcadero Technologies does not currently have any additional information. If you're for some strange reason not satisfied with the official documentation check out the source code: { CPPFreeAndNil is a helper to implement a C++ type-safe FreeAndNil }
  9. Lajos Juhász

    Error in module rtl200.bpl

    If it's Embarcaderos fault it's tough to report it. I have had a situation when the IDE gave me the dialog to report a bug, it generates everything including the call stack. Even after submiting it I was asked for a test case (in my case it is impossible to give) while the call stack should help a developer to locate the error. In this case the first step should be to generate a call stack to see where to search for the bug.
  10. Lajos Juhász

    Rest Server

    The easiest way to use it: ShowMessage(WhichFailedToLoad()); I am not sure that those dlls are shipped with Delphi. There are some old threads about this error like
  11. Lajos Juhász

    Rest Server

    You can try WhichFailedToLoad from IdSSLOpenSSLHeaders to see which dll failed. Maybe a dependency on the dll. From where did you downloaded the open SSL dlls?
  12. Lajos Juhász

    How to enter unicode symbols into the Delphi IDE

    For me the easiest way is to use the character map copy - paste it into the source. Tested using var Φ: real; begin Φ:=5.8; showmessage(FloatToStr(Φ)); end;
  13. Lajos Juhász

    Puzzled by StrToDate

    FMX is just another reason to keep up with the Delphi version. Unlike Windows, other platforms are not backward compatible.
  14. Lajos Juhász

    Puzzled by StrToDate

    BDE (Borland Database Enginge) is deprecated for about 20 years you should not use that. If you are referencing to the Delphi version you should use the official one that everyone can understand.
  15. Lajos Juhász

    Puzzled by StrToDate

    If you are looking how the Delphi is converting the month names you can search for @AFormatSettings.ShortMonthNames in the System.SysUtils.
  16. Lajos Juhász

    Puzzled by StrToDate

    Using Delphi 11.2 update 1 the code works correctly.
  17. Lajos Juhász

    Current subscription required to download ?

    Delphi 11.2 is an update on version 11.
  18. Lajos Juhász

    Current subscription required to download ?

    https://www.embarcadero.com/update-subscription FAQ part Can I obtain updates and hotfixes without a subscription? An active update subscription is the only way to obtain updates and hotfixes.
  19. Lajos Juhász

    Current subscription required to download ?

    There was a change that only with active subscription you can download from Registered Products Portal.
  20. Lajos Juhász

    "Divided by zero" exception

    $Q = Overflow checking (Delphi) $R = Range checking These directives are working and have their meaning just have nothing to do with ExceptionMask they are different things.
  21. Lajos Juhász

    How to free object compiled to Linux

    Are you using fastmm5? I don't have this procedure in Fastmm4.
  22. Lajos Juhász

    Animating rectangle position in code using fmx

    When the user moves outside the rect you want to move the rectangle to the first position thus the AnimateFloat should be corrected: procedure TForm2.Rectangle2MouseLeave(Sender: TObject); begin Rectangle2.AnimateFloat('Position.y', 222.0, 5, TAnimationType.InOut, TInterpolationType.Linear); // Rectangle2.Position.y := (Rectangle1.Position.Y + 200); end; Now you can easily see the real problem. As the rectangle is moved the mouse will get outside the rectangle and that will trigger the mouse leave event. To solve this you can change the height of the rectangle to 300.
  23. Lajos Juhász

    Help installing TProcess on Delphi Sydney 10.4

    The repository doesn't contains the files to install the component. You can use it from code (hint there are demo projects to show how you can use it).
  24. What a great suggestion to free a component from a form. That's a huge NO. If it's in a try ... finally it must be a local reference not a global one. programmerdelphi2k as others wrote please make sure that your reply brings something to the topic here the goal is to help and not to reply to every post. If a reference is freed in a code it should be local: var dlgFileSave: TSaveDialog; begin dlgFileSave:=TSaveDialog.create(nil); try ... finally dlgFileSave.Free; end; end; The code to save csv is almost how it should be, the problem there is that the wrong reference is freed. Instead of frmMainSIG.frmSIG.dlgFileSave the saveCSV should be freed. var Excel: Variant; Linha, i : Integer; mostrar : boolean; caminho, edtCaminhoRelatorio, nome, extensao, saveDir: string; saveCSV: TSaveDialog; f: TextFile; begin if not frmImovel.qryPesq.IsEmpty then begin if Application.MessageBox('Deseja acompanhar o Excel carregando as informações?', 'Opção',MB_YESNO+MB_ICONINFORMATION) = mrYes then begin mostrar := true; showMessage('Não clique no Excel até que o procedimento termine, isso interrompe o carregamento.'); end else begin mostrar := false; showMessage('O Excel está oculto gerando as informações. Clique em "OK" para continuar. O sistema ficará desabilitado até que termine.'); end; frmSig.jvAlertaProgress.MessageText := 'Iniciado!'; frmSig.jvAlertaProgress.Execute; frmExportarImovel.progressBarQry.Max := frmImovel.qryPesq.RecordCount; frmImovel.qryPesq.First; Excel := CreateOleObject('Excel.Application'); Excel.Workbooks.Add; Excel.Visible := mostrar; Linha := 1; for i := 0 to frmImovel.qryPesq.FieldCount - 1 do Excel.WorkBooks[1].Sheets[1].Cells[Linha,i+1] := frmImovel.qryPesq.Fields[i].DisplayName; Linha := 2; while not frmImovel.qryPesq.Eof do begin for i := 0 to frmImovel.qryPesq.FieldCount - 1 do Excel.WorkBooks[1].Sheets[1].Cells[Linha,i+1] := frmImovel.qryPesq.Fields[i].Text; frmImovel.qryPesq.Next; Linha:=Linha+1; atualizaTela; end; Excel.Visible := false; sleep(100); // Salvar como CSV saveCSV:= TSaveDialog.Create(nil); try saveCSV.Title:= 'Salvar como CSV'; saveCSV.Filter:= 'Arquivo CSV|*.csv'; saveCSV.DefaultExt:= 'csv'; saveCSV.FilterIndex:= 1; if saveCSV.Execute then begin AssignFile(f, saveCSV.FileName); end; Excel.ActiveWorkbook.saveas(saveCSV.FileName); Excel.Workbooks[1].Close; Excel.Quit; Excel := Unassigned; showMessage('Arquivo CSV salvo com sucesso!'); frmSig.jvAlertaProgress.MessageText := 'O Relatório foi Gerado com Sucesso!'; frmSig.jvAlertaProgress.Execute; progressBarQry.Position := 0; lblProgresso.Caption := '0 de 0'; lblProgresso.Refresh; if Application.MessageBox('Deseja abrir o arquivo?', 'Opção', MB_YESNO+MB_ICONINFORMATION) = mrYes then ShellExecute(Handle, 'open', PChar(saveCSV.FileName), nil, nil, SW_SHOWNORMAL); finaly saveCSV.Free; end; end else showMessage('Tabela não possui dados para serem exportados!'); end;
  25. Please define "the component are clean and ready to use". You can reuse the dialog component without freeing it. In this case your freeing it and set the reference to nil (freeandnil) then try to access a nil object reference. You cannot do that. Just remove FreeAndNil. In case you would like to use a fresh dialog object just use a local variable instead of a global one then you can free it at the end of the procedure/method wherever this code snippet was copied from.
×