Re: [Lazarus] Sending e-mail from within Lazarus
On Sat, 12 May 2018 01:18:31 +0100, Graeme Geldenhuys via Lazarus wrote: >Indy rocks!!! +1 And additionally the support available at the Indy forum is very good! https://www.atozed.com/forums/forumdisplay.php?fid=9 If you ask sensible questions you *will* get help there! Note that the old atozed forum was taken down on technical reasons a while ago and the old posts there are not yet available for browsing. Apparently they are working on a way to restore the old database. -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Sending e-mail from within Lazarus
On 05/11/2018 08:18 PM, Graeme Geldenhuys via Lazarus wrote: > On 2018-05-11 01:12, brian wrote: >> I omitted to put in my original post that I'm running 64-bit Ubuntu >> Studio. All the Indy examples I've been able to find seem to require >> Windows DLLs to implement SSL/TLS. > > It works just fine under Windows, Linux and FreeBSD too. I've testing > them all. On Linux and Windows it uses the OpenSSL libraries - which > normally comes standard with the system. > > To save you some trouble, I've attached a fully working console demo. > Edit the config.ini to match your details. Also edit the SMTP host name > inside the program unit. Sending emails via Gmail requires a extra step > - you need to log into your Gmail with a Web Browser and under security > settings, authenticate the "unknown device". When the console app gives > an error on the first run, it will output URL you can use to get to that > settings page (thanks Google). > > The "IndySecureMailClient.pas" implements a wrapper class for Indy's > SMTP and SSL handling making it super easy to use. The wrapper class in > fact adds all Indy's abilities of encryption for convenience. Indy rocks!!! > > I hope that helps. > Thank you. I'll take a close look at it all over the weekend. I much prefer this sort of solution to trying to call one of the Linux 'mail from command line' utilities. Brian. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Sending e-mail from within Lazarus
On 2018-05-11 01:12, brian wrote: > I omitted to put in my original post that I'm running 64-bit Ubuntu > Studio. All the Indy examples I've been able to find seem to require > Windows DLLs to implement SSL/TLS. It works just fine under Windows, Linux and FreeBSD too. I've testing them all. On Linux and Windows it uses the OpenSSL libraries - which normally comes standard with the system. To save you some trouble, I've attached a fully working console demo. Edit the config.ini to match your details. Also edit the SMTP host name inside the program unit. Sending emails via Gmail requires a extra step - you need to log into your Gmail with a Web Browser and under security settings, authenticate the "unknown device". When the console app gives an error on the first run, it will output URL you can use to get to that settings page (thanks Google). The "IndySecureMailClient.pas" implements a wrapper class for Indy's SMTP and SSL handling making it super easy to use. The wrapper class in fact adds all Indy's abilities of encryption for convenience. Indy rocks!!! I hope that helps. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp indy_SecureEmail.7z Description: application/7z-compressed -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Restart Lazarus after rebuild crashes
Hi All! Brand new Laptop :-). Clean installation of Linux Mint 18.3.:-) New download of Lazarus. Version 18.2, Date 2018=-05-10, FPC 3.0, x86_64-linux-gtk2 8-). Added simple component, interface section and mostly stubbed methods (only Create and Destroy have code). After Lazarus successfully installs the component (rebuilding), the IDE crashes when trying to restart with the following: Hint: (lazarus) TMainIDE.DoRestart WARNING: TMenuItem.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event? WARNING: TToolBar.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event? TApplication.HandleException Access violation Stack trace: $ $0060C5CE line 69 of include/toolbutton.inc $0060C550 line 116 of include/toolbutton.inc $0059876A line 2292 of include/control.inc $00598C37 line 2430 of include/control.inc $0043281F $00596C38 line 1571 of include/control.inc $0058956B line 4735 of include/wincontrol.inc $0058AC51 line 5362 of include/wincontrol.inc $00756032 line 112 of lclmessageglue.pas $00657825 line 3702 of gtk2proc.inc $00666F6D line 2194 of gtk2callback.inc $006665D8 line 1949 of gtk2callback.inc $7FB43DD42AEC Exception at : EAccessViolation: Access violation. (lazarus:28802): GLib-GObject-CRITICAL **: g_object_get_data: assertion 'G_IS_OBJECT (object)' failed TApplication.HandleException Access violation Stack trace: $00432718 $0044 line 1964 of gtk2callback.inc $7FB43DD42AEC Exception at 00432718: EAccessViolation: Access violation. LAZARUS END - cleaning up ... [FORMS.PP] ExceptionOccurred Sender=EAccessViolation Exception=Access violation Stack trace: $7FB43D9DE820 TApplication.HandleException Access violation Stack trace: $7FB43D9DE820 Exception at 7FB43D9DE820: EAccessViolation: Access violation. The offending line is: pt := ScreenToClient(Mouse.CursorPos); and based on the stacktrace I would beleive that Mouse.CursorPos is nil! I then added: if not Assigned(Mouse) then exit; This moved the location of the Access Violation, confirming that Mouse is indeed nil. At that point I figured that I should report this and leave further debugging to the experts.:-[ ~/.lazarus/bin/lazarus and ~./lazarus/bin/lazarus.old both have the correct timestamps. I saw this before on my old machine, but at that point I had installed a large library of components and I thought that maybe I had caused the problem. This time I have a new, up-to-date installation which crashed the first time I added a trivial component and rebuild the IDE. I will try to submit a bug report, but trying to replicate for the report may be a step too far. Thanks, Don Ziesig -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus still not usable with VNC under Raspbian
As tested, with revision 57898, the AltGr problem under Raspbian is fixed now. Thank you, Mattias and Ondrej. -- Joe -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to use two different versions of FPC
On 11/05/18 16:17, Joost van der Sluis via Lazarus wrote: On 05/10/2018 04:35 PM, patspiper via Lazarus wrote: Attached snapshot is work in progress Sorry, but I don't think this is an improvement. For new users this looks like a nightmare. It should be hidden, at least, imho. Or better: make it a plugin. As Mattias has pointed out, it is a plugin (IDE package), and definitely not for the faint of heart. Once one creates a standardized folder hierarchy for the different fpc versions, it becomes a matter of a few clicks to switch versions. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to use two different versions of FPC
On 05/11/2018 03:26 PM, Mattias Gaertner via Lazarus wrote: Attached snapshot is work in progress Sorry, but I don't think this is an improvement. For new users this looks like a nightmare. It should be hidden, at least, imho. Or better: make it a plugin. This is a plugin. In that case: nothing said. Nice work! ;) Joost. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to use two different versions of FPC
On Fri, 11 May 2018 15:17:45 +0200 Joost van der Sluis via Lazarus wrote: > On 05/10/2018 04:35 PM, patspiper via Lazarus wrote: > > > > Attached snapshot is work in progress > > Sorry, but I don't think this is an improvement. For new users this > looks like a nightmare. It should be hidden, at least, imho. Or better: > make it a plugin. This is a plugin. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] How to use two different versions of FPC
On 05/10/2018 04:35 PM, patspiper via Lazarus wrote: Attached snapshot is work in progress Sorry, but I don't think this is an improvement. For new users this looks like a nightmare. It should be hidden, at least, imho. Or better: make it a plugin. Regards, Joost. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Runtime error: INCLOCKED (BUG)
El 29/04/2018 a las 19:38, Vojtěch Čihák via Lazarus escribió: > > Hi, > > > > I changed line 7: > > > > TElement = record > > strr: String; > > end; > > TList = array[0..1] of TElement; //HERE > > Plist = ^TList; > > > > and demo works. Simply, static and dynamic arrays are not the same. > > AFAIR, dynamic array is just pointer while static array are data. > > I guess someone else will give you more detailed answer. > Yes, but I think that it should be considered a FPC bug TList = array of TElement; Plist = ^TList; TSetting = record list: Plist; end; const _List: array [0..1] of TElement = ( (strr: 'a'), (strr: 'b')); _Settings: array [0..0] of TSetting = ( (list: @_List)); // <=== This line should rise a compiler error. You are asigning a pointer to an static array to a pointer to a dynamic array. --- You could add a type cast of the pointer to Plist _Settings: array [0..0] of TSetting = ( (list: Plist(@_List) )); You explicitly tell the complier to bypass type check, it is up to deal with this potential dangerous > > > V. > > __ > > Od: Valdas Jankūnas via Lazarus > > Komu: Lazarus@lists.lazarus-ide.org > > Datum: 29.04.2018 18:16 > > Předmět: [Lazarus] Runtime error: INCLOCKED > > > > > type > TElement = record > strr: String; > end; > TList = array of TElement; > Plist = ^TList; > . > > Why I getting that error? Something wrong with records and constant > initialization? > > My system is: Linux 4.13.0-39-generic #44-Ubuntu SMP Thu Apr 5 > 14:25:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux > FPC (from SVN): 3.1.1 [2018/02/21] for x86_64 > -- > Valdas Jankūnas > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > > -- Saludos Santiago A. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus