Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Ian Branch

    smtp client in a console app??

    Doh! Stupid, stupid me! I forgot to put the two .dll files in the project directory. :-( All good now. Thanks Guys, Ian
  3. I just tried. I got the .hpp files and copied those two referenced over into the directory of that project, but compilation gives a [ilink32 failure] Fatal: file 'SYSTEM.CLASSES.OBJ' cannot get opened. I tried to find the file in my VM, but I failed.
  4. If you want complier dependent enablement of Audits you can file a feature request. Question for me would be what in audits is not CLang compatible... But I'm no C++ developer.
  5. This I was informed: The 'C++ Audits' feature was removed because it is incompatible to the Clang compiler. Codeguard is not working as soon as the dynamic runtime library feature is in use. This can be also the case if the related C++ linker option "Link with dynamic RTL, ..." is disabled. It may be fixed in some future release (i.e. > V10.4.2) I wonder why they have not compiler dependent 'C++ Audits' disabled? I.e. for the Clang compiler disabled but still usable for the classic Borland compiler .
  6. Remy Lebeau

    smtp client in a console app??

    EIdTLSClientTLSHandShakeFailed is raised when another exception is caught internally during the SSL/TLS handshake process. So the EIdTLSClientTLSHandShakeFailed.InnerException should not be nil. What are the values of the ClassName and Message of that InnerException?
  7. Der schöne Günther

    eDP: Fluid Display showing recent topics broken?

    Works for me. Have you tried ticking on the boxes, and then unticking it? Or logging out/in again?
  8. Hi, since about 4 hours, the DP does not show any topics in the fluid display mode any more...? Usually, I have no categories selected, thus showing all of them...
  9. Mark-

    Prevent from closing when....

    Thanks for the response "Rollo62", interesting. "Uwe Raabe" thank you. I will check it out.
  10. DPStano

    smtp client in a console app??

    do you have libeay32.dll and ssleay32.dll near exe?
  11. Experience with Linux would be a bonus....
  12. Uwe Raabe

    Prevent from closing when....

    The VCL already provides such a flag for you: TApplication.ModalLevel
  13. Rollo62

    Prevent from closing when....

    I would consider closing requests by TMessage and TMessageManager, to keep all units as much decoupled as possible ( not sure if you work with a recent version of the IDE, but I think its in for long time already ).
  14. Mark-

    Prevent from closing when....

    Thanks for the response "Kas Ob.". This issue is not about the application closing. These form A come and go in a 24/7 program. The possible changes are limited to the areas I mentioned, in form A. The user designs/creates/codes/uses/etc. these form A. We provide the IDE and execution of the user created form A inside the main program, like an add on, along with other user configurable features. Large changes to a huge program for one issue with the form A, that was actually found by destructive testing, a user in 14 years has never created the issue, is not prudent/practical/etc. Again, thanks for the reply.
  15. Kas Ob.

    Prevent from closing when....

    Well, lets discuss your application behaviour This could be better, will be clear in few lines, but this is the root of your problem, i am talking about closing message vs closing request ! Sure and right way to do it, but you are deciding this within the form or (a form) not from the application as one whole creature. There is many approaches, the easiest and simplest one is to have a controller for exiting the application, by controller i mean any logic to define your application relation with its forms and messages, a controller can be a class or a hidden form (not visible) or few global functions with few global vars. The idea is to lets say have a class that will live as long as the application is not terminated, when a form like B show in modal it will register with that controller as opened and will unregister when it close, on other hand A will consult with the controller when execute CloseQuery to see if there is B or any B's like, the last thing is to change the bahaviour mentioned here "another part of the program posts a close message to form A and it closes." to "another part of the program posts close request to the controller." here the controller will have its logic on how to terminate the application and what forms need to be closed and if there is background threads working need to be waited for or terminated or.... In other word redesign your program exit code to have its own messages/events and respond according to logic your define, this will simplify your code as it will be Controller.RequestAppClose and it will close in orderly fashion, also "Controller.IsClosing : Boolean" will be nice addition if needed, the controller does know the main form and will keep track of dialogs and modal dialogs, while B doesn't need to have to handle A and A doesn't need to keep track of B.
  16. Mark-

    Prevent from closing when....

    Perhaps I can get the foreground window, check it for modal and if so prevent form A from closing in FormCloseQuery. Tomorrow.
  17. Ian Branch

    smtp client in a console app??

    Hi Guys, D10.4.2, latest Indy 10, Win 10. I have created a console app with my Indy code in it. The code is exactly the same as I have in my VCL app, same settings/parameters, etc, which works. But. When I run it in the cmd prompt I get the following error. >>EIdTLSClientTLSHandShakeFailed: SSL negotiation failed.<< Now, I freely acknowledge I probably don't have something set right. 😞 Here is the source I have att.. program DBiPREmail; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, IdMessage, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase, IdMessageClient, IdSMTPBase, IdSMTP, IdBaseComponent, IdComponent, IdIOHandler, IdIOHandlerSocket, IdIOHandlerStack, IdSSL, IdSSLOpenSSL, IdAttachment, IdMessageParts, IdEMailAddress, IdAttachmentFile, IdGlobal, IdText; // These are all in just to start. To be cleaned up when working.. var dmPREmail: TdmPREmail; IdSMTP: TIdSMTP; IdMessage: TIdMessage; IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL; // to allow SSL authenticate // try // try // IdSMTP := TIdSMTP.Create(nil); // try // IdSSLIOHandlerSocketOpenSSL1 := TIdSSLIOHandlerSocketOpenSSL.Create(IdSMTP); // IdMessage := TIdMessage.Create(IdSMTP); // // IO HANDLER SETTINGS // with IdSSLIOHandlerSocketOpenSSL1 do begin MaxLineAction := maException; SSLOptions.Method := sslvTLSv1; end; // IdSMTP.Host := 'my smtp email host'; // IdSMTP.Port := 587; // IdSMTP.Username := 'my user name'; IdSMTP.Password := 'my password'; // IdSMTP.IOHandler := IdSSLIOHandlerSocketOpenSSL1; IdSMTP.AuthType := satDefault; // IdSMTP.UseTLS := utUseExplicitTLS; // // SETTING email MESSAGE DATA // IdMessage.Clear; // IdMessage.From.Address := 'my email address'; IdMessage.Recipients.EMailAddresses := 'second email address'; IdMessage.CCList.EMailAddresses := 'third email address'; // IdMessage.Subject := 'Test Email Subject'; IdMessage.Body.text := 'Test Email Body'; IdMessage.Priority := mpHigh; // with TIdText.Create(IdMessage.MessageParts, nil) do begin // Body.text := Body.text + '<p style="color: #5e9ca0;">This is a test <strong>message</strong> for <span style="color: #ff0000;"><strong>emailing</strong></span>.</p><h1 style="color: #5e9ca0;"> </h1>'; ContentType := 'text/html'; end; // IdMessage.ContentType := 'multipart/mixed'; // try IdSMTP.Connect; except on E: Exception do begin Writeln(E.ClassName, ': ', E.Message); Exit; end; end; // try try IdSMTP.Send(IdMessage); finally IdSMTP.Disconnect(); end; except on E: Exception do begin Writeln(E.ClassName, ': ', E.Message); Exit; end; end; // finally // IdSMTP.Free; // end; // except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; // end. Thoughts, suggestions appreciated.. Regards & TIA, Ian
  18. Esteban Pacheco

    VMWare Workstation PRO vs MS Hyper-V

    Running multiple VMs on VMWARE Player with no issues on windows. Threadripper 12/24 core/threads, 3 vms running all the time plus main machine, no issues all smooth. Also running on another a xcpng (Free xenserver) with windows/linux servers. VMWare is a good choice in general, their only reason to exist is virtualization, cant go wrong with them.
  19. Mark-

    Prevent from closing when....

    Hello, Delphi 10.2.3, VCL Might seem simple but I have not run into this issue and have limits on what changes I can make. Form A is opened containing one button. The button opens a modal dialog, form B, displaying a message. Before the user can close form B, another part of the program posts a close message to form A and it closes. The user closes form B, leading to a crash. Setting a flag to indicate a modal dialog has been opened to prevent form A from closing is not possible. That would be a big change. Users design the screens and run script, etc. I can change the FormCloseQuery, FormClose and FormDestroy of form A. Finding what to check in the form properties/methods has produced no joy. Forest for the trees might be present. Any ideas? Thanks, Mark
  20. darnocian

    Parsing Text search expression

    I felt like playing with this idea for Delphi - as like writing parsers. 😉 Years ago I did something similar for a document management system in a different language. I've written a small demo illustrating 2 ways of parsing https://github.com/sempare/sempare-delphi-fts-expression I did this for fun and in a few hours, so it is still very raw. It contains a hand rolled lexer and parser, but hopefully can give you some ideas how to do this too. In the first (Sempare.FullTextSearch.SimpleExpression.Test.pas) you can see some scenarios: procedure TSimpleExprTest.TestSimpleExpr; begin assert.AreEqual('name = ''conrad''', tparser.ParseStr('name', '"conrad"')); end; procedure TSimpleExprTest.TestWildCard2Expr; begin assert.AreEqual('(name like ''conrad%'') or (name like ''%pete'')', tparser.ParseStr('name', '"conrad%" "%pete"')); end; procedure TSimpleExprTest.TestWildCardExpr; begin assert.AreEqual('name like ''conrad%''', tparser.ParseStr('name', '"conrad%"')); end; procedure TSimpleExprTest.TestNotExpr; begin assert.AreEqual('not (name = ''conrad'')', tparser.ParseStr('name', 'not "conrad"')); end; procedure TSimpleExprTest.TestOrExpr; begin assert.AreEqual('(name = ''abc'') or (name = ''def'')', tparser.ParseStr('name', '"abc" or "def"')); end; procedure TSimpleExprTest.TestPrecidentExpr; begin assert.AreEqual('(name = ''abc'') and (not ((name = ''321'') or (name = ''def'')))', tparser.ParseStr('name', '''abc'' and not ''321'' or ''def''')); end; The second (Sempare.FullTextSearch.Expression.Test.pas) is a bit more general. It illustrates parsing, but implementation at present is fairly basic as just a pretty printer: procedure TExprTest.TestNotExpr; begin assert.Areequal('not (name != ''conrad'')', tparser.ParseStr('not (name!="conrad")')); end; procedure TExprTest.TestOrExpr; begin assert.Areequal('(name = ''abc'') or (text = ''def'')', tparser.ParseStr('name = ''abc'' or text = ''def''')); end; procedure TExprTest.TestPrecidentExpr; begin assert.Areequal('((name = ''abc'') and (value = ''321'')) or (text = ''def'')', // tparser.ParseStr('name = ''abc'' and value = ''321'' or text = ''def''')); end; procedure TExprTest.TestStartsWithExpr; begin assert.Areequal('name like ''abc%''', tparser.ParseStr('name starts with "abc"')); end; above you can see that the parsing identifies the precedence and places brackets appropriately. Also it changed 'starts with' to 'like'... NOTE: there are 2 different parsers implemented for the above scenarios (but both named TParser - just depends which unit is being referenced) Hope you find this useful.
  21. Yesterday
  22. Rollo62

    TMS and CoPilot, and Delphi ?

    It seems to be good enough for TMS VsCode, and this IS Pascal language too. The results and proposals of the AI looks very much OK, like the email verification and RegEx. Focussing on the "Pascal" question, you better do not underestimate the current AI's. I think they are quite able, to convert e.g. Javascript, C++, etc. to valid Delphi. They show a high grade of creativity, and I would say they even might pass a turing test.
  23. I did not have that for each character but each time I was entering an editable field.
  24. I confirm that HTMLLibrary is an awesome HTML library. Congratulation Alexander 😉 But for the SQL parser of HTML library I don't find how to transform this : Peter or "Bibi Paulo" and John to a where clause to search on a field : select xxx where Name containing 'Peter' or Name containing 'Bibi Paulo' and Name containing 'John'
  25. DPStano

    TMS and CoPilot, and Delphi ?

    I would not expect much from a neural network trained on that few pascal repos hosted on github 😄
  26. Perpeto

    TMS and CoPilot, and Delphi ?

    If we have a working LSP, we can talk about "LSP + new KI".. besides that I do not think there are enough delphi projects on github to "feed" copilot.. compared to more popular languages like js, c# etc
  1. Load more activity
×