Re: [Lazarus] Email sending program using Indy stopped working - seems to be an SSL problem

2024-01-15 Thread Tony Whyman via lazarus
The default for SSLVersions is sslvTLSv1, so it looks like your mail server stopped accepting TLS v1.x (which it should do as older versions are now deprecated). I assume that you are using the out of date Openssl 1.0.2 library or earlier, given that TIdSSLIOHandlerSocketOpenSSL does not work

Re: [Lazarus] Email sending program using Indy stopped working - seems to be an SSL problem

2024-01-13 Thread Tony Whyman via lazarus
I came across a similar problem recently with Indy and did some research. There is a proposed patch to support Openssl 1.1.1 and hence TLS1.3. This is discussed on github under https://github.com/IndySockets/Indy/pull/299 with a proposed patch published under

Re: [Lazarus] Fritzbox TR64 communication

2021-08-19 Thread Tony Whyman via lazarus
Rolf, You can use the Indy Component library available from https://github.com/IndySockets/Indy. This includes support for http/https and Digest Authentication. A few years ago I did implement a SOAP based application using the Web Services Toolkit which also used Indy as a comms package.

Re: [Lazarus] Cross-platform using TRegistry - how to?

2020-05-04 Thread Tony Whyman via lazarus
On 04/05/2020 11:05, Bo Berglund via lazarus wrote: On Mon, 4 May 2020 10:25:42 +0100, Tony Whyman via lazarus wrote: As to the filename issue: the xml file location is determined from the Vendor Name and application name and relative to $HOME/.config - is that really a problem? First off

Re: [Lazarus] Cross-platform using TRegistry - how to?

2020-05-04 Thread Tony Whyman via lazarus
I often use TRegistry for cross-platform configuration data and you should be able to use it and avoid having to maintain different Linux and Windows versions. Under Linux, you are using TXMLRegistry and this saves registry data in an application specific XML file. There can be both a common

Re: [Lazarus] Cross-platform using TRegistry - how to?

2020-05-04 Thread Tony Whyman via lazarus
Firstly, the question is about TRegistry and not TRegIniFile. On a *nix platform TRegistry is implemented using TXMLRegistry and not TRegIniFile. You should only have a single instance of a TXMLRegistry in any one program no matter how many times you create a TRegistry object - they all point

Re: [Lazarus] Adding Required Packages paths... dynamically

2019-07-19 Thread Tony Whyman via lazarus
My understanding is that when you add a "required package" what actually happens is that the IDE adds the package unit paths to the list of unit paths for your project, and adds the top level .pas file for the package (which usually has the same name as the package) to the "uses" clause in

Re: [Lazarus] IDE

2019-03-15 Thread Tony Whyman via lazarus
My guess is that you are using Windows ;) If you are using Linux then there is a problem with your distro's library manager. I am sure that it is recommended practice by MS to install dependencies in an application's folder. Otherwise there is a risk of stealth upgrades/downgrades. For that

Re: [Lazarus] TLabel or TStaticText?

2019-03-15 Thread Tony Whyman via lazarus
Using a TPanel as a container is generally good advice for similar problems with all TGraphicControl descendents. I often use a TPanel to contain a TImage for this reason. Perhaps the point that needs to come across is that TLabel is a TGraphicControl and is drawn by the LCL, while

Re: [Lazarus] Tools for self-extracting executables?

2019-02-18 Thread Tony Whyman via lazarus
Before spending any time on this I would look at the Open Source 7-zip compression utility (https://www.7-zip.org/). This is available for both Windows and Linux and I use it to package my own Windows/FPC/Lazarus builds for self-extraction and installation under Windows (I also use Microsoft

Re: [Lazarus] Fwd: TRadioGroup not found error

2019-01-01 Thread Tony Whyman via lazarus
Tom, I made transition from Delphi about 9 years ago and never looked back. Yes, there are some conceptual differences, especially in the way the IDE works and which you have to get your head around but, generally, the problems are to do with the occasional name change for library functions,

Re: [Lazarus] derived forms and frames

2018-09-22 Thread Tony Whyman via Lazarus
Franz, It sounds like we a share a programming style as I also use lots of derived forms and frames. You have to use packages if you are going to work with Lazarus in this way. Create a run-time package for your framework forms and frames and their dependencies - you may even want more than

Re: [Lazarus] Encrypted connection between Lazarus and Firebird

2018-04-11 Thread Tony Whyman via Lazarus
The first question is a Firebird question. With Firebird 3, you can configure use of the Srp user authentication module and "over-the-wire" encryption. This should give you an encrypted connection between client and server. The settings for this are in the "firebird.conf" config file. This

Re: [Lazarus] How to catch an unhandled exception? [FIXED - but there is an FPC bug here]

2018-03-09 Thread Tony Whyman via Lazarus
to system.Setstring. On 09/03/18 11:09, Tony Whyman via Lazarus wrote: Thanks to Giuliano mentioning debug libraries I have been able to duplicate the problem and to find the source of the bug - but it is as weird as it gets. FYI: tests done on Linux Mint 18 with Lazarus 1.8.0 and fpc 3.0.4

Re: [Lazarus] How to catch an unhandled exception? [FIXED - but there is an FPC bug here]

2018-03-09 Thread Tony Whyman via Lazarus
Thanks to Giuliano mentioning debug libraries I have been able to duplicate the problem and to find the source of the bug - but it is as weird as it gets. FYI: tests done on Linux Mint 18 with Lazarus 1.8.0 and fpc 3.0.4. The evidence so far: 1. Gabor's program ends with an exception when

Re: [Lazarus] How to catch an unhandled exception?

2018-03-09 Thread Tony Whyman via Lazarus
Giulian, You may in a roundabout way have pointed me at where the problem lies. I always work with fpc debug libraries as well and I can't catch the problem. I changed to the standard release and the bug appears! Unfortunately, while duplicating the problem is one thing, tracking it down

Re: [Lazarus] How to catch an unhandled exception?

2018-03-09 Thread Tony Whyman via Lazarus
Gabor, I can't duplicate your problem which probably implies that we are looking at some weird race condition during the program tidy up phase. I did see occasionally something like this before with Lazarus 1.6.4 on Windows with heaptrc - but I never saw it without heaptrc and it cleared up

Re: [Lazarus] Garbage writing to console

2018-02-22 Thread Tony Whyman via Lazarus
You may find the "SetTextCodePage" procedure useful when it comes to setting the code page for a Windows console. e.g. SetTextCodePage(stdout,cp_utf8); See also https://www.freepascal.org/docs-html/rtl/system/settextcodepage.html On 22/02/18 11:21, Luca Olivetti via Lazarus wrote: Lazarus

[Lazarus] Fixes_1_8 branches fails to compile

2017-11-29 Thread Tony Whyman via Lazarus
After last night's update from svn, my copy of the 1.8 fixes branch fails to compile with the following error: /tmp/lazarus/components/codetools/codecompletiontool.pas(7094,18) Error: (5038) identifier idents no member "GetPriorAtom" codecompletiontool.pas(9802) Fatal: (10026) There were 1

Re: [Lazarus] String vs WideString

2017-08-18 Thread Tony Whyman via Lazarus
Damn, should remember never to copy and paste from Wikipedia! On 17/08/17 13:40, Michael Schnell via Lazarus wrote: On 17.08.2017 12:41, Tony Whyman via Lazarus wrote: Finally: "In UTF-16, code points greater or equal to 2^16 are encoded using /two/ 16-bit code units. 2¹⁵ ??? -Mi

Re: [Lazarus] String vs WideString

2017-08-17 Thread Tony Whyman via Lazarus
On 16/08/17 11:05, Juha Manninen via Lazarus wrote: 2. Clean up the char type. ... Why shouldn't there be a single char type that intuitively represents a single character regardless of how many bytes are used to represent it. What do you mean by "a single character"? A "character" in Unicode

Re: [Lazarus] String vs WideString

2017-08-17 Thread Tony Whyman via Lazarus
On 16/08/17 11:05, Juha Manninen via Lazarus wrote: On Mon, Aug 14, 2017 at 4:21 PM, Tony Whyman via Lazarus <lazarus@lists.lazarus-ide.org> wrote: UTF-16/Unicode can only store 65,536 characters while the Unicode standard (that covers UTF8 as well) defines 136,755 characters. UTF-16/Uni

Re: [Lazarus] String vs WideString

2017-08-15 Thread Tony Whyman via Lazarus
You can me as a "like" on that one. On 15/08/17 10:13, Mattias Gaertner via Lazarus wrote: IMHO the main problem of adding a new string type is https://xkcd.com/927/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] String vs WideString

2017-08-15 Thread Tony Whyman via Lazarus
On 14/08/17 22:01, Juha Manninen via Lazarus wrote: Tony Whyman, this issue has been discussed again and again for the past 10+ years first in FPC mailing lists and then in Lazarus lists. The current Unicode support in Lazarus works f***ing well and is amazingly compatible with Delphi. WinAPI

Re: [Lazarus] String vs WideString

2017-08-15 Thread Tony Whyman via Lazarus
On 14/08/17 17:47, Sven Barth via Lazarus wrote: The main problem of such a dynamic type would be the inability to do fast indexing as the compiler would need to insert runtime checks for the size of a character. I had already thought the same, but then had to discard the idea due to this.

Re: [Lazarus] String vs WideString

2017-08-14 Thread Tony Whyman via Lazarus
On 14/08/17 14:46, Mattias Gaertner via Lazarus wrote: You made need UTF-16/Unicode support for accessing Microsoft APIs but apart from that, why is it being promoted as the universal standard? Who does that? Mattias Because the obvious implication when someone argues against AnsiString

Re: [Lazarus] String vs WideString

2017-08-14 Thread Tony Whyman via Lazarus
On 13/08/17 12:18, Juha Manninen via Lazarus wrote: Unicode was designed to solve exactly the problems caused by locale differences. Why don't you use it? I believe you effectively answer your own question in your preceding post: Actually using the Windows system codepage is not safe any

Re: [Lazarus] Making sources compatible with Delphi (but Lazarus is priority)

2017-05-04 Thread Tony Whyman via Lazarus
On 03/05/17 17:53, Sven Barth via Lazarus wrote: Am 03.05.2017 14:37 schrieb "Tony Whyman via Lazarus" <lazarus@lists.lazarus-ide.org <mailto:lazarus@lists.lazarus-ide.org>>: > On the other hand, AnsiString and UnicodeString are still separate types. Why? Why sho

Re: [Lazarus] Making sources compatible with Delphi (but Lazarus is priority)

2017-05-03 Thread Tony Whyman via Lazarus
On 03/05/17 09:52, Graeme Geldenhuys via Lazarus wrote: [rant] ps: Both FPC and Delphi is in such a messed up state when it comes to string and character types. It is the laughing stock of programming languages at the moment. At least EMBT is heading in the right direction with their

Re: [Lazarus] Making sources compatible with Delphi (but Lazarus is priority)

2017-05-01 Thread Tony Whyman via Lazarus
On 01/05/17 16:33, Sven Barth via Lazarus wrote: Would you please elaborate on these and which FPC version you targeted? Regards, Sven I am working with FPC 3.0.x and an example of the solution I used follows. Note that with FPC, there is no problem calling a constructor from a

Re: [Lazarus] Making sources compatible with Delphi (but Lazarus is priority)

2017-05-01 Thread Tony Whyman via Lazarus
On 01/05/17 15:18, Juha Manninen via Lazarus wrote: On Mon, May 1, 2017 at 12:30 PM, Tony Whyman via Lazarus <lazarus@lists.lazarus-ide.org> wrote: When I originally created the Firebird Pascal API package, Now I realize your code may have been for FPC but not for Lazarus

Re: [Lazarus] Making sources compatible with Delphi (but Lazarus is priority)

2017-05-01 Thread Tony Whyman via Lazarus
Marcos, When I originally created the Firebird Pascal API package, I wrote it with FPC as the only intended target. However, I then got feedback asking for Delphi compatibility and I couldn't resist the challenge of seeing how easy it would be to convert the source code. In the end, it was

[Lazarus] https website for Lazarus

2017-03-13 Thread Tony Whyman via Lazarus
Has anyone thought about supporting https on the Lazarus (and Free Pascal) websites? Firefox, for example, is getting increasingly sniffy about unprotected websites and for good reason. It would also be useful to protect the svn feeds, if only to reduce the risk of a man in the middle attack

[Lazarus] Should Frames be transparent?

2017-01-11 Thread Tony Whyman via Lazarus
I suppose that this could be one of those "is it a feature or is it a bug" type questions, but it is also a big difference in behaviour between Linux and Windows. I've realised that if you create a simple application with an image on a form and then partially or wholly overlay it with a frame

Re: [Lazarus] fcl-pdf change

2016-11-03 Thread Tony Whyman via Lazarus
Does this affect the Power PDF package or is this entirely independent? On 03/11/16 08:47, Michael Van Canneyt via Lazarus wrote: For those using the fcl-pdf package: There has been a change in the API. Well, there were many additions, but this change may influence existing code. --

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-14 Thread Tony Whyman via Lazarus
On 14/10/16 06:43, LacaK via Lazarus wrote: I do not know IBX, but don't you use overriden TDataSet.InternalInitFieldDefs ? It will allow you put extra info into FieldDef and then use overriden TDataSet.CreateFields, which will allow you pass extra info from TIBFieldDef into TIBStringField

Re: [Lazarus] Teaching Pascal at College

2016-10-12 Thread Tony Whyman via Lazarus
When I read your post ,it sent me back to read the Introduction to Nicklaus Wirth's original "Pascal user Manual and Report" where the opening paragraph says: "The development of the language Pascal is based on two principal aims. The first is to make available a language suitable to teach

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-12 Thread Tony Whyman via Lazarus
On 11/10/16 19:21, LacaK via Lazarus wrote: I am aware of it. I have not added all other MBCS because ! I doubt, which are realy used nowadays. My guess is that UTF-8 is far most used / supported as client character set. No problem to add them if there will be real demand from users ...

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Tony Whyman via Lazarus
On 11/10/16 15:14, Martin Schreiber via Lazarus wrote: MSEgui uses below code in order to guess the Firebird character size: " FYI, this is the table IBX uses to look up character sets and code pages: CharSetMap: array [0..69] of TCharsetMap = ( (CharsetID: 0; CharSetName: 'NONE';

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Tony Whyman via Lazarus
On 11/10/16 15:14, Martin Schreiber via Lazarus wrote: case i2 of 5,6,8,44,56,57,64: begin Agree with 5,6, 44, 56, 57 as two byte character sets. 8 doesn't seem to exist (at least in my version). 64 is KOI8U. According to Wikipedia "KOI8-U is an 8-bit character encoding,

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Tony Whyman via Lazarus
Please look at changes in TRUNK. May be that not all is perfect, but you will see there direction ... -Laco. Which FPC version is this likely to be released in? On a quick review of the code, all seems good. Just one point: GetDataSize seems to acknowledge CP_UTF8 as the only multibyte

[Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Tony Whyman via Lazarus
An IBX user came to me with a problem and the problem seems to be a deep seated disconnect between multi-byte character sets, TStringField.Size and TDBEdit.MaxLength. Something needs to give - but I am not sure what should. Firstly documentation: If you go back to Delphi, TField.DataSize is

Re: [Lazarus] Anyone has experience controlling Excel from FPC/delphi via OLE Automation?

2016-10-05 Thread Tony Whyman via Lazarus
Denis, Answer is yes - and only yesterday was I working on such a program. Years ago I did the same from Delphi and used the type libraries. With FPC, the key is to use variants. As an example, I've attached a neat little unit for exporting a DBGrid to an Excel spreadsheet. Regards Tony