From mschnell at lumino.de Fri Feb 2 11:25:32 2018 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 2 Feb 2018 11:25:32 +0100 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned Message-ID: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> Featuring "parallel loops", "future variables", etc, implemented via a thread pool that is transparent for the application programmer. -> http://docwiki.embarcadero.com/Libraries/Tokyo/de/System.Threading -Michael From mschnell at lumino.de Fri Feb 2 11:27:59 2018 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 2 Feb 2018 11:27:59 +0100 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned In-Reply-To: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> References: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> Message-ID: <7ed05a58-1eac-88ac-4969-c8f949cbd9f3@lumino.de> sorry -> http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Threading -Michael From aaa5500 at ya.ru Fri Feb 2 11:59:34 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 2 Feb 2018 13:59:34 +0300 Subject: [Lazarus] Hi-dpi cursors in app? Message-ID: Ondrej, I have cursors https://github.com/Alexey-T/ATSynEdit/tree/master/atsynedit/res they look very bad in win10 scale 150%. What to do here? -- Regards, Alexey From marcov at stack.nl Fri Feb 2 16:10:17 2018 From: marcov at stack.nl (Marco van de Voort) Date: Fri, 2 Feb 2018 16:10:17 +0100 Subject: [Lazarus] Problem with fpc-3.0.4 and double In-Reply-To: References: <593e447e-7b48-be0f-d44c-166edac8518e@holobit.net> <5ecc08d8-ae89-b5aa-d424-66dc4961a65c@gmail.com> Message-ID: <20180202151017.GA28609@stack.nl> On Wed, Jan 31, 2018 at 07:31:56PM +0100, zeljko via Lazarus wrote: > > Using binary floats, there are just too many values that can't be > > represented 100%, regardless of the length of the mantissa. > > https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems > > Thanks Ralf, I know what is floating point arithmetic, but something is > changed between 3.0.2 and 3.0.4 and I want to know what it is. It could be as simple as slightly different codegeneration that eliminates a temporary variable or adds it. The x87 CPU calculates with 80-bits, but storing it into a double variable (e.g. a local variable on the stack) will round it to 64-bit double. This can cause small precision fluctuations, and, as with all regular float comparison issues, it is something of all times and all compilers. From zeljko at holobit.net Fri Feb 2 16:28:01 2018 From: zeljko at holobit.net (zeljko) Date: Fri, 2 Feb 2018 16:28:01 +0100 Subject: [Lazarus] Problem with fpc-3.0.4 and double In-Reply-To: <20180202151017.GA28609@stack.nl> References: <593e447e-7b48-be0f-d44c-166edac8518e@holobit.net> <5ecc08d8-ae89-b5aa-d424-66dc4961a65c@gmail.com> <20180202151017.GA28609@stack.nl> Message-ID: <887f9dc1-e1b7-aa57-5ca9-2f624e1c798b@holobit.net> On 02/02/2018 04:10 PM, Marco van de Voort wrote: > On Wed, Jan 31, 2018 at 07:31:56PM +0100, zeljko via Lazarus wrote: >>> Using binary floats, there are just too many values that can't be >>> represented 100%, regardless of the length of the mantissa. >>> https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems >> >> Thanks Ralf, I know what is floating point arithmetic, but something is >> changed between 3.0.2 and 3.0.4 and I want to know what it is. > > It could be as simple as slightly different codegeneration that eliminates a > temporary variable or adds it. > > The x87 CPU calculates with 80-bits, but storing it into a double variable > (e.g. a local variable on the stack) will round it to 64-bit double. This > can cause small precision fluctuations, and, as with all regular float > comparison issues, it is something of all times and all compilers. > Today I've found exact where's problem. It's zeoslib 7.2.1 which uses fastcode (ZFastCode) implementation and results of StrToFloatDef() are bit different than results which is given by fpc's StrToFloatDef(). Changed code to use fpc functions and everything is correct now :) Thanks for your time ppl zeljko From pascaldragon at googlemail.com Fri Feb 2 17:14:45 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Fri, 2 Feb 2018 17:14:45 +0100 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned In-Reply-To: References: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> Message-ID: Am 02.02.2018 11:25 schrieb "Michael Schnell via Lazarus" < lazarus at lists.lazarus-ide.org>: Featuring "parallel loops", "future variables", etc, implemented via a thread pool that is transparent for the application programmer. -> http://docwiki.embarcadero.com/Libraries/Tokyo/de/System.Threading It only relies on already existing functionality (except for those overloads that take a TProc<>), so feel free to implement this for FPC as no one is planning to implement it currently, so first come, first serve. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoe at scootersoftware.com Fri Feb 2 17:19:25 2018 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Fri, 2 Feb 2018 10:19:25 -0600 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned In-Reply-To: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> References: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> Message-ID: On 2/2/2018 4:25 AM, Michael Schnell via Lazarus wrote: > Featuring "parallel loops", "future variables", etc, implemented via a > thread pool that is transparent for the application programmer. System.Threading requires anonymous methods, which Free Pascal doesn't currently support. Someone has been working on those, but it's hard to say when they'll be ready for merging. Once that's done someone could start implementing System.Threading, though personally I'd probably just look into adding FPC support to OmniThreadLibrary at that point. -- Zoë Peterson Scooter Software From zoe at scootersoftware.com Fri Feb 2 17:26:59 2018 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Fri, 2 Feb 2018 10:26:59 -0600 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned In-Reply-To: References: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> Message-ID: On 2/2/2018 10:19 AM, Zoë Peterson wrote: > System.Threading requires anonymous methods, which Free Pascal doesn't > currently support. Oops, Sven's right, it mostly doesn't use anonymous methods, so this isn't a blocker. -- Zoë Peterson Scooter Software From r030t1 at gmail.com Fri Feb 2 20:37:42 2018 From: r030t1 at gmail.com (R0b0t1) Date: Fri, 2 Feb 2018 13:37:42 -0600 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned In-Reply-To: References: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> Message-ID: On Fri, Feb 2, 2018 at 10:26 AM, Zoë Peterson via Lazarus wrote: > On 2/2/2018 10:19 AM, Zoë Peterson wrote: >> >> System.Threading requires anonymous methods, which Free Pascal doesn't >> currently support. > > > Oops, Sven's right, it mostly doesn't use anonymous methods, so this isn't a > blocker. > > I've been looking for a replacement to http://www.omnithreadlibrary.com/ for a long time. If I remember, the dealbreaker is the library's codebase making heavy use of anonymous functions and procedures. Does System.Threading expose an API that could take either code references or anonymous methods? I'm very interested. Cheers, R0b0t1 From zoe at scootersoftware.com Fri Feb 2 21:08:40 2018 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Fri, 2 Feb 2018 14:08:40 -0600 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned In-Reply-To: References: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> Message-ID: <4fe682e2-c73f-4206-2044-782bae846fcc@scootersoftware.com> On 2/2/2018 1:37 PM, R0b0t1 wrote: > I've been looking for a replacement to > http://www.omnithreadlibrary.com/ for a long time. If I remember, the > dealbreaker is the library's codebase making heavy use of anonymous > functions and procedures. Yeah, OTL requires anonymous methods. I was hoping to port it to FPC once the anonymous method support landed, but AFAICT the cross platform port got pushed into OTL v4 and it looks like that stalled a year ago. > Does System.Threading expose an API that could take either code > references or anonymous methods? I'm very interested. Yes, System.Threading has both "reference to procedure" and "procedure of object" overloads in the API, so you could implement most of it in the current FPC release. As Sven said, though, no one has started on it, and anyone who did work on it would have to be careful to not taint it with code from Delphi's implementation. -- Zoë Peterson Scooter Software From pascaldragon at googlemail.com Fri Feb 2 21:37:08 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Fri, 2 Feb 2018 21:37:08 +0100 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned In-Reply-To: <4fe682e2-c73f-4206-2044-782bae846fcc@scootersoftware.com> References: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> <4fe682e2-c73f-4206-2044-782bae846fcc@scootersoftware.com> Message-ID: Am 02.02.2018 21:08 schrieb "Zoë Peterson via Lazarus" < lazarus at lists.lazarus-ide.org>: On 2/2/2018 1:37 PM, R0b0t1 wrote: > I've been looking for a replacement to > http://www.omnithreadlibrary.com/ for a long time. If I remember, the > dealbreaker is the library's codebase making heavy use of anonymous > functions and procedures. > Yeah, OTL requires anonymous methods. I was hoping to port it to FPC once the anonymous method support landed, but AFAICT the cross platform port got pushed into OTL v4 and it looks like that stalled a year ago. Once FPC supports anonymous functions as well I assume that support will start to become alive again. ;) Does System.Threading expose an API that could take either code > references or anonymous methods? I'm very interested. > Yes, System.Threading has both "reference to procedure" and "procedure of object" overloads in the API, so you could implement most of it in the current FPC release. As Sven said, though, no one has started on it, and anyone who did work on it would have to be careful to not taint it with code from Delphi's implementation. The suggested way is to write tests for the Delphi implementation and to implement the FPC one based on those tests and the Delphi documentation. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoe at scootersoftware.com Sat Feb 3 00:31:21 2018 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Fri, 2 Feb 2018 17:31:21 -0600 Subject: [Lazarus] Doe fpc/lazarus already have System-Threading or is it planned In-Reply-To: References: <36b700ff-f59d-807c-fd79-d5c50ba2ddbb@lumino.de> <4fe682e2-c73f-4206-2044-782bae846fcc@scootersoftware.com> Message-ID: <31cb6c00-6174-2882-411d-dbabd09b6616@scootersoftware.com> On 2/2/2018 2:37 PM, Sven Barth via Lazarus wrote: > Once FPC supports anonymous functions as well I assume that support will > start to become alive again. ;) Hopefully. They were already working on iOS/Android/macOS/Linux support using Delphi, and that's what's stalled. The last commit on the v4 branch was a year ago. I looked into at least getting FPC on Windows running with Blaise's closure branch in Nov/Dec, but stopped because of that and the missing generics. Primož did respond favorably when I asked him about adding FPC support though. -- Zoë Peterson Scooter Software From lazarus at kluug.net Sat Feb 3 09:39:54 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 3 Feb 2018 09:39:54 +0100 Subject: [Lazarus] Hi-dpi cursors in app? In-Reply-To: References: Message-ID: <0657c5b6-1c9a-dc76-8d25-d530e3282a88@kluug.net> On 02.02.2018 11:59, AlexeyT via Lazarus wrote: > I have cursors > https://github.com/Alexey-T/ATSynEdit/tree/master/atsynedit/res > > they look very bad in win10 scale 150%. What to do here? I haven't looked into the hi-dpi cursors issue yet. But I assume you have to create several .cur files (one file for every resolution you want to support) and then pick up the correct size for your DPI. I don't think multi-resolution CUR files are (or can be) supported. But I may be wrong here. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Sat Feb 3 10:34:45 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 3 Feb 2018 12:34:45 +0300 Subject: [Lazarus] Now some my icons paint from ImageList incorrect Message-ID: In Laz trunk, 16x16 icons paint incorrect, stretched by x. Picture. Some icons paint ok, but 2nd toolbar icons - incorrect. Alex -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: tool-bad-icon.png Type: image/png Size: 14519 bytes Desc: not available URL: From lazarus at kluug.net Sat Feb 3 10:37:21 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 3 Feb 2018 10:37:21 +0100 Subject: [Lazarus] Now some my icons paint from ImageList incorrect In-Reply-To: References: Message-ID: <3ecbf6fb-0687-2e2a-2622-042eb170d99a@kluug.net> On 03.02.2018 10:34, AlexeyT via Lazarus wrote: > In Laz trunk, 16x16 icons paint incorrect, stretched by x. > > Picture. Some icons paint ok, but 2nd toolbar icons - incorrect. I assume your icon size does not match the image list size. If this is correct, use AddSlice instead of Add. Ondrej From aaa5500 at ya.ru Sat Feb 3 10:37:53 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 3 Feb 2018 12:37:53 +0300 Subject: [Lazarus] Hi-dpi cursors in app? In-Reply-To: <0657c5b6-1c9a-dc76-8d25-d530e3282a88@kluug.net> References: <0657c5b6-1c9a-dc76-8d25-d530e3282a88@kluug.net> Message-ID: <7fb29c0a-a540-ff8e-d260-ef5962ef05a2@ya.ru> >But I assume you have to create several .cur files (one file for every resolution you want to support) I don't know how to make .cur file for bigger DPI. It is bitmap with big size? it will paint same way too. -- Regards, Alexey From lazarus at kluug.net Sat Feb 3 10:39:54 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 3 Feb 2018 10:39:54 +0100 Subject: [Lazarus] Hi-dpi cursors in app? In-Reply-To: <7fb29c0a-a540-ff8e-d260-ef5962ef05a2@ya.ru> References: <0657c5b6-1c9a-dc76-8d25-d530e3282a88@kluug.net> <7fb29c0a-a540-ff8e-d260-ef5962ef05a2@ya.ru> Message-ID: On 03.02.2018 10:37, AlexeyT via Lazarus wrote: > >But I assume you have to create several .cur files (one file for > every resolution you want to support) > > I don't know how to make .cur file for bigger DPI. It is bitmap with > big size? it will paint same way too. Just create a .cur with a bigger image. Ondrej From joshyfun at gmail.com Sat Feb 3 14:11:22 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sat, 3 Feb 2018 14:11:22 +0100 Subject: [Lazarus] Hi-dpi cursors in app? In-Reply-To: <7fb29c0a-a540-ff8e-d260-ef5962ef05a2@ya.ru> References: <0657c5b6-1c9a-dc76-8d25-d530e3282a88@kluug.net> <7fb29c0a-a540-ff8e-d260-ef5962ef05a2@ya.ru> Message-ID: El 03/02/2018 a las 10:37, AlexeyT via Lazarus escribió: > >But I assume you have to create several .cur files (one file for every > resolution you want to support) > > I don't know how to make .cur file for bigger DPI. It is bitmap with big > size? it will paint same way too. > Hello, Not tested but it could be a solution for your problem (windows): http://www.rw-designer.com/cursor-maker Quoted from a page: "Windows 8 automatically changes the size of mouse pointers (cursors) depending on DPI settings of display. The relations between DPI and the size of cursors are roughly as follows: 100% : 32×32 pixel 150% : 48×48 pixel 200% : 64×64 pixel This is done by the OS’s selecting one image from multiple images of different sizes contained in a cursor file." -- From aaa5500 at ya.ru Sat Feb 3 16:33:24 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 3 Feb 2018 18:33:24 +0300 Subject: [Lazarus] fpGUI WS update Message-ID: https://bugs.freepascal.org/view.php?id=32647 is also fixed? cannot test yet. -- Regards, Alexey From lazarus at kluug.net Sat Feb 3 16:38:46 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 3 Feb 2018 16:38:46 +0100 Subject: [Lazarus] fpGUI WS update In-Reply-To: References: Message-ID: <204a4800-2fc9-06d4-c734-0e0842f80566@kluug.net> On 03.02.2018 16:33, AlexeyT via Lazarus wrote: > https://bugs.freepascal.org/view.php?id=32647 is also fixed? cannot > test yet. Yes. Ondrej From lazarus at kluug.net Sat Feb 3 18:33:26 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 3 Feb 2018 18:33:26 +0100 Subject: [Lazarus] Hi-dpi cursors in app? In-Reply-To: References: <0657c5b6-1c9a-dc76-8d25-d530e3282a88@kluug.net> <7fb29c0a-a540-ff8e-d260-ef5962ef05a2@ya.ru> Message-ID: <56828671-78b3-a9dd-3fba-cefeb887785e@kluug.net> On 03.02.2018 14:11, José Mejuto via Lazarus wrote: > The relations between DPI and the size of cursors are roughly as follows: > >         100% : 32×32 pixel >         150% : 48×48 pixel >         200% : 64×64 pixel Correct - I completely forgot about it. And Lazarus has High-DPI cursors already (and working - I tested on Windows 10). Alexey, see lcl\images\cursors Ondrej From mailinglists at geldenhuys.co.uk Sat Feb 3 23:17:49 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 3 Feb 2018 22:17:49 +0000 Subject: [Lazarus] Code comment conflicts with code in LCL Message-ID: <285f3da5-c834-a17b-b7b0-307762da34f1@geldenhuys.co.uk> Please see the lcl/themes.pas unit =================================== unit Themes; {$mode objfpc}{$H+} interface uses // no Graphics or Controls can be used here to prevent circular references // SysUtils, Types, GraphType, Math, Classes, LCLProc, LCLType, Graphics, TmSchema; type =================================== Note the code comment about "Graphics", but then that unit IS used in the uses clause. :) Trunk r57236 (from today) 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 From mailinglists at geldenhuys.co.uk Sat Feb 3 23:49:23 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 3 Feb 2018 22:49:23 +0000 Subject: [Lazarus] fpGUI WS update In-Reply-To: <204a4800-2fc9-06d4-c734-0e0842f80566@kluug.net> References: <204a4800-2fc9-06d4-c734-0e0842f80566@kluug.net> Message-ID: <58c862f5-d2d2-1f85-3e0f-32e79f0f0801@geldenhuys.co.uk> On 2018-02-03 15:38, Ondrej Pokorny via Lazarus wrote: > On 03.02.2018 16:33, AlexeyT via Lazarus wrote: >> https://bugs.freepascal.org/view.php?id=32647 is also fixed? cannot >> test yet. > Yes. First off, I'm very glad to see movement on the LCL-fpGUI front. So well done to those that contributed. I wanted to test the latest Lazarus Trunk LCL-fpGUI support under FreeBSD (64-bit) with FPC 3.0.4. Creating a simple LCL application with a button, mainmenu, memo, listbox and combobox. Compilation error: * I had to remove the "Graph" reference in the lcl/interfaces/fpgui/fpguiint.pp unit's uses clause. It tried to link agains a FPC package pulling in SVGALib (which seems to be Linux and Windows only or something). Or not a library that comes standard with FreeBSD. After removing that, LCL-fpGUI compiled fine, and so did my test project. Running my test project produces the following error: [tmp]$ ./project1 svgalib: Cannot get I/O permissions. [tmp]$ It seems somewhere something is still trying to link against svgalib - which clearly is a FPC package that is unsupported under FreeBSD. I also can't see why such a dependency is needed for LCL-fpGUI widgetset - it definitely isn't a requirement for pure fpGUI apps. Anyway, anybody know where this dependencies in LCL-fpGUI is coming from so we can try and remove it or IFDEF it out for FreeBSD? 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 From mailinglists at geldenhuys.co.uk Sat Feb 3 23:53:39 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 3 Feb 2018 22:53:39 +0000 Subject: [Lazarus] fpGUI WS update In-Reply-To: <58c862f5-d2d2-1f85-3e0f-32e79f0f0801@geldenhuys.co.uk> References: <204a4800-2fc9-06d4-c734-0e0842f80566@kluug.net> <58c862f5-d2d2-1f85-3e0f-32e79f0f0801@geldenhuys.co.uk> Message-ID: On 2018-02-03 22:49, Graeme Geldenhuys via Lazarus wrote: > Anyway, anybody know where this dependencies in LCL-fpGUI is coming from > so we can try and remove it or IFDEF it out for FreeBSD? After a while it came to me, the IO error is probably a permission issue for my logged in user. So I switched to root user on my FreeBSD system and ran my test project again. It switched to fullscreen Console mode and gave errors in the console. So I guess 'svgalib' is a console graphics library (ie: Turbo Pascal days) or something. Definitely not something that should be used with LCL. 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 From michael at freepascal.org Sun Feb 4 09:06:09 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 4 Feb 2018 09:06:09 +0100 (CET) Subject: [Lazarus] fpGUI WS update In-Reply-To: References: <204a4800-2fc9-06d4-c734-0e0842f80566@kluug.net> <58c862f5-d2d2-1f85-3e0f-32e79f0f0801@geldenhuys.co.uk> Message-ID: On Sat, 3 Feb 2018, Graeme Geldenhuys via Lazarus wrote: > On 2018-02-03 22:49, Graeme Geldenhuys via Lazarus wrote: >> Anyway, anybody know where this dependencies in LCL-fpGUI is coming from >> so we can try and remove it or IFDEF it out for FreeBSD? > > After a while it came to me, the IO error is probably a permission issue > for my logged in user. So I switched to root user on my FreeBSD system > and ran my test project again. It switched to fullscreen Console mode > and gave errors in the console. So I guess 'svgalib' is a console > graphics library (ie: Turbo Pascal days) or something. Definitely not > something that should be used with LCL. yes, svgalib is a console graphics library. Looks like there is still some reference to the graph unit in the code, because it links directly to libsvga. Michael. From bo.berglund at gmail.com Sun Feb 4 20:44:03 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 04 Feb 2018 20:44:03 +0100 Subject: [Lazarus] Windows Registry, how do I read data from rdExpandString Message-ID: I am writing a little Lazarus program to examine the registry values stored by a program we use. So far I have only used strings and integers in the registry, and I have known in advance what type they are. Now I want to make a more general kind of reader and so I have created a read function like shown below. So there is a case construct taht uses the data type reported on each item, but I don't know what to do about rdExpandString. In fact I don't know what kind of data may hide behind this data type... I would apprecieate to get some clarification on this because googling has so far not resulted in anything for Pascal. function ReadRegValues(Root: HKEY; Key: string; List: TStrings): boolean; var Reg: TRegistry; i: integer; sVal: string; siz: integer; DT: TRegDataType; BUF: TBytes; begin List.Clear; Result := false; Reg := TRegistry.Create; try Reg.RootKey := Root; if not Reg.OpenKeyReadOnly(Key) then exit; try Reg.GetValueNames(List); for i := 0 to List.Count-1 do begin sVal := ''; try if Reg.ValueExists(List[i]) then begin DT := Reg.GetDataType(List[i]); // one of (rdUnknown, rdString, rdExpandString, rdBinary, rdInteger) case DT of rdString: sVal := Reg.ReadString(List[i]); rdExpandString: What to do here????; rdBinary: begin siz := Reg.GetDataSize(List[i]); SetLength(BUF, siz); sVal := ''; Reg.ReadBinaryData(List[i], BUF, siz); for i := 0 to siz-1 do sVal := sVal + IntToHex(BUF[i], 2) + ' '; end; rdInteger: sVal := IntToStr(Reg.ReadInteger(List[i])); end; end; List[i] := List[i] + '=' + sVal; except end; end; Result := true; except end; finally Reg.Free; end; end; -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Feb 4 20:50:13 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 04 Feb 2018 20:50:13 +0100 Subject: [Lazarus] Windows 10 execution problem for my application... References: Message-ID: <0qoe7dtq90fo0g38rltl8vm7qbo138hr4f@4ax.com> On Sat, 20 Jan 2018 00:57:36 +0100, Bo Berglund via Lazarus wrote: >I am having problems with Windows10 Pro x64 regarding running my >programs from Windows Explorer. >What happens is this: >- I have created a new virtual computer with Windows 10 Pro x64 >- Installed Subversion and checked out a project including sources and >the 32 bit binary >- Went to the binary folder and doubleclicked the executable > >Now Win10 responds by showing a message: >"This app can't run on your PC" >No extra information as to why it happens except to contact the >publisher for a solution. But it so happens that I am the publisher... > UPDATE: This has nothing to do with Win10 as it also appears when I check out the project from Svn on a Win7 machine. It turns out the Svn has applied the wrong "mime type" to the executable (on commit?) so it is corrupted on checkout probably by expansion of line endings... The application Icon does not show up either.. -- Bo Berglund Developer in Sweden From joshyfun at gmail.com Mon Feb 5 09:46:42 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 5 Feb 2018 09:46:42 +0100 Subject: [Lazarus] fpGUI WS update In-Reply-To: References: <204a4800-2fc9-06d4-c734-0e0842f80566@kluug.net> <58c862f5-d2d2-1f85-3e0f-32e79f0f0801@geldenhuys.co.uk> Message-ID: El 03/02/2018 a las 23:53, Graeme Geldenhuys via Lazarus escribió: > After a while it came to me, the IO error is probably a permission issue > for my logged in user. So I switched to root user on my FreeBSD system > and ran my test project again. It switched to fullscreen Console mode > and gave errors in the console. So I guess 'svgalib' is a console > graphics library (ie: Turbo Pascal days) or something. Definitely not > something that should be used with LCL. Hello, I'll try to circunvent the use of Graph unit, if my memory serves me, it is mostly used for some sets to perform value conversions between fpGUI and LCL. Last update was not recently tested in Linux family as main development is in Windows because LCL tries to mimic Windows/Delphi behavior, and fpGUI widgetset is not being used for production right now. I promise that future updates will be tested in at least one Linux platform ;-) -- From andrea.mauri.75 at gmail.com Mon Feb 5 11:42:03 2018 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Mon, 5 Feb 2018 11:42:03 +0100 Subject: [Lazarus] Thistoryfiles carbon issue Message-ID: Dear all, I am using THistoryFiles (http://wiki.freepascal.org/HistoryFiles) in a project running on linux/win/osx. I have an issue with THistoryFiles on Carbon. Specifically, the issue is related to historyfiles.pas when clicking on a recent menu item. When a recent menu item is clicked an event is raised in HistoryFiles: procedure THistoryFiles.OnMainMenuClickHistoryItem(Sender:TObject); var thefile : string; begin thefile:=''; If Assigned(FOnHistoryItemClick) Then begin thefile := FItems.Strings[TMenuItem(sender).tag-1]; if thefile<>'' then FLastItemIndex := TMenuItem(sender).tag; LastItemIndex_WriteIni; FOnHistoryItemClick(Self, TMenuItem(sender), thefile); UpdateParentMenu; end; end; Before the event is raised the following function is executed (in carbonobject.inc) function CarbonApp_CommandProcess(ANextHandler: EventHandlerCallRef; AEvent: EventRef; {%H-}AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF} Staring from line 271 the following code is executed: if CarbonMenu.Parent.Dismissed=kHIMenuDismissedBySelection then begin FillChar(Msg{%H-}, SizeOf(Msg), 0); Msg.msg := LM_ACTIVATE; DeliverMessage(CarbonMenu.LCLMenuItem, Msg); if assigned(CarbonMenu.Parent) then // if parent not closed CarbonMenu.Parent.Dismissed:=0; Result := noErr; Exit; end else Result:=CallNextEventHandler(ANextHandler, AEvent); Specifically THistoryFiles.OnMainMenuClickHistoryItem is executed on DeliverMessage, the issue is that in THistoryFiles.OnMainMenuClickHistoryItem the menu is deleted and replaced by thistoryfiles, so when executing the instructions after DeliverMessage the CarbonMenu does not exists anymore. Any hint? Andrea Mauri -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Mon Feb 5 14:07:07 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 5 Feb 2018 14:07:07 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: The high-DPI imagelist adds a new entry to the lfm file, "BitmapAdv". Is this really absolutely necessary in all cases, for example if the imagelist contains only standard-resolution images? The problem is that once a form with an image list has been opened by Laz trunk it cannot be opened by Laz 1.8 or older any more without an error message and the need to remove this new entry.  In particular, this is an issue for third-party components where the author must be very careful to save demo forms with Laz 1.8, not with trunk. I remember I had the same argument with the addition of "Application.Scaled := true" to the lpr file, but here portability could kept by putting it into an {$if lclversion >= 1090000} directive. In the lfm files, however, such directives are not allowed. From lazarus at kluug.net Mon Feb 5 16:01:00 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 5 Feb 2018 16:01:00 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: <087c0232-5e52-d1b8-bf42-571b5e4af0a9@kluug.net> On 05.02.2018 14:07, Werner Pamler via Lazarus wrote: > The high-DPI imagelist adds a new entry to the lfm file, "BitmapAdv". > Is this really absolutely necessary in all cases, for example if the > imagelist contains only standard-resolution images? The problem is > that once a form with an image list has been opened by Laz trunk it > cannot be opened by Laz 1.8 or older any more without an error message > and the need to remove this new entry.  In particular, this is an > issue for third-party components where the author must be very careful > to save demo forms with Laz 1.8, not with trunk. > > I remember I had the same argument with the addition of > "Application.Scaled := true" to the lpr file, but here portability > could kept by putting it into an {$if lclversion >= 1090000} > directive. In the lfm files, however, such directives are not allowed. No, it's not needed if no extra resolutions are stored. I'll check if it can be omitted (it's a manually added entry and not a normal property). If not, I'll add an ignore entry for 1.8.2. Ondrej From giuliano.colla at fastwebnet.it Mon Feb 5 18:48:33 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 5 Feb 2018 18:48:33 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: <087c0232-5e52-d1b8-bf42-571b5e4af0a9@kluug.net> References: <087c0232-5e52-d1b8-bf42-571b5e4af0a9@kluug.net> Message-ID: <5220af0d-7976-c739-7847-1df61537eb89@fastwebnet.it> Il 05/02/2018 16:01, Ondrej Pokorny via Lazarus ha scritto: > No, it's not needed if no extra resolutions are stored. I'll check if > it can be omitted (it's a manually added entry and not a normal > property). If not, I'll add an ignore entry for 1.8.2. In the past undefined properties were silently ignored when streaming the lfm files. This did provide a good backward compatibility for new properties. Of course using them in code would raise an error, but code can easily be edited, while manually editing lfm files is rather cumbersome. Wouldn't it be good to revive the old way? Or maybe just issue a warning? Giuliano From mailinglists at geldenhuys.co.uk Mon Feb 5 19:29:35 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 5 Feb 2018 18:29:35 +0000 Subject: [Lazarus] fpGUI WS update In-Reply-To: References: <204a4800-2fc9-06d4-c734-0e0842f80566@kluug.net> <58c862f5-d2d2-1f85-3e0f-32e79f0f0801@geldenhuys.co.uk> Message-ID: <3d616561-e1a3-3349-fa3f-49a86d7ab817@geldenhuys.co.uk> On 2018-02-05 08:46, José Mejuto via Lazarus wrote: > I'll try to circunvent the use of Graph unit, if my memory serves me, it > is mostly used for some sets to perform value conversions between fpGUI > and LCL. Still strange to use that unit - though removing it (in one location) did not cause any compilation error on FreeBSD. But I still can't find where else it is used, because LCL-fpGUI still seems to have a dependency on it somewhere. Very nice of you to contribute to LCL-fpGUI. Much appreciated. :) 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 From lazarus at kluug.net Mon Feb 5 19:45:53 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 5 Feb 2018 19:45:53 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: On 05.02.2018 14:07, Werner Pamler via Lazarus wrote: > The high-DPI imagelist adds a new entry to the lfm file, "BitmapAdv". > Is this really absolutely necessary in all cases, for example if the > imagelist contains only standard-resolution images? The problem is > that once a form with an image list has been opened by Laz trunk it > cannot be opened by Laz 1.8 I just opened my image list example (trunk\examples\imagelist_highdpi_designtime\) in Lazarus 1.6 without any problems. I only had to skip some warning boxes: I hit on "Continue loading" every time and the project opened without problems and no lost properties and I was able to compile and run it (of course without the new high dpi features introduced in 1.9). => I cannot confirm that a 1.9 project using the high-dpi image list cannot be opened in 1.8 and older. Just on the contrary - no problem here, only one read error box have to be skipped. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: kkaenfnmleaannld.png Type: image/png Size: 4675 bytes Desc: not available URL: From werner.pamler at freenet.de Mon Feb 5 20:04:59 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 5 Feb 2018 20:04:59 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: <2d38c7f6-37fd-7a1b-30da-92e3eeec7c03@freenet.de> Am 05.02.2018 um 19:45 schrieb Ondrej Pokorny via Lazarus: > On 05.02.2018 14:07, Werner Pamler via Lazarus wrote: >> The high-DPI imagelist adds a new entry to the lfm file, "BitmapAdv". >> Is this really absolutely necessary in all cases, for example if the >> imagelist contains only standard-resolution images? The problem is >> that once a form with an image list has been opened by Laz trunk it >> cannot be opened by Laz 1.8 > > I just opened my image list example > (trunk\examples\imagelist_highdpi_designtime\) in Lazarus 1.6 without > any problems. I only had to skip some warning boxes: > > > > I hit on "Continue loading" every time and the project opened without > problems and no lost properties and I was able to compile and run it > (of course without the new high dpi features introduced in 1.9). > > => I cannot confirm that a 1.9 project using the high-dpi image list > cannot be opened in 1.8 and older. Just on the contrary - no problem > here, only one read error box have to be skipped. Whenever I see this dialog I go crazy. I never know which button to press, there's a 67% chance to hit the wrong one. The labels texts are not descriptive at all. I am absolutely sure that a user less experienced than me will have the same issues and give up. It really would be much better to not see this dialog. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: kkaenfnmleaannld.png Type: image/png Size: 4675 bytes Desc: not available URL: From bartjunk64 at gmail.com Mon Feb 5 22:29:03 2018 From: bartjunk64 at gmail.com (Bart) Date: Mon, 5 Feb 2018 22:29:03 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: <2d38c7f6-37fd-7a1b-30da-92e3eeec7c03@freenet.de> References: <2d38c7f6-37fd-7a1b-30da-92e3eeec7c03@freenet.de> Message-ID: On Mon, Feb 5, 2018 at 8:04 PM, Werner Pamler via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Whenever I see this dialog I go crazy. I never know which button to press, > there's a 67% chance to hit the wrong one. The labels texts are not > descriptive at all. I am absolutely sure that a user less experienced than > me will have the same issues and give up. > > It really would be much better to not see this dialog. > I feel the same about this dialog. To me it is totally unclear what "Continue loading" means. Every encouter I had with this dialog so far, resulted in either not being able to open the project, or an empy form, which when built and run immediately error'd out. A dialog that said "skip/ignore this property" and/or "skip/ignore this component" (and then doing what it said) would make more sense. As it is now, when I see this dialog, I just cancel, quit Lazarus and edit the .lfm manually. Bart -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Tue Feb 6 06:06:49 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 6 Feb 2018 06:06:49 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: <2d38c7f6-37fd-7a1b-30da-92e3eeec7c03@freenet.de> Message-ID: On 05.02.2018 22:29, Bart via Lazarus wrote: > On Mon, Feb 5, 2018 at 8:04 PM, Werner Pamler via Lazarus > > > wrote: > > Whenever I see this dialog I go crazy. I never know which button > to press, there's a 67% chance to hit the wrong one. The labels > texts are not descriptive at all. I am absolutely sure that a user > less experienced than me will have the same issues and give up. > > It really would be much better to not see this dialog. > > > I feel the same about this dialog. > To me it is totally unclear what "Continue loading" means. > Every encouter I had with this dialog so far, resulted in either not > being able to open the project, or an empy form, which when built and > run immediately error'd out. > > A dialog that said "skip/ignore this property" and/or "skip/ignore > this component" (and then doing what it said) would make more sense. > As it is now, when I see this dialog, I just cancel, quit Lazarus and > edit the .lfm manually. AFAIK it's not forbidden to improve the dialog if you find it unclear :) You can even take use of the new TTaskDialog I introduced in 1.7: http://wiki.freepascal.org/TTaskDialog. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Tue Feb 6 07:00:55 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 6 Feb 2018 07:00:55 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: On 05.02.2018 14:07, Werner Pamler via Lazarus wrote: > The high-DPI imagelist adds a new entry to the lfm file, "BitmapAdv". > Is this really absolutely necessary in all cases, for example if the > imagelist contains only standard-resolution images? Fixed. > The problem is that once a form with an image list has been opened by > Laz trunk it cannot be opened by Laz 1.8 or older any more without an > error message and the need to remove this new entry. Feel free to improve the dialog. > In particular, this is an issue for third-party components where the > author must be very careful to save demo forms with Laz 1.8, not with > trunk. Lazarus is perfectly backwards compatible. E.g. If you want to support 1.6, write your demos in 1.6 -> 1.8 and 1.9 will open your project without problems. Ondrej From lazarus at kluug.net Tue Feb 6 09:01:51 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 6 Feb 2018 09:01:51 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: <71e923d4-23ee-7a8e-27b3-4cb1626e175c@kluug.net> On 06.02.2018 7:00, Ondrej Pokorny via Lazarus wrote: > On 05.02.2018 14:07, Werner Pamler via Lazarus wrote: >> The high-DPI imagelist adds a new entry to the lfm file, "BitmapAdv". >> Is this really absolutely necessary in all cases, for example if the >> imagelist contains only standard-resolution images? > > Fixed. > >> The problem is that once a form with an image list has been opened by >> Laz trunk it cannot be opened by Laz 1.8 or older any more without an >> error message and the need to remove this new entry. > > Feel free to improve the dialog. > >> In particular, this is an issue for third-party components where the >> author must be very careful to save demo forms with Laz 1.8, not with >> trunk. > > Lazarus is perfectly backwards compatible. E.g. If you want to support > 1.6, write your demos in 1.6 -> 1.8 and 1.9 will open your project > without problems. Nevertheless ir was a bug that BitmapAdv was streamed even if not needed. Thanks for reporting :) Ondrej From lubos.pintes at gmail.com Tue Feb 6 10:34:25 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Tue, 6 Feb 2018 10:34:25 +0100 Subject: [Lazarus] Internal error when compiling LCL Message-ID: Hello, During compilation of my project, I encountered this: win32wsmenus.pp(253,1) Error: Internal error 200611031 I didn't touch the mentioned file. FPC version is Free Pascal Compiler version 3.0.4 [2017/10/06] OS Windows 10, SVN trunk 57257 From lazarus at kluug.net Tue Feb 6 10:36:18 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 6 Feb 2018 10:36:18 +0100 Subject: [Lazarus] Internal error when compiling LCL In-Reply-To: References: Message-ID: <409fe73f-e5c5-c387-8175-b9b828277d97@kluug.net> On 06.02.2018 10:34, Lubos Pintes via Lazarus wrote: > Hello, > During compilation of my project, I encountered this: > win32wsmenus.pp(253,1) Error: Internal error 200611031 > I didn't touch the mentioned file. > FPC version is > Free Pascal Compiler version 3.0.4 [2017/10/06] > OS Windows 10, SVN trunk 57257 > Try to rebuild clean. Ondrej From lubos.pintes at gmail.com Tue Feb 6 10:45:54 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Tue, 6 Feb 2018 10:45:54 +0100 Subject: [Lazarus] Internal error when compiling LCL In-Reply-To: <409fe73f-e5c5-c387-8175-b9b828277d97@kluug.net> References: <409fe73f-e5c5-c387-8175-b9b828277d97@kluug.net> Message-ID: This helped, thanks. Dňa 06.02.2018 o 10:36 Ondrej Pokorny via Lazarus napísal(a): > On 06.02.2018 10:34, Lubos Pintes via Lazarus wrote: >> Hello, >> During compilation of my project, I encountered this: >> win32wsmenus.pp(253,1) Error: Internal error 200611031 >> I didn't touch the mentioned file. >> FPC version is >> Free Pascal Compiler version 3.0.4 [2017/10/06] >> OS Windows 10, SVN trunk 57257 >> > Try to rebuild clean. > > Ondrej > From bo.berglund at gmail.com Tue Feb 6 10:58:21 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 06 Feb 2018 10:58:21 +0100 Subject: [Lazarus] Windows Registry, how do I read data from rdExpandString References: Message-ID: On Sun, 04 Feb 2018 20:44:03 +0100, Bo Berglund via Lazarus wrote: >So there is a case construct taht uses the data type reported on each >item, but I don't know what to do about rdExpandString. >In fact I don't know what kind of data may hide behind this data >type... What I want to know is how to treat data of the type REG_EXPAND_SZ in the registry when reading it. THere are not tha many such but for completeness I want to be able to display these kinds of data too. And my code example in my previous post is not working, it contains a few obvious bugs like using a loop variable inside the loop as a new loop variable. But these are ironed out already so right now my main concerns is still the treatment of REG_EXPAND_SZ data... I googled and followed links into the Microsoft site where the format should be described but it was only in words and no exact spec that I could find. Like this: https://support.microsoft.com/en-us/help/256986 Any ideas on what to do? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Feb 6 11:15:25 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 06 Feb 2018 11:15:25 +0100 Subject: [Lazarus] Windows Registry, how do I read data from rdExpandString References: Message-ID: <6hvi7dh4f1b0ragejvmfh3pn0rk7fdtanh@4ax.com> On Tue, 06 Feb 2018 10:58:21 +0100, Bo Berglund via Lazarus wrote: >What I want to know is how to treat data of the type REG_EXPAND_SZ in >the registry when reading it. There are not that many such but for >completeness I want to be able to display these kinds of data too. If I use Reg.ReadString method on a REG_EXPAND_SZ item which I have found in the user settings in the registry for CVSNT I get back a string looking like this: C:\Programs\cvsnt\cvsnt-default.pem But if I export the registry key with RegEdit I get this instead: "CertificateFile"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,\ 6d,00,73,00,5c,00,63,00,76,00,73,00,6e,00,74,00,5c,00,63,00,76,00,73,00,6e,\ 00,74,00,2d,00,64,00,65,00,66,00,61,00,75,00,6c,00,74,00,2e,00,70,00,65,00,\ 6d,00,00,00 It looks like the data is encoded with 16 bit values per character and stored in successive 1-byte hex values with lsb first, but is this always the case and why does the ReadString function not deliver the hex in that case. Can someone explain how it works? And why there is no TRegistry class method for fetching the REG_EXPAND_SZ data type? Does it have something to do with Unicode on Windows (I am testing on a Windows 7 Pro X64 machine)? -- Bo Berglund Developer in Sweden From werner.pamler at freenet.de Tue Feb 6 12:18:26 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Tue, 6 Feb 2018 12:18:26 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: Am 06.02.2018 um 07:00 schrieb Ondrej Pokorny via Lazarus: > Lazarus is perfectly backwards compatible. E.g. If you want to support > 1.6, write your demos in 1.6 -> 1.8 and 1.9 will open your project > without problems. This is correct. But unrealistic. Even if I write a demo for 1.8 I must test it with trunk. And if I commit it after I saved it with trunk without having gone back to 1.8 the new property is in the lfm - the user will see it and get the impression "what piece of crap!". Of course, you will say: don't do this, always run the last test with the release version. But that's the way things are, they just happen, we're only human. But if an unneeded property is not written to the form by trunk, at least this kind of error cannot happen. From alexander.hofmann at new-h.de Tue Feb 6 13:35:28 2018 From: alexander.hofmann at new-h.de (Alexander Hofmann) Date: Tue, 6 Feb 2018 13:35:28 +0100 Subject: [Lazarus] Windows Registry, how do I read data from rdExpandString In-Reply-To: <6hvi7dh4f1b0ragejvmfh3pn0rk7fdtanh@4ax.com> References: <6hvi7dh4f1b0ragejvmfh3pn0rk7fdtanh@4ax.com> Message-ID: <6dbbc67d-a9ae-cef8-37be-8c0c69a23523@new-h.de> Hi, as stated in the MSDN article you cited, the REG_EXPAND_SZ type is a hint to the API/API-User, that the string (stored as any other string either 2-byte or 1-byte depending in the Version) might contain environment variables, that need to be expanded before use. Respective M$ PowerShell, REG.exe versions etc. honor this hint and expand the variables before returning you the results... Am 06.02.2018 um 11:15 schrieb Bo Berglund via Lazarus: > > If I use Reg.ReadString method on a REG_EXPAND_SZ item which I have > found in the user settings in the registry for CVSNT I get back a > string looking like this: > C:\Programs\cvsnt\cvsnt-default.pem Does it look like this in Regedit.exe? I think yes in this case. The REG_EXPAND_SZ was "misused" here, because the next hex data below translates to the same text. The intended use of REG_EXPAND_SZ would be to store "%programfiles%\cvsnt\cvsnt-default.pem" instead - so that on internationalized (pre-win7/vista) systems it might expand to e.g. "c:\Programme\"... > But if I export the registry key with RegEdit I get this instead: > "CertificateFile"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,\ > > 6d,00,73,00,5c,00,63,00,76,00,73,00,6e,00,74,00,5c,00,63,00,76,00,73,00,6e,\ > > 00,74,00,2d,00,64,00,65,00,66,00,61,00,75,00,6c,00,74,00,2e,00,70,00,65,00,\ > 6d,00,00,00 See e.g. https://social.msdn.microsoft.com/Forums/en-US/6bbef2d0-425d-4fb7-8ced-29ff18b91698/regexpandsz-to-regsz-question?forum=vblanguage REG_EXPAND_SZ has to be encoded in Hex to be compatible with old Regedit versions / to be sure it is stored with the correct datatype. > Can someone explain how it works? And why there is no TRegistry class > method for fetching the REG_EXPAND_SZ data type? That I don't know - but according to https://msdn.microsoft.com/de-de/library/windows/desktop/ms724884(v=vs.85).aspx, you are required to do the conversion yourself, i.e. call ExpandEnvironmentStrings to get a usable path. But - you should try reading a "correct" REG_EXPAND_SZ value first, or look at the code of TRegistry, to see if there is any conversion going on at all. As for displaying - I would suggest displaying the "original" value (without expansion) alongside with a "current reading" e.g. containing the expanded string for the current system/user. Greetings, Alex From bartjunk64 at gmail.com Tue Feb 6 18:58:19 2018 From: bartjunk64 at gmail.com (Bart) Date: Tue, 6 Feb 2018 18:58:19 +0100 Subject: [Lazarus] Internal error when compiling LCL In-Reply-To: References: Message-ID: On Tue, Feb 6, 2018 at 10:34 AM, Lubos Pintes via Lazarus wrote: > win32wsmenus.pp(253,1) Error: Internal error 200611031 Yep, had that some days ago. I was working on an unrelated LCL unit and had to do a "make clean" to make it go away. This process repeated about 5 times. There already is a bugreport about it: https://bugs.freepascal.org/view.php?id=32352 Bart From donald at ziesig.org Wed Feb 7 00:14:32 2018 From: donald at ziesig.org (Donald Ziesig) Date: Tue, 6 Feb 2018 18:14:32 -0500 Subject: [Lazarus] ppu's in wrong directory. Message-ID: <44d3e468-fb4a-56ab-1507-8e7dbf053bb5@ziesig.org> I am working on updates to some free pascal database code.  In order to do this, I used fpcupdelux to download and build the entire app into a private folder so I don't mess up my normal installation. I made one change to db.pas (changed a private to protected) and re-compiled it and the IDE and my code.  After doing this, I am getting many errors of the type: "bufdataset_parser.pp(13,3) Fatal: Cannot find dbf_prscore used by bufdataset_parser. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/home/donz/Desktop/Lazarus/fpc/units/x86_64-linux/fcl-db/dbf_prscore.ppu.." This is just one of many with the same theme (ppu in wrong directory). I'm working on Linux Mint 18.3, Lazarus 1.8.0, FPC 3.0.4,  SVN 57265M, x86_64-linux-gtk2 How can I recover from this? Thanks, Don Ziesig From nc-gaertnma at netcologne.de Wed Feb 7 02:25:09 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 7 Feb 2018 02:25:09 +0100 Subject: [Lazarus] ppu's in wrong directory. In-Reply-To: <44d3e468-fb4a-56ab-1507-8e7dbf053bb5@ziesig.org> References: <44d3e468-fb4a-56ab-1507-8e7dbf053bb5@ziesig.org> Message-ID: <20180207022509.0d236988@limapholos.matflo.wg> On Tue, 6 Feb 2018 18:14:32 -0500 Donald Ziesig via Lazarus wrote: >[...] > I made one change to db.pas (changed a private to protected) and > re-compiled it You must recompile all depending units as well. I recommend to rebuild the whole fpc. > and the IDE and my code.  After doing this, I am getting > many errors of the type: > > "bufdataset_parser.pp(13,3) Fatal: Cannot find dbf_prscore used by > bufdataset_parser. Make sure all ppu files of a package are in its > output directory. ppu in wrong > directory=/home/donz/Desktop/Lazarus/fpc/units/x86_64-linux/fcl-db/dbf_prscore.ppu.." > > This is just one of many with the same theme (ppu in wrong directory). Check that the right fpc.cfg is used and it contains the paths to your private fpc installation, and not the paths to the normal fpc installation. For example check in Lazarus View / IDE Internals / About FPC, CfgFilename and UnitPaths. Mattias From bo.berglund at gmail.com Wed Feb 7 20:52:55 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 07 Feb 2018 20:52:55 +0100 Subject: [Lazarus] Windows Registry, how do I read data from rdExpandString References: <6hvi7dh4f1b0ragejvmfh3pn0rk7fdtanh@4ax.com> <6dbbc67d-a9ae-cef8-37be-8c0c69a23523@new-h.de> Message-ID: On Tue, 6 Feb 2018 13:35:28 +0100, Alexander Hofmann via Lazarus wrote: >Hi, > >as stated in the MSDN article you cited, the REG_EXPAND_SZ type is a >hint to the API/API-User, that the string (stored as any other string >either 2-byte or 1-byte depending in the Version) might contain >environment variables, that need to be expanded before use. > >Respective M$ PowerShell, REG.exe versions etc. honor this hint and >expand the variables before returning you the results... > ... > >As for displaying - I would suggest displaying the "original" value >(without expansion) alongside with a "current reading" e.g. containing >the expanded string for the current system/user. > Thanks, then I will use ReadString for both types and let the registry "fix" the values and expand the environment variables as needed. While I have been looking at this I am getting more and more confused about the 32/64 bit issues.... I had the impression before embarking on this that the 32 bit applications would read/write into Software/Wow6432Node/ and would not be able to reach the Software/. But that seems not to be the case for my Lazarus program because in my viewer I can navigate the registry and I see the Wow6432Node item and can step into it too. I will have to stuff this into Delphi to see if it holds true there as well. Very confusing. I have not yet embarked on 64 bit computing (at least I believe not). -- Bo Berglund Developer in Sweden From pascaldragon at googlemail.com Wed Feb 7 21:32:33 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Wed, 7 Feb 2018 21:32:33 +0100 Subject: [Lazarus] Windows Registry, how do I read data from rdExpandString In-Reply-To: References: <6hvi7dh4f1b0ragejvmfh3pn0rk7fdtanh@4ax.com> <6dbbc67d-a9ae-cef8-37be-8c0c69a23523@new-h.de> Message-ID: On 07.02.2018 20:52, Bo Berglund via Lazarus wrote: > I had the impression before embarking on this that the 32 bit > applications would read/write into Software/Wow6432Node/ > and would not be able to reach the Software/. > But that seems not to be the case for my Lazarus program because in my > viewer I can navigate the registry and I see the Wow6432Node item and > can step into it too. 32-bit applications are de facto accessing Software/Wow6432Node/, but to them it appears as if they're accessing Software/. This is handled transparently by Windows. If you want to disable this, you need to create the TRegistry class with the KEY_WOW64_64KEY flag set, this way you'll access the real Software/. Same is true if you use RegCreateKeyEx(), RegOpenKeyEx() or RegDeleteKeyEx() directly. Regards, Sven From jmlandmesser at gmx.de Thu Feb 8 12:57:48 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Thu, 8 Feb 2018 12:57:48 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll Message-ID: do i have to write a bug report? Lazarus 1.9.0 "today" FPC 3.0.4 i386-win32-win32/win64 From aaa5500 at ya.ru Thu Feb 8 15:11:45 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Thu, 8 Feb 2018 17:11:45 +0300 Subject: [Lazarus] Show crash info to user (MadExcept) Message-ID: <33a23f15-da7b-1ae2-3aa4-5f2826615538@ya.ru> Hi In Delphi i used lib MadExcept. I need similar lib in Laz too. To show to user reason of crash- src filename, line number, stack How to do it? -- Regards, Alexey From leandrodiazoe at gmail.com Thu Feb 8 16:02:41 2018 From: leandrodiazoe at gmail.com (lainz) Date: Thu, 8 Feb 2018 08:02:41 -0700 (MST) Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: <1518102161427-0.post@n3.nabble.com> Hi, I have a component BGRAImageList that fixes basically the alpha channels of the regular ImageList on Linux using BGRABitmap. I did not code that component, but I'm the one that updates the package. Sources: https://github.com/bgrabitmap/bgracontrols/blob/master/bgraimagelist.pas It works fine in 1.8, but in trunk there are changes like: 1.8 TCustomImageList = class(TLCLReferenceComponent) 1.9 is TCustomImageList = class(TLCLComponent), so the method ReferenceNeeded is not available. Questions: - *What does ReferenceNeeded, and if it is necessary on 1.9*. Another is this: 1.8 procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType; ADrawEffect: TGraphicsDrawEffect); overload; virtual; 1.9 procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType; ADrawEffect: TGraphicsDrawEffect); overload; In 1.9 the virtual was removed and I can't use override anymore. My question is *if the method still will be called instead of the LCL one in 1.9 without using override*. I know this is a basic of OOP but I need a bit of help because I never use virtual and overload. Another question: If I remove override to compile in 1.9, what happens in 1.8? I never use IFDEF LCL_FULLVERSION and don't know how to use it, any chances to have 2 different methods, one with override and other without, one for 1.8 and one for 1.9 or newer? And the big question: *Transparency is now or will be fixed on linux, so I don't need this component anymore and I can archive it?* -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From michael at freepascal.org Thu Feb 8 16:53:58 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 8 Feb 2018 16:53:58 +0100 (CET) Subject: [Lazarus] Show crash info to user (MadExcept) In-Reply-To: <33a23f15-da7b-1ae2-3aa4-5f2826615538@ya.ru> References: <33a23f15-da7b-1ae2-3aa4-5f2826615538@ya.ru> Message-ID: On Thu, 8 Feb 2018, AlexeyT via Lazarus wrote: > Hi > > In Delphi i used lib MadExcept. I need similar lib in Laz too. To show > to user reason of crash- src filename, line number, stack > > How to do it? Hook into the various exception handling routines, and use routines similar to the ones found in heaptrc. The lazarus IDE also contains some nice examples of logging when an exception occurs. Michael. From jmlandmesser at gmx.de Thu Feb 8 17:48:07 2018 From: jmlandmesser at gmx.de (John Landmesser) Date: Thu, 8 Feb 2018 17:48:07 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: References: Message-ID: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> On 08.02.2018 12:57, Landmesser John via Lazarus wrote: > do i have to write a bug report? > > > Lazarus 1.9.0 "today" FPC 3.0.4 i386-win32-win32/win64 > bug report done https://bugs.freepascal.org/view.php?id=33139 From juha.manninen62 at gmail.com Thu Feb 8 19:51:45 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 8 Feb 2018 20:51:45 +0200 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> Message-ID: On Thu, Feb 8, 2018 at 6:48 PM, John Landmesser via Lazarus wrote: > bug report done > https://bugs.freepascal.org/view.php?id=33139 Ah, I was just planning to write that I cannot reproduce. Works well here. Can you open the components list with Ctrl-Shift-P ? Can anybody else reproduce? > Lazarus 1.9.0 "today" FPC 3.0.4 i386-win32-win32/win64 Your report says GTK2 / Linux. I also tested on both Linux and Windows. Juha From juha.manninen62 at gmail.com Thu Feb 8 19:59:34 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 8 Feb 2018 20:59:34 +0200 Subject: [Lazarus] High-DPI TImageList In-Reply-To: <1518102161427-0.post@n3.nabble.com> References: <1518102161427-0.post@n3.nabble.com> Message-ID: On Thu, Feb 8, 2018 at 5:02 PM, lainz via Lazarus wrote: > My question is *if the method still will be called instead of the LCL one in > 1.9 without using override*. I know this is a basic of OOP but I need a bit > of help because I never use virtual and overload. Virtual methods are polymorphic so a caller does not need to know the actual type of an object. The correct virtual / overridden method is always called. I guess your code knows the exact type (BGRAImageList) and can use it. Thus the correct method is called even if it is not virtual. Juha From leandrodiazoe at gmail.com Thu Feb 8 20:02:54 2018 From: leandrodiazoe at gmail.com (Leandro Diaz) Date: Thu, 8 Feb 2018 16:02:54 -0300 Subject: [Lazarus] High-DPI TImageList In-Reply-To: References: Message-ID: Ok Juha thanks. And what about the ifdef for that missing method? ReferenceNeeded Sent from Mailspring (https://link.getmailspring.com/link/local-0739f840-40a8-v1.1.3-27dcee2f at PC-i7/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=lazarus%40lists.lazarus-ide.org), the best free email app for work On feb. 8 2018, at 3:59 pm, Juha Manninen via Lazarus wrote: > > On Thu, Feb 8, 2018 at 5:02 PM, lainz via Lazarus > wrote: > > My question is *if the method still will be called instead of the LCL one in > > 1.9 without using override*. I know this is a basic of OOP but I need a bit > > of help because I never use virtual and overload. > > > Virtual methods are polymorphic so a caller does not need to know the > actual type of an object. The correct virtual / overridden method is > always called. > I guess your code knows the exact type (BGRAImageList) and can use it. > Thus the correct method is called even if it is not virtual. > > Juha > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Thu Feb 8 20:14:16 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 8 Feb 2018 21:14:16 +0200 Subject: [Lazarus] High-DPI TImageList In-Reply-To: <1518102161427-0.post@n3.nabble.com> References: <1518102161427-0.post@n3.nabble.com> Message-ID: On Thu, Feb 8, 2018 at 5:02 PM, lainz via Lazarus wrote: > 1.8 > TCustomImageList = class(TLCLReferenceComponent) > > 1.9 is TCustomImageList = class(TLCLComponent), so the method > ReferenceNeeded is not available. > > Questions: > - *What does ReferenceNeeded, and if it is necessary on 1.9*. TLCLReferenceComponent has a handle. I have no idea why an ImageList would need a handle. I noticed there is now: TCustomImageListResolution = class(TLCLReferenceComponent) Maybe Ondrej can explain why it is there. Juha From juha.manninen62 at gmail.com Thu Feb 8 20:58:25 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 8 Feb 2018 21:58:25 +0200 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> Message-ID: On Thu, Feb 8, 2018 at 8:51 PM, Juha Manninen wrote: > Can you open the components list with Ctrl-Shift-P ? I meant Ctrl-Alt-P. Juha From lazarus at kluug.net Thu Feb 8 21:00:39 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 8 Feb 2018 21:00:39 +0100 Subject: [Lazarus] High-DPI TImageList In-Reply-To: <1518102161427-0.post@n3.nabble.com> References: <1518102161427-0.post@n3.nabble.com> Message-ID: <09582937-62be-c9b7-c4de-f25d7b2f3c8c@kluug.net> First of all, the image list became multi-resolution. You have the new class TCustomImageListResolution that is the new "TCustomImageList". You have to move your custom code there. On 08.02.2018 16:02, lainz via Lazarus wrote: > Hi, I have a component BGRAImageList that fixes basically the alpha channels > of the regular ImageList on Linux using BGRABitmap. > > I did not code that component, but I'm the one that updates the package. > > Sources: > https://github.com/bgrabitmap/bgracontrols/blob/master/bgraimagelist.pas > > It works fine in 1.8, but in trunk there are changes like: > > 1.8 > TCustomImageList = class(TLCLReferenceComponent) > > 1.9 is TCustomImageList = class(TLCLComponent), so the method > ReferenceNeeded is not available. > > Questions: > - *What does ReferenceNeeded, and if it is necessary on 1.9*. On win32 you need a handle for WinAPI native controls. The real imagelist code (along with ReferenceNeeded method) was moved into TCustomImageListResolution. You have to move all your code into a TCustomImageListResolution descendant and register it in TCustomImageList.GetResolutionClass. > Another is this: > > 1.8 > procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: > TDrawingStyle; AImageType: TImageType; > ADrawEffect: TGraphicsDrawEffect); overload; virtual; > > 1.9 > procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: > TDrawingStyle; AImageType: TImageType; > ADrawEffect: TGraphicsDrawEffect); overload; > > In 1.9 the virtual was removed and I can't use override anymore. Again, override TCustomImageListResolution.Draw > My question is *if the method still will be called instead of the LCL one in > 1.9 without using override*. I know this is a basic of OOP but I need a bit > of help because I never use virtual and overload. Override TCustomImageListResolution.Draw > Another question: If I remove override to compile in 1.9, what happens in > 1.8? The new image list from 1.9 is not compatible with 1.8. You have to release a new version for 1.9+ only. > I never use IFDEF LCL_FULLVERSION and don't know how to use it, any chances > to have 2 different methods, one with override and other without, one for > 1.8 and one for 1.9 or newer? > > And the big question: > > *Transparency is now or will be fixed on linux, so I don't need this > component anymore and I can archive it?* I didn't change anything about transparency but for me transparency works fine on both Gtk2 and Qt Linux. (I don't know any other details.) Ondrej From jmlandmesser at gmx.de Thu Feb 8 21:39:39 2018 From: jmlandmesser at gmx.de (John Landmesser) Date: Thu, 8 Feb 2018 21:39:39 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> Message-ID: <432fac8d-5173-3fd4-731f-10a9f6b7e21e@gmx.de> On 08.02.2018 20:58, Juha Manninen via Lazarus wrote: > On Thu, Feb 8, 2018 at 8:51 PM, Juha Manninen wrote: >> Can you open the components list with Ctrl-Shift-P ? > I meant Ctrl-Alt-P. > > Juha Ctrl-Alt-P is already defined on my Linux XFCE Have to learn how to redefine it in Lazarus Same issue for Windows XP Lazarus trunk! From jmlandmesser at gmx.de Thu Feb 8 21:45:49 2018 From: jmlandmesser at gmx.de (John Landmesser) Date: Thu, 8 Feb 2018 21:45:49 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> Message-ID: <24cc67e5-9469-cff7-5d3c-6c79139dd776@gmx.de> On 08.02.2018 20:58, Juha Manninen via Lazarus wrote: > On Thu, Feb 8, 2018 at 8:51 PM, Juha Manninen wrote: >> Can you open the components list with Ctrl-Shift-P ? > I meant Ctrl-Alt-P. > > Juha sam AV if i use the keyboard shortcut From jmlandmesser at gmx.de Thu Feb 8 22:00:09 2018 From: jmlandmesser at gmx.de (john Landmesser) Date: Thu, 8 Feb 2018 22:00:09 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: <24cc67e5-9469-cff7-5d3c-6c79139dd776@gmx.de> References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> <24cc67e5-9469-cff7-5d3c-6c79139dd776@gmx.de> Message-ID: <0254b494-3793-919b-c666-0aab7eb13e93@gmx.de> Am 08.02.2018 um 21:45 schrieb John Landmesser via Lazarus: > On 08.02.2018 20:58, Juha Manninen via Lazarus wrote: >> On Thu, Feb 8, 2018 at 8:51 PM, Juha Manninen >> wrote: >>> Can you open the components list with Ctrl-Shift-P ? >> I meant Ctrl-Alt-P. >> >> Juha > > sam AV if i use the keyboard shortcut > strange:  same AV on Win 10 In Office i tested with Windows XP Now at home i tested Linux XFCE and Windows 10 So there are two different hardware configuration with same AV error. I have fpc 3.02 and 3.0.4 !? From leandrodiazoe at gmail.com Thu Feb 8 22:03:10 2018 From: leandrodiazoe at gmail.com (Leandro Diaz) Date: Thu, 8 Feb 2018 18:03:10 -0300 Subject: [Lazarus] High-DPI TImageList In-Reply-To: <09582937-62be-c9b7-c4de-f25d7b2f3c8c@kluug.net> References: <1518102161427-0.post@n3.nabble.com> <09582937-62be-c9b7-c4de-f25d7b2f3c8c@kluug.net> Message-ID: Thanks. If transparency works fine the best should be deprecate the component. El feb 8, 2018 5:08 PM, "Ondrej Pokorny via Lazarus" < lazarus at lists.lazarus-ide.org> escribió: > First of all, the image list became multi-resolution. You have the new > class TCustomImageListResolution that is the new "TCustomImageList". You > have to move your custom code there. > > On 08.02.2018 16:02, lainz via Lazarus wrote: > >> Hi, I have a component BGRAImageList that fixes basically the alpha >> channels >> of the regular ImageList on Linux using BGRABitmap. >> >> I did not code that component, but I'm the one that updates the package. >> >> Sources: >> https://github.com/bgrabitmap/bgracontrols/blob/master/bgraimagelist.pas >> >> It works fine in 1.8, but in trunk there are changes like: >> >> 1.8 >> TCustomImageList = class(TLCLReferenceComponent) >> >> 1.9 is TCustomImageList = class(TLCLComponent), so the method >> ReferenceNeeded is not available. >> >> Questions: >> - *What does ReferenceNeeded, and if it is necessary on 1.9*. >> > > On win32 you need a handle for WinAPI native controls. The real imagelist > code (along with ReferenceNeeded method) was moved into > TCustomImageListResolution. > > You have to move all your code into a TCustomImageListResolution > descendant and register it in TCustomImageList.GetResolutionClass. > > Another is this: >> >> 1.8 >> procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: >> TDrawingStyle; AImageType: TImageType; >> ADrawEffect: TGraphicsDrawEffect); overload; virtual; >> >> 1.9 >> procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: >> TDrawingStyle; AImageType: TImageType; >> ADrawEffect: TGraphicsDrawEffect); overload; >> >> In 1.9 the virtual was removed and I can't use override anymore. >> > > Again, override TCustomImageListResolution.Draw > > My question is *if the method still will be called instead of the LCL one >> in >> 1.9 without using override*. I know this is a basic of OOP but I need a >> bit >> of help because I never use virtual and overload. >> > > Override TCustomImageListResolution.Draw > > Another question: If I remove override to compile in 1.9, what happens in >> 1.8? >> > > The new image list from 1.9 is not compatible with 1.8. You have to > release a new version for 1.9+ only. > > I never use IFDEF LCL_FULLVERSION and don't know how to use it, any chances >> to have 2 different methods, one with override and other without, one for >> 1.8 and one for 1.9 or newer? >> >> And the big question: >> >> *Transparency is now or will be fixed on linux, so I don't need this >> component anymore and I can archive it?* >> > > I didn't change anything about transparency but for me transparency works > fine on both Gtk2 and Qt Linux. (I don't know any other details.) > > Ondrej > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmlandmesser at gmx.de Thu Feb 8 22:16:51 2018 From: jmlandmesser at gmx.de (john Landmesser) Date: Thu, 8 Feb 2018 22:16:51 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: <0254b494-3793-919b-c666-0aab7eb13e93@gmx.de> References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> <24cc67e5-9469-cff7-5d3c-6c79139dd776@gmx.de> <0254b494-3793-919b-c666-0aab7eb13e93@gmx.de> Message-ID: did a fresh svn download of lazarus Without own components it is ok but this AV appears again after compiling with my extra components?!! From jmlandmesser at gmx.de Thu Feb 8 22:34:36 2018 From: jmlandmesser at gmx.de (John Landmesser) Date: Thu, 8 Feb 2018 22:34:36 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> <24cc67e5-9469-cff7-5d3c-6c79139dd776@gmx.de> <0254b494-3793-919b-c666-0aab7eb13e93@gmx.de> Message-ID: <2c442063-ca6e-6c71-6af4-f90e5cf4eb1c@gmx.de> same experience for Linux XFCE and own components installed -> AV with these messages: > TLazarusManager.Run starting /home/john1/lazarus/lazarus ... > Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] > PrimaryConfigPath="/home/john1/.lazarus" > Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] > SecondaryConfigPath="/etc/lazarus" > Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 > New=x86_64-linux-gtk2 FPC=True LCL=False > TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with > components > TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with > components > TComponentTreeView.SetSelection: Updating component node values. > TLazSourceFileManager.LoadLFM Creating designer for hidden component > of /run/media/john1/ntfs1/PROJEKTE/Lazarus/Anleitung/unit1.pas > TLazSourceFileManager.InitOpenedProjectFile select form in designer: > Form1:TForm1 TDesigner > TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with > components > > (lazarus:3564): GLib-GObject-WARNING **: gsignal.c:1207: no emission > of signal "button-release-event" to stop for instance '0x3b8fa90' > > (lazarus:3564): GLib-GObject-WARNING **: gsignal.c:1207: no emission > of signal "button-release-event" to stop for instance '0x3b8fa90' > > (lazarus:3564): GLib-GObject-WARNING **: gsignal.c:1207: no emission > of signal "button-release-event" to stop for instance '0x3b8fa90' > TApplication.HandleException Access violation >   Stack trace: >   $00000000005A150D line 5745 of include/control.inc >   $00000000009105AC line 2254 of idewindowintf.pas >   $00000000004B5A51 line 5916 of main.pp >   $00000000009B9C91 line 565 of componentpalette.pas >   $00000000005D9C4C line 83 of include/menuitem.inc >   $00000000005DA528 line 293 of include/menuitem.inc >   $0000000000432E0F >   $0000000000655421 line 3705 of gtk2/gtk2proc.inc >   $00000000007D09F6 line 139 of gtk2/gtk2wsmenus.pp >   $00007F5F99D5EC5D > TObjectInspectorDlg.FillPersistentComboBox: Updating ComboBox with > components > LAZARUS END - cleaning up ... > Hint: (lazarus) [TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE > Hint: (lazarus) [TMainIDE.Destroy] END From juha.manninen62 at gmail.com Fri Feb 9 00:11:33 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 9 Feb 2018 01:11:33 +0200 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> <24cc67e5-9469-cff7-5d3c-6c79139dd776@gmx.de> <0254b494-3793-919b-c666-0aab7eb13e93@gmx.de> Message-ID: On Thu, Feb 8, 2018 at 11:16 PM, john Landmesser via Lazarus wrote: > Without own components it is ok but this AV appears again after compiling > with my extra components?!! Ok, there you go... Do the components work when added from the palette? Your stack trace is usable but better still would be a proper GDB backtrace. Run Lazarus under GDB and then type "bt" after the AV. > Ctrl-Alt-P is already defined on my Linux XFCE The same window can be opened also from menu View -> Components. Juha From juha.manninen62 at gmail.com Fri Feb 9 00:44:52 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 9 Feb 2018 01:44:52 +0200 Subject: [Lazarus] Code comment conflicts with code in LCL In-Reply-To: <285f3da5-c834-a17b-b7b0-307762da34f1@geldenhuys.co.uk> References: <285f3da5-c834-a17b-b7b0-307762da34f1@geldenhuys.co.uk> Message-ID: On Sun, Feb 4, 2018 at 12:17 AM, Graeme Geldenhuys via Lazarus wrote: > // no Graphics or Controls can be used here to prevent circular references I fixed the comment in r57276. Controls indeed cannot be used there. It creates a circular reference. Juha From jmlandmesser at gmx.de Fri Feb 9 12:33:36 2018 From: jmlandmesser at gmx.de (john Landmesser) Date: Fri, 9 Feb 2018 12:33:36 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> <24cc67e5-9469-cff7-5d3c-6c79139dd776@gmx.de> <0254b494-3793-919b-c666-0aab7eb13e93@gmx.de> Message-ID: just followed my intuition and uninstalled https://svn.code.sf.net/p/lazarus-ccr/svn/components/rx didn't used it ad don't know why to realive RxLib, that was really great. We have replacements in Lazarus itself! Thanks guys! Can someone close the bugreport: https://bugs.freepascal.org/view.php?id=33139 Am 09.02.2018 um 00:11 schrieb Juha Manninen via Lazarus: > On Thu, Feb 8, 2018 at 11:16 PM, john Landmesser via Lazarus > wrote: >> Without own components it is ok but this AV appears again after compiling >> with my extra components?!! > Ok, there you go... > Do the components work when added from the palette? > Your stack trace is usable but better still would be a proper GDB backtrace. > Run Lazarus under GDB and then type "bt" after the AV. > >> Ctrl-Alt-P is already defined on my Linux XFCE > The same window can be opened also from menu View -> Components. > > Juha From lazarus at kluug.net Fri Feb 9 13:25:50 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 9 Feb 2018 13:25:50 +0100 Subject: [Lazarus] Lazarus trunk: AV on rightClick on Component-pallette: ShowAll In-Reply-To: References: <1b660af8-f0ae-971a-f3de-f6d999d6fc97@gmx.de> <24cc67e5-9469-cff7-5d3c-6c79139dd776@gmx.de> <0254b494-3793-919b-c666-0aab7eb13e93@gmx.de> Message-ID: I resolved your report. Ondrej From wv99999 at gmail.com Sat Feb 10 08:10:37 2018 From: wv99999 at gmail.com (Wolf) Date: Sat, 10 Feb 2018 20:10:37 +1300 Subject: [Lazarus] Lazarus Console text Message-ID: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> Hi What must I do to change font on the Lazarus console - not the Kubuntu console - to a monospace font, and how do I change font color there? Thanks Wolf From r030t1 at gmail.com Sat Feb 10 08:22:18 2018 From: r030t1 at gmail.com (R0b0t1) Date: Sat, 10 Feb 2018 01:22:18 -0600 Subject: [Lazarus] Lazarus Console text In-Reply-To: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> References: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> Message-ID: On Sat, Feb 10, 2018 at 1:10 AM, Wolf via Lazarus wrote: > Hi > > What must I do to change font on the Lazarus console - not the Kubuntu > console - to a monospace font, and how do I change font color there? > Sorry for the noise, but I am also very interested in an answer to this. I would like to be able to customize Lazarus more, and/or not use it when possible (admittedly lazbuild does a fairly good job). Cheers, R0b0t1 From aaa5500 at ya.ru Sat Feb 10 08:50:11 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Feb 2018 10:50:11 +0300 Subject: [Lazarus] Windres compiler not found by IDE Message-ID: atsynedit.pas(5691,1) Error: resource compiler "windres" not found, switching to external mode I tried to change {$r nnn.res} to {$r nnn.rc} and got this. How to fix it? Laz 1.9 trunk, FPC 3.0.2, Linux x64 -- Regards, Alexey From aaa5500 at ya.ru Sat Feb 10 09:44:52 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Feb 2018 11:44:52 +0300 Subject: [Lazarus] Multi-resolution cursors don't work on Win Message-ID: <96cc712d-7e7e-b844-519c-c9efdee86d65@ya.ru> Hi CudaText app now has .cur files with multi resolition. each cursor has 3 sizes (32x, 48x, 64x, ResourceHacker shows it in cudatext.exe) But still Win10 hi-dpi mode (150%) don't use these new cursor sizes, ie middle mouse click - shows old 32x32 cursor resized (all 5 of them on mouse move- center/left/rt/up/dn). Laz 1.9, fpc 3.0.0 (cross compile from Lin x64). -- Regards, Alexey From michael at freepascal.org Sat Feb 10 10:23:42 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 10 Feb 2018 10:23:42 +0100 (CET) Subject: [Lazarus] Windres compiler not found by IDE In-Reply-To: References: Message-ID: On Sat, 10 Feb 2018, AlexeyT via Lazarus wrote: > atsynedit.pas(5691,1) Error: resource compiler "windres" not found, > switching to external mode > > I tried to change {$r nnn.res} to {$r nnn.rc} and got this. How to fix it? > > Laz 1.9 trunk, FPC 3.0.2, Linux x64 You must install the necessary binutils for this. On a debian based system: sudo apt-get install mingw-w64 sudo ln -s /usr/bin/x86_64-w64-mingw32-windres /usr/bin/windres Should do the trick. Michael. From mlnglsts at bgss.hu Sat Feb 10 10:30:48 2018 From: mlnglsts at bgss.hu (Gabor Boros) Date: Sat, 10 Feb 2018 10:30:48 +0100 Subject: [Lazarus] LCL-fpGUI - SIGSEGV Message-ID: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> Hi All, I want to try LCL-fpGUI. Followed the instructions from the below wiki page, a new project compiled successfully but got error at application start. If start from the IDE got SIGSEGV, if start from command line got "Access violation". I used Lazarus trunk (57276) and fpGUI's maint branch. http://wiki.freepascal.org/fpGUI_Interface Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: LCL_fpGUI_error1.png Type: image/png Size: 3447 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LCL_fpGUI_error2.png Type: image/png Size: 7871 bytes Desc: not available URL: From lazarus at kluug.net Sat Feb 10 10:43:40 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 10 Feb 2018 10:43:40 +0100 Subject: [Lazarus] Multi-resolution cursors don't work on Win In-Reply-To: <96cc712d-7e7e-b844-519c-c9efdee86d65@ya.ru> References: <96cc712d-7e7e-b844-519c-c9efdee86d65@ya.ru> Message-ID: <88c87621-dff7-b32b-b248-f4cef56d60a9@kluug.net> What about LCL specific cursors. Are the scaled? Ondrej From lazarus at kluug.net Sat Feb 10 10:42:36 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 10 Feb 2018 10:42:36 +0100 Subject: [Lazarus] LCL-fpGUI - SIGSEGV In-Reply-To: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> References: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> Message-ID: <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> On 10.02.2018 10:30, Gabor Boros via Lazarus wrote: > Hi All, > > I want to try LCL-fpGUI. Followed the instructions from the below wiki > page, a new project compiled successfully but got error at application > start. If start from the IDE got SIGSEGV, if start from command line > got "Access violation". I used Lazarus trunk (57276) and fpGUI's maint > branch. > > http://wiki.freepascal.org/fpGUI_Interface Disable Application.Scaled - fpGUI doesn't support it yet. Ondrej From aaa5500 at ya.ru Sat Feb 10 11:20:38 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Feb 2018 13:20:38 +0300 Subject: [Lazarus] Multi-resolution cursors don't work on Win In-Reply-To: <88c87621-dff7-b32b-b248-f4cef56d60a9@kluug.net> References: <96cc712d-7e7e-b844-519c-c9efdee86d65@ya.ru> <88c87621-dff7-b32b-b248-f4cef56d60a9@kluug.net> Message-ID: <490c7689-fce6-5c6d-14fa-aa4dc14c971e@ya.ru> They work, i tried several of them (h split, v split, no, multidrag, sql) Maybe my cur files not correct? https://github.com/Alexey-T/ATSynEdit/tree/master/atsynedit/res On 10.02.2018 12:43, Ondrej Pokorny via Lazarus wrote: > What about LCL specific cursors. Are the scaled? -- Regards, Alexey From lazarus at mfriebe.de Sat Feb 10 12:37:50 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Sat, 10 Feb 2018 12:37:50 +0100 Subject: [Lazarus] Lazarus Console text In-Reply-To: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> References: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> Message-ID: On 10/02/18 08:10, Wolf via Lazarus wrote: > What must I do to change font on the Lazarus console - not the Kubuntu > console - to a monospace font, and how do I change font color there? You refer to the Console / "Terminal Output" from the menu View > Debug Windows? There are currently no settings for this. Source code (if you want to create a patch) is in debugger/pseudoterminaldlg.pp From mlnglsts at bgss.hu Sat Feb 10 12:49:51 2018 From: mlnglsts at bgss.hu (Gabor Boros) Date: Sat, 10 Feb 2018 12:49:51 +0100 Subject: [Lazarus] LCL-fpGUI - SIGSEGV In-Reply-To: <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> References: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> Message-ID: 2018. 02. 10. 10:42 keltezéssel, Ondrej Pokorny via Lazarus írta: > Disable Application.Scaled - fpGUI doesn't support it yet. Works now! Thank you! Gabor From aaa5500 at ya.ru Sat Feb 10 15:29:34 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Feb 2018 17:29:34 +0300 Subject: [Lazarus] Multi-resolution cursors don't work on Win In-Reply-To: <490c7689-fce6-5c6d-14fa-aa4dc14c971e@ya.ru> References: <96cc712d-7e7e-b844-519c-c9efdee86d65@ya.ru> <88c87621-dff7-b32b-b248-f4cef56d60a9@kluug.net> <490c7689-fce6-5c6d-14fa-aa4dc14c971e@ya.ru> Message-ID: <53c01533-a07f-7b28-e2b1-7ca41fd1cc1b@ya.ru> Cursors are ok, tested in new empty app. But in Cudatext they are not ok, 32x32 used... (LCL cursors are ok) Alexey From aaa5500 at ya.ru Sat Feb 10 16:26:18 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Feb 2018 18:26:18 +0300 Subject: [Lazarus] Multi-resolution cursors don't work on Win In-Reply-To: <96cc712d-7e7e-b844-519c-c9efdee86d65@ya.ru> References: <96cc712d-7e7e-b844-519c-c9efdee86d65@ya.ru> Message-ID: <84756196-0330-e147-45a0-ea4933e06e5c@ya.ru>  Sorry, it was duplicated cursors [one hi-dpi set and other set not hi-dpi, same INT values]. Solved. From mailinglists at geldenhuys.co.uk Sat Feb 10 16:43:08 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 10 Feb 2018 15:43:08 +0000 Subject: [Lazarus] LCL-fpGUI - SIGSEGV In-Reply-To: <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> References: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> Message-ID: <9e639f16-6d02-2e14-af8f-7443021d8472@geldenhuys.co.uk> On 2018-02-10 09:42, Ondrej Pokorny via Lazarus wrote: > Disable Application.Scaled - fpGUI doesn't support it yet. Is that for multi-DPI aware applications? If so, at least in the fpGUI 'develop' branch there is built-in support for multi-DPI. So LCL-fpGUI might be able to hook into that functionality. 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 From lazarus at kluug.net Sat Feb 10 17:31:32 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 10 Feb 2018 17:31:32 +0100 Subject: [Lazarus] LCL-fpGUI - SIGSEGV In-Reply-To: <9e639f16-6d02-2e14-af8f-7443021d8472@geldenhuys.co.uk> References: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> <9e639f16-6d02-2e14-af8f-7443021d8472@geldenhuys.co.uk> Message-ID: On 10.02.2018 16:43, Graeme Geldenhuys via Lazarus wrote: > On 2018-02-10 09:42, Ondrej Pokorny via Lazarus wrote: >> Disable Application.Scaled - fpGUI doesn't support it yet. > > Is that for multi-DPI aware applications? If so, at least in the fpGUI > 'develop' branch there is built-in support for multi-DPI. So LCL-fpGUI > might be able to hook into that functionality. Yes, sorry. I wasn't exact: LCL-fpGUI doesn't support it yet. The same goes for the develop branch, unfortunately: LCL-fpGUI cannot be compiled with it. What is missing in LCL-fpGUI binding: TMonitor.PixelsPerInch. Ondrej From mailinglists at geldenhuys.co.uk Sat Feb 10 18:51:46 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 10 Feb 2018 17:51:46 +0000 Subject: [Lazarus] LCL-fpGUI - SIGSEGV In-Reply-To: References: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> <9e639f16-6d02-2e14-af8f-7443021d8472@geldenhuys.co.uk> Message-ID: <8040ac8e-529d-4143-3436-fbb048f8a441@geldenhuys.co.uk> On 2018-02-10 16:31, Ondrej Pokorny via Lazarus wrote: > > Yes, sorry. I wasn't exact: LCL-fpGUI doesn't support it yet. The same > goes for the develop branch, unfortunately: LCL-fpGUI cannot be compiled > with it. No worries, just checking if I understood what you meant. > What is missing in LCL-fpGUI binding: TMonitor.PixelsPerInch. In fpGUI, you can grab that information from the global fpgApplication instance. That has been around for years, so both the 'maint' and 'develop' branches have it. function Screen_dpi_x: integer; function Screen_dpi_y: integer; function Screen_dpi: integer; LCL-fpGUI probably only needs the last one. I don't believe non-X11 platforms (eg: Windows) support varying dpi on the x and y axis. 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 From joshyfun at gmail.com Sat Feb 10 20:44:00 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sat, 10 Feb 2018 20:44:00 +0100 Subject: [Lazarus] LCL-fpGUI - SIGSEGV In-Reply-To: <8040ac8e-529d-4143-3436-fbb048f8a441@geldenhuys.co.uk> References: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> <9e639f16-6d02-2e14-af8f-7443021d8472@geldenhuys.co.uk> <8040ac8e-529d-4143-3436-fbb048f8a441@geldenhuys.co.uk> Message-ID: El 10/02/2018 a las 18:51, Graeme Geldenhuys via Lazarus escribió: >     function    Screen_dpi: integer; > LCL-fpGUI probably only needs the last one. I don't believe non-X11 > platforms (eg: Windows) support varying dpi on the x and y axis. Hello, Yes that's the needed value, is the binding which is missing, not detected as I'm not using scaled applications. It will be added in the next LCL-fpGUI update. -- From wv99999 at gmail.com Sat Feb 10 22:36:26 2018 From: wv99999 at gmail.com (Wolf) Date: Sun, 11 Feb 2018 10:36:26 +1300 Subject: [Lazarus] Lazarus Console text In-Reply-To: References: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> Message-ID: <0fc8f285-4df2-61c4-40e3-02599e753114@gmail.com> On 11/02/2018 00:37, Martin Frb via Lazarus wrote: > On 10/02/18 08:10, Wolf via Lazarus wrote: >> What must I do to change font on the Lazarus console - not the >> Kubuntu console - to a monospace font, and how do I change font color >> there? > > You refer to the Console / "Terminal Output" from the menu View > > Debug Windows? correct > > There are currently no settings for this. > > Source code (if you want to create a patch) is in > debugger/pseudoterminaldlg.pp pseudoterminaldlg.pp defines a class TPseudoConsoleDlg, which contains a field Memo1: TMemo Memo1 already contains all the facilities I am looking for, I just need to find the place where to set them. Unless I'm mistaken, this means all I need to know is the variable name under which class TPseudoConsoleDlg is created?? Does anyone know this name / the file in which it is created? Thanks Wolf From zikon770 at gmail.com Sat Feb 10 23:50:18 2018 From: zikon770 at gmail.com (Tom Lisjac) Date: Sat, 10 Feb 2018 15:50:18 -0700 Subject: [Lazarus] ll 1.8.0 compiles fail with "Error while linking" Message-ID: Hi all, Getting "Error while linking" when trying to compile the 1.8.0 ide or any test programs on an old Fedora 19 and fresh installs of Fedora 23 and Centos 6.8. Reviewed some bugs and forum postings, but there doesn't seem to be a fix or workaround available. I'd like to get this working on an RPM based distro, but am wondering if I'd have better luck trying a debian flavor. Any suggestions would be appreciated. Thanks, -Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sat Feb 10 23:55:45 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 10 Feb 2018 23:55:45 +0100 (CET) Subject: [Lazarus] ll 1.8.0 compiles fail with "Error while linking" In-Reply-To: References: Message-ID: On Sat, 10 Feb 2018, Tom Lisjac via Lazarus wrote: > Hi all, > > Getting "Error while linking" when trying to compile the 1.8.0 ide or any > test programs on an old Fedora 19 and fresh installs of Fedora 23 and > Centos 6.8. Reviewed some bugs and forum postings, but there doesn't seem > to be a fix or workaround available. > > I'd like to get this working on an RPM based distro, but am wondering if > I'd have better luck trying a debian flavor. > > Any suggestions would be appreciated. Can you provide more output ? 'Error while linking' is not much to go on. to be able to diagnose, a little more would be good... Michael. From zeljko at holobit.net Sun Feb 11 09:35:57 2018 From: zeljko at holobit.net (zeljko) Date: Sun, 11 Feb 2018 09:35:57 +0100 Subject: [Lazarus] ll 1.8.0 compiles fail with "Error while linking" In-Reply-To: References: Message-ID: On 02/10/2018 11:50 PM, Tom Lisjac via Lazarus wrote: > Hi all, > > Getting "Error while linking" when trying to compile the 1.8.0 ide or > any test programs on an old Fedora 19 and fresh installs of Fedora 23 > and Centos 6.8. Reviewed some bugs and forum postings, but there doesn't > seem to be a fix or workaround available. > > I'd like to get this working on an RPM based distro, but am wondering if > I'd have better luck trying a debian flavor. > > Any suggestions would be appreciated. You're probably missing some devel packages. zeljko From lazarus at mfriebe.de Sun Feb 11 10:06:11 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 11 Feb 2018 10:06:11 +0100 Subject: [Lazarus] Lazarus Console text In-Reply-To: <0fc8f285-4df2-61c4-40e3-02599e753114@gmail.com> References: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> <0fc8f285-4df2-61c4-40e3-02599e753114@gmail.com> Message-ID: On 10/02/18 22:36, Wolf via Lazarus wrote: > > > On 11/02/2018 00:37, Martin Frb via Lazarus wrote: >> >> Source code (if you want to create a patch) is in >> debugger/pseudoterminaldlg.pp > pseudoterminaldlg.pp defines a class TPseudoConsoleDlg, which contains > a field Memo1: TMemo > Memo1 already contains all the facilities I am looking for, I just > need to find the place where to set them. Unless I'm mistaken, this > means all I need to know is the variable name under which class > TPseudoConsoleDlg is created?? > Does anyone know this name / the file in which it is created? > just override Form.Create ? From lazarus at kluug.net Sun Feb 11 10:34:58 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 11 Feb 2018 10:34:58 +0100 Subject: [Lazarus] LCL-fpGUI - SIGSEGV In-Reply-To: <8040ac8e-529d-4143-3436-fbb048f8a441@geldenhuys.co.uk> References: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> <9e639f16-6d02-2e14-af8f-7443021d8472@geldenhuys.co.uk> <8040ac8e-529d-4143-3436-fbb048f8a441@geldenhuys.co.uk> Message-ID: <9ce9ea41-1e8b-68b0-0dcc-dca4b887af92@kluug.net> On 10.02.2018 18:51, Graeme Geldenhuys via Lazarus wrote: > On 2018-02-10 16:31, Ondrej Pokorny via Lazarus wrote: >> What is missing in LCL-fpGUI binding: TMonitor.PixelsPerInch. > > In fpGUI, you can grab that information from the global fpgApplication > instance. That has been around for years, so both the 'maint' and > 'develop' branches have it. > >     function    Screen_dpi_x: integer; >     function    Screen_dpi_y: integer; >     function    Screen_dpi: integer; Does fpGUI support DPI on per-monitor basis? I.e. I have a high-DPI laptop screen and a normal DPI external monitor connected to it - and I work on both of them. > LCL-fpGUI probably only needs the last one. I don't believe non-X11 > platforms (eg: Windows) support varying dpi on the x and y axis. LCL scaling doesn't support varying x/y dpi either. Ondrej From ptrg at freemail.hu Sun Feb 11 10:38:11 2018 From: ptrg at freemail.hu (=?UTF-8?B?UMOpdGVyIEfDoWJvcg==?=) Date: Sun, 11 Feb 2018 10:38:11 +0100 Subject: [Lazarus] ll 1.8.0 compiles fail with "Error while linking" In-Reply-To: References: Message-ID: <11e1e4df-aa65-ecfb-3dd9-48c3e5604323@freemail.hu> 2018-02-11 09:35 keltezéssel, zeljko via Lazarus írta: > On 02/10/2018 11:50 PM, Tom Lisjac via Lazarus wrote: >> Hi all, >> >> Getting "Error while linking" when trying to compile the 1.8.0 ide or >> any test programs on an old Fedora 19 and fresh installs of Fedora 23 >> and Centos 6.8. Reviewed some bugs and forum postings, but there >> doesn't seem to be a fix or workaround available. >> >> I'd like to get this working on an RPM based distro, but am wondering >> if I'd have better luck trying a debian flavor. >> >> Any suggestions would be appreciated. > > You're probably missing some devel packages. > > zeljko I think zeljko is true... however low dispk space and a lot of other issues can result in "Error while linking": You can list dependencies with the following command (in terminal):   readelf -d ~/Projektek/Lazarus-trunk/lazarus | grep NEEDED   objdump -p ~/Projektek/Lazarus-trunk/lazarus | grep NEEDED   ldd ~/Projektek/Lazarus-trunk/lazarus You can list only the missing dependencies with 'grep' command like this:   ldd ~/Projektek/Lazarus-trunk/lazarus | grep "not found" The result of the above command hardly depends on the installed Lazarus components, and may change if you  install or uninstall some of the Lazarus components. -- Péter Gábor ptrg at freemail.hu From nc-gaertnma at netcologne.de Sun Feb 11 11:20:25 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 11 Feb 2018 11:20:25 +0100 Subject: [Lazarus] ll 1.8.0 compiles fail with "Error while linking" In-Reply-To: <11e1e4df-aa65-ecfb-3dd9-48c3e5604323@freemail.hu> References: <11e1e4df-aa65-ecfb-3dd9-48c3e5604323@freemail.hu> Message-ID: <20180211112025.60adc18e@limapholos.matflo.wg> On Sun, 11 Feb 2018 10:38:11 +0100 Péter Gábor via Lazarus wrote: >[...] > >> Getting "Error while linking" when trying to compile the 1.8.0 ide or > >> any test programs on an old Fedora 19 and fresh installs of Fedora 23 Compiling via make or via the IDE? On Fedora the normal IDE needs these rpms: gtk2-devel, glibc-devel, binutils, gdb Have you tried installing the rpms from our website? They were built on Fedora. > >> and Centos 6.8. Reviewed some bugs and forum postings, but there > >> doesn't seem to be a fix or workaround available. > >> > >> I'd like to get this working on an RPM based distro, but am wondering > >> if I'd have better luck trying a debian flavor. > >> > >> Any suggestions would be appreciated. Usually there are more messages than just "Error while linking". Please post them. > > You're probably missing some devel packages. > > > > zeljko > I think zeljko is true... however low dispk space and a lot of other > issues can result in "Error while linking": > > You can list dependencies with the following command (in terminal): > >   readelf -d ~/Projektek/Lazarus-trunk/lazarus | grep NEEDED >   objdump -p ~/Projektek/Lazarus-trunk/lazarus | grep NEEDED >   ldd ~/Projektek/Lazarus-trunk/lazarus When linking the IDE fails there is no lazarus, is there? Instead there should be link.res files. > You can list only the missing dependencies with 'grep' command like this: >   ldd ~/Projektek/Lazarus-trunk/lazarus | grep "not found" > > The result of the above command hardly depends on the installed Lazarus > components, and may change if you  install or uninstall some of the > Lazarus components. Mattias From wv99999 at gmail.com Sun Feb 11 20:47:53 2018 From: wv99999 at gmail.com (Wolf) Date: Mon, 12 Feb 2018 08:47:53 +1300 Subject: [Lazarus] Lazarus Console text In-Reply-To: References: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> <0fc8f285-4df2-61c4-40e3-02599e753114@gmail.com> Message-ID: <37460bca-5f1f-6a46-ddb6-c716c6b90a16@gmail.com> On 11/02/2018 22:06, Martin Frb via Lazarus wrote: > On 10/02/18 22:36, Wolf via Lazarus wrote: >> >> >> On 11/02/2018 00:37, Martin Frb via Lazarus wrote: >>> >>> Source code (if you want to create a patch) is in >>> debugger/pseudoterminaldlg.pp >> pseudoterminaldlg.pp defines a class TPseudoConsoleDlg, which >> contains a field Memo1: TMemo >> Memo1 already contains all the facilities I am looking for, I just >> need to find the place where to set them. Unless I'm mistaken, this >> means all I need to know is the variable name under which class >> TPseudoConsoleDlg is created?? >> Does anyone know this name / the file in which it is created? >> > > just override Form.Create ? > > I had nothing that drastic in mind. If xxx creates class TPseudoConsoleDlg, then I should be able to call xxx from anywhere in my program xxx.Memo1.Font to change the font or xxx.Memo1.Font.Color to change color. But the idea hinges on me knowing xxx, or its address. Wolf From lazarus at mfriebe.de Sun Feb 11 22:26:40 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 11 Feb 2018 22:26:40 +0100 Subject: [Lazarus] Lazarus Console text In-Reply-To: <37460bca-5f1f-6a46-ddb6-c716c6b90a16@gmail.com> References: <3ef2ff90-3f55-6dde-52b4-271da5a0923a@gmail.com> <0fc8f285-4df2-61c4-40e3-02599e753114@gmail.com> <37460bca-5f1f-6a46-ddb6-c716c6b90a16@gmail.com> Message-ID: On 11/02/18 20:47, Wolf via Lazarus wrote: > > > On 11/02/2018 22:06, Martin Frb via Lazarus wrote: >> On 10/02/18 22:36, Wolf via Lazarus wrote: >>> >>> >>> On 11/02/2018 00:37, Martin Frb via Lazarus wrote: >>>> >>>> Source code (if you want to create a patch) is in >>>> debugger/pseudoterminaldlg.pp >>> pseudoterminaldlg.pp defines a class TPseudoConsoleDlg, which >>> contains a field Memo1: TMemo >>> Memo1 already contains all the facilities I am looking for, I just >>> need to find the place where to set them. Unless I'm mistaken, this >>> means all I need to know is the variable name under which class >>> TPseudoConsoleDlg is created?? >>> Does anyone know this name / the file in which it is created? >>> >> >> just override Form.Create ? >> >> > I had nothing that drastic in mind. It is the less drastic option.... If ever it will be officially implemented, it will with very high likelihood be there. > If xxx creates class TPseudoConsoleDlg, then I should be able to call > xxx from anywhere in my program > xxx.Memo1.Font to change the font or xxx.Memo1.Font.Color to change > color. But the idea hinges on me knowing xxx, or its address. As you wish.... ide/debugmanager.pas line 1455 (at least in svn trunk) procedure TDebugManager.ViewDebugDialog this line     CurDialog := TDebuggerDlg(DEBUGDIALOGCLASS[ADialogType].NewInstance); From zikon770 at gmail.com Sun Feb 11 23:36:57 2018 From: zikon770 at gmail.com (Tom Lisjac) Date: Sun, 11 Feb 2018 15:36:57 -0700 Subject: [Lazarus] ll 1.8.0 compiles fail with "Error while linking" In-Reply-To: <20180211112025.60adc18e@limapholos.matflo.wg> References: <11e1e4df-aa65-ecfb-3dd9-48c3e5604323@freemail.hu> <20180211112025.60adc18e@limapholos.matflo.wg> Message-ID: Thanks Zeljke, Péter and Mattias. Plenty of space on all three OS'es and I installed all the dependencies that the rpm's (from sourceforge) required. I've upgraded the Fedora 19 install many times without issues. This is the error after upgrading to 1.8.0 when compiling a blank form or the IDE from the ide: Build IDE: Exit code 512, Errors: 1 [lazarus] Error 1 [idepkg] Error 2 make: *** [idepkg] Error 2 lazarus.pp(161,1) Error: Error while linking It was originally the same on a new Fedora 23, but booted the VM up again today and now see this with a blank form compile: Compile Project, Target: /home/user/tmp/project1: Exit code 256, Errors: 1, Warnings: 2 project1.lpr(20,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure project1.lpr(20,1) Warning: "crtendS.o" not found, this will probably cause a linking failure project1.lpr(20,1) Error: Error while linking A forum search search suggested checking the path in /etc/fpc.cfg: # path to the gcclib #ifdef cpui386 -Fl/usr/lib/gcc/x86_64-redhat-linux/4.8.3/32 #endif #ifdef cpux86_64 -Fl/usr/lib/gcc/x86_64-redhat-linux/4.8.3 #endif Both are correct on Fedora 19 as I can see crtbeginS.o and crtendS.o in those directories, but neither of those entries are present in the /etc/fpc.cfg on Fedora 23, so it's still not clear what the problem is and how to fix it. Thanks, -Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko at holobit.net Mon Feb 12 00:02:08 2018 From: zeljko at holobit.net (zeljko) Date: Mon, 12 Feb 2018 00:02:08 +0100 Subject: [Lazarus] ll 1.8.0 compiles fail with "Error while linking" In-Reply-To: References: <11e1e4df-aa65-ecfb-3dd9-48c3e5604323@freemail.hu> <20180211112025.60adc18e@limapholos.matflo.wg> Message-ID: <5209e43c-5b5a-ddd4-ad09-93264ab29d94@holobit.net> On 11.02.2018 23:36, Tom Lisjac via Lazarus wrote: > > Thanks Zeljke, Péter and Mattias. > > Plenty of space on all three OS'es and I installed all the dependencies > that the rpm's (from sourceforge) required. > > I've upgraded the Fedora 19 install many times without issues. This is > the error after upgrading to 1.8.0 when compiling a blank form or the > IDE from the ide: > > Build IDE: Exit code 512, Errors: 1 > [lazarus] Error 1 > [idepkg] Error 2 > make: *** [idepkg] Error 2 > lazarus.pp(161,1) Error: Error while linking > > It was originally the same on a new Fedora 23, but booted the VM up > again today and now see this with a blank form compile: > > Compile Project, Target: /home/user/tmp/project1: Exit code 256, Errors: > 1, Warnings: 2 > project1.lpr(20,1) Warning: "crtbeginS.o" not found, this will probably > cause a linking failure > project1.lpr(20,1) Warning: "crtendS.o" not found, this will probably > cause a linking failure > project1.lpr(20,1) Error: Error while linking > > A forum search search suggested checking the path in /etc/fpc.cfg: > > # path to the gcclib > #ifdef cpui386 > -Fl/usr/lib/gcc/x86_64-redhat-linux/4.8.3/32 > #endif > #ifdef cpux86_64 > -Fl/usr/lib/gcc/x86_64-redhat-linux/4.8.3 > #endif eg. my current Fedora 26 have /usr/lib/gcc/x86_64-redhat-linux/7 /usr/lib/gcc/x86_64-redhat-linux/7/32 so just change fpc.cfg according to your gcc dir. In any case warning about crtbeginS.o and crtendS.o won't break linking stage, something else is missing. From mailinglists at geldenhuys.co.uk Mon Feb 12 11:33:40 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 12 Feb 2018 10:33:40 +0000 Subject: [Lazarus] LCL-fpGUI - SIGSEGV In-Reply-To: <9ce9ea41-1e8b-68b0-0dcc-dca4b887af92@kluug.net> References: <1ddd2d4f-e3d7-a3fc-9a5b-9eb8dc334285@bgss.hu> <4ea814ba-841c-4284-bf68-6225e8dc4d28@kluug.net> <9e639f16-6d02-2e14-af8f-7443021d8472@geldenhuys.co.uk> <8040ac8e-529d-4143-3436-fbb048f8a441@geldenhuys.co.uk> <9ce9ea41-1e8b-68b0-0dcc-dca4b887af92@kluug.net> Message-ID: <2e726563-0fcf-a58d-0018-585eb0ee8079@geldenhuys.co.uk> On 2018-02-11 09:34, Ondrej Pokorny via Lazarus wrote: > > Does fpGUI support DPI on per-monitor basis? I.e. I have a high-DPI > laptop screen and a normal DPI external monitor connected to it - and I > work on both of them. Last time I tested (granted that was a while back), the fpGUI application detects the DPI of the monitor it is launched on. I can't remember what happens when you drag that application from one monitor to another (where they have varying dpi values). [Nothing related to fpGUI] I do know that Windows 10 is seriously broken in this regard. At least I think it is broken, or the implementation is seriously sh*t. eg: Take an application like Delphi XE3 and launch it on a 140+ dpi monitor. Open a debug window (or any non-docked IDE window). Drag that window to the 96dpi monitor. Boom, you have the over-scaled fuzzy looking window. Even dragging a single window application so that just over 50% of the window appears on the 96dpi monitor, and the same thing happens. Less than 50% overlap, and all is well. WTF Microsoft!!! I've got this issue at work every day. To alleviate the problem slightly, I have to change the "default monitor" to the lower dpi monitor. 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 From parmaja at gmail.com Tue Feb 13 13:05:26 2018 From: parmaja at gmail.com (Zaher Dirkey) Date: Tue, 13 Feb 2018 14:05:26 +0200 Subject: [Lazarus] Can not access www.lazarus-ide.org Message-ID: I think Lazarus site using a service that block some countries, kind of protecting, for me it is acting like most of sites that block my country "Syria" (by not responds after long delay). While www.freepascal.org is work fine for me. Please check your hoster or domain services or dns server to fix this problem. ​Thank you. ​ Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca at wetron.es Tue Feb 13 13:44:33 2018 From: luca at wetron.es (Luca Olivetti) Date: Tue, 13 Feb 2018 13:44:33 +0100 Subject: [Lazarus] Can not access www.lazarus-ide.org In-Reply-To: References: Message-ID: El 13/02/18 a les 13:05, Zaher Dirkey via Lazarus ha escrit: > I think Lazarus site using a service that block some countries, kind of > protecting, for me it is acting like most of sites that block my country > "Syria" (by not responds after long delay). Same problem here: I can access it from work but not from home (both in Spain but with different providers). A traceroute from home shows that packets are blocked after e1-a7.r1.ams0.transip.net (157.97.168.0), connections from work go through the same host, so it must be lazarus-ide.org that's blocking my home ip. It also makes the online package manager unusable from home. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From aaa5500 at ya.ru Tue Feb 13 20:22:56 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Tue, 13 Feb 2018 22:22:56 +0300 Subject: [Lazarus] IDE loose func default param on class completion Message-ID: <5106f9ab-14e2-cf5a-8ca2-6b48dd9029c1@ya.ru> On class completion (ctrl+shift+c?) I'm on method declaration in "implementation". method decl in "interface" has "default" values of params. and this hotkey changes line in "interface" to same as in "impl" and default values - are lost... :-\ eg   TATMarkers = class   public     procedure Add(APosX, APosY: integer;       const ATag: Int64=0;       ALenX: integer=0;       ALenY: integer=0;       APtr: TObject=nil;       AInsertToBegin: boolean=false); -- Regards, Alexey From nc-gaertnma at netcologne.de Tue Feb 13 22:25:19 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 13 Feb 2018 22:25:19 +0100 Subject: [Lazarus] IDE loose func default param on class completion In-Reply-To: <5106f9ab-14e2-cf5a-8ca2-6b48dd9029c1@ya.ru> References: <5106f9ab-14e2-cf5a-8ca2-6b48dd9029c1@ya.ru> Message-ID: <20180213222519.5617be82@limapholos.matflo.wg> On Tue, 13 Feb 2018 22:22:56 +0300 AlexeyT via Lazarus wrote: > On class completion (ctrl+shift+c?) I'm on method declaration in > "implementation". > > method decl in "interface" has "default" values of params. and this > hotkey changes line in "interface" to same as in "impl" and default > values - are lost... :-\ Please create a bug report with a complete example. Mattias From vojtech.cihak at atlas.cz Tue Feb 13 22:26:28 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 13 Feb 2018 22:26:28 +0100 Subject: [Lazarus] =?utf-8?q?IDE_loose_func_default_param_on_class_complet?= =?utf-8?q?ion?= In-Reply-To: 0000000085c600010ff8015c5064 References: 0000000085c600010ff8015c5064 Message-ID: <20180213222628.6DD5A0E0@atlas.cz> I knw it but I always thought it is by design.   V. ______________________________________________________________ > Od: AlexeyT via Lazarus > Komu: Lazarus mailing list > Datum: 13.02.2018 20:22 > Předmět: [Lazarus] IDE loose func default param on class completion > On class completion (ctrl+shift+c?) I'm on method declaration in "implementation". method decl in "interface" has "default" values of params. and this hotkey changes line in "interface" to same as in "impl" and default values - are lost... :-\ eg   TATMarkers = class   public     procedure Add(APosX, APosY: integer;       const ATag: Int64=0;       ALenX: integer=0;       ALenY: integer=0;       APtr: TObject=nil;       AInsertToBegin: boolean=false); -- Regards, Alexey -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc at dommelstein.nl Tue Feb 13 23:20:20 2018 From: marc at dommelstein.nl (Marc Weustink) Date: Tue, 13 Feb 2018 23:20:20 +0100 Subject: [Lazarus] Can not access www.lazarus-ide.org In-Reply-To: References: Message-ID: <8801F770-B39F-4950-B7BB-E82005721478@dommelstein.nl> Nope Lazarus is not blocking ip blocks. Only a few ips in the 2xx.xxx.xxx.xxx range are temporary blocked by fail to ban. Through trans-ip (our hoster) i've received some complaints from Croatia and Italy. I've tried to trace what happened but no success. Can you confirm that it happens for both http and https? If you want to help tracking this issue, please contact me directy Marc On February 13, 2018 1:44:33 PM GMT+01:00, Luca Olivetti via Lazarus wrote: >El 13/02/18 a les 13:05, Zaher Dirkey via Lazarus ha escrit: >> I think Lazarus site using a service that block some countries, kind >of >> protecting, for me it is acting like most of sites that block my >country >> "Syria" (by not responds after long delay). > >Same problem here: I can access it from work but not from home (both in > >Spain but with different providers). >A traceroute from home shows that packets are blocked after >e1-a7.r1.ams0.transip.net (157.97.168.0), connections from work go >through the same host, so it must be lazarus-ide.org that's blocking my > >home ip. > >It also makes the online package manager unusable from home. > >Bye >-- >Luca Olivetti >Wetron Automation Technology http://www.wetron.es/ >Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 >-- >_______________________________________________ >Lazarus mailing list >Lazarus at lists.lazarus-ide.org >https://lists.lazarus-ide.org/listinfo/lazarus From nc-gaertnma at netcologne.de Wed Feb 14 00:45:03 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 14 Feb 2018 00:45:03 +0100 Subject: [Lazarus] IDE loose func default param on class completion In-Reply-To: <20180213222628.6DD5A0E0@atlas.cz> References: <20180213222628.6DD5A0E0@atlas.cz> Message-ID: <20180214004503.148f128f@limapholos.matflo.wg> On Tue, 13 Feb 2018 22:26:28 +0100 Vojtěch Čihák via Lazarus wrote: > I knw it but I always thought it is by design. It should remove default values from implementation, not from interface. Mattias From vojtech.cihak at atlas.cz Wed Feb 14 01:38:23 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Wed, 14 Feb 2018 01:38:23 +0100 Subject: [Lazarus] =?utf-8?q?IDE_loose_func_default_param_on_class_complet?= =?utf-8?q?ion?= In-Reply-To: 0000000085ca0001179c015c505f References: <20180213222628.6DD5A0E0@atlas.cz> 0000000085ca0001179c015c505f Message-ID: <20180214013823.3829C67F@atlas.cz> Thanks, I understand now. So I can confirm with Lazarus 1.9.0 r57291M FPC 3.0.4 x86_64-linux-qt.   V. ______________________________________________________________ > Od: Mattias Gaertner via Lazarus > Komu: lazarus at lists.lazarus-ide.org > Datum: 14.02.2018 00:45 > Předmět: Re: [Lazarus] IDE loose func default param on class completion > On Tue, 13 Feb 2018 22:26:28 +0100 Vojtěch Čihák via Lazarus wrote: > I knw it but I always thought it is by design. It should remove default values from implementation, not from interface. Mattias -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc at dommelstein.nl Wed Feb 14 14:37:40 2018 From: marc at dommelstein.nl (Marc Weustink) Date: Wed, 14 Feb 2018 14:37:40 +0100 Subject: [Lazarus] Can not access www.lazarus-ide.org In-Reply-To: <8801F770-B39F-4950-B7BB-E82005721478@dommelstein.nl> References: <8801F770-B39F-4950-B7BB-E82005721478@dommelstein.nl> Message-ID: <309e3968-80eb-7d8c-c7fb-fd42faed38d1@dommelstein.nl> Hi all, Due to a typo, the netmask of the network adapter was /8 instead of /24 Since Lazarus has IP 37.97.187.115, all 37.x.x.x traffic got routed locally It should work now Marc Marc Weustink via Lazarus wrote: > Nope Lazarus is not blocking ip blocks. > > Only a few ips in the 2xx.xxx.xxx.xxx range are temporary blocked by fail to ban. Through trans-ip (our hoster) i've received some complaints from Croatia and Italy. I've tried to trace what happened but no success. > > Can you confirm that it happens for both http and https? > > If you want to help tracking this issue, please contact me directy > > Marc > > On February 13, 2018 1:44:33 PM GMT+01:00, Luca Olivetti via Lazarus wrote: >> El 13/02/18 a les 13:05, Zaher Dirkey via Lazarus ha escrit: >>> I think Lazarus site using a service that block some countries, kind >> of >>> protecting, for me it is acting like most of sites that block my >> country >>> "Syria" (by not responds after long delay). >> >> Same problem here: I can access it from work but not from home (both in >> >> Spain but with different providers). >> A traceroute from home shows that packets are blocked after >> e1-a7.r1.ams0.transip.net (157.97.168.0), connections from work go >> through the same host, so it must be lazarus-ide.org that's blocking my >> >> home ip. >> >> It also makes the online package manager unusable from home. >> >> Bye >> -- >> Luca Olivetti >> Wetron Automation Technology http://www.wetron.es/ >> Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 >> -- >> _______________________________________________ >> Lazarus mailing list >> Lazarus at lists.lazarus-ide.org >> https://lists.lazarus-ide.org/listinfo/lazarus From luca at wetron.es Thu Feb 15 09:10:59 2018 From: luca at wetron.es (Luca Olivetti) Date: Thu, 15 Feb 2018 09:10:59 +0100 Subject: [Lazarus] ghost selector in form editor Message-ID: I've been seeing this from time immemorial, probably since 0.something, both under windows and linux/gtk/qt (though under linux is much more frequent): when I select an object on the form, sometimes I see a ghost selection (or more than one, see the attached screenshots, first one windows, second one linux/gtk). This is lazarus 1.8.0/fpc 3.0.4 but, as I said, I saw this with every previous lazarus version. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 -------------- next part -------------- A non-text attachment was scrubbed... Name: ghost_lazarus.png Type: image/png Size: 1897 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ghost_lazarus2.png Type: image/png Size: 1503 bytes Desc: not available URL: From parmaja at gmail.com Thu Feb 15 18:02:12 2018 From: parmaja at gmail.com (Zaher Dirkey) Date: Thu, 15 Feb 2018 19:02:12 +0200 Subject: [Lazarus] Can not access www.lazarus-ide.org In-Reply-To: <309e3968-80eb-7d8c-c7fb-fd42faed38d1@dommelstein.nl> References: <8801F770-B39F-4950-B7BB-E82005721478@dommelstein.nl> <309e3968-80eb-7d8c-c7fb-fd42faed38d1@dommelstein.nl> Message-ID: Now it is working, thank you :) On Wed, Feb 14, 2018 at 3:37 PM, Marc Weustink via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Hi all, > > Due to a typo, the netmask of the network adapter was /8 instead of /24 > > Since Lazarus has IP 37.97.187.115, all 37.x.x.x traffic got routed locally > > It should work now > > Marc > > > Marc Weustink via Lazarus wrote: > >> Nope Lazarus is not blocking ip blocks. >> >> Only a few ips in the 2xx.xxx.xxx.xxx range are temporary blocked by fail >> to ban. Through trans-ip (our hoster) i've received some complaints from >> Croatia and Italy. I've tried to trace what happened but no success. >> >> Can you confirm that it happens for both http and https? >> >> If you want to help tracking this issue, please contact me directy >> >> Marc >> >> On February 13, 2018 1:44:33 PM GMT+01:00, Luca Olivetti via Lazarus < >> lazarus at lists.lazarus-ide.org> wrote: >> >>> El 13/02/18 a les 13:05, Zaher Dirkey via Lazarus ha escrit: >>> >>>> I think Lazarus site using a service that block some countries, kind >>>> >>> of >>> >>>> protecting, for me it is acting like most of sites that block my >>>> >>> country >>> >>>> "Syria" (by not responds after long delay). >>>> >>> >>> Same problem here: I can access it from work but not from home (both in >>> >>> Spain but with different providers). >>> A traceroute from home shows that packets are blocked after >>> e1-a7.r1.ams0.transip.net (157.97.168.0), connections from work go >>> through the same host, so it must be lazarus-ide.org that's blocking my >>> >>> home ip. >>> >>> It also makes the online package manager unusable from home. >>> >>> Bye >>> -- >>> Luca Olivetti >>> Wetron Automation Technology http://www.wetron.es/ >>> Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> Lazarus at lists.lazarus-ide.org >>> https://lists.lazarus-ide.org/listinfo/lazarus >>> >> > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -- I am using last revision of Lazarus, FPC 3.0 on Windows8.1 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: From friess at gmx.at Thu Feb 15 19:03:37 2018 From: friess at gmx.at (Andreas =?UTF-8?B?RnJpZcOf?=) Date: Thu, 15 Feb 2018 19:03:37 +0100 Subject: [Lazarus] Nested Components in a Form at runtime In-Reply-To: References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> Message-ID: For testing purposes, i want to create a form at runtime with chained panels - to make it simple. I use this code // Create components ATestForm := TForm.Create(nil); ATestForm.Name:= 'Main'; // Create a Panel ATestPanel := TPanel.Create(ATestForm); ATestPanel.Parent:=ATestForm; ATestPanel.Name:='PanelA'; ATestPanel.Caption:= 'Panel'; // Create in the panel a panel (to see the chain) ATestPanelSub := TPanel.Create(ATestPanel); ATestPanelSub.Parent := ATestPanel; ATestPanelSub.Name:= 'SubPanelA'; ATestPanelSub.Caption:= 'Sub Panel'; but in the ObjectInspector (used at runtime) i see only the PanelA, not the nested ATestPanel. What do i wrong or have misunderstood ? What is the differnt to Lazarus at desdigntime ? When i place there a a Pnale in a Panel it works. Andreas From nc-gaertnma at netcologne.de Thu Feb 15 19:17:01 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Feb 2018 19:17:01 +0100 Subject: [Lazarus] Nested Components in a Form at runtime In-Reply-To: References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> Message-ID: <20180215191701.7c21d6c5@limapholos.matflo.wg> On Thu, 15 Feb 2018 19:03:37 +0100 Andreas Frieß via Lazarus wrote: > For testing purposes, i want to create a form at runtime with chained > panels - to make it simple. > > I use this code > > > // Create components > ATestForm := TForm.Create(nil); > ATestForm.Name:= 'Main'; > // Create a Panel > ATestPanel := TPanel.Create(ATestForm); > ATestPanel.Parent:=ATestForm; > ATestPanel.Name:='PanelA'; > ATestPanel.Caption:= 'Panel'; > // Create in the panel a panel (to see the chain) > ATestPanelSub := TPanel.Create(ATestPanel); Owner must be the form: ATestPanelSub := TPanel.Create(ATestForm); > ATestPanelSub.Parent := ATestPanel; > ATestPanelSub.Name:= 'SubPanelA'; > ATestPanelSub.Caption:= 'Sub Panel'; > > but in the ObjectInspector (used at runtime) i see only the PanelA, not > the nested ATestPanel. What do i wrong or have misunderstood ? Mattias From lazarus at kluug.net Thu Feb 15 22:02:21 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 15 Feb 2018 22:02:21 +0100 Subject: [Lazarus] Nested Components in a Form at runtime In-Reply-To: References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> Message-ID: On 15.02.2018 19:03, Andreas Frieß via Lazarus wrote: > For testing purposes, i want to create a form at runtime with chained > panels - to make it simple. > > I use this code > > > // Create components > ATestForm := TForm.Create(nil); > ATestForm.Name:= 'Main'; > // Create a Panel > ATestPanel := TPanel.Create(ATestForm); > ATestPanel.Parent:=ATestForm; > ATestPanel.Name:='PanelA'; > ATestPanel.Caption:= 'Panel'; > // Create in the panel a panel (to see the chain) > ATestPanelSub := TPanel.Create(ATestPanel); > ATestPanelSub.Parent := ATestPanel; > ATestPanelSub.Name:= 'SubPanelA'; > ATestPanelSub.Caption:= 'Sub Panel'; > > but in the ObjectInspector (used at runtime) i see only the PanelA, not > the nested ATestPanel. What do i wrong or have misunderstood ? > > What is the differnt to Lazarus at desdigntime ? When i place there a a > Pnale in a Panel it works. I didn't know you can use the object inspector to inspect controls/components in runtime. How to enable it? Is this documented somewhere? Ondrej From michael at freepascal.org Thu Feb 15 22:22:33 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 15 Feb 2018 22:22:33 +0100 (CET) Subject: [Lazarus] TMS Web core released - based on pas2js. Message-ID: Hi, Yesterday, TMS Software has released a tech preview of their "TMS Web core" product for Delphi. Now that it's official, I don't need to be secretive about it anymore :) You can read about it on their Blog (2 articles): http://www.tmssoftware.com/site/blog.asp It uses pas2js as the compiler, together with its basic RTL, inside Delphi. This is a commercial product which allows you to design your web page as you would design a Delphi application, using the Delphi form designer. It comes with a full set of widgets (components), based on their FNC components. But they also provide a wrapper around a large set of jQuery components, jqWidgets. The plan is that later on they will release a Lazarus version of their product. Of course, it would be nice if the lazarus community would attempt to make a LCL widgetset using pas2js... I think TMS Software has shown in a convincing manner that pas2js is up to the task... Michael. From nc-gaertnma at netcologne.de Thu Feb 15 22:26:21 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Feb 2018 22:26:21 +0100 Subject: [Lazarus] Nested Components in a Form at runtime In-Reply-To: References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> Message-ID: <20180215222621.406262cc@limapholos.matflo.wg> On Thu, 15 Feb 2018 22:02:21 +0100 Ondrej Pokorny via Lazarus wrote: >[...] > I didn't know you can use the object inspector to inspect > controls/components in runtime. How to enable it? Is this documented > somewhere? examples/objectinspector/ Mattias From friess at gmx.at Fri Feb 16 06:51:51 2018 From: friess at gmx.at (Andreas =?UTF-8?B?RnJpZcOf?=) Date: Fri, 16 Feb 2018 06:51:51 +0100 Subject: [Lazarus] Nested Components in a Form at runtime In-Reply-To: References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> Message-ID: Ondrej Pokorny via Lazarus wrote: > I didn't know you can use the object inspector to inspect > controls/components in runtime. How to enable it? Is this documented > somewhere? > > Ondrej Yes, Lazarus/examples/objectinspetor/ is an example. My tests based on this and mine is here https://github.com/afriess/LazarusBug0032919 because i am searching for a problem of using components with published interfaces, see bug 0032919: Components with published properties of type "interface" does not work, Access violation in IDE My try is to isolate the problem completly, and i found only very basically tests for the ObjectInspetor itself. If there are tests pls correct me. So i want to write code to test this without recompiling and debugging Lazarus itself. Andreas From mschnell at lumino.de Fri Feb 16 10:04:09 2018 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 16 Feb 2018 10:04:09 +0100 Subject: [Lazarus] TMS Web core released - based on pas2js. In-Reply-To: References: Message-ID: <00738ee2-a005-94e7-b869-56ff443e0320@lumino.de> On 15.02.2018 22:22, Michael Van Canneyt via Lazarus wrote: > Yesterday, TMS Software has released a tech preview of their "TMS Web > core" product for Delphi. Great stuff indeed ! -Michael From mlnglsts at bgss.hu Fri Feb 16 18:40:43 2018 From: mlnglsts at bgss.hu (Gabor Boros) Date: Fri, 16 Feb 2018 18:40:43 +0100 Subject: [Lazarus] Form events firing order and count Message-ID: Hi All, I want to know when a form maximized, restored or moved. But completely lost between form's events. See below what I got with the attached example project. For example 1 WindowPosChanged at application start with Linux-Qt and 3 with Windows, with Linux-Qt form maximize and restore give same result but with Windows the result different for maximize and restore, etc. *****Linux-Qt***** *Application start* Resize ChangeBounds WindowPosChanged Move *Form maximize* WindowStateChange Move ChangeBounds WindowPosChanged Resize *Form restore* WindowStateChange Move ChangeBounds WindowPosChanged Resize *After form move* Move *****Windows***** *Application start* Resize ChangeBounds WindowPosChanged Move WindowPosChanged WindowPosChanged *Form maximize* Move ChangeBounds WindowPosChanged Resize WindowStateChange WindowPosChanged *Form restore* ChangeBounds WindowPosChanged Resize WindowStateChange WindowPosChanged *Meanwhile form move* Move WindowPosChanged Move WindowPosChanged . . . Move WindowPosChanged Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: FormEvents.tar.gz Type: application/x-gzip Size: 1743 bytes Desc: not available URL: From wv99999 at gmail.com Fri Feb 16 21:06:39 2018 From: wv99999 at gmail.com (Wolf) Date: Sat, 17 Feb 2018 09:06:39 +1300 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: Message-ID: When I was in the same situation, I modified each procedure / function to read procedure xxx begin {first line} write('procedure xx opened'); ... {last line} writeln('procedure xxx closed'); end; This produced on the console an easy trace of who called whom, and how they were stacked. Wolf On 17/02/2018 06:40, Gabor Boros via Lazarus wrote: > Hi All, > > I want to know when a form maximized, restored or moved. But > completely lost between form's events. See below what I got with the > attached example project. For example 1 WindowPosChanged at > application start with Linux-Qt and 3 with Windows, with Linux-Qt form > maximize and restore give same result but with Windows the result > different for maximize and restore, etc. > > *****Linux-Qt***** > > *Application start* > Resize > ChangeBounds > WindowPosChanged > Move > > *Form maximize* > WindowStateChange > Move > ChangeBounds > WindowPosChanged > Resize > > *Form restore* > WindowStateChange > Move > ChangeBounds > WindowPosChanged > Resize > > *After form move* > Move > > *****Windows***** > > *Application start* > Resize > ChangeBounds > WindowPosChanged > Move > WindowPosChanged > WindowPosChanged > > *Form maximize* > Move > ChangeBounds > WindowPosChanged > Resize > WindowStateChange > WindowPosChanged > > *Form restore* > ChangeBounds > WindowPosChanged > Resize > WindowStateChange > WindowPosChanged > > *Meanwhile form move* > Move > WindowPosChanged > Move > WindowPosChanged > . > . > . > Move > WindowPosChanged > > Gabor > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Fri Feb 16 22:16:56 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Fri, 16 Feb 2018 22:16:56 +0100 Subject: [Lazarus] =?utf-8?q?WARNING=3A_TResourceCacheItem=2EIncreaseRefCo?= =?utf-8?q?unt_1000_TFontHandleCache?= Message-ID: <20180216221656.F773B227@atlas.cz> Hi,   don't you know what does this output mean (in Console In/Output, not in Messages): WARNING: TResourceCacheItem.IncreaseRefCount 1000 TFontHandleCache ?   Thanks,   V. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Fri Feb 16 23:18:56 2018 From: bartjunk64 at gmail.com (Bart) Date: Fri, 16 Feb 2018 23:18:56 +0100 Subject: [Lazarus] WARNING: TResourceCacheItem.IncreaseRefCount 1000 TFontHandleCache In-Reply-To: <20180216221656.F773B227@atlas.cz> References: <20180216221656.F773B227@atlas.cz> Message-ID: On Fri, Feb 16, 2018 at 10:16 PM, Vojtěch Čihák via Lazarus wrote: > don't you know what does this output mean (in Console In/Output, not in > Messages): WARNING: TResourceCacheItem.IncreaseRefCount 1000 > TFontHandleCache ? Sounds quite familiar, see: https://bugs.freepascal.org/view.php?id=30661 Michl solved that one. Bart From friess at gmx.at Sat Feb 17 10:53:48 2018 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Sat, 17 Feb 2018 10:53:48 +0100 Subject: [Lazarus] OI / App crash - components with published interfaces Message-ID: <1e8a1734-3620-a303-7de8-a528274aa80c@gmx.at> I have an appcrash when i use components with interfaces in the published part. See also Bug 32919. I have now simpilied the problem and isolated from Lazarus itself. The component is on https://github.com/afriess/LazarusBug0032919 in OITestBasic, together with the testproject shown here. Somethigs goes wrong , if call free for the Form ( SIGSEGV ). A sencond issue is, i did not see the value of the property ObjectHasInterface in the OI.  But i see the value if i click on the Combobox. My Question: Did i miss something in the definition of the Components ? ------------ definition components --------------- type   // define the Interface   ITestInterface =  interface       function OnlyDummy: integer;     end;   { TIntfComp }   TIntfComp = class(TComponent)   private     FObjectHasInterface: ITestInterface;     function GetObjectHasInterface: ITestInterface;     procedure SetObjectHasInterface(AValue: ITestInterface);   published     property ObjectHasInterface: ITestInterface read GetObjectHasInterface write SetObjectHasInterface;   end;   { TCompHasIntf }   TCompHasIntf = class(TComponent, ITestInterface)   public     function OnlyDummy: integer;   end; --------- test programm ------------     DUT := TObjectInspectorDlg.Create(nil);     DUT.Caption:= 'My ObjectInspector';     // create the PropertyEditorHook (the interface to the properties)     ThePropertyEditorHook:=TPropertyEditorHook.Create(DUT);     DUT.PropertyEditorHook:=ThePropertyEditorHook;     // Create components     ATestForm :=  TForm.Create(nil);     ATestForm.Name:= 'Main';     ATestIntf := TIntfComp.Create(ATestForm);       // This componnets can hold a component with interface     ATestIntf.Name := 'ATestIntf';     ATestHasIntf := TCompHasIntf.Create(ATestForm); // This component has an Interface     ATestHasIntf.Name:= 'ATestHasIntf';     ATestIntf.ObjectHasInterface := ATestHasIntf;     ATestIntf.GetParentComponent;     ThePropertyEditorHook.LookupRoot:=ATestForm;     PerList:=TPersistentSelectionList.Create;     PerList.Add(ATestForm);     DUT.Selection:=PerList;     PerList.Free;     DUT.Show; .......   if DUT <> nil then begin     ATestForm.Free;   // <----- Appcrash     FreeAndNil(DUT);   end; ----------------------- End ------------------ ------------------ Stack ------------------------ #0 fpc_intf_decr_ref at :0 #1 fpc_finalize at :0 #2 ?? at :0 #3 SYSTEM_$$_SETVARIANTMANAGER$TVARIANTMANAGER at :0 #4 ?? at :0 #5 DESTROY(0x3aa8868, 0x0) at include\control.inc:5146 #6 DESTROY(0x3aa8868, 0x0) at include\wincontrol.inc:6626 #7 DESTROY(0x3aa8868, 0x0) at include\customcontrol.inc:40 #8 DESTROY(0x3aa8868, 0x0) at include\scrollingwincontrol.inc:316 #9 DESTROY(0x3aa8868, 0x1) at include\customform.inc:212 #10 SYSTEM$_$TOBJECT_$__$$_FREE at :0 #11 FREEUSEDOBJECTS(0x3ad46f8) at uoitest.pas:161 #12 BUFREECLICK(0x3ad46f8, 0x3ad5878) at uoitest.pas:139 #13 CLICK(0x3ad5878) at include\control.inc:2929 #14 CLICK(0x3ad5878) at include\buttoncontrol.inc:55 #15 CLICK(0x3ad5878) at include\buttons.inc:169 #16 WMDEFAULTCLICKED(0x3ad5878, {MSG = 66567, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}) at include\buttoncontrol.inc:21 #17 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0 #18 ?? at :0 #19 VMT_$STDCTRLS_$$_TBUTTONCONTROL at :0 #20 VMT_$STDCTRLS_$$_TCUSTOMSTATICTEXT$indirect at :0 #21 STDCTRLS$_$TBUTTONCONTROL_$__$$_ISCHECKEDSTORED$$BOOLEAN at :0 #22 WNDPROC(0x3ad5878, {MSG = 66567, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}) at include\wincontrol.inc:5406 #23 DELIVERMESSAGE(0x3ad5878, 0) at lclmessageglue.pas:112 #24 DOWINDOWPROC(0x3b0d780) at win32\win32callback.inc:2534 #25 WINDOWPROC(199064, 273, 22648, 1705918) at win32\win32callback.inc:2696 #26 CUSTOMFORMWNDPROC(199064, 273, 22648, 1705918) at win32\win32wsforms.pp:386 #27 USER32!AddClipboardFormatListener at :0 #28 USER32!EndTask at :0 #29 DEBUGSTART_$WIN32WSFORMS at :0 #30 USER32!EndTask at :0 #31 ?? at :0 #32 USER32!EndTask at :0 #33 DEBUGSTART_$WIN32WSFORMS at :0 #34 USER32!SendMessageW at :0 #35 CreateMappedBitmap at :0 #36 ImageList_GetIconSize at :0 #37 USER32!AddClipboardFormatListener at :0 #38 USER32!EndTask at :0 #39 ImageList_GetIconSize at :0 #40 USER32!EndTask at :0 #41 ?? at :0 #42 USER32!EndTask at :0 #43 ImageList_GetIconSize at :0 #44 USER32!CallWindowProcW at :0 #45 CALLDEFAULTWINDOWPROC(1705918, 514, 0, 1310774) at win32\win32callback.inc:97 #46 DOWINDOWPROC(0x3b0d610) at win32\win32callback.inc:2442 #47 WINDOWPROC(1705918, 514, 0, 1310774) at win32\win32callback.inc:2696 #48 BUTTONWNDPROC(1705918, 514, 0, 1310774) at win32\win32wsstdctrls.pp:1791 #49 USER32!AddClipboardFormatListener at :0 #50 USER32!EndTask at :0 #51 WIN32WSSTDCTRLS$_$TWIN32WSBUTTONCONTROL_$__$$_GETPREFERREDSIZE$TWINCONTROL$LONGINT$LONGINT$BOOLEAN at :0 #52 USER32!EndTask at :0 #53 ?? at :0 #54 USER32!DispatchMessageW at :0 #55 USER32!DispatchMessageW at :0 #56 APPPROCESSMESSAGES(0x3af7fd0) at win32\win32object.inc:407 #57 HANDLEMESSAGE(0x3a98408) at include\application.inc:1276 #58 RUNLOOP(0x3a98408) at include\application.inc:1413 #59 APPRUN(0x3af7fd0, {Proc = {procedure (POINTER)} 0x177ff48, Self = 0x3a98408}) at include\interfacebase.inc:54 #60 RUN(0x3a98408) at include\application.inc:1401 #61 main at GuiOITest.lpr:19 ------------------- End Stack --------------------------- From mailinglists at geldenhuys.co.uk Sat Feb 17 17:26:34 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 17 Feb 2018 16:26:34 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: Message-ID: On 2018-02-16 17:40, Gabor Boros via Lazarus wrote: > I want to know when a form maximized, restored or moved. But completely > lost between form's events. I reported the LCL problem of inconsistent events and order of events between LCL widgetsets (at the time I compared LCL-QT3, LCL-Win32 and LCL-GTK2) some 12 years ago. From your email, it unfortunately seems nothing has changed in that regards. I guess you'll just have to live with it and do lots of testing in your own applications - and devise your own workarounds with {$IFDEF } etc code or field variables FInSomeEventFired: boolean etc. At the time (circa 2006) our application relied heavily on specific event orders and LCL was a nightmare - to the point that we moved to a completely different solution/toolkit. 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 From mlnglsts at bgss.hu Sat Feb 17 17:59:04 2018 From: mlnglsts at bgss.hu (Gabor Boros) Date: Sat, 17 Feb 2018 17:59:04 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: Message-ID: 2018. 02. 17. 17:26 keltezéssel, Graeme Geldenhuys via Lazarus írta: > At the time (circa 2006) our > application relied heavily on specific event orders and LCL was a > nightmare - to the point that we moved to a completely different > solution/toolkit. Is that nightmare exists with LCL-fpGUI also? Gabor From joshyfun at gmail.com Sat Feb 17 19:37:48 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sat, 17 Feb 2018 19:37:48 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: Message-ID: El 17/02/2018 a las 17:59, Gabor Boros via Lazarus escribió: > 2018. 02. 17. 17:26 keltezéssel, Graeme Geldenhuys via Lazarus írta: >> event orders and LCL was a nightmare - to the point that we moved to a >> completely different solution/toolkit. > Is that nightmare exists with LCL-fpGUI also? > Gabor Hello, Probably in LCL-fpGUI the order is not the same or even some events are not fired at all. In pure fpGUI apps I'm not sure about the consistence in the order of events/messages. -- From mailinglists at geldenhuys.co.uk Sun Feb 18 00:52:49 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 17 Feb 2018 23:52:49 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: Message-ID: <07c2b273-8ca4-31ba-5c98-10aaaa47042c@geldenhuys.co.uk> On 2018-02-17 16:59, Gabor Boros via Lazarus wrote: > Is that nightmare exists with LCL-fpGUI also? I can't speak much for LCL-fpGUI, but in "pure fpGUI" I spent probably a year of testing and development making sure the same events fire in the same order under all fpGUI supported platforms. I remember implementing numerous tests one after the other for every widget in the toolkit. So to answer your question.... I'm hoping that effort translates well to LCL-fpGUI too. For pure fpGUI it took a lot of effort to get there, but the end result was well worth the effort. Resulting in very consistent behaviour across all platforms. What a developer would expect from a GUI toolkit. 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 From mailinglists at geldenhuys.co.uk Sun Feb 18 00:59:44 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 17 Feb 2018 23:59:44 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: Message-ID: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> On 2018-02-17 18:37, José Mejuto via Lazarus wrote: >> Is that nightmare exists with LCL-fpGUI also? > > Probably in LCL-fpGUI the order is not the same Now comes the BIG question... Does LCL have a reference implementation? Which LCL widgetset gives the correct behaviour and feature list, that the other LCL widgetsets need to follow or mimic? Until that is answered, I guess it is every LCL widgetset for themselves and the inconsistencies in LCL will continue. And the burden falls on the application developer to try and fix the mess (via workarounds) - per application. 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 From juha.manninen62 at gmail.com Sun Feb 18 01:17:55 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 18 Feb 2018 02:17:55 +0200 Subject: [Lazarus] ghost selector in form editor In-Reply-To: References: Message-ID: On Thu, Feb 15, 2018 at 10:10 AM, Luca Olivetti via Lazarus wrote: > I've been seeing this from time immemorial, probably since 0.something, both > under windows and linux/gtk/qt (though under linux is much more frequent): There is an oldish report: https://bugs.freepascal.org/view.php?id=23741 but I don't remember seeing this problem although I have used many Linux distributions and few Windows versions, too. What can make the difference? Does it happen only with particular forms or with any form? Juha From vojtech.cihak at atlas.cz Sun Feb 18 02:41:37 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sun, 18 Feb 2018 02:41:37 +0100 Subject: [Lazarus] =?utf-8?q?ghost_selector_in_form_editor?= In-Reply-To: 0000000085ce0000ff10015d508c References: 0000000085ce0000ff10015d508c Message-ID: <20180218024137.34A94E40@atlas.cz> Hi,   I can simulate this on Qt in several ways: 1) select two components on different tabs of page control, one of them will be ghost 2) some components can be hidden behind other, it is caused by wrong Z-order, for example TSpeedButton behind enlarged non-transparent TLabel or TStaticText. and probably other ways.   BTW, what control is that "Status no valido!" caption? Isn't it the case no.2?   V.   ______________________________________________________________ > Od: Luca Olivetti via Lazarus > Komu: lazarus at lists.lazarus-ide.org > Datum: 15.02.2018 09:10 > Předmět: [Lazarus] ghost selector in form editor > I've been seeing this from time immemorial, probably since 0.something, both under windows and linux/gtk/qt (though under linux is much more frequent): when I select an object on the form, sometimes I see a ghost selection (or more than one, see the attached screenshots, first one windows, second one linux/gtk). This is lazarus 1.8.0/fpc 3.0.4 but, as I said, I saw this with every previous lazarus version. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007 ---------- -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From donald at ziesig.org Sun Feb 18 04:08:17 2018 From: donald at ziesig.org (Donald Ziesig) Date: Sat, 17 Feb 2018 22:08:17 -0500 Subject: [Lazarus] Compilation aborted! Message-ID: <48b7be8d-b6eb-f4e1-48b4-777e80023889@ziesig.org> Hi Everyone: I am writing a package that currently has one unit file which, in turn, has two inter-related classes. Until just now, the package compiled (some empty methods) with only expected info and warnings.  I just did some minor editing (added 6 contiguous lines) and now I get "FATAL Compilation aborted".  I commented out the newly entered code, but the compilation aborts.  I removed the newly entered code but it still aborts. I ran the IDE from a terminal and it suggested that I look at the State file (.compiled).  I did, but it has nothing of interest. Can anyone suggest what to do next to isolate the problem? Thanks, Don Ziesig From donald at ziesig.org Sun Feb 18 04:19:21 2018 From: donald at ziesig.org (Donald Ziesig) Date: Sat, 17 Feb 2018 22:19:21 -0500 Subject: [Lazarus] Compilation aborted! In-Reply-To: <48b7be8d-b6eb-f4e1-48b4-777e80023889@ziesig.org> References: <48b7be8d-b6eb-f4e1-48b4-777e80023889@ziesig.org> Message-ID: <8522b237-ed7a-8cb6-5936-ff70d5881e2d@ziesig.org> On 02/17/2018 10:08 PM, Donald Ziesig via Lazarus wrote: > Hi Everyone: > > I am writing a package that currently has one unit file which, in > turn, has two inter-related classes. > > Until just now, the package compiled (some empty methods) with only > expected info and warnings.  I just did some minor editing (added 6 > contiguous lines) and now I get "FATAL Compilation aborted".  I > commented out the newly entered code, but the compilation aborts.  I > removed the newly entered code but it still aborts. > > I ran the IDE from a terminal and it suggested that I look at the > State file (.compiled).  I did, but it has nothing of interest. > > Can anyone suggest what to do next to isolate the problem? > > Thanks, > > Don Ziesig > Forgot to add: Linux Mint 18.3, Lazarus 1.8.0 02-09-2018 SVN 57265M, FPC 3.0.4 From donald at ziesig.org Sun Feb 18 04:35:17 2018 From: donald at ziesig.org (Donald Ziesig) Date: Sat, 17 Feb 2018 22:35:17 -0500 Subject: [Lazarus] Compilation aborted! In-Reply-To: <8522b237-ed7a-8cb6-5936-ff70d5881e2d@ziesig.org> References: <48b7be8d-b6eb-f4e1-48b4-777e80023889@ziesig.org> <8522b237-ed7a-8cb6-5936-ff70d5881e2d@ziesig.org> Message-ID: <6ddf0281-77b6-e21a-6457-ff3b2a286ae9@ziesig.org> On 02/17/2018 10:19 PM, Donald Ziesig via Lazarus wrote: > On 02/17/2018 10:08 PM, Donald Ziesig via Lazarus wrote: >> Hi Everyone: >> >> I am writing a package that currently has one unit file which, in >> turn, has two inter-related classes. >> >> Until just now, the package compiled (some empty methods) with only >> expected info and warnings.  I just did some minor editing (added 6 >> contiguous lines) and now I get "FATAL Compilation aborted".  I >> commented out the newly entered code, but the compilation aborts.  I >> removed the newly entered code but it still aborts. >> >> I ran the IDE from a terminal and it suggested that I look at the >> State file (.compiled).  I did, but it has nothing of interest. >> >> Can anyone suggest what to do next to isolate the problem? >> >> Thanks, >> >> Don Ziesig >> > Forgot to add: Linux Mint 18.3, Lazarus 1.8.0 02-09-2018 SVN 57265M, > FPC 3.0.4 > > Isolated it to FPC.  Ran fpc from terminal without IDE.  Got same error (AV).  It is getting late here. I will look at this in the morning. From nc-gaertnma at netcologne.de Sun Feb 18 10:02:30 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 18 Feb 2018 10:02:30 +0100 Subject: [Lazarus] Compilation aborted! In-Reply-To: <6ddf0281-77b6-e21a-6457-ff3b2a286ae9@ziesig.org> References: <48b7be8d-b6eb-f4e1-48b4-777e80023889@ziesig.org> <8522b237-ed7a-8cb6-5936-ff70d5881e2d@ziesig.org> <6ddf0281-77b6-e21a-6457-ff3b2a286ae9@ziesig.org> Message-ID: <20180218100230.74e7ec45@limapholos.matflo.wg> On Sat, 17 Feb 2018 22:35:17 -0500 Donald Ziesig via Lazarus wrote: >[...] > Isolated it to FPC.  Ran fpc from terminal without IDE.  Got same error > (AV).  It is getting late here. I will look at this in the morning. Maybe you got messed up ppu files, or you messed up unit paths. Mattias From luca at wetron.es Sun Feb 18 10:06:39 2018 From: luca at wetron.es (Luca Olivetti) Date: Sun, 18 Feb 2018 10:06:39 +0100 Subject: [Lazarus] ghost selector in form editor In-Reply-To: <20180218024137.34A94E40@atlas.cz> References: <20180218024137.34A94E40@atlas.cz> Message-ID: <44cf0317-4e7e-13c4-2fef-c88c5c630dcd@wetron.es> El 18/02/18 a les 02:41, Vojtěch Čihák via Lazarus ha escrit: > Hi, > > I can simulate this on Qt in several ways: > > 1) select two components on different tabs of page control, one of them > will be ghost That I think it's a different issue (and, IIRC, I saw that too). In this case it's just a plain form. As I said, I seen this for a long, long time. Much more often with linux than with windows. E.g., see the attached screenshot (linux/gtk), I just created a new application and dropped a label on the form. That's all. > > 2) some components can be hidden behind other, it is caused by wrong > Z-order, for example TSpeedButton behind enlarged non-transparent TLabel > or TStaticText. > > and probably other ways. > > BTW, what control is that "Status no valido!" caption? Isn't it the case > no.2? It' just a label Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 -------------- next part -------------- A non-text attachment was scrubbed... Name: ghost_lazarus3.png Type: image/png Size: 2252 bytes Desc: not available URL: From luca at wetron.es Sun Feb 18 10:24:45 2018 From: luca at wetron.es (Luca Olivetti) Date: Sun, 18 Feb 2018 10:24:45 +0100 Subject: [Lazarus] ghost selector in form editor In-Reply-To: References: Message-ID: El 18/02/18 a les 01:17, Juha Manninen via Lazarus ha escrit: > On Thu, Feb 15, 2018 at 10:10 AM, Luca Olivetti via Lazarus > wrote: >> I've been seeing this from time immemorial, probably since 0.something, both >> under windows and linux/gtk/qt (though under linux is much more frequent): > > There is an oldish report: > https://bugs.freepascal.org/view.php?id=23741 > but I don't remember seeing this problem although I have used many > Linux distributions and few Windows versions, too. > What can make the difference? > Does it happen only with particular forms or with any form? I don't know. I'm currently using kubuntu 17.10 and a windows 7 virtual machine, but I've seen it with windows xp and my previous linux distributions (older versions of kubuntu, mageia, mandriva). In any case, I'm not sure the cause it's the same both on windows and linux: in linux it's enough to drop a label on a form, and when I move it the position of the ghost selector diverges from the real one https://www.youtube.com/watch?v=ZteRShCdkDA under windows I need a more complex form and the ghost selector moves in sync with the real one. Notice also how the ghost selector of the string grid is just one point. https://www.youtube.com/watch?v=EY92B46URZ8 Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Sun Feb 18 10:31:14 2018 From: luca at wetron.es (Luca Olivetti) Date: Sun, 18 Feb 2018 10:31:14 +0100 Subject: [Lazarus] ghost selector in form editor In-Reply-To: References: Message-ID: <978cc15b-a243-8457-45f9-4ac44bd6e144@wetron.es> El 18/02/18 a les 10:24, Luca Olivetti via Lazarus ha escrit: > El 18/02/18 a les 01:17, Juha Manninen via Lazarus ha escrit: >> On Thu, Feb 15, 2018 at 10:10 AM, Luca Olivetti via Lazarus >> wrote: >>> I've been seeing this from time immemorial, probably since >>> 0.something, both >>> under windows and linux/gtk/qt (though under linux is much more >>> frequent): >> >> There is an oldish report: >>   https://bugs.freepascal.org/view.php?id=23741 >> but I don't remember seeing this problem although I have used many >> Linux distributions and few Windows versions, too. >> What can make the difference? >> Does it happen only with particular forms or with any form? > > I don't know. I'm currently using kubuntu 17.10 and a windows 7 virtual > machine, but I've seen it with windows xp and my previous linux > distributions (older versions of kubuntu, mageia, mandriva). > In any case, I'm not sure the cause it's the same both on windows and > linux: in linux it's enough to drop a label on a form, and when I move > it the position of the ghost selector diverges from the real one > > https://www.youtube.com/watch?v=ZteRShCdkDA > > under windows I need a more complex form and the ghost selector moves in > sync with the real one. > Notice also how the ghost selector of the string grid is just one point. > > https://www.youtube.com/watch?v=EY92B46URZ8 The plot thickens: while the ghost selector of a label diverges from the real one, the ghost selector of other controls moves in sync: https://www.youtube.com/watch?v=wTAKaYIM8_U Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From lazarus at kluug.net Sun Feb 18 11:09:15 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 18 Feb 2018 11:09:15 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> Message-ID: <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> On 18.02.2018 0:59, Graeme Geldenhuys via Lazarus wrote: > Now comes the BIG question... Does LCL have a reference implementation? Yes, it does. It is Delphi. Ondrej From giuliano.colla at fastwebnet.it Sun Feb 18 11:33:30 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sun, 18 Feb 2018 11:33:30 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> Message-ID: Il 18/02/2018 00:59, Graeme Geldenhuys via Lazarus ha scritto: > Now comes the BIG question... Does LCL have a reference > implementation? Which LCL widgetset gives the correct behaviour and > feature list, that the other LCL widgetsets need to follow or mimic? IMHO that's impossible to achieve. Design is the art of compromise. When you request feature A and feature B which are mutually exclusive, you must decide which one is most important and drop the other. Lazarus since the beginning has chosen (wrongly, IMO, but that's another matter) that the basic feature is *native* look and feel, by making LCL delegate as much as possible to the underlying widgetset. This is incompatible both with *consistent* look and feel, and with *consistent* behaviour. Giuliano From giuliano.colla at fastwebnet.it Sun Feb 18 11:44:19 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sun, 18 Feb 2018 11:44:19 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> Message-ID: <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> Il 18/02/2018 11:09, Ondrej Pokorny via Lazarus ha scritto: > On 18.02.2018 0:59, Graeme Geldenhuys via Lazarus wrote: >> Now comes the BIG question... Does LCL have a reference implementation? > > Yes, it does. It is Delphi. > That's not true, as far as events triggering is concerned. Delphi implementation is to fire each visual change when requested. LCL implementation is to queue all visual changes and to fire all of them at the end. This provides better efficiency but completely disrupts the order in which events are fired. Those lines of code generate two events on Delphi, and just one event on LCL: MyLabel.Color := clRed; MyLabel.Color := clGreen; To achieve the Delphi behavior in Lazarus I should code: MyLabel.Color := clRed; Application:ProcessMessages; MyLabel.Color := clGreen; Giuliano From lazarus at kluug.net Sun Feb 18 11:54:18 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 18 Feb 2018 11:54:18 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> Message-ID: <39ab0265-edd1-2bb7-59b1-58a3d447fb33@kluug.net> On 18.02.2018 11:44, Giuliano Colla wrote: > Il 18/02/2018 11:09, Ondrej Pokorny via Lazarus ha scritto: > >> On 18.02.2018 0:59, Graeme Geldenhuys via Lazarus wrote: >>> Now comes the BIG question... Does LCL have a reference implementation? >> >> Yes, it does. It is Delphi. >> > > That's not true, as far as events triggering is concerned. > Delphi implementation is to fire each visual change when requested. > LCL implementation is to queue all visual changes and to fire all of > them at the end. This provides better efficiency but completely > disrupts the order in which events are fired. > Those lines of code generate two events on Delphi, and just one event > on LCL: > > MyLabel.Color := clRed; > MyLabel.Color := clGreen; What events are generated? Ondrej From m-w-vogel at gmx.de Sun Feb 18 12:05:05 2018 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Sun, 18 Feb 2018 12:05:05 +0100 Subject: [Lazarus] WARNING: TResourceCacheItem.IncreaseRefCount 1000 TFontHandleCache In-Reply-To: <20180216221656.F773B227@atlas.cz> References: <20180216221656.F773B227@atlas.cz> Message-ID: Am 16.02.2018 um 22:16 schrieb Vojtěch Čihák via Lazarus: > > Hi, > > don't you know what does this output mean(in Console In/Output, not in > Messages): WARNING: TResourceCacheItem.IncreaseRefCount 1000 > TFontHandleCache ? > > Thanks, > > V. > Please create a minimal example and report to mantis bugtracker. Michl -------------- next part -------------- An HTML attachment was scrubbed... URL: From friess at gmx.at Sun Feb 18 13:16:36 2018 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Sun, 18 Feb 2018 13:16:36 +0100 Subject: [Lazarus] OI / App crash - components with published interfaces In-Reply-To: <1e8a1734-3620-a303-7de8-a528274aa80c@gmx.at> References: <1e8a1734-3620-a303-7de8-a528274aa80c@gmx.at> Message-ID: <04a8b580-01fe-e1b8-7fbf-46db46da4ee5@gmx.at> Now i have inserted code in the TIntfComp to remove the link to the interface -------------------- destructor TIntfComp.Destroy; begin   FObjectHasInterface := nil;  // <<-- Crahe here now   inherited Destroy; end; -------------------- And now i it crash explicitly  at the line wher i try to 'unlink'. And the Callstack from Lazarus give me some information. The setting to nil, call fpc_intf_assign and  call IUnknown(D)._Release. But this is absolutly unwated (and unexpected) for me here. How can i release the link without calling  fpc_intf_assign. Or what is my mistake of understanding ? Andreas ------------------------------- #0 fpc_intf_assign at :0 #1 DESTROY(0x3868750, 0x1) at intfcomp.pas:76 #2 CLASSES$_$TCOMPONENT_$__$$_DESTROYCOMPONENTS at :0 #3 CLASSES$_$TCOMPONENT_$__$$_DESTROY at :0 #4 ?? at :0 #5 DESTROY(0x3838d38, 0x0) at include\control.inc:5146 #6 DESTROY(0x3838d38, 0x0) at include\wincontrol.inc:6626 #7 DESTROY(0x3838d38, 0x0) at include\customcontrol.inc:40 #8 DESTROY(0x3838d38, 0x0) at include\scrollingwincontrol.inc:316 #9 DESTROY(0x3838d38, 0x1) at include\customform.inc:212 #10 SYSTEM$_$TOBJECT_$__$$_FREE at :0 #11 FREEUSEDOBJECTS(0x38648d8) at uoitest.pas:161 #12 BUFREECLICK(0x38648d8, 0x3865a58) at uoitest.pas:139 --------------------------- Am 17.02.2018 um 10:53 schrieb Andreas Frieß via Lazarus: > I have an appcrash when i use components with interfaces in the > published part. See also Bug 32919. I have now simpilied the problem > and isolated from Lazarus itself. > > The component is on https://github.com/afriess/LazarusBug0032919 in > OITestBasic, together with the testproject shown here. > > Somethigs goes wrong , if call free for the Form ( SIGSEGV ). A > sencond issue is, i did not see the value of the property > ObjectHasInterface in the OI.  But i see the value if i click on the > Combobox. > > My Question: > > Did i miss something in the definition of the Components ? > > ------------ definition components --------------- > > type >   // define the Interface >   ITestInterface =  interface >       function OnlyDummy: integer; >     end; > >   { TIntfComp } >   TIntfComp = class(TComponent) >   private >     FObjectHasInterface: ITestInterface; >     function GetObjectHasInterface: ITestInterface; >     procedure SetObjectHasInterface(AValue: ITestInterface); >   published >     property ObjectHasInterface: ITestInterface read > GetObjectHasInterface write SetObjectHasInterface; >   end; > >   { TCompHasIntf } >   TCompHasIntf = class(TComponent, ITestInterface) >   public >     function OnlyDummy: integer; >   end; > > --------- test programm ------------ > >     DUT := TObjectInspectorDlg.Create(nil); >     DUT.Caption:= 'My ObjectInspector'; > >     // create the PropertyEditorHook (the interface to the properties) >     ThePropertyEditorHook:=TPropertyEditorHook.Create(DUT); >     DUT.PropertyEditorHook:=ThePropertyEditorHook; > >     // Create components >     ATestForm :=  TForm.Create(nil); >     ATestForm.Name:= 'Main'; > >     ATestIntf := TIntfComp.Create(ATestForm);       // This componnets > can hold a component with interface >     ATestIntf.Name := 'ATestIntf'; >     ATestHasIntf := TCompHasIntf.Create(ATestForm); // This component > has an Interface >     ATestHasIntf.Name:= 'ATestHasIntf'; >     ATestIntf.ObjectHasInterface := ATestHasIntf; >     ATestIntf.GetParentComponent; >     ThePropertyEditorHook.LookupRoot:=ATestForm; > >     PerList:=TPersistentSelectionList.Create; >     PerList.Add(ATestForm); >     DUT.Selection:=PerList; >     PerList.Free; > >     DUT.Show; > > ....... > >   if DUT <> nil then begin >     ATestForm.Free;   // <----- Appcrash >     FreeAndNil(DUT); >   end; > ----------------------- End ------------------ > > > ------------------ Stack ------------------------ > > #0 fpc_intf_decr_ref at :0 > #1 fpc_finalize at :0 > #2 ?? at :0 > #3 SYSTEM_$$_SETVARIANTMANAGER$TVARIANTMANAGER at :0 > #4 ?? at :0 > #5 DESTROY(0x3aa8868, 0x0) at include\control.inc:5146 > #6 DESTROY(0x3aa8868, 0x0) at include\wincontrol.inc:6626 > #7 DESTROY(0x3aa8868, 0x0) at include\customcontrol.inc:40 > #8 DESTROY(0x3aa8868, 0x0) at include\scrollingwincontrol.inc:316 > #9 DESTROY(0x3aa8868, 0x1) at include\customform.inc:212 > #10 SYSTEM$_$TOBJECT_$__$$_FREE at :0 > #11 FREEUSEDOBJECTS(0x3ad46f8) at uoitest.pas:161 > #12 BUFREECLICK(0x3ad46f8, 0x3ad5878) at uoitest.pas:139 > #13 CLICK(0x3ad5878) at include\control.inc:2929 > #14 CLICK(0x3ad5878) at include\buttoncontrol.inc:55 > #15 CLICK(0x3ad5878) at include\buttons.inc:169 > #16 WMDEFAULTCLICKED(0x3ad5878, {MSG = 66567, WPARAM = 0, LPARAM = 0, > RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = > 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, > RESULTFILLER = {}}) at include\buttoncontrol.inc:21 > #17 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0 > #18 ?? at :0 > #19 VMT_$STDCTRLS_$$_TBUTTONCONTROL at :0 > #20 VMT_$STDCTRLS_$$_TCUSTOMSTATICTEXT$indirect at :0 > #21 STDCTRLS$_$TBUTTONCONTROL_$__$$_ISCHECKEDSTORED$$BOOLEAN at :0 > #22 WNDPROC(0x3ad5878, {MSG = 66567, WPARAM = 0, LPARAM = 0, RESULT = > 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, > LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, > RESULTFILLER = {}}) at include\wincontrol.inc:5406 > #23 DELIVERMESSAGE(0x3ad5878, 0) at lclmessageglue.pas:112 > #24 DOWINDOWPROC(0x3b0d780) at win32\win32callback.inc:2534 > #25 WINDOWPROC(199064, 273, 22648, 1705918) at > win32\win32callback.inc:2696 > #26 CUSTOMFORMWNDPROC(199064, 273, 22648, 1705918) at > win32\win32wsforms.pp:386 > #27 USER32!AddClipboardFormatListener at :0 > #28 USER32!EndTask at :0 > #29 DEBUGSTART_$WIN32WSFORMS at :0 > #30 USER32!EndTask at :0 > #31 ?? at :0 > #32 USER32!EndTask at :0 > #33 DEBUGSTART_$WIN32WSFORMS at :0 > #34 USER32!SendMessageW at :0 > #35 CreateMappedBitmap at :0 > #36 ImageList_GetIconSize at :0 > #37 USER32!AddClipboardFormatListener at :0 > #38 USER32!EndTask at :0 > #39 ImageList_GetIconSize at :0 > #40 USER32!EndTask at :0 > #41 ?? at :0 > #42 USER32!EndTask at :0 > #43 ImageList_GetIconSize at :0 > #44 USER32!CallWindowProcW at :0 > #45 CALLDEFAULTWINDOWPROC(1705918, 514, 0, 1310774) at > win32\win32callback.inc:97 > #46 DOWINDOWPROC(0x3b0d610) at win32\win32callback.inc:2442 > #47 WINDOWPROC(1705918, 514, 0, 1310774) at win32\win32callback.inc:2696 > #48 BUTTONWNDPROC(1705918, 514, 0, 1310774) at > win32\win32wsstdctrls.pp:1791 > #49 USER32!AddClipboardFormatListener at :0 > #50 USER32!EndTask at :0 > #51 > WIN32WSSTDCTRLS$_$TWIN32WSBUTTONCONTROL_$__$$_GETPREFERREDSIZE$TWINCONTROL$LONGINT$LONGINT$BOOLEAN > at :0 > #52 USER32!EndTask at :0 > #53 ?? at :0 > #54 USER32!DispatchMessageW at :0 > #55 USER32!DispatchMessageW at :0 > #56 APPPROCESSMESSAGES(0x3af7fd0) at win32\win32object.inc:407 > #57 HANDLEMESSAGE(0x3a98408) at include\application.inc:1276 > #58 RUNLOOP(0x3a98408) at include\application.inc:1413 > #59 APPRUN(0x3af7fd0, {Proc = {procedure (POINTER)} 0x177ff48, Self = > 0x3a98408}) at include\interfacebase.inc:54 > #60 RUN(0x3a98408) at include\application.inc:1401 > #61 main at GuiOITest.lpr:19 > ------------------- End Stack --------------------------- > > From joshyfun at gmail.com Sun Feb 18 13:51:34 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sun, 18 Feb 2018 13:51:34 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <07c2b273-8ca4-31ba-5c98-10aaaa47042c@geldenhuys.co.uk> References: <07c2b273-8ca4-31ba-5c98-10aaaa47042c@geldenhuys.co.uk> Message-ID: <67d25453-4dd3-1e14-8f04-04beeb674534@gmail.com> El 18/02/2018 a las 0:52, Graeme Geldenhuys via Lazarus escribió: > On 2018-02-17 16:59, Gabor Boros via Lazarus wrote: > to answer your question.... I'm hoping that effort translates well to > LCL-fpGUI too. Hello, I was talking about LCL-fpGUI with reation to other LCL based platforms. As I do not have a Delphi to verify I'm trying to mimic the win32 platform (easy for me). Anyway I'm not fixing event orders now, there are a lot fo things to do before ;-) -- From luca at wetron.es Sun Feb 18 16:12:17 2018 From: luca at wetron.es (Luca Olivetti) Date: Sun, 18 Feb 2018 16:12:17 +0100 Subject: [Lazarus] ghost selector in form editor In-Reply-To: <978cc15b-a243-8457-45f9-4ac44bd6e144@wetron.es> References: <978cc15b-a243-8457-45f9-4ac44bd6e144@wetron.es> Message-ID: El 18/02/18 a les 10:31, Luca Olivetti via Lazarus ha escrit: > The plot thickens: > > while the ghost selector of a label diverges from the real one, the > ghost selector of other controls moves in sync: > > > https://www.youtube.com/watch?v=wTAKaYIM8_U Meanwhile, I compiled the ide with qt5 and it doesn't show the problem, while with gtk, see the link, ouch!. I only selected the "PLANTA OFICINES" label. https://imgur.com/a/FSt5f Under windows it would "only" show one ghost selector. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From mse00000 at gmail.com Sun Feb 18 16:32:05 2018 From: mse00000 at gmail.com (Martin Schreiber) Date: Sun, 18 Feb 2018 16:32:05 +0100 Subject: [Lazarus] OI / App crash - components with published interfaces In-Reply-To: <04a8b580-01fe-e1b8-7fbf-46db46da4ee5@gmx.at> References: <1e8a1734-3620-a303-7de8-a528274aa80c@gmx.at> <04a8b580-01fe-e1b8-7fbf-46db46da4ee5@gmx.at> Message-ID: <201802181632.05471.mse00000@gmail.com> On Sunday 18 February 2018 13:16:36 Andreas Friec39f via Lazarus wrote: > Now i have inserted code in the TIntfComp to remove the link to the > interface > > -------------------- > > destructor TIntfComp.Destroy; > begin >   FObjectHasInterface := nil;  // <<-- Crahe here now >   inherited Destroy; > end; > -------------------- > > And now i it crash explicitly  at the line wher i try to 'unlink'. And > the Callstack from Lazarus give me some information. The setting to nil, > call fpc_intf_assign and  call IUnknown(D)._Release. But this is > absolutly unwated (and unexpected) for me here. > I did not read the whole thread. If you want to set a COM interface pointer to nil without calling _release() use " pointer(FObjectHasInterface):= nil; " It is very difficult or even impossible in Delphi and FPC to reliable mix reference counted COM interfaces with TComponent/TObject life cycle management. If you need interfaces without reference counting use CORBA interfaces. Never use COM-interface variables if there are TObject.Destroy() calls. It is an undefined "implementation detail" when the interface variable goes out of scope, there is a risk that it goes out of scope and _release() will be called after the according object has been destroyed by a TObject.Destroy() call. Martin From giuliano.colla at fastwebnet.it Sun Feb 18 17:19:47 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sun, 18 Feb 2018 17:19:47 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <39ab0265-edd1-2bb7-59b1-58a3d447fb33@kluug.net> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> <39ab0265-edd1-2bb7-59b1-58a3d447fb33@kluug.net> Message-ID: <95150169-e92a-068e-f9ab-43e1def3559e@fastwebnet.it> Il 18/02/2018 11:54, Ondrej Pokorny ha scritto: > What events are generated? onFormPaint Giuliano From bartjunk64 at gmail.com Sun Feb 18 17:21:10 2018 From: bartjunk64 at gmail.com (Bart) Date: Sun, 18 Feb 2018 17:21:10 +0100 Subject: [Lazarus] ghost selector in form editor In-Reply-To: References: Message-ID: On Sun, Feb 18, 2018 at 1:17 AM, Juha Manninen via Lazarus wrote: > There is an oldish report: > https://bugs.freepascal.org/view.php?id=23741 Or even older: https://bugs.freepascal.org/view.php?id=13062 (But that was on WinMe) Bart From friess at gmx.at Sun Feb 18 18:09:21 2018 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Sun, 18 Feb 2018 18:09:21 +0100 Subject: [Lazarus] OI / App crash - components with published interfaces In-Reply-To: <201802181632.05471.mse00000@gmail.com> References: <1e8a1734-3620-a303-7de8-a528274aa80c@gmx.at> <04a8b580-01fe-e1b8-7fbf-46db46da4ee5@gmx.at> <201802181632.05471.mse00000@gmail.com> Message-ID: THX for the information Martin, i have changed the line and it looks good. Very good. This code is a prototype for me to inhibt unwanted Ref Counter changes. Am 18.02.2018 um 16:32 schrieb Martin Schreiber via Lazarus: > pointer(FObjectHasInterface):= nil; THX Andreas From donald at ziesig.org Sun Feb 18 18:51:49 2018 From: donald at ziesig.org (Donald Ziesig) Date: Sun, 18 Feb 2018 12:51:49 -0500 Subject: [Lazarus] Compilation aborted! In-Reply-To: <20180218100230.74e7ec45@limapholos.matflo.wg> References: <48b7be8d-b6eb-f4e1-48b4-777e80023889@ziesig.org> <8522b237-ed7a-8cb6-5936-ff70d5881e2d@ziesig.org> <6ddf0281-77b6-e21a-6457-ff3b2a286ae9@ziesig.org> <20180218100230.74e7ec45@limapholos.matflo.wg> Message-ID: <496c188d-bcae-84c7-b2e4-c9c1f1145964@ziesig.org> On 02/18/2018 04:02 AM, Mattias Gaertner via Lazarus wrote: > On Sat, 17 Feb 2018 22:35:17 -0500 > Donald Ziesig via Lazarus wrote: > >> [...] >> Isolated it to FPC.  Ran fpc from terminal without IDE.  Got same error >> (AV).  It is getting late here. I will look at this in the morning. > Maybe you got messed up ppu files, or you messed up unit paths. > > Mattias I found the problem!  It is definitely a compiler bug (compiler did NOT report the actual error, all it did was throw an Access Violation). Unfortunately, I had changed one more line than I remembered during the last edit before the failure. That line was (in the type(s) declaration:     TAMBytes = array[0..1] of Byte; I changed it to:   TAMBytes = array[0..High(Integer)] of Byte; Type TAMBytes was used as the return type is several functions. When I commented out ALL of the code that used TAMBytes, the error went away.  Since TAMBytes was the only consistent item in that code, I checked its declaration and remembered the other :-[ change I made. Reverted that to the original version and the compilation succeeded.  Finally changed it to:   TAMBytes = array[0..32767] of Byte; This also compiled successfully, and was big enough that it will handle much bigger arrays than I expected to use. I will create a simplified test case and submit a bug report to Free Pascal. Thanks for putting up with my earlier complaints. Don Ziesig From mailinglists at geldenhuys.co.uk Sun Feb 18 19:06:19 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 18 Feb 2018 18:06:19 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> Message-ID: <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> On 2018-02-18 10:09, Ondrej Pokorny via Lazarus wrote: > Yes, it does. It is Delphi. 1) Not everybody owns a copy of Delphi to compare. Since when is it a good idea to have a Open Source project rely on a Commercial product. 2) FPC seems to target Delphi 7 compatibility - but considering how old Delphi 7 is, that seems to be a ridiculous goal. What Delphi version does the Lazarus project try to mimic? 3) Does that mean LCL-Win32 being the closest to Delphi.... ie: a wrapper around the native Win32 controls. Does that mean LCL-Win32 is the reference implementation for all other LCL widgetsets? 4) Continuing with option (3). Are there any defined tests or test projects that can confirm LCL-Win32 is compatible with Delphi's VCL? I'm talking about events, order of events firing. And then also components and properties of said components. 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 From mailinglists at geldenhuys.co.uk Sun Feb 18 19:08:25 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 18 Feb 2018 18:08:25 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> Message-ID: On 2018-02-18 10:44, Giuliano Colla via Lazarus wrote: > To achieve the Delphi behavior in Lazarus I should code: > > MyLabel.Color := clRed; > Application:ProcessMessages; > MyLabel.Color := clGreen; If that's true, then the above is not Delphi compatible, and thus LCL is back to square one, of simply not being compatible with anything. 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 From florian at freepascal.org Sun Feb 18 19:10:02 2018 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 18 Feb 2018 19:10:02 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> Message-ID: Am 18.02.2018 um 19:06 schrieb Graeme Geldenhuys via Lazarus: > > 2) FPC seems to target Delphi 7 compatibility - What makes you think so? From lazarus at kluug.net Sun Feb 18 19:10:07 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 18 Feb 2018 19:10:07 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> Message-ID: On 18.02.2018 19:08, Graeme Geldenhuys via Lazarus wrote: > On 2018-02-18 10:44, Giuliano Colla via Lazarus wrote: >> To achieve the Delphi behavior in Lazarus I should code: >> >> MyLabel.Color := clRed; >> Application:ProcessMessages; >> MyLabel.Color := clGreen; > > If that's true No, it is not true. Ondrej From mailinglists at geldenhuys.co.uk Sun Feb 18 19:13:35 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 18 Feb 2018 18:13:35 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> Message-ID: <81d6cd75-dc3b-af83-96d5-4f239b6dcc57@geldenhuys.co.uk> On 2018-02-18 18:06, Graeme Geldenhuys via Lazarus wrote: > > 1) Not everybody owns a copy of Delphi to compare. Since when is it a > good idea to have a Open Source project rely on a Commercial product. By that I also mean forcing people to own a copy of Windows and a copy of Delphi just to see if my Linux or FreeBSD Lazarus LCL-GTK2 or LCL-QT4 is working as per the reference implementation. Forcing such requirements is ludicrous. I personally haven't owned a copy of Windows since probably Windows 98 which came with a very old laptop of mine. I believe neither FPC nor Lazarus support pre-Windows2000 any more. 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 From mailinglists at geldenhuys.co.uk Sun Feb 18 19:14:24 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 18 Feb 2018 18:14:24 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> Message-ID: <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> On 2018-02-18 18:10, Florian Klämpfl via Lazarus wrote: > What makes you think so? Michael van Canneyt. 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 From mailinglists at geldenhuys.co.uk Sun Feb 18 19:18:26 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 18 Feb 2018 18:18:26 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> Message-ID: <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> On 2018-02-18 18:14, Graeme Geldenhuys via Lazarus wrote: > On 2018-02-18 18:10, Florian Klämpfl via Lazarus wrote: >> What makes you think so? > > Michael van Canneyt. And quoting the official FPC documentation from the Free Pascal website: "Free Pascal is designed to be, as much as possible, source compatible with Turbo Pascal 7.0 and Delphi 7 (although this goal is not yet attained), ..." https://www.freepascal.org/docs-html/current/user/userse2.html Regards, Graeme From mailinglists at geldenhuys.co.uk Sun Feb 18 19:20:29 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 18 Feb 2018 18:20:29 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: <67d25453-4dd3-1e14-8f04-04beeb674534@gmail.com> References: <07c2b273-8ca4-31ba-5c98-10aaaa47042c@geldenhuys.co.uk> <67d25453-4dd3-1e14-8f04-04beeb674534@gmail.com> Message-ID: <3b515ba4-f244-58c9-53a0-3c8384902e91@geldenhuys.co.uk> On 2018-02-18 12:51, José Mejuto via Lazarus wrote: > Anyway I'm not fixing event orders now, there are a lot fo things to do > before I fully understand that, and agree with your decision. Regards, Graeme From florian at freepascal.org Sun Feb 18 19:28:28 2018 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 18 Feb 2018 19:28:28 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> Message-ID: <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> Am 18.02.2018 um 19:18 schrieb Graeme Geldenhuys via Lazarus: > On 2018-02-18 18:14, Graeme Geldenhuys via Lazarus wrote: >> On 2018-02-18 18:10, Florian Klämpfl via Lazarus wrote: >>> What makes you think so? >> >> Michael van Canneyt. > > > And quoting the official FPC documentation from the Free Pascal website: > > "Free Pascal is designed to be, as much as possible, source compatible with Turbo Pascal 7.0 and > Delphi 7 (although this goal is not yet attained), ..." Does it exclude other versions? No. This list also does not mention ISO or ObjFPC, so it is clear, the two mentioned versions are only examples. Besides this, if you followed fpc development, you should quickly realize that this page is simply outdated: no word on aarch64 which is supported for years as well as jvm and m68k, iOS is not mentioned. You should know also that FPC contains a lot of stuff of newer delphis starting with advanced records, type helpers etc. which is for sure not D7. > > > https://www.freepascal.org/docs-html/current/user/userse2.html From michael at freepascal.org Sun Feb 18 19:34:37 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 18 Feb 2018 19:34:37 +0100 (CET) Subject: [Lazarus] Form events firing order and count In-Reply-To: <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> Message-ID: On Sun, 18 Feb 2018, Florian Klämpfl via Lazarus wrote: > Am 18.02.2018 um 19:18 schrieb Graeme Geldenhuys via Lazarus: >> On 2018-02-18 18:14, Graeme Geldenhuys via Lazarus wrote: >>> On 2018-02-18 18:10, Florian Klämpfl via Lazarus wrote: >>>> What makes you think so? >>> >>> Michael van Canneyt. >> >> >> And quoting the official FPC documentation from the Free Pascal website: >> >> "Free Pascal is designed to be, as much as possible, source compatible with Turbo Pascal 7.0 and >> Delphi 7 (although this goal is not yet attained), ..." > > Does it exclude other versions? No. This list also does not mention ISO or ObjFPC, so it is clear, > the two mentioned versions are only examples. Besides this, if you followed fpc development, you > should quickly realize that this page is simply outdated: no word on aarch64 which is supported for > years as well as jvm and m68k, iOS is not mentioned. You should know also that FPC contains a lot of > stuff of newer delphis starting with advanced records, type helpers etc. which is for sure not D7. I will update this page, it is indeed in dire need of a review. That said, a small look at the language guide will of course convince even the most malicious person that we also aim to be compatible - at the language level - with recent Delphis... Michael. From lazarus at kluug.net Sun Feb 18 19:42:11 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 18 Feb 2018 19:42:11 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <95150169-e92a-068e-f9ab-43e1def3559e@fastwebnet.it> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> <39ab0265-edd1-2bb7-59b1-58a3d447fb33@kluug.net> <95150169-e92a-068e-f9ab-43e1def3559e@fastwebnet.it> Message-ID: <76839017-8121-14f7-25f7-27b0af827450@kluug.net> On 18.02.2018 17:19, Giuliano Colla wrote: > Il 18/02/2018 11:54, Ondrej Pokorny ha scritto: > >> What events are generated? > > onFormPaint Do you mean TForm.OnPaint? --- No, no, no, no. Setting MyLabel.Color and any other visual property does NOT fire any paint event/method/whatever - neither in Delphi nor in Lazarus. Instead a repaint is requested with Invalidate/InvalidateRect that is then handled when the WM_PAINT message is received. I really don't know where you got this information from. Or did I misunderstand you? Ondrej --- PS: A test project: unit Unit1; interface uses   Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,   Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type   TForm1 = class(TForm)     Label1: TLabel;     Button1: TButton;     procedure Button1Click(Sender: TObject);     procedure FormPaint(Sender: TObject);   private     { Private declarations }   public     { Public declarations }   end; var   Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin   Writeln('1');   Label1.Color := clRed;   Writeln('2');   Label1.Color := clGreen;   Writeln('3'); end; procedure TForm1.FormPaint(Sender: TObject); begin   Caption := IntToStr(StrToIntDef(Caption, 0)+1);   Writeln('paint'); end; end. object Form1: TForm1   Left = 0   Top = 0   Caption = 'Form1'   ClientHeight = 561   ClientWidth = 391   Color = clBtnFace   Font.Charset = DEFAULT_CHARSET   Font.Color = clWindowText   Font.Height = -11   Font.Name = 'Tahoma'   Font.Style = []   OldCreateOrder = False   OnPaint = FormPaint   PixelsPerInch = 96   TextHeight = 13   object Label1: TLabel     Left = 80     Top = 112     Width = 31     Height = 13     Caption = 'Label1'   end   object Button1: TButton     Left = 80     Top = 155     Width = 75     Height = 25     Caption = 'Button1'     TabOrder = 0     OnClick = Button1Click   end end From mailinglists at geldenhuys.co.uk Sun Feb 18 19:48:10 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 18 Feb 2018 18:48:10 +0000 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> Message-ID: <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> On 2018-02-18 18:34, Michael Van Canneyt via Lazarus wrote: > That said, a small look at the language guide will of course convince even > the most malicious person that we also aim to be compatible - at the > language level - with recent Delphis... I understood that, I just wasn't sure if that was a "FPC goal" like the statement mentioned the D7 goal. I assumed any features post D7 was just a bonus - thanks to development contributions. Anyway, my original message was more targeted at Lazarus than at FPC. At least the FPC team mentioned some Delphi version (albeit outdated) they aspire to mimic. The Lazarus team don't mention anything - which I consider worse and raises uncertainty. 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 From florian at freepascal.org Sun Feb 18 19:50:17 2018 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 18 Feb 2018 19:50:17 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> Message-ID: <3344ce02-a300-df94-fe76-3a2f3e76102b@freepascal.org> Am 18.02.2018 um 19:48 schrieb Graeme Geldenhuys via Lazarus: > On 2018-02-18 18:34, Michael Van Canneyt via Lazarus wrote: >> That said, a small look at the language guide will of course convince even >> the most malicious person that we also aim to be compatible - at the language level - with recent >> Delphis... > > > I understood that, I just wasn't sure if that was a "FPC goal" like the statement mentioned the D7 The FPC goal is an open source pascal compiler, the supported language flavors depend on contributors. > goal. I assumed any features post D7 was just a bonus - thanks to development contributions. This applies to every feature, even D7 features. From lazarus at kluug.net Sun Feb 18 20:13:16 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 18 Feb 2018 20:13:16 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> Message-ID: <04d4b4ad-feb0-2fd8-48ed-a240bf5ad463@kluug.net> On 18.02.2018 19:06, Graeme Geldenhuys via Lazarus wrote: > On 2018-02-18 10:09, Ondrej Pokorny via Lazarus wrote: >> Yes, it does. It is Delphi. > > 1) Not everybody owns a copy of Delphi to compare. Since when is it a > good idea to have a Open Source project rely on a Commercial product. Come on, AFAIK FPC and Lazarus have aimed to be Delphi compatible from the very beginning. You are much longer a member of the Lazarus community than I am, so you should know better. What do you want to say with this point? Or am I somehow absolutely wrong and FPC/Lazarus are so close to Delphi by accident? > 2) FPC seems to target Delphi 7 compatibility - but considering how > old Delphi 7 is, that seems to be a ridiculous goal. :D OK, MvC and Florian already commented on this. I really don't understand why there is so much false/misleading information in this thread from you. > What Delphi version does the Lazarus project try to mimic? The latest. > 3) Does that mean LCL-Win32 being the closest to Delphi.... ie: a > wrapper around the native Win32 controls. Does that mean LCL-Win32 is > the reference implementation for all other LCL widgetsets? Yes - in a loose way. There are Gtk2 and Qt specific properties in the LCL as well. See the Restricted tab in object inspector. > 4) Continuing with option (3). Are there any defined tests or test > projects that can confirm LCL-Win32 is compatible with Delphi's VCL? > I'm talking about events, order of events firing. And then also > components and properties of said components. I am not aware of any (which doesn't mean they don't exist). Ondrej From lazarus at kluug.net Sun Feb 18 20:35:56 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 18 Feb 2018 20:35:56 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> Message-ID: <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> On 18.02.2018 19:48, Graeme Geldenhuys via Lazarus wrote: > I understood that, I just wasn't sure if that was a "FPC goal" like > the statement mentioned the D7 goal. I assumed any features post D7 > was just a bonus - thanks to development contributions. > > Anyway, my original message was more targeted at Lazarus than at FPC. > At least the FPC team mentioned some Delphi version (albeit outdated) > they aspire to mimic. The Lazarus team don't mention anything - which > I consider worse and raises uncertainty. LOL, what uncertainty does it raise? By not mentioning a specific Delphi version we mean that Lazarus aims to mimic all Delphi features; that means always the latest version - a goal FPC aims as well. The FPC team just forgot to update an outdated page. Ondrej From michael at freepascal.org Sun Feb 18 20:39:01 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 18 Feb 2018 20:39:01 +0100 (CET) Subject: [Lazarus] Form events firing order and count In-Reply-To: <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: On Sun, 18 Feb 2018, Ondrej Pokorny via Lazarus wrote: > On 18.02.2018 19:48, Graeme Geldenhuys via Lazarus wrote: >> I understood that, I just wasn't sure if that was a "FPC goal" like >> the statement mentioned the D7 goal. I assumed any features post D7 >> was just a bonus - thanks to development contributions. >> >> Anyway, my original message was more targeted at Lazarus than at FPC. >> At least the FPC team mentioned some Delphi version (albeit outdated) >> they aspire to mimic. The Lazarus team don't mention anything - which >> I consider worse and raises uncertainty. > > LOL, what uncertainty does it raise? By not mentioning a specific Delphi > version we mean that Lazarus aims to mimic all Delphi features; that > means always the latest version - a goal FPC aims as well. > > The FPC team just forgot to update an outdated page. It's already fixed in SVN :) Michael. From lazarus at kluug.net Sun Feb 18 20:50:01 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 18 Feb 2018 20:50:01 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: <3cbece62-24fb-7042-d578-1237bb51c63f@kluug.net> On 18.02.2018 20:39, Michael Van Canneyt via Lazarus wrote: > On Sun, 18 Feb 2018, Ondrej Pokorny via Lazarus wrote: >> The FPC team just forgot to update an outdated page. > > It's already fixed in SVN :) I expected Graeme to send a patch and help a little bit but you were obviously eager to fix it :) Ondrej From listbox at martoks-place.de Sun Feb 18 23:37:31 2018 From: listbox at martoks-place.de (Martok) Date: Sun, 18 Feb 2018 23:37:31 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: Am 18.02.2018 um 20:39 schrieb Michael Van Canneyt via Lazarus: > It's already fixed in SVN :) FYI: Line 121 contains a double http:// Line 234 is missing a "y" on "necessar_y_". Also, while we're apparently in the off-topic section of this thread, a thought: """ fpc is designed to be, as much as possible, language and source-level compatible with ISO pascal, Mac Pascal, Turbo Pascal 7.0 and most (if not all) versions of Delphi. """ I wonder if you shouldn't leave out the words "source-level compatible", since that is obviously not true. That phrasing implies the same code will do the same thing (if it compiles), but with the amount of intentional differences between fpc and "undocumented internals" of Borland's products that keep popping up, it might be less surprising to people looking to write portable code if the claim wasn't made in the first place. Same goes for LCL, really. -- Regards, Martok Ceterum censeo b32079 esse sanandam. From giuliano.colla at fastwebnet.it Sun Feb 18 23:49:36 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Sun, 18 Feb 2018 23:49:36 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <76839017-8121-14f7-25f7-27b0af827450@kluug.net> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <59a7829e-6d59-e79c-5a32-12149729def7@fastwebnet.it> <39ab0265-edd1-2bb7-59b1-58a3d447fb33@kluug.net> <95150169-e92a-068e-f9ab-43e1def3559e@fastwebnet.it> <76839017-8121-14f7-25f7-27b0af827450@kluug.net> Message-ID: <4f20b972-d8bb-c116-2b53-679c3d545e87@fastwebnet.it> Il 18/02/2018 19:42, Ondrej Pokorny via Lazarus ha scritto: > Do you mean TForm.OnPaint? > Yes, sorry for the typo. Giuliano From giuliano.colla at fastwebnet.it Mon Feb 19 00:03:41 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 19 Feb 2018 00:03:41 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> Message-ID: Il 18/02/2018 19:06, Graeme Geldenhuys via Lazarus ha scritto: > Are there any defined tests or test projects that can confirm > LCL-Win32 is compatible with Delphi's VCL? I'm talking about events, > order of events firing. I hope that nobody will spend time which could be used for constructive purpose to verify Lazarus compliance to *undocumented* Delphi features, subject to change from one release to the next. Giuliano From michael at freepascal.org Mon Feb 19 00:18:38 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 19 Feb 2018 00:18:38 +0100 (CET) Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: On Sun, 18 Feb 2018, Martok via Lazarus wrote: > Am 18.02.2018 um 20:39 schrieb Michael Van Canneyt via Lazarus: >> It's already fixed in SVN :) > FYI: > Line 121 contains a double http:// > Line 234 is missing a "y" on "necessar_y_". > > > Also, while we're apparently in the off-topic section of this thread, a thought: > """ > fpc is designed to be, as much as possible, language and source-level compatible > with ISO pascal, Mac Pascal, Turbo Pascal 7.0 and most (if not all) versions of > Delphi. > """ > I wonder if you shouldn't leave out the words "source-level compatible", since > that is obviously not true. That phrasing implies the same code will do the same > thing (if it compiles), but with the amount of intentional differences between > fpc and "undocumented internals" of Borland's products that keep popping up, it > might be less surprising to people looking to write portable code if the claim > wasn't made in the first place. Same goes for LCL, really. Why is it obviously not true ? It's obviously not true that it is compatible at the binary level. FPC does not produce the same binary code, nor can you use Delphi units. But source code written for Delphi must compile in FPC. That is why I put the sentence there. (in Delphi mode, obviously) Michael. From michael at freepascal.org Mon Feb 19 00:18:38 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 19 Feb 2018 00:18:38 +0100 (CET) Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: On Sun, 18 Feb 2018, Martok via Lazarus wrote: > Am 18.02.2018 um 20:39 schrieb Michael Van Canneyt via Lazarus: >> It's already fixed in SVN :) > FYI: > Line 121 contains a double http:// > Line 234 is missing a "y" on "necessar_y_". > > > Also, while we're apparently in the off-topic section of this thread, a thought: > """ > fpc is designed to be, as much as possible, language and source-level compatible > with ISO pascal, Mac Pascal, Turbo Pascal 7.0 and most (if not all) versions of > Delphi. > """ > I wonder if you shouldn't leave out the words "source-level compatible", since > that is obviously not true. That phrasing implies the same code will do the same > thing (if it compiles), but with the amount of intentional differences between > fpc and "undocumented internals" of Borland's products that keep popping up, it > might be less surprising to people looking to write portable code if the claim > wasn't made in the first place. Same goes for LCL, really. Why is it obviously not true ? It's obviously not true that it is compatible at the binary level. FPC does not produce the same binary code, nor can you use Delphi units. But source code written for Delphi must compile in FPC. That is why I put the sentence there. (in Delphi mode, obviously) Michael. From listbox at martoks-place.de Mon Feb 19 10:28:52 2018 From: listbox at martoks-place.de (Martok) Date: Mon, 19 Feb 2018 10:28:52 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: Am 19.02.2018 um 00:18 schrieb Michael Van Canneyt via Lazarus: > Why is it obviously not true ? It's obviously not true that it is compatible > at the binary level. FPC does not produce the same binary code I'm more talking about the macroscopic perspective. Of course the binary code may be different, but does it have the same concept of what a specific block of source "means"? Or, put differently, > But source code written for Delphi must compile in FPC. Should it also do something *similar*? Just from the things that come up at least twice a year in the time since I started actively following the lists... tempvar allocation and lifetimes (especially with respect to interface refcounting), TBitmap Pixelformat & co, LCL event order, my pet peeve small type memory layout... I get why most of them are/must be different, it's just that code compiles, but stops working. That's kinda the opposite of what the technical definition of "source-code compatible" means. -- Regards, Martok Ceterum censeo b32079 esse sanandam. From pascaldragon at googlemail.com Mon Feb 19 11:10:05 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Mon, 19 Feb 2018 11:10:05 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: Am 19.02.2018 10:29 schrieb "Martok via Lazarus" < lazarus at lists.lazarus-ide.org>: > But source code written for Delphi must compile in FPC. Should it also do something *similar*? As long as the code does not rely on undocumented behavior, yes. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From fpc at microbizz.nl Mon Feb 19 11:35:36 2018 From: fpc at microbizz.nl (Adriaan van Os) Date: Mon, 19 Feb 2018 11:35:36 +0100 Subject: [Lazarus] Gtk2 Message-ID: <5A8AA878.2070303@microbizz.nl> Any suggestions on where to download gtk2 binaries for OS X (e.g. version 2.24) ? Thanks, Adriaan van Os From fpc at microbizz.nl Mon Feb 19 12:22:41 2018 From: fpc at microbizz.nl (Adriaan van Os) Date: Mon, 19 Feb 2018 12:22:41 +0100 Subject: [Lazarus] Gtk2 In-Reply-To: <5A8AA878.2070303@microbizz.nl> References: <5A8AA878.2070303@microbizz.nl> Message-ID: <5A8AB381.3060502@microbizz.nl> Adriaan van Os via Lazarus wrote: > Any suggestions on where to download gtk2 binaries for OS X (e.g. > version 2.24) ? To answer my own question, maybe MacPorts is the best source ? Regards, Adriaan van Os From michael at freepascal.org Mon Feb 19 13:51:16 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 19 Feb 2018 13:51:16 +0100 (CET) Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: On Mon, 19 Feb 2018, Martok via Lazarus wrote: > Am 19.02.2018 um 00:18 schrieb Michael Van Canneyt via Lazarus: >> Why is it obviously not true ? It's obviously not true that it is compatible >> at the binary level. FPC does not produce the same binary code > I'm more talking about the macroscopic perspective. Of course the binary code > may be different, but does it have the same concept of what a specific block of > source "means"? It should. It's obvious that if CloseFile() under the hood actually does nothing, this is not what it 'means'. The examples you give are in a gray zone, where "what it means" is not always so clear. > > Or, put differently, >> But source code written for Delphi must compile in FPC. > Should it also do something *similar*? Do you have examples where it does not ? > > Just from the things that come up at least twice a year in the time since I > started actively following the lists... tempvar allocation and lifetimes > (especially with respect to interface refcounting), TBitmap Pixelformat & co, > LCL event order, my pet peeve small type memory layout... > I get why most of them are/must be different, it's just that code compiles, but > stops working. That's kinda the opposite of what the technical definition of > "source-code compatible" means. Really? Where did you find this definition ? If your code relies on implementation details, it won't always work obviously. But if you spot differences in behaviour, you can notify the devs. There are then 2 options: - They try to fix the behaviour. - They explain why it works differently. And that's all there is to say about it. Michael. From lazarus at kluug.net Mon Feb 19 14:09:32 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 19 Feb 2018 14:09:32 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: On 19.02.2018 13:51, Michael Van Canneyt via Lazarus wrote: > If your code relies on implementation details, it won't always work > obviously. > > But if you spot differences in behaviour, you can notify the devs. > There are > then 2 options: > - They try to fix the behaviour. > - They explain why it works differently. > > And that's all there is to say about it. True words. IMO we can apply the same to LCL events: the order/count is an implementation detail and depends on the underlying widgetset. Ondrej From listbox at martoks-place.de Mon Feb 19 15:14:12 2018 From: listbox at martoks-place.de (Martok) Date: Mon, 19 Feb 2018 15:14:12 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: Am 19.02.2018 um 11:10 schrieb Sven Barth via Lazarus: > As long as the code does not rely on undocumented behavior, yes. And therein lies the issue. Things that worked the same way for >25 years and are mentioned explicitly in numerous secondary literature are considered "undocumented". And whatever is the official documentation anyway - the yellow-{blue,red} books? .hlp? .hxs? Docwiki? And in which translation? Don't get me wrong: I *get* why the choices that were made needed to be made to get cross-platform consistency within fpc. I even agree with most of them. I just think it would be dishonest to pretend they weren't made. That was the entire point of my earlier post. Am 19.02.2018 um 13:51 schrieb Michael Van Canneyt via Lazarus: > Do you have examples where it does not ? I listed some right below. Mind you, none of them are esoteric corner-cases: the Interface stuff is any LINQ-alike ever, PixelFormat means Scanline and blit performance, etc. >> That's kinda the opposite of what the technical definition of >> "source-code compatible" means. > Really? Where did you find this definition ? Wikipedia. They make it about portability of the function of a program across platforms (read: compilers). > And that's all there is to say about it. Indeed it is. Once one internalizes that there is at best accidental compatibility, a lot of pain goes away. Just treat fpc as a completely different language system with some deceptively named syntax modes, and you end up with a pretty great compiler. -- Regards, Martok Ceterum censeo b32079 esse sanandam. From michael at freepascal.org Mon Feb 19 19:47:14 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 19 Feb 2018 19:47:14 +0100 (CET) Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: On Mon, 19 Feb 2018, Martok via Lazarus wrote: > Am 19.02.2018 um 11:10 schrieb Sven Barth via Lazarus: >> As long as the code does not rely on undocumented behavior, yes. > And therein lies the issue. Things that worked the same way for >25 years and > are mentioned explicitly in numerous secondary literature are considered > "undocumented". I will mention 1 case in point. Const parameters. For years, people mistakenly assumed that Const parameters were be passed by reference if they were "big" (records), a behaviour which Delphi exhibited. And 'mentioned explicitly in numberous secundary literature' as you put it so nicely. But not documented. FPC introduced Constref to guarantee a constant was passed by reference (I think IUnknown methods were the first to use this), but otherwise refused to change our view of 'Const'. Then one day, someone on the Delphi team (I believe Allan Bauer?) makes a blog post stating that "Const never implied that big types are passed by reference", and that people should correct their code and use the new [Ref] attribute if they want a const parameter passed by reference. Thus supporting the point of view which we had all along. So, no, we will not promise to conform to undocumented behaviour. And documented behaviour is what the language guide of Delphi states. So unless Delphi _documents_ that MyClass.SomeInterfaceExpression.SomeMethod; is 100% equivalent to Temp:=MyClass.SomeInterfaceExpression; try Temp.SomeMethod; finally Temp:=Nil; end; It remains an implementation detail when the temp is finalized. Which, in FPC, is currently at the end of the procedure. Michael. From doug at moosemail.net Mon Feb 19 20:48:32 2018 From: doug at moosemail.net (DougC) Date: Mon, 19 Feb 2018 14:48:32 -0500 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: <161af9c50d4.b6d2dc4a104641.4576644834549206516@moosemail.net> ---- On Mon, 19 Feb 2018 13:47:14 -0500 Michael Van Canneyt via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- And documented behaviour is what the language guide of Delphi states. Is there such a language guide for the language features introduced in the last 10 years? AFAIK the last one was published around 2002 so this is hardly a good basis. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Mon Feb 19 23:10:21 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 19 Feb 2018 23:10:21 +0100 (CET) Subject: [Lazarus] Form events firing order and count In-Reply-To: <161af9c50d4.b6d2dc4a104641.4576644834549206516@moosemail.net> References: <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> <161af9c50d4.b6d2dc4a104641.4576644834549206516@moosemail.net> Message-ID: On Mon, 19 Feb 2018, DougC via Lazarus wrote: > ---- On Mon, 19 Feb 2018 13:47:14 -0500 Michael Van Canneyt via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- > > And documented behaviour is what the language guide of Delphi states. > > Is there such a language guide for the language features introduced in the last 10 years? > > AFAIK the last one was published around 2002 so this is hardly a good basis. The Delphi help is the only documentation available these days, so what you find in that, this is it... Michael. From sysrpl at gmail.com Tue Feb 20 07:48:55 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 20 Feb 2018 01:48:55 -0500 Subject: [Lazarus] Gtk2 In-Reply-To: <5A8AB381.3060502@microbizz.nl> References: <5A8AA878.2070303@microbizz.nl> <5A8AB381.3060502@microbizz.nl> Message-ID: Maybe homebrew as well. I've heard from most people that brew is better than ports. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rolf.wetjen at mail.de Tue Feb 20 08:40:58 2018 From: rolf.wetjen at mail.de (Rolf Wetjen(rolf.wetjen@mail.de)) Date: Tue, 20 Feb 2018 07:40:58 +0000 Subject: [Lazarus] Strange ComboBox behavior (Windows) Message-ID: Hi Lazarus team, I've two issues with a ComboBox (csDropDown) control in Windows: 1. ComboBox.AutoSelect:=false isn't working. I seems that Windows always selects the whole ComboBox.Text at activation of the control. 2. Changing the ComboBox.Font (.Style, .Size or .Color) overwrites the ComboBox.Text with the first matching item of ComboBox.Items. ComboBox.Style is csDropDown. Look at this code: procedure TForm1.SpeedButtonTestClick (Sender: TObject); begin ComboBox1.Clear; ComboBox1.Items.Add('Item0'); ComboBox1.Items.Add('TestItem1'); ComboBox1.Items.Add('Item2'); ComboBox1.Text:='Test'; if fsBold in ComboBox1.Font.Style then ComboBox1.Font.Style:=ComboBox1.Font.Style-[fsBold] else ComboBox1.Font.Style:=ComboBox1.Font.Style+[fsBold]; end; ComboBox1.Text is set to 'TestItem1'. I'd a good look into customcombobox.inc and win32wsstdctrls.pp (Windows 10 x64, Lazarus 1.9 57316) trying to analyse this without any idea. Meanwhile I think that both issues are MS Windows ones. But I don't have a Linux environment to check it. Maybe someone else can do? Is there any interest in a patch to solve MS Windows issues although the patch would add some windows specific code to stdctrls.pp and customcombobox.inc? I've a solution for the "AutoSelect=false" one and an idea for the second one. Rolf -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmlandmesser at gmx.de Tue Feb 20 09:44:31 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Tue, 20 Feb 2018 09:44:31 +0100 Subject: [Lazarus] Strange screen flickering Lazarus revision > 57000 Message-ID: i have lazarus trunk revision 57333 and observe strange screen flickering with a DBGrid and Oracle Database connection. See Revision 57000 without flickering https://drive.google.com/file/d/1671s-JuIM5z7KkwRU8pbX6Nqt53sDACI/view?usp=sharing ( hope that link is ok ) compare with Revision 57333,  heavy screen flickering https://drive.google.com/file/d/1yZHltOBPt47i6S2jeovGu9W3ScUX8-Zg/view?usp=sharing Info: Lazarus 1.9.0 57333 FPC 3.0.4 i386-win32-win32/win64 Windows XP SP3 No flickering with same app and Windows 2003 !! From juha.manninen62 at gmail.com Tue Feb 20 14:24:33 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 20 Feb 2018 15:24:33 +0200 Subject: [Lazarus] Strange screen flickering Lazarus revision > 57000 In-Reply-To: References: Message-ID: This report is about the same issue: https://bugs.freepascal.org/view.php?id=33198 On Tue, Feb 20, 2018 at 10:44 AM, Landmesser John via Lazarus wrote: > Lazarus 1.9.0 57333 FPC 3.0.4 i386-win32-win32/win64 > Windows XP SP3 > No flickering with same app and Windows 2003 !! Maybe the solution should be specific to LCL-Win32 and Windows version. Juha From jmlandmesser at gmx.de Tue Feb 20 14:56:00 2018 From: jmlandmesser at gmx.de (John Landmesser) Date: Tue, 20 Feb 2018 14:56:00 +0100 Subject: [Lazarus] Strange screen flickering Lazarus revision > 57000 In-Reply-To: References: Message-ID: <99fcb214-ce22-b7a2-ec3c-ed63b485cbb6@gmx.de> the delivered patch in https://bugs.freepascal.org/view.php?id=33198 is: Index: grids.pas =================================================================== --- grids.pas    (revision 57332) +++ grids.pas    (working copy) @@ -9414,6 +9414,8 @@  procedure TCustomGrid.Loaded;  begin    inherited Loaded; +  if not (csDesigning in ComponentState) then +    DoubleBuffered := DoubleBuffered or (GetSystemMetrics(SM_REMOTESESSION)=0); // force DoubleBuffered if not used in remote session    VisualChange;  end; but in Grid.pas Revision 57333 procedure TCustomGrid.Loaded; begin   inherited Loaded;   VisualChange; end; so the patch was never applied?? Am 20.02.2018 um 14:24 schrieb Juha Manninen via Lazarus: > This report is about the same issue: > https://bugs.freepascal.org/view.php?id=33198 > > On Tue, Feb 20, 2018 at 10:44 AM, Landmesser John via Lazarus > wrote: >> Lazarus 1.9.0 57333 FPC 3.0.4 i386-win32-win32/win64 >> Windows XP SP3 >> No flickering with same app and Windows 2003 !! > Maybe the solution should be specific to LCL-Win32 and Windows version. > > Juha From jmlandmesser at gmx.de Tue Feb 20 15:29:56 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Tue, 20 Feb 2018 15:29:56 +0100 Subject: [Lazarus] Strange screen flickering Lazarus revision > 57000 In-Reply-To: <99fcb214-ce22-b7a2-ec3c-ed63b485cbb6@gmx.de> References: <99fcb214-ce22-b7a2-ec3c-ed63b485cbb6@gmx.de> Message-ID: <7c5e80d9-92b2-a302-181e-ab4f6c6b1add@gmx.de> patch applied to my local copy of lcl --> issue is gone !! Am 20.02.2018 um 14:56 schrieb John Landmesser via Lazarus: > the delivered patch in https://bugs.freepascal.org/view.php?id=33198 is: > > Index: grids.pas > =================================================================== > --- grids.pas    (revision 57332) > +++ grids.pas    (working copy) > @@ -9414,6 +9414,8 @@ >  procedure TCustomGrid.Loaded; >  begin >    inherited Loaded; > +  if not (csDesigning in ComponentState) then > +    DoubleBuffered := DoubleBuffered or > (GetSystemMetrics(SM_REMOTESESSION)=0); // force DoubleBuffered if not > used in remote session >    VisualChange; >  end; > > > but in Grid.pas Revision 57333 > > procedure TCustomGrid.Loaded; > begin >   inherited Loaded; >   VisualChange; > end; > > > so the patch was never applied?? > > > Am 20.02.2018 um 14:24 schrieb Juha Manninen via Lazarus: >> This report is about the same issue: >>   https://bugs.freepascal.org/view.php?id=33198 >> >> On Tue, Feb 20, 2018 at 10:44 AM, Landmesser John via Lazarus >> wrote: >>> Lazarus 1.9.0 57333 FPC 3.0.4 i386-win32-win32/win64 >>> Windows XP SP3 >>> No flickering with same app and Windows 2003 !! >> Maybe the solution should be specific to LCL-Win32 and Windows version. >> >> Juha > From lazarus at kluug.net Tue Feb 20 17:45:40 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 20 Feb 2018 17:45:40 +0100 Subject: [Lazarus] Strange ComboBox behavior (Windows) In-Reply-To: References: Message-ID: <6ed2539a-0546-fbf0-7d47-1bf30dec63ca@kluug.net> On 20.02.2018 8:40, Rolf Wetjen(rolf.wetjen--- via Lazarus wrote: > Is there any interest in a patch to solve MS Windows issues although > the patch would add some windows specific code to stdctrls.pp and > customcombobox.inc? I've a solution for the "AutoSelect=false" one and > an idea for the second one. There definitely is interest in fixing bugs. OS/WS/platform-specific code belongs to the widgetset code: win32wsstdctrls.pp and similar. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From listbox at martoks-place.de Wed Feb 21 00:40:10 2018 From: listbox at martoks-place.de (Martok) Date: Wed, 21 Feb 2018 00:40:10 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: > I will mention 1 case in point. Const parameters. > > For years, people mistakenly assumed that Const parameters were > be passed by reference if they were "big" (records), a behaviour which > Delphi exhibited. People actually believed that? When the documentation explicitly stated that var parameters are the *only* byrefs, everything else being passed by value (which technically makes the special case for large objects a bug)? Oh well. One might argue if code is documentation for EOL products - they can't change their minds about Turbo Pascal any more. And with the long standing policy of being source-code compatible all the way back, that should mean something regarding the same language constructs in current versions. But still, Delphi is a moving target, and some things have long branched way past the point where one might aim to be "compatible". Why do I feel we're both arguing the same side here? ;-) --Martok From r030t1 at gmail.com Wed Feb 21 08:44:20 2018 From: r030t1 at gmail.com (R0b0t1) Date: Wed, 21 Feb 2018 01:44:20 -0600 Subject: [Lazarus] Form events firing order and count In-Reply-To: References: <93dbc895-8a0b-cd19-b155-d334a08d10ef@geldenhuys.co.uk> <7e66b3d4-69de-ef19-a721-027b46108d3d@kluug.net> <869ced63-1769-14d8-eca7-97f8c599ae0f@geldenhuys.co.uk> <0746477a-ca41-d35f-d793-84ee3e82613a@geldenhuys.co.uk> <8ac58d7b-f8cb-2cef-65ea-02c5a39f97e7@geldenhuys.co.uk> <92cdb17b-83dc-34c5-7526-f00fe9c743c9@freepascal.org> <2ca97674-63a8-c74e-4b28-deebec129016@geldenhuys.co.uk> <22d7028f-6044-db6b-7715-28b96ffc14a9@kluug.net> Message-ID: On Mon, Feb 19, 2018 at 7:09 AM, Ondrej Pokorny via Lazarus wrote: > True words. IMO we can apply the same to LCL events: the order/count is an > implementation detail and depends on the underlying widgetset. > I agree, and am glad to find this was brought up. On the other hand, I think it would be good to know what is going on in the event loop of the application. There are some inconsistencies in naming and how threading "works" or does not work that I am still baffled by. This is likely not a Lazarus issue, and may be something inherited from Delphi. I think the goal could be aided with a high level document on what is going on, as I've had it explained to me a number of times but am still confused. Cheers, R0b0t1 From tc at epidata.info Wed Feb 21 08:51:23 2018 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Wed, 21 Feb 2018 08:51:23 +0100 Subject: [Lazarus] TAChart cannot compile with fpc 3.0.0 after rev. 57277 Message-ID: Hi all. After rev. 57277 there is a statement (line 536, pos 24) in tachartaxis.pas which uses the overloaded operater "+" for TPoint. I don't think this exist in fpc 3.0.0 and hence trunk no longer compiles. Is this on purpose - ie. is it required to use fpc 3.0.4 to compile trunk or is this a bug? Kind regards, Torsten. From werner.pamler at freenet.de Wed Feb 21 09:19:21 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Wed, 21 Feb 2018 09:19:21 +0100 Subject: [Lazarus] TAChart cannot compile with fpc 3.0.0 after rev. 57277 In-Reply-To: References: Message-ID: <801ccd61-857c-1adc-23db-0ba91011c9f0@freenet.de> Am 21.02.2018 um 08:51 schrieb Torsten Bonde Christiansen via Lazarus: > After rev. 57277 there is a statement (line 536, pos 24) in > tachartaxis.pas which uses the overloaded operater "+" for TPoint. > > I don't think this exist in fpc 3.0.0 and hence trunk no longer > compiles. Is this on purpose - ie. is it required to use fpc 3.0.4 to > compile trunk or is this a bug? No, not on purpose, just cleaning up hints and warning, and there was one about unused unit TAGeometry in TAChartAxis. Should work again. From pbruccoleri at adinet.com.uy Thu Feb 22 01:23:33 2018 From: pbruccoleri at adinet.com.uy (Paola Bruccoleri) Date: Wed, 21 Feb 2018 21:23:33 -0300 Subject: [Lazarus] component for database ADS Message-ID: <886c9334-2ddc-e770-9b73-3d826012c244@adinet.com.uy> Hello everyone In the company where we work, we use the ADS database (advantage database server) version 11.1 I have downloaded version 1.8 of lazarus. Is there any component for that database? I would like to be able to migrate software made in the language harbuour (console mode) to lazarus. A few years ago I used this language but with Firebird and I want to take it up again very thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From giuliano.colla at fastwebnet.it Thu Feb 22 02:09:07 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Thu, 22 Feb 2018 02:09:07 +0100 Subject: [Lazarus] component for database ADS In-Reply-To: <886c9334-2ddc-e770-9b73-3d826012c244@adinet.com.uy> References: <886c9334-2ddc-e770-9b73-3d826012c244@adinet.com.uy> Message-ID: Il 22/02/2018 01:23, Paola Bruccoleri via Lazarus ha scritto: > Hello everyone In the company where we work, we use the ADS database > (advantage database server) version 11.1 I have downloaded version 1.8 > of lazarus. Is there any component for that database? I would like to > be able to migrate software made in the language harbuour (console > mode) to lazarus. > A few years ago I used this language but with Firebird and I want to > take it up again very thanks > > You may find what you need in the Lazarus wiki page: http://wiki.lazarus.freepascal.org/Advantage_Database_Server Happy programming! Giuliano -------------- next part -------------- An HTML attachment was scrubbed... URL: From virgo.parna at mail.ee Thu Feb 22 11:29:34 2018 From: virgo.parna at mail.ee (Virgo =?UTF-8?Q?P=C3=A4rna?=) Date: Thu, 22 Feb 2018 10:29:34 +0000 (UTC) Subject: [Lazarus] Compilation aborted! References: <48b7be8d-b6eb-f4e1-48b4-777e80023889@ziesig.org> <8522b237-ed7a-8cb6-5936-ff70d5881e2d@ziesig.org> <6ddf0281-77b6-e21a-6457-ff3b2a286ae9@ziesig.org> <20180218100230.74e7ec45@limapholos.matflo.wg> <496c188d-bcae-84c7-b2e4-c9c1f1145964@ziesig.org> Message-ID: On Sun, 18 Feb 2018 12:51:49 -0500, Donald Ziesig via Lazarus wrote: > >   TAMBytes = array[0..High(Integer)] of Byte; > Was it 32 bit compiler? Because 2GB - 1 byte array would really be problem with 32 bit programs. But ofcause it should not result in Access Violation. -- Virgo Pärna virgo.parna at mail.ee From luca at wetron.es Thu Feb 22 12:21:57 2018 From: luca at wetron.es (Luca Olivetti) Date: Thu, 22 Feb 2018 12:21:57 +0100 Subject: [Lazarus] Garbage writing to console Message-ID: Lazarus 1.8.0, fpc 3.0.4, windows application (with "win32 gui application unchecked") or console application (using LazUTF8). File encoding utf-8 without bom. writeln('áéí') produces garbage, contrary to what's said in http://wiki.freepascal.org/Unicode_Support_in_Lazarus#Writing_to_console using {$codepage utf8} (or utf-8 with bom) fixes it, but I'm not sure it's recommended to do so: http://wiki.freepascal.org/Unicode_Support_in_Lazarus#String_Literals The strange thing is that: procedure w(const s:string); begin writeln(s); end; w('áéí') also gives the correct output. Why? After all I'm using the same string literal. I suppose there's some underlying automatic conversion going on, but it's very confusing. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From tony.whyman at mccallumwhyman.com Thu Feb 22 13:07:38 2018 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Thu, 22 Feb 2018 12:07:38 +0000 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: Message-ID: 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 1.8.0, fpc 3.0.4, windows application (with "win32 gui > application unchecked") or console application (using LazUTF8). > File encoding utf-8 without bom. > > writeln('áéí') > > produces garbage, contrary to what's said in > http://wiki.freepascal.org/Unicode_Support_in_Lazarus#Writing_to_console > > using {$codepage utf8} (or utf-8 with bom) fixes it, but I'm not sure > it's recommended to do so: > http://wiki.freepascal.org/Unicode_Support_in_Lazarus#String_Literals > > The strange thing is that: > > procedure w(const s:string); > begin >   writeln(s); > end; > > w('áéí') > > > also gives the correct output. > Why? After all I'm using the same string literal. > I suppose there's some underlying automatic conversion going on, but > it's very confusing. > > Bye From luca at wetron.es Thu Feb 22 13:46:14 2018 From: luca at wetron.es (Luca Olivetti) Date: Thu, 22 Feb 2018 13:46:14 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: Message-ID: <154060aa-05c4-a888-a762-08123a9e7b37@wetron.es> El 22/02/18 a les 13:07, Tony Whyman via Lazarus ha escrit: > 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); Same result: garbage with writeln, correct result with w > > See also > https://www.freepascal.org/docs-html/rtl/system/settextcodepage.html > > > On 22/02/18 11:21, Luca Olivetti via Lazarus wrote: >> Lazarus 1.8.0, fpc 3.0.4, windows application (with "win32 gui >> application unchecked") or console application (using LazUTF8). >> File encoding utf-8 without bom. >> >> writeln('áéí') >> >> produces garbage, contrary to what's said in >> http://wiki.freepascal.org/Unicode_Support_in_Lazarus#Writing_to_console >> >> using {$codepage utf8} (or utf-8 with bom) fixes it, but I'm not sure >> it's recommended to do so: >> http://wiki.freepascal.org/Unicode_Support_in_Lazarus#String_Literals >> >> The strange thing is that: >> >> procedure w(const s:string); >> begin >>   writeln(s); >> end; >> >> w('áéí') >> >> >> also gives the correct output. >> Why? After all I'm using the same string literal. >> I suppose there's some underlying automatic conversion going on, but >> it's very confusing. >> >> Bye > -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Thu Feb 22 15:05:06 2018 From: luca at wetron.es (Luca Olivetti) Date: Thu, 22 Feb 2018 15:05:06 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <154060aa-05c4-a888-a762-08123a9e7b37@wetron.es> References: <154060aa-05c4-a888-a762-08123a9e7b37@wetron.es> Message-ID: El 22/02/18 a les 13:46, Luca Olivetti via Lazarus ha escrit: > El 22/02/18 a les 13:07, Tony Whyman via Lazarus ha escrit: >> 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); > > Same result: garbage with writeln, correct result with w Unsurprising since it's already cp_utf8 (according to GetTextCodePage) Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From lazarus at kluug.net Thu Feb 22 22:26:56 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 22 Feb 2018 22:26:56 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: Message-ID: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> On 22.02.2018 12:21, Luca Olivetti via Lazarus wrote: > Lazarus 1.8.0, fpc 3.0.4, windows application (with "win32 gui > application unchecked") or console application (using LazUTF8). > File encoding utf-8 without bom. > > writeln('áéí') > > produces garbage, contrary to what's said in > http://wiki.freepascal.org/Unicode_Support_in_Lazarus#Writing_to_console No, it's not contrary - just the opposite. The problem is that áéí (ANSI 1250 or whatever) have different codes to your console codepage (CP437 or whatever). You should open/edit your program source code in your console codepage - you obviously edit it in ANSI. > The strange thing is that: > > procedure w(const s:string); > begin >   writeln(s); > end; > > w('áéí') > > also gives the correct output. It looks like writeln ignores the codepage for constant strings but checks it for "normal" strings. You should ask on fpc-devel list for details. Ondrej From virgo.parna at mail.ee Fri Feb 23 04:55:20 2018 From: virgo.parna at mail.ee (Virgo =?UTF-8?Q?P=C3=A4rna?=) Date: Fri, 23 Feb 2018 03:55:20 +0000 (UTC) Subject: [Lazarus] Compilation aborted! References: <48b7be8d-b6eb-f4e1-48b4-777e80023889@ziesig.org> <8522b237-ed7a-8cb6-5936-ff70d5881e2d@ziesig.org> <6ddf0281-77b6-e21a-6457-ff3b2a286ae9@ziesig.org> <20180218100230.74e7ec45@limapholos.matflo.wg> <496c188d-bcae-84c7-b2e4-c9c1f1145964@ziesig.org> Message-ID: On Thu, 22 Feb 2018 10:29:34 +0000 (UTC), Virgo Pärna via Lazarus wrote: > On Sun, 18 Feb 2018 12:51:49 -0500, Donald Ziesig via Lazarus wrote: >> >>   TAMBytes = array[0..High(Integer)] of Byte; >> > > Was it 32 bit compiler? Because 2GB - 1 byte array would really > be problem with 32 bit programs. But ofcause it should not result in Access Violation. > Correction: actully 2GB. Forgot 0th byte. -- Virgo Pärna virgo.parna at mail.ee From luca at wetron.es Fri Feb 23 08:36:54 2018 From: luca at wetron.es (Luca Olivetti) Date: Fri, 23 Feb 2018 08:36:54 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> Message-ID: <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> El 22/02/18 a les 22:26, Ondrej Pokorny via Lazarus ha escrit: > On 22.02.2018 12:21, Luca Olivetti via Lazarus wrote: >> Lazarus 1.8.0, fpc 3.0.4, windows application (with "win32 gui >> application unchecked") or console application (using LazUTF8). >> File encoding utf-8 without bom. >> >> writeln('áéí') >> >> produces garbage, contrary to what's said in >> http://wiki.freepascal.org/Unicode_Support_in_Lazarus#Writing_to_console > > No, it's not contrary - just the opposite. The problem is that áéí (ANSI > 1250 or whatever) have different codes to your console codepage (CP437 > or whatever). You should open/edit your program source code in your > console codepage - you obviously edit it in ANSI. Uh? It's utf-8 "When you convert the code to UTF-8, for example by using Lazarus' source editor popup menu item File Settings / Encoding / UTF-8 and clicking on the dialog button "Change file on disk", the ╩ becomes 3 bytes (#226#149#169), so the literal becomes a string. *The procedures write and writeln convert the UTF-8 string to the current console codepage*. So your console program now outputs the '╩' on Windows with any codepage (i.e. not only CP437) and it even works on Linux and Mac OS X." Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From lazarus at kluug.net Fri Feb 23 08:44:23 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 23 Feb 2018 08:44:23 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> Message-ID: <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> OK, sorry. I wrote bullshit. But still, you should ask on fpc-devel list regarding compiler issues - the right people are there. Ondrej From nc-gaertnma at netcologne.de Fri Feb 23 08:46:54 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 23 Feb 2018 08:46:54 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> Message-ID: <20180223084654.683fd909@limapholos.matflo.wg> On Fri, 23 Feb 2018 08:44:23 +0100 Ondrej Pokorny via Lazarus wrote: > OK, sorry. I wrote bullshit. But still, you should ask on fpc-devel list > regarding compiler issues - the right people are there. fpc-devel is about development of the compiler. fpc-pascal is for normal user questions. But this is a Lazarus issue. Mattias From lazarus at kluug.net Fri Feb 23 08:56:55 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 23 Feb 2018 08:56:55 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <20180223084654.683fd909@limapholos.matflo.wg> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> Message-ID: On 23.02.2018 8:46, Mattias Gaertner via Lazarus wrote: > But this is a Lazarus issue. Why? Ondrej From nc-gaertnma at netcologne.de Fri Feb 23 09:23:46 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 23 Feb 2018 09:23:46 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> Message-ID: <20180223092346.7d47a432@limapholos.matflo.wg> On Fri, 23 Feb 2018 08:56:55 +0100 Ondrej Pokorny via Lazarus wrote: > On 23.02.2018 8:46, Mattias Gaertner via Lazarus wrote: > > But this is a Lazarus issue. > > Why? Because the wiki page is unclear. writeln('áéí'); // works only with source codepage UTF-8 s:='áéí'; writeln(s); // works with and without writeln(UTF8ToConsole('áéí')); // works with and without Mattias From lazarus at kluug.net Fri Feb 23 09:29:10 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 23 Feb 2018 09:29:10 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <20180223092346.7d47a432@limapholos.matflo.wg> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> Message-ID: On 23.02.2018 9:23, Mattias Gaertner via Lazarus wrote: > On Fri, 23 Feb 2018 08:56:55 +0100 > Ondrej Pokorny via Lazarus wrote: > >> On 23.02.2018 8:46, Mattias Gaertner via Lazarus wrote: >>> But this is a Lazarus issue. >> Why? > Because the wiki page is unclear. > > writeln('áéí'); // works only with source codepage UTF-8 > > s:='áéí'; > writeln(s); // works with and without > > writeln(UTF8ToConsole('áéí')); // works with and without OK, you mean it's a wiki page issue. I just didn't understand how we could solve it in Lazarus :) Ondrej From r030t1 at gmail.com Fri Feb 23 10:15:56 2018 From: r030t1 at gmail.com (R0b0t1) Date: Fri, 23 Feb 2018 03:15:56 -0600 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> Message-ID: On Fri, Feb 23, 2018 at 2:29 AM, Ondrej Pokorny via Lazarus wrote: > OK, you mean it's a wiki page issue. I just didn't understand how we could > solve it in Lazarus :) > I am interested in this thread because I was under the impression that UTF-8 support in Windows is fundamentally broken and should not be used (it interferes with the C libraries). Not to take the thread offtopic, but can anyone comment on this in practice? Cheers, R0b0t1 From michael at freepascal.org Fri Feb 23 10:25:59 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 23 Feb 2018 10:25:59 +0100 (CET) Subject: [Lazarus] Garbage writing to console In-Reply-To: References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> Message-ID: On Fri, 23 Feb 2018, R0b0t1 via Lazarus wrote: > On Fri, Feb 23, 2018 at 2:29 AM, Ondrej Pokorny via Lazarus > wrote: >> OK, you mean it's a wiki page issue. I just didn't understand how we could >> solve it in Lazarus :) >> > > I am interested in this thread because I was under the impression that > UTF-8 support in Windows is fundamentally broken and should not be > used (it interferes with the C libraries). > > Not to take the thread offtopic, but can anyone comment on this in practice? Where did you get that from ? You can perfectly use UTF8 in FPC code, but when calling a windows API, you should a) convert UTF8 to UTF16 (or WideString). If you use the correct types, the compiler will do it for you most of the time. b) Use the *W variant of a Windows system call. Michael. From fpc at microbizz.nl Fri Feb 23 10:50:50 2018 From: fpc at microbizz.nl (Adriaan van Os) Date: Fri, 23 Feb 2018 10:50:50 +0100 Subject: [Lazarus] Gtk2 In-Reply-To: References: <5A8AA878.2070303@microbizz.nl> <5A8AB381.3060502@microbizz.nl> Message-ID: <5A8FE3FA.6030706@microbizz.nl> Anthony Walter via Lazarus wrote: > Maybe homebrew as well. I've heard from most people that brew is better > than ports. Thanks for the hint. I looked at but they don't even have a list of packages without having to install their software, which requires OS X 10.10. Not for me. The MacPorts install of gtk2 worked for default x86-64 but not for +universal. And MacPorts is quite unflexible when it comes to skipping (unneeded but failing) dependencies. So, I grabbed the binaries from a server by hand. I have a FreePascal GTK applcation now running on OSX. Regards, Adriaan van Os From r030t1 at gmail.com Fri Feb 23 10:55:52 2018 From: r030t1 at gmail.com (R0b0t1) Date: Fri, 23 Feb 2018 03:55:52 -0600 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> Message-ID: On Fri, Feb 23, 2018 at 3:25 AM, Michael Van Canneyt via Lazarus wrote: > > > On Fri, 23 Feb 2018, R0b0t1 via Lazarus wrote: > >> On Fri, Feb 23, 2018 at 2:29 AM, Ondrej Pokorny via Lazarus >> wrote: >>> >>> OK, you mean it's a wiki page issue. I just didn't understand how we >>> could >>> solve it in Lazarus :) >>> >> >> I am interested in this thread because I was under the impression that >> UTF-8 support in Windows is fundamentally broken and should not be >> used (it interferes with the C libraries). >> >> Not to take the thread offtopic, but can anyone comment on this in >> practice? > > > Where did you get that from ? > > You can perfectly use UTF8 in FPC code, but when calling a windows API, you > should a) convert UTF8 to UTF16 (or WideString). If you use the correct > types, > the compiler will do it for you most of the time. > b) Use the *W variant of a Windows system call. > The combination of those is the largest part of why http://utf8everywhere.org/ and many independent developers recommend avoiding Window's implementation of UTF-8. It doesn't end up doing you any good, because you typically can not set the whole system to use UTF-8 (because it is broken). The brokenness (described at https://social.msdn.microsoft.com/Forums/vstudio/en-US/e4b91f49-6f60-4ffe-887a-e18e39250905/possible-bugs-in-writefile-and-crt-unicode-issues?forum=vcgeneral) is due to the UTF-8 codepage causing Windows to report multibyte characters as a single character, and stdio assuming one byte per character. The Chinese/Japanese mappings apparently had these problems as well, but a workaround was added. Cheers, R0b0t1 From luca at wetron.es Fri Feb 23 10:56:11 2018 From: luca at wetron.es (Luca Olivetti) Date: Fri, 23 Feb 2018 10:56:11 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <20180223092346.7d47a432@limapholos.matflo.wg> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> Message-ID: <6a6f0146-5186-1b31-cdd3-03aeb457887e@wetron.es> El 23/02/18 a les 09:23, Mattias Gaertner via Lazarus ha escrit: > On Fri, 23 Feb 2018 08:56:55 +0100 > Ondrej Pokorny via Lazarus wrote: > >> On 23.02.2018 8:46, Mattias Gaertner via Lazarus wrote: >>> But this is a Lazarus issue. >> >> Why? > > Because the wiki page is unclear. > > writeln('áéí'); // works only with source codepage UTF-8 That's not enough, it has to be either utf8 with BOM or with {$codepage utf8} (Which has its own set of problems) > > s:='áéí'; > writeln(s); // works with and without Correct, but I don't understand why > > writeln(UTF8ToConsole('áéí')); // works with and without Yes, that works too. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From nc-gaertnma at netcologne.de Fri Feb 23 11:18:55 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 23 Feb 2018 11:18:55 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <6a6f0146-5186-1b31-cdd3-03aeb457887e@wetron.es> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> <6a6f0146-5186-1b31-cdd3-03aeb457887e@wetron.es> Message-ID: <20180223111855.4dedd194@limapholos.matflo.wg> On Fri, 23 Feb 2018 10:56:11 +0100 Luca Olivetti via Lazarus wrote: > El 23/02/18 a les 09:23, Mattias Gaertner via Lazarus ha escrit: > > On Fri, 23 Feb 2018 08:56:55 +0100 > > Ondrej Pokorny via Lazarus wrote: > > > >> On 23.02.2018 8:46, Mattias Gaertner via Lazarus wrote: > >>> But this is a Lazarus issue. > >> > >> Why? > > > > Because the wiki page is unclear. > > > > writeln('áéí'); // works only with source codepage UTF-8 > > That's not enough, it has to be either utf8 with BOM or with {$codepage > utf8} > (Which has its own set of problems) "source codepage UTF-8" = "utf8 with BOM" = "{$codepage UTF8}" = "-Fcutf8" > > s:='áéí'; > > writeln(s); // works with and without > > Correct, but I don't understand why > > > > > writeln(UTF8ToConsole('áéí')); // works with and without > > Yes, that works too. Write and Writeln are pure compiler magic. Apparently if the string is CP_ACP, it is passed unchanged to Output, ignoring the DefaultSystemCodepage variable. Otherwise it converts the string to the console codepage. This allows to write arbitrary bytes. Maybe some compiler guru can confirm this. Mattias From karl-michael.schindler at web.de Fri Feb 23 11:27:56 2018 From: karl-michael.schindler at web.de (Schindler Karl-Michael) Date: Fri, 23 Feb 2018 11:27:56 +0100 Subject: [Lazarus] Gtk2 In-Reply-To: References: Message-ID: <439A0AE8-14E0-4EF0-BEE2-C4CD079220CA@web.de> Am 23.02.2018 um 10:56 schrieb lazarus-request at lists.lazarus-ide.org: > > Message: 6 > Date: Fri, 23 Feb 2018 10:50:50 +0100 > From: Adriaan van Os > To: Lazarus mailing list > Subject: Re: [Lazarus] Gtk2 > Message-ID: <5A8FE3FA.6030706 at microbizz.nl> > > Anthony Walter via Lazarus wrote: >> Maybe homebrew as well. I've heard from most people that brew is better >> than ports. > > Thanks for the hint. I looked at but they don't even have a list of packages > without having to install their software, which requires OS X 10.10. Not for me. > > The MacPorts install of gtk2 worked for default x86-64 but not for +universal. And MacPorts is > quite unflexible when it comes to skipping (unneeded but failing) dependencies. So, I grabbed the > binaries from a server by hand. I have a FreePascal GTK applcation now running on OSX. > > Regards, > > Adriaan van Os How about fink? If sources and prerequisites are available, I could have a go at a package description. I did so successfully for lazarus-gkt2. Michael aka MiSchi. From lazarus at kluug.net Fri Feb 23 11:31:40 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 23 Feb 2018 11:31:40 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <20180223111855.4dedd194@limapholos.matflo.wg> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> <6a6f0146-5186-1b31-cdd3-03aeb457887e@wetron.es> <20180223111855.4dedd194@limapholos.matflo.wg> Message-ID: <3d7c310d-df33-ac2e-d3dc-9a47af3958b0@kluug.net> On 23.02.2018 11:18, Mattias Gaertner via Lazarus wrote: > Write and Writeln are pure compiler magic. > Apparently if the string is CP_ACP, it is passed unchanged to Output, > ignoring the DefaultSystemCodepage variable. Otherwise it converts the > string to the console codepage. This allows to write arbitrary bytes. > Maybe some compiler guru can confirm this. Compiler gurus are reading fpc-devel :) On 22.02.2018 22:26, Ondrej Pokorny via Lazarus wrote: > It looks like writeln ignores the codepage for constant strings but checks it for "normal" strings. You should ask on fpc-devel list for details. Ondrej From nc-gaertnma at netcologne.de Fri Feb 23 11:46:20 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 23 Feb 2018 11:46:20 +0100 Subject: [Lazarus] Garbage writing to console In-Reply-To: <20180223111855.4dedd194@limapholos.matflo.wg> References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> <6a6f0146-5186-1b31-cdd3-03aeb457887e@wetron.es> <20180223111855.4dedd194@limapholos.matflo.wg> Message-ID: <20180223114620.12b470ea@limapholos.matflo.wg> On Fri, 23 Feb 2018 11:18:55 +0100 Mattias Gaertner via Lazarus wrote: >[...] > Write and Writeln are pure compiler magic. > Apparently if the string is CP_ACP, it is passed unchanged to Output, > ignoring the DefaultSystemCodepage variable. I correct myself. ;) My example of write(s) showed that CP_ACP string is converted to console codepage. Passing a string literal to writeln works differently. It is passed unchanged to Output, ignoring the DefaultSystemCodepage variable. Mattias From fpc at microbizz.nl Fri Feb 23 18:06:59 2018 From: fpc at microbizz.nl (Adriaan van Os) Date: Fri, 23 Feb 2018 18:06:59 +0100 Subject: [Lazarus] Gtk2 In-Reply-To: <439A0AE8-14E0-4EF0-BEE2-C4CD079220CA@web.de> References: <439A0AE8-14E0-4EF0-BEE2-C4CD079220CA@web.de> Message-ID: <5A904A33.6010303@microbizz.nl> Schindler Karl-Michael via Lazarus wrote: > How about fink? If sources and prerequisites are available, I could have a go at a package description. I did so successfully for lazarus-gkt2. Not quite sure what you mean. There are some fink gtk packages, they seem to be based on gtk2.18 rather than 2.24 ? e.g. . The binary distributions don't look to be complete. Regards, Adriaan van Os From juha.manninen62 at gmail.com Sat Feb 24 12:17:38 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 24 Feb 2018 13:17:38 +0200 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> Message-ID: On Fri, Feb 23, 2018 at 11:15 AM, R0b0t1 via Lazarus wrote: > Not to take the thread offtopic, ... You took it offtopic anyway. UTF-8 works just fine. Please read this page : http://wiki.freepascal.org/Unicode_Support_in_Lazarus and start a new thread if you did not understand something. Juha From karl-michael.schindler at web.de Sat Feb 24 13:08:12 2018 From: karl-michael.schindler at web.de (Schindler Karl-Michael) Date: Sat, 24 Feb 2018 13:08:12 +0100 Subject: [Lazarus] Gtk2 In-Reply-To: References: Message-ID: Hi > Date: Fri, 23 Feb 2018 18:06:59 +0100 > From: Adriaan van Os > To: Lazarus mailing list > Subject: Re: [Lazarus] Gtk2 > Message-ID: <5A904A33.6010303 at microbizz.nl> > Content-Type: text/plain; charset=ISO-8859-15; format=flowed > > Schindler Karl-Michael via Lazarus wrote: >> How about fink? If sources and prerequisites are available, I could have a go at a package description. I did so successfully for lazarus-gkt2. > > Not quite sure what you mean. There are some fink gtk packages, they seem to be based on gtk2.18 > rather than 2.24 ? e.g. > . The binary > distributions don't look to be complete. > > Regards, > > Adriaan van Os You are right. The version (2.18) is not the most recent. But to the best of my knowledge, it is sufficient to build the gtk2 based lcl and gtk2-based lazarus. So, maybe it is also sufficient for your purpose. Do you really need 2.24? Actually, the maintainers of gtk2 are working on updates, but they haven't completely finished it and the updated descriptions are in their experimental branches only. What is the oldest version of macOS you want to support? The easiest requirement is 64bit and 10.9 and newer, but if need be stepping back to i386 and 10.7 would also be possible. Regarding fink packages, I meant that if the source code of your program is available, I could have a go at a package description. Michael. From aaa5500 at ya.ru Sat Feb 24 14:19:12 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 24 Feb 2018 16:19:12 +0300 Subject: [Lazarus] TImage drag of big image Message-ID: <36801375-9d0c-95eb-c139-5af7790ba9c3@ya.ru> I want to add to TImage props: a) enable drag of pic, when pic is too big or zoomed. Eg if pic is 1000x2000 and TImage is 300x400. b) key modified (e.g. Ctrl or Alt) with m-wheel - to zoom pic in/out. c) prop ZoomValue to set/get zoom in %. Such patch can be accepted? -- Regards, Alexey From r030t1 at gmail.com Sat Feb 24 18:55:03 2018 From: r030t1 at gmail.com (R0b0t1) Date: Sat, 24 Feb 2018 11:55:03 -0600 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> Message-ID: On Sat, Feb 24, 2018 at 5:17 AM, Juha Manninen via Lazarus wrote: > On Fri, Feb 23, 2018 at 11:15 AM, R0b0t1 via Lazarus > wrote: >> Not to take the thread offtopic, ... > > You took it offtopic anyway. > UTF-8 works just fine. Please read this page : > http://wiki.freepascal.org/Unicode_Support_in_Lazarus > and start a new thread if you did not understand something. > It will not happen again, sir. I am a stain upon this mailing list. My question was not about UTF-8 support in Lazarus. I know it works. My question was about interoperability with Windows. Theoretically there are some serious issues; I figured I would get a better response asking someone using UTF-8 with Windows compared to a general poll. Remorsefully, R0b0t1 From juha.manninen62 at gmail.com Sun Feb 25 00:58:43 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 25 Feb 2018 01:58:43 +0200 Subject: [Lazarus] Garbage writing to console In-Reply-To: References: <5a7d63d6-2cde-3290-f6ae-f68e3c5a19cd@kluug.net> <7a8fdcc2-f961-8f25-52e2-95ca13f358fd@wetron.es> <32a30349-d763-84f7-9017-a346cbc0a625@kluug.net> <20180223084654.683fd909@limapholos.matflo.wg> <20180223092346.7d47a432@limapholos.matflo.wg> Message-ID: On Sat, Feb 24, 2018 at 7:55 PM, R0b0t1 wrote: > My question was not about UTF-8 support in Lazarus. I know it works. > My question was about interoperability with Windows. Theoretically > there are some serious issues; I figured I would get a better response > asking someone using UTF-8 with Windows compared to a general poll. No, it works very well with Windows when following the simple rules mentioned in the wiki page. Console is the only real issue with its own console codepage. I still don't fully understand its logic and I remember giving false information sometime earlier about it. Anyway, if you write GUI apps and call WinAPI, things "just work". Juha From mlnglsts at bgss.hu Sun Feb 25 09:03:13 2018 From: mlnglsts at bgss.hu (Gabor Boros) Date: Sun, 25 Feb 2018 09:03:13 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <67d25453-4dd3-1e14-8f04-04beeb674534@gmail.com> References: <07c2b273-8ca4-31ba-5c98-10aaaa47042c@geldenhuys.co.uk> <67d25453-4dd3-1e14-8f04-04beeb674534@gmail.com> Message-ID: <92638b8f-3a97-c5bb-1a6e-710c68695afb@bgss.hu> 2018. 02. 18. 13:51 keltezéssel, José Mejuto via Lazarus írta: > I was talking about LCL-fpGUI with reation to other LCL based platforms. > As I do not have a Delphi to verify I'm trying to mimic the win32 > platform (easy for me). > > Anyway I'm not fixing event orders now, there are a lot fo things to do > before ;-) For me the good order is the real order independently from the other widgetsets. For example at form maximize, the form moved to 0,0 coordinates then it's size increased. At form restore, form's size decreased then moved to the correct place. So at maximize the order is moved, resized, statechanged and at restore resized, statechanged, moved. Is the development process of LCL-fpGUI public or viewable just when committed into Lazarus trunk? Gabor From joshyfun at gmail.com Sun Feb 25 14:28:56 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sun, 25 Feb 2018 14:28:56 +0100 Subject: [Lazarus] Form events firing order and count In-Reply-To: <92638b8f-3a97-c5bb-1a6e-710c68695afb@bgss.hu> References: <07c2b273-8ca4-31ba-5c98-10aaaa47042c@geldenhuys.co.uk> <67d25453-4dd3-1e14-8f04-04beeb674534@gmail.com> <92638b8f-3a97-c5bb-1a6e-710c68695afb@bgss.hu> Message-ID: <397a766b-2b59-783f-b24b-06eb1bea341d@gmail.com> El 25/02/2018 a las 9:03, Gabor Boros via Lazarus escribió: > For me the good order is the real order independently from the other > widgetsets. For example at form maximize, the form moved to 0,0 > coordinates then it's size increased. At form restore, form's size > decreased then moved to the correct place. So at maximize the order is > moved, resized, statechanged and at restore resized, statechanged, moved. Hello, Events order is mostly a matter of taste, for me the order should be statechange (so programmer can cancel the operation before it happens, if possible), move, resize. > Is the development process of LCL-fpGUI public or viewable just when > committed into Lazarus trunk? I'm the only one working in LCL-fpGUI and I'm contributing using patches so the "advances" are not visible in real-time. If you are interested in the advances I can pack my develop folder and send it to you by mail when something more or less important is changed. The folder is mostly in unstable state because some features need a lot of try/error with a bunch of writelns all over different units. Last advance is Hi-DPI support (under testing) and the possibility to compile with develop branch but with this branch some things do not work as expected (I think they are bugs in fpGUI and I'm writting sample code to send to Graeme so he can decide if its a bug or not). -- From patspiper at gmail.com Sun Feb 25 19:15:15 2018 From: patspiper at gmail.com (patspiper) Date: Sun, 25 Feb 2018 20:15:15 +0200 Subject: [Lazarus] fpreport designer Message-ID: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> Hi, I am able to create fpreports by code. However the graphical designer is riddled with serious bugs making it impossible to use. I haven't succeeded in creating a single report. Is something wrong with my installation, or is the designer still in alpha stage? I'll create bug reports if it's the latter case. Stephano From aaa5500 at ya.ru Sun Feb 25 19:37:22 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sun, 25 Feb 2018 21:37:22 +0300 Subject: [Lazarus] TImage drag of big image In-Reply-To: <36801375-9d0c-95eb-c139-5af7790ba9c3@ya.ru> References: <36801375-9d0c-95eb-c139-5af7790ba9c3@ya.ru> Message-ID: <3b37bd89-7780-cb9c-3221-58b29fea85c0@ya.ru> I now see it's not needed in TImage, it must be component TScrollbox+TImage. sorry. Alex From michael at freepascal.org Sun Feb 25 20:09:33 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 25 Feb 2018 20:09:33 +0100 (CET) Subject: [Lazarus] fpreport designer In-Reply-To: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> Message-ID: On Sun, 25 Feb 2018, patspiper via Lazarus wrote: > Hi, > > I am able to create fpreports by code. > > However the graphical designer is riddled with serious bugs making it > impossible to use. I haven't succeeded in creating a single report. Is > something wrong with my installation, or is the designer still in alpha > stage? I'll create bug reports if it's the latter case. Hm. I don't know your installation of course, so it is hard to comment on that. But you should definitely be able to make reports. I know I do. But then, I made it, so I will probably avoid doing things that confuse the designer... If you do experience bugs, please report them, I will do my best to fix them ASAP. Michael. From patspiper at gmail.com Sun Feb 25 20:33:32 2018 From: patspiper at gmail.com (patspiper) Date: Sun, 25 Feb 2018 21:33:32 +0200 Subject: [Lazarus] fpreport designer In-Reply-To: References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> Message-ID: <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> On 25/02/18 21:09, Michael Van Canneyt via Lazarus wrote: > On Sun, 25 Feb 2018, patspiper via Lazarus wrote: >> Hi, >> >> I am able to create fpreports by code. >> >> However the graphical designer is riddled with serious bugs making it >> impossible to use. I haven't succeeded in creating a single report. >> Is something wrong with my installation, or is the designer still in >> alpha stage? I'll create bug reports if it's the latter case. > > Hm. I don't know your installation of course, so it is hard to comment > on that. > > But you should definitely be able to make reports. I know I do. But > then, I made it, so I will probably avoid doing things that confuse > the designer... > > If you do experience bugs, please report them, I will do my best to > fix them ASAP. I use FPC 3.0.5 with fpreport from trunk along with lazarus trunk. Just to test the waters: 1- Create a new application 2- Place a TFPReport on the form 3- Double click the FPReport component to open the designer 4- Add a page by clicking the add page toolbutton -> Bug1: The page properties are not displayed in the designer's object inspector 5- Add a databand and enlarge it 6- Click on memo toolbutton 7- Click on the databand without dragging. The memo will be created with 0 size. 8- Resize the memo with the mouse -> Bug2: The designer freezes and cannot be closed anymore If you can confirm these 2 bugs, i'll start creating bug reports in the tracker. Stephano From robin.listas at telefonica.net Sun Feb 25 20:52:32 2018 From: robin.listas at telefonica.net (Carlos E. R.) Date: Sun, 25 Feb 2018 20:52:32 +0100 (CET) Subject: [Lazarus] Translating a small C program to pascal (on lazarus) Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I want to translate a little Linux C program (600 lines) to pascal (so that I can then add my parts in comfort). I failed to find a good automated tool in Linux. I had a look here: I used "OpenC2Pas" but there remains quite a lot to translate. So I have to edit a lot, but my C is rusty. I had this, in C (simplified to the sections I'm using so far): #define SOCKET_COUNT 4 #define KEY_LEN 8 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) typedef enum { EG_PROTO_V20, EG_PROTO_V21, EG_PROTO_WLAN } Protocol; typedef enum { ACTION_ON, ACTION_OFF, ACTION_TOGGLE, ACTION_LEFT, ACTION_INVALID } Action; typedef struct { Action socket[SOCKET_COUNT]; } Actions; The automatic translation did: #define SOCKET_COUNT 4 #define KEY_LEN 8 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) typedef enum begin EG_PROTO_V20, EG_PROTO_V21, EG_PROTO_WLAN end; Protocol; typedef enum begin ACTION_ON, ACTION_OFF, ACTION_TOGGLE, ACTION_LEFT, ACTION_INVALID end; Action; typedef struct begin Action socket[SOCKET_COUNT]; end; Actions; As you can see, it is quite incomplete. The manual translation goes (I'm reading at for info): const SOCKET_COUNT = 4; KEY_LEN = 8; type Protocol = (EG_PROTO_V20, EG_PROTO_V21, EG_PROTO_WLAN); Action = (ACTION_ON, ACTION_OFF, ACTION_TOGGLE, ACTION_LEFT, ACTION_INVALID); _Actions = record socket: array[0..SOCKET_COUNT] of Action; end; Actions = _Actions; // typedef struct // { // Action socket[SOCKET_COUNT]; // } Actions; Now, the part I have doubts (one of many) is the later. In C it is: typedef struct { Action socket[SOCKET_COUNT]; } Actions; The question is: is my translation correct? _Actions = record socket: array[1..SOCKET_COUNT] of Action; end; Actions = _Actions; It confuses me that a single item, an array, is defined inside the struct or record. I also have doubts about the translation of the array itself. Is it an array of Action? You see, it doesn't help at all that my C is rusty. Based in the section "Structs and unions" of the "Rudy's Delphi Corner" site I linked above. He says: typedef struct _CERT_STORE_PROV_INFO { DWORD cbSize; DWORD cStoreProvFunc; void **rgpvStoreProvFunc; HCERTSTOREPROV hStoreProv; DWORD dwStoreProvFlags; HCRYPTOIDFUNCADDR hStoreProvFuncAddr2; } CERT_STORE_PROV_INFO, *PCERT_STORE_PROV_INFO; This results in: PCertStoreProvInfo = ^TCertStoreProvInfo; {$EXTERNALSYM _CERT_STORE_PROV_INFO} _CERT_STORE_PROV_INFO = record cbSize: DWORD; cStoreProvFunc: DWORD; rgpvStoreProvFunc: PPointer; hStoreProv: HCERTSTOREPROV; dwStoreProvFlags: DWORD; hStoreProvFuncAddr2: HCRYPTOIDFUNCADDR; end; {$EXTERNALSYM CERT_STORE_PROV_INFO} CERT_STORE_PROV_INFO = _CERT_STORE_PROV_INFO; {$EXTERNALSYM PCERT_STORE_PROV_INFO} PCERT_STORE_PROV_INFO = ^_CERT_STORE_PROV_INFO; TCertStoreProvInfo = _CERT_STORE_PROV_INFO; Then, the next part I'll have to translate is this: typedef struct { uint8_t octets[KEY_LEN]; } Key; typedef struct { /* since the protocol is little-endian, low word comes first */ uint16_t loword; uint16_t hiword; } __attribute__((__packed__)) Res; First, I have to find the equivalence of uint8_t, otherwise it is very similar to the first struct. Then comes uint16_t. And then, the last line: __attribute__((__packed__)) Res; Probably it is just a packed record. Maybe it will all be too complicated, and I should instead call the C program from my Pascal program in the command line so that it does its thing. It would indeed be faster to code. - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlqTFAgACgkQtTMYHG2NR9VuYACdHUodKSCy5maqrpRk1VaGwI1m EkwAnjGHLfMsOfEB4v38adCY7grvEmij =4pSm -----END PGP SIGNATURE----- From markMLl.lazarus at telemetry.co.uk Sun Feb 25 21:26:45 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Sun, 25 Feb 2018 20:26:45 +0000 Subject: [Lazarus] Translating a small C program to pascal (on lazarus) In-Reply-To: References: Message-ID: On 25/02/18 20:00, Carlos E. R. via Lazarus wrote: > -----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1 > > Hi, > I want to translate a little Linux C program (600 lines) to pascal (so > that I can then add my parts in comfort). I failed to find a good > automated tool in Linux. I had a look here: > > I used "OpenC2Pas" but there remains quite a lot to translate. etc. Presumably the original looks something like https://github.com/unterwulf/egctl/blob/master/egctl.c I've just been through a comparable exercise writing a utility to program a Logitech G600 gamer's mouse, and my suggestion would be to use Wireshark etc. to get an understanding of the messages going over the network then to transcribe the bits of the program you need into Pascal manually. Assuming that since you're asking on the Lazarus ML you're putting together a GUI to control the device you probably won't want roughly half of the original code which is using C-style string operations to read a configuration file. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From robin.listas at telefonica.net Sun Feb 25 23:07:08 2018 From: robin.listas at telefonica.net (Carlos E. R.) Date: Sun, 25 Feb 2018 23:07:08 +0100 Subject: [Lazarus] Translating a small C program to pascal (on lazarus) In-Reply-To: References: Message-ID: <167092c0-b611-c9c7-0ae4-2f6365063152@telefonica.net> On 2018-02-25 21:26, Mark Morgan Lloyd via Lazarus wrote: > On 25/02/18 20:00, Carlos E. R. via Lazarus wrote: >> Hi, >> I want to translate a little Linux C program (600 lines) to pascal (so >> that I can then add my parts in comfort). I failed to find a good >> automated tool in Linux. I had a look here: >> >> I used "OpenC2Pas" but there remains quite a lot to translate. > > etc. Presumably the original looks something like > https://github.com/unterwulf/egctl/blob/master/egctl.c Absolutely! :-) How did you find out that fast? > I've just been through a comparable exercise writing a utility to > program a Logitech G600 gamer's mouse, and my suggestion would be to use > Wireshark etc. to get an understanding of the messages going over the > network then to transcribe the bits of the program you need into Pascal > manually. I don't think I have the skill set for that. I guess that the author of that code, Vitaly Sinilin, had the Windows SDK for the device (a power strip controllable and programmable via Ethernet, LAN or WAN) and did a translation to Linux of the Windows command line tool. The SDK comes with the CD when purchasing the power strip, but the box I bought on Amazon had none. Perhaps it can be downloaded for free (I did not look yet), but anyway, it is for Windows (and probably C). > Assuming that since you're asking on the Lazarus ML you're putting > together a GUI to control the device you probably won't want roughly > half of the original code which is using C-style string operations to > read a configuration file. No, I'm not writing a GUI, I'm attempting to write a daemon. :-) I have a router that hangs randomly, and I can't replace it because it is ISP supplied with a complex configuration. So the idea is to ping the router and when it goes silent power cycle it. I have tested the idea, I can power a socket off from Linux using that utility, and then a programmed schedule switches it back on on the 00 seconds mark (the power strip syncs via NTP). The period can be programmed to anything, but currently it is set to every minute. So first I have to handle that powering off some seconds before the "00" mark, then I have to add the ping, wait for router come back alive, log the event, update the dynamic dns, email me, and go back to watch. Of course, I could do it all from a bash script, maybe easier. But I want to have a go at doing it in Pascal first. :-) The funny thing is, I programmed for a living in C two decades ago, I was good. It seems I fave forgotten most of it. :-} I hopped to find people here familiar with C to pas translation. I also did this type of things long ago... I translated some windows api headers to pascal back then. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From giuliano.colla at fastwebnet.it Mon Feb 26 01:11:36 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 26 Feb 2018 01:11:36 +0100 Subject: [Lazarus] Translating a small C program to pascal (on lazarus) In-Reply-To: References: Message-ID: Il 25/02/2018 20:52, Carlos E. R. via Lazarus ha scritto: > I want to translate a little Linux C program (600 lines) to pascal (so > that I can then add my parts in comfort). I failed to find a good > automated tool in Linux. I had a look here: Did you consider h2pas (which comes with fpc/Lazarus)? It's only intended to translate C headers to Pascal, but it makes a good job on this. You can only use it to translate declarations, but once declarations are in Pascal, converting the code becomes much easier. Giuliano From robin.listas at telefonica.net Mon Feb 26 03:51:29 2018 From: robin.listas at telefonica.net (Carlos E. R.) Date: Mon, 26 Feb 2018 03:51:29 +0100 Subject: [Lazarus] Translating a small C program to pascal (on lazarus) In-Reply-To: References: Message-ID: <3a63f4fe-6856-6624-116b-c3497dd9e492@telefonica.net> On 2018-02-26 01:11, Giuliano Colla via Lazarus wrote: > Il 25/02/2018 20:52, Carlos E. R. via Lazarus ha scritto: > >> I want to translate a little Linux C program (600 lines) to pascal (so >> that I can then add my parts in comfort). I failed to find a good >> automated tool in Linux. I had a look here: > > Did you consider h2pas (which comes with fpc/Lazarus)? > It's only intended to translate C headers to Pascal, but it makes a good > job on this. > > You can only use it to translate declarations, but once declarations are > in Pascal, converting the code becomes much easier. Ah! I didn't realize it could translate the declarations on a .c file, I thought it was only for .h files. I just had a quick test, but... I'll have to read on it, the quick test crashes: cer at Telcontar:~/bin/lazarus/mios/egctl> h2pas egctl.c at line 49 error : syntax error at line 82 error : syntax error An unhandled exception occurred at $00000000004089F2: EAccessViolation: Access violation $00000000004089F2 cer at Telcontar:~/bin/lazarus/mios/egctl> It did some translation, though: -rw-r--r-- 1 cer users 0 Feb 26 03:36 ext2.tmp -rw-r--r-- 1 cer users 0 Feb 26 03:36 ext.tmp -rw-r--r-- 1 cer users 1579 Feb 26 03:36 ext3.tmp The last file contains a translation till it crashed: {$include } ... const TASK_LEN = 4; STATCRYP_LEN = 4; CTRLCRYP_LEN = 4; KEY_LEN = 8; ... SOCKET_COUNT = 4; (* error #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) in define line 49 *) type Protocol = (EG_PROTO_V20,EG_PROTO_V21,EG_PROTO_WLAN ); Action = (ACTION_ON,ACTION_OFF,ACTION_TOGGLE,ACTION_LEFT, ACTION_INVALID); Actions = record socket : array[0..(SOCKET_COUNT)-1] of Action; end; Key = record octets : array[0..(KEY_LEN)-1] of uint8_t; end; { since the protocol is little-endian, low word comes first } and here it crashes. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From friess at gmx.at Mon Feb 26 18:02:26 2018 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Mon, 26 Feb 2018 18:02:26 +0100 Subject: [Lazarus] fpreport designer In-Reply-To: <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> Message-ID: Actual it make IMHO only sense with the actual trunk fpc (and trunk Lazarus). Pls use the standalone designer too, to make a check if the problem is not only in the fp-report component. Andreas Am 25.02.2018 um 20:33 schrieb patspiper via Lazarus: > On 25/02/18 21:09, Michael Van Canneyt via Lazarus wrote: >> On Sun, 25 Feb 2018, patspiper via Lazarus wrote: >>> Hi, >>> >>> I am able to create fpreports by code. >>> >>> However the graphical designer is riddled with serious bugs making >>> it impossible to use. I haven't succeeded in creating a single >>> report. Is something wrong with my installation, or is the designer >>> still in alpha stage? I'll create bug reports if it's the latter case. >> >> Hm. I don't know your installation of course, so it is hard to >> comment on that. >> >> But you should definitely be able to make reports. I know I do. But >> then, I made it, so I will probably avoid doing things that confuse >> the designer... >> >> If you do experience bugs, please report them, I will do my best to >> fix them ASAP. > > I use FPC 3.0.5 with fpreport from trunk along with lazarus trunk. > > Just to test the waters: > > 1- Create a new application > 2- Place a TFPReport on the form > 3- Double click the FPReport component to open the designer > 4- Add a page by clicking the add page toolbutton > -> Bug1: The page properties are not displayed in the designer's > object inspector > 5- Add a databand and enlarge it > 6- Click on memo toolbutton > 7- Click on the databand without dragging. The memo will be created > with 0 size. > 8- Resize the memo with the mouse > -> Bug2: The designer freezes and cannot be closed anymore > > If you can confirm these 2 bugs, i'll start creating bug reports in > the tracker. > > Stephano From michael at freepascal.org Mon Feb 26 18:27:59 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 26 Feb 2018 18:27:59 +0100 (CET) Subject: [Lazarus] fpreport designer In-Reply-To: References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> Message-ID: Hi, 1. Agreed about the use of trunk FPC/lazarus. 2. In the standalone designer, I can reproduce the bug in step 8, but not the one in step 4. 3. In view of point 2, please report bugs. Michael. On Mon, 26 Feb 2018, Andreas Frieß via Lazarus wrote: > Actual it make IMHO only sense with the actual trunk fpc (and trunk > Lazarus). Pls use the standalone designer too, to make a check if the > problem is not only in the fp-report component. > > Andreas > > > Am 25.02.2018 um 20:33 schrieb patspiper via Lazarus: >> On 25/02/18 21:09, Michael Van Canneyt via Lazarus wrote: >>> On Sun, 25 Feb 2018, patspiper via Lazarus wrote: >>>> Hi, >>>> >>>> I am able to create fpreports by code. >>>> >>>> However the graphical designer is riddled with serious bugs making >>>> it impossible to use. I haven't succeeded in creating a single >>>> report. Is something wrong with my installation, or is the designer >>>> still in alpha stage? I'll create bug reports if it's the latter case. >>> >>> Hm. I don't know your installation of course, so it is hard to >>> comment on that. >>> >>> But you should definitely be able to make reports. I know I do. But >>> then, I made it, so I will probably avoid doing things that confuse >>> the designer... >>> >>> If you do experience bugs, please report them, I will do my best to >>> fix them ASAP. >> >> I use FPC 3.0.5 with fpreport from trunk along with lazarus trunk. >> >> Just to test the waters: >> >> 1- Create a new application >> 2- Place a TFPReport on the form >> 3- Double click the FPReport component to open the designer >> 4- Add a page by clicking the add page toolbutton >> -> Bug1: The page properties are not displayed in the designer's >> object inspector >> 5- Add a databand and enlarge it >> 6- Click on memo toolbutton >> 7- Click on the databand without dragging. The memo will be created >> with 0 size. >> 8- Resize the memo with the mouse >> -> Bug2: The designer freezes and cannot be closed anymore >> >> If you can confirm these 2 bugs, i'll start creating bug reports in >> the tracker. >> >> Stephano > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > From patspiper at gmail.com Mon Feb 26 18:52:17 2018 From: patspiper at gmail.com (patspiper) Date: Mon, 26 Feb 2018 19:52:17 +0200 Subject: [Lazarus] fpreport designer In-Reply-To: References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> Message-ID: <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> On 26/02/18 19:27, Michael Van Canneyt via Lazarus wrote: > 1. Agreed about the use of trunk FPC/lazarus. I can't build the Lazarus IDE with FPC trunk because of an FPC bug (#33230) that makes a package fail to compile. > 2. In the standalone designer, I can reproduce the bug in step 8, but > not the one in step 4. I will use the standalone designer (with FPC trunk) for the time being. For step 4, add the page right after firing the designer (don't create a new report). Refer to bug report #33234. I will proceed with creating bug reports. However, the bug tracker lacks an fpreport category. I am currently filing the bugs under packages. Stephano From giuliano.colla at fastwebnet.it Mon Feb 26 18:56:35 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 26 Feb 2018 18:56:35 +0100 Subject: [Lazarus] Translating a small C program to pascal (on lazarus) In-Reply-To: <3a63f4fe-6856-6624-116b-c3497dd9e492@telefonica.net> References: <3a63f4fe-6856-6624-116b-c3497dd9e492@telefonica.net> Message-ID: <1ad5cf3b-98a6-5ee7-6139-969d80d45406@fastwebnet.it> Il 26/02/2018 03:51, Carlos E. R. via Lazarus ha scritto: > Ah! I didn't realize it could translate the declarations on a .c file, > I thought it was only for .h files. > > I just had a quick test, but... I'll have to read on it, the quick test > crashes: Well actually it is only for .h files, but as .h files are just declaration, it can handle a good part of the job. Most likely it crashes because it doesn't know how to handle the code after the declarations. What I'd do in your place would be to create a sort of .h file, by cutting away from the original source everything except the declarations, and translate it. Then translating the code, when you have all declarations in place becomes much easier, the bulk of it being sort of: replace all "{" with "begin" replace all "}" with "end;" replace all "0x" with "$" and so on. Giuliano From friess at gmx.at Mon Feb 26 19:03:52 2018 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Mon, 26 Feb 2018 19:03:52 +0100 Subject: [Lazarus] fpreport designer In-Reply-To: <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> Message-ID: <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> Acknowledge of the two Bugs -> Bug1: The page properties are not displayed in the designer's object inspector -> Bug2: The designer freezes and cannot be closed anymore i can reproduce this with actual trunk fpc/ trunk Lazarus. Another goal is, if you install lazideintfreport, the lazarus won't start without a message, if you switch logging on, you find the reason: freetype-56.dll is missing. The problem is, you have NO indication, no messagebos, nothing, why Lazarus wont start and exit immedatly. sing config file C:\Data\lazdev\trunk_trunk\lazarus\lazarus.cfg [FORMS.PP] ExceptionOccurred   Sender=EInOutError   Exception=Can not load Freetype library "freetype-6.dll". Check your installation.   Stack trace:   $00E41D99  INITIALIZEFREETYPE,  line 529 of ./fcl-image/src/libfreetype.inc   $00E41E1D  INITIALIZEFREETYPE,  line 536 of ./fcl-image/src/libfreetype.inc   $00E41E9A  FREETYPEHDYN_$$_init$,  of ./fcl-image/src/libfreetype.inc TApplication.HandleException Can not load Freetype library "freetype-6.dll". Check your installation.   Stack trace:   $00E41D99  INITIALIZEFREETYPE,  line 529 of ./fcl-image/src/libfreetype.inc   $00E41E1D  INITIALIZEFREETYPE,  line 536 of ./fcl-image/src/libfreetype.inc   $00E41E9A  FREETYPEHDYN_$$_init$,  of ./fcl-image/src/libfreetype.inc Andreas Am 26.02.2018 um 18:52 schrieb patspiper via Lazarus: > On 26/02/18 19:27, Michael Van Canneyt via Lazarus wrote: >> 1. Agreed about the use of trunk FPC/lazarus. > I can't build the Lazarus IDE with FPC trunk because of an FPC bug > (#33230) that makes a package fail to compile. > >> 2. In the standalone designer, I can reproduce the bug in step 8, but >> not the one in step 4. > > I will use the standalone designer (with FPC trunk) for the time being. > > For step 4, add the page right after firing the designer (don't create > a new report). Refer to bug report #33234. > > I will proceed with creating bug reports. However, the bug tracker > lacks an fpreport category. I am currently filing the bugs under > packages. > > Stephano From friess at gmx.at Mon Feb 26 19:07:16 2018 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Mon, 26 Feb 2018 19:07:16 +0100 Subject: [Lazarus] fpreport designer In-Reply-To: <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> Message-ID: <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> The second bug is in the standalone-designer too. Andreas Am 26.02.2018 um 19:03 schrieb Andreas Frieß via Lazarus: > Acknowledge of the two Bugs > > -> Bug1: The page properties are not displayed in the designer's > object inspector > -> Bug2: The designer freezes and cannot be closed anymore > > i can reproduce this with actual trunk fpc/ trunk Lazarus. From robin.listas at telefonica.net Mon Feb 26 19:20:33 2018 From: robin.listas at telefonica.net (Carlos E. R.) Date: Mon, 26 Feb 2018 19:20:33 +0100 Subject: [Lazarus] Translating a small C program to pascal (on lazarus) In-Reply-To: <1ad5cf3b-98a6-5ee7-6139-969d80d45406@fastwebnet.it> References: <3a63f4fe-6856-6624-116b-c3497dd9e492@telefonica.net> <1ad5cf3b-98a6-5ee7-6139-969d80d45406@fastwebnet.it> Message-ID: <3889665b-c37c-675b-5e74-4cf5d3a4028c@telefonica.net> On 2018-02-26 18:56, Giuliano Colla via Lazarus wrote: > Il 26/02/2018 03:51, Carlos E. R. via Lazarus ha scritto: >> Ah!  I didn't realize it could translate the declarations on a .c file, >> I thought it was only for .h files. >> >> I just had a quick test, but... I'll have to read on it, the quick test >> crashes: > > Well actually it is only for .h files, but as .h files are just > declaration, it can handle a good part of the job. > > Most likely it crashes because it doesn't know how to handle the code > after the declarations. That can't explain a "EAccessViolation: Access violation". It could be a syntax error, yes, but never an exception. And it happens before the code part. Description EAccessViolation is raised when the OS reports an Access Violation, i.e. when invalid memory is accessed. > What I'd do in your place would be to create a sort of .h file, by > cutting away from the original source everything except the > declarations, and translate it. Yes, I'll do that. > Then translating the code, when you have all declarations in place > becomes much easier, the bulk of it being sort of: > > replace all "{" with "begin" > > replace all "}" with "end;" > > replace all "0x" with "$" > > and so on. Actually, the OpenC2Pas program did a lot of that :-) Hopefully, one program translates most of the declarations, and another a good part of the code :-) -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" (Minas Tirith)) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature URL: From patspiper at gmail.com Mon Feb 26 19:30:54 2018 From: patspiper at gmail.com (patspiper) Date: Mon, 26 Feb 2018 20:30:54 +0200 Subject: [Lazarus] fpreport designer In-Reply-To: <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> Message-ID: On 26/02/18 20:07, Andreas Frieß via Lazarus wrote: > The second bug is in the standalone-designer too. > > Andreas I have created 8 bug reports. Just to make sure: Once i create report data (SQLDB/firebird) as Data1. I cannot set the page or the databand Data property to Data1. Data1 is the the OI Data property dropdown, but it will not persist and the entry will stay blank. Clicking on the preview icon freezes the designer. What are be the right steps for data? Stephano From r030t1 at gmail.com Tue Feb 27 01:44:04 2018 From: r030t1 at gmail.com (R0b0t1) Date: Mon, 26 Feb 2018 18:44:04 -0600 Subject: [Lazarus] Translating a small C program to pascal (on lazarus) In-Reply-To: <3889665b-c37c-675b-5e74-4cf5d3a4028c@telefonica.net> References: <3a63f4fe-6856-6624-116b-c3497dd9e492@telefonica.net> <1ad5cf3b-98a6-5ee7-6139-969d80d45406@fastwebnet.it> <3889665b-c37c-675b-5e74-4cf5d3a4028c@telefonica.net> Message-ID: On Mon, Feb 26, 2018 at 12:20 PM, Carlos E. R. via Lazarus wrote: > Hopefully, one program translates most of the declarations, and another > a good part of the code :-) > I doubt that in general a program exists to do what you want, as it would require having a front end for the C language and then something close to a decompiler for Pascal. However, this thread did clue me in to h2pas, which I hope can be used to convert STM's header files for the embedded target project. Cheers, R0b0t1 From michael at freepascal.org Tue Feb 27 18:04:39 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 27 Feb 2018 18:04:39 +0100 (CET) Subject: [Lazarus] fpreport designer In-Reply-To: References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> Message-ID: On Mon, 26 Feb 2018, patspiper via Lazarus wrote: > On 26/02/18 20:07, Andreas Frieß via Lazarus wrote: >> The second bug is in the standalone-designer too. >> >> Andreas > I have created 8 bug reports. > > Just to make sure: Once i create report data (SQLDB/firebird) as Data1. > I cannot set the page or the databand Data property to Data1. Data1 is > the the OI Data property dropdown, but it will not persist and the entry > will stay blank. Clicking on the preview icon freezes the designer. > > What are be the right steps for data? These are the right steps. The data is set. The problem is in my misunderstanding how the OI works. For some reason, it refuses to display component references - even though they are set - if the component does not include csDesigning in the component state. I fixed that. All reported bugs and feature requests except 1 should now be fixed, I also made some other improvements. Make sure you update the FPC repository, some changes to the base classes were needed. Thanks for reporting the bugs ! Michael. From patspiper at gmail.com Tue Feb 27 18:44:04 2018 From: patspiper at gmail.com (patspiper) Date: Tue, 27 Feb 2018 19:44:04 +0200 Subject: [Lazarus] fpreport designer In-Reply-To: References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> Message-ID: <080cb009-421c-e72d-f747-096229b57166@gmail.com> On 27/02/18 19:04, Michael Van Canneyt via Lazarus wrote: > On Mon, 26 Feb 2018, patspiper via Lazarus wrote: > >> Just to make sure: Once i create report data (SQLDB/firebird) as >> Data1. I cannot set the page or the databand Data property to Data1. >> Data1 is the the OI Data property dropdown, but it will not persist >> and the entry will stay blank. Clicking on the preview icon freezes >> the designer. >> >> What are be the right steps for data? > > These are the right steps. The data is set. > > The problem is in my misunderstanding how the OI works. For some > reason, it > refuses to display component references - even though they are set - > if the component does not include csDesigning in the component state. > I fixed that. I still can't set the Data and ChildBand properties. I updated fpc trunk and lazarus and am testing using the standalone designer. > > All reported bugs and feature requests except 1 should now be fixed, I > also made some other improvements. > > Make sure you update the FPC repository, some changes to the base > classes were needed. > > Thanks for reporting the bugs ! Thanks for the fixing the bugs! I guess I will keep you busy more when I test the integrated designer, since as far as i can see, the standalone designer allows static reports only. More on that later on. Stephano From michael at freepascal.org Tue Feb 27 18:48:47 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 27 Feb 2018 18:48:47 +0100 (CET) Subject: [Lazarus] fpreport designer In-Reply-To: <080cb009-421c-e72d-f747-096229b57166@gmail.com> References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> <080cb009-421c-e72d-f747-096229b57166@gmail.com> Message-ID: On Tue, 27 Feb 2018, patspiper wrote: > On 27/02/18 19:04, Michael Van Canneyt via Lazarus wrote: >> On Mon, 26 Feb 2018, patspiper via Lazarus wrote: >> >>> Just to make sure: Once i create report data (SQLDB/firebird) as Data1. I >>> cannot set the page or the databand Data property to Data1. Data1 is the >>> the OI Data property dropdown, but it will not persist and the entry will >>> stay blank. Clicking on the preview icon freezes the designer. >>> >>> What are be the right steps for data? >> >> These are the right steps. The data is set. >> >> The problem is in my misunderstanding how the OI works. For some reason, it >> refuses to display component references - even though they are set - if the >> component does not include csDesigning in the component state. I fixed >> that. > > I still can't set the Data and ChildBand properties. I updated fpc trunk and > lazarus and am testing using the standalone designer. I will check again tomorrow. Michael. From rolf.wetjen at mail.de Wed Feb 28 14:02:31 2018 From: rolf.wetjen at mail.de (Rolf Wetjen(rolf.wetjen@mail.de)) Date: Wed, 28 Feb 2018 13:02:31 +0000 Subject: [Lazarus] Strange ComboBox behavior (Windows) In-Reply-To: <6ed2539a-0546-fbf0-7d47-1bf30dec63ca@kluug.net> References: <6ed2539a-0546-fbf0-7d47-1bf30dec63ca@kluug.net> Message-ID: Hi Ondrej, I was in doubt but to my own surprise it's possible to patch only win32wsstdctrls.pp for both issues. Patch is attached. Are you the one to apply it or shall I do something else? Rolf ------ Originalnachricht ------ Von: "Ondrej Pokorny via Lazarus" An: lazarus at lists.lazarus-ide.org Cc: "Ondrej Pokorny" Gesendet: 20.02.2018 17:45:40 Betreff: Re: [Lazarus] Strange ComboBox behavior (Windows) >On 20.02.2018 8:40, Rolf Wetjen(rolf.wetjen--- via Lazarus wrote: >>Is there any interest in a patch to solve MS Windows issues although >>the patch would add some windows specific code to stdctrls.pp and >>customcombobox.inc? I've a solution for the "AutoSelect=false" one and >>an idea for the second one. > >There definitely is interest in fixing bugs. OS/WS/platform-specific >code belongs to the widgetset code: win32wsstdctrls.pp and similar. > >Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: win32wsstdctrls.pp.patch Type: application/octet-stream Size: 11210 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Wed Feb 28 15:57:45 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 28 Feb 2018 15:57:45 +0100 Subject: [Lazarus] Lazarus Release 1.8.2 Message-ID: <20180228155745.1379fef2@limapholos.matflo.wg> The Lazarus team is glad to announce the release of Lazarus 1.8.2. This is a bugfix release. The release was built with FPC 3.0.4. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.0.4 Here is the list of fixes for Lazarus 1.8.x: http://wiki.freepascal.org/Lazarus_1.8_fixes_branch The release is available for download on SourceForge: http://sourceforge.net/projects/lazarus/files/ Choose your CPU, OS, distro and then the "Lazarus 1.8.2" directory. Checksums for the SourceForge files: http://www.lazarus-ide.org/index.php?page=checksums#1_8_2 Minimum requirements: Windows: 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. optional qt 4.5 or 5.6 for qt apps FreeBSD/Linux: gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. Mac OS X: 10.5 to 10.12; Carbon (32bit), Cocoa (64bit, not stable), qt and qt5 (32 or 64bit). The svn tag is http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_2 For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/ and later at (after some time for synchronization) http://mirrors.iwi.me/lazarus/ Mattias From dec12 at avidsoft.com.hk Wed Feb 28 17:54:05 2018 From: dec12 at avidsoft.com.hk (Dennis) Date: Thu, 1 Mar 2018 00:54:05 +0800 Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: <20180228155745.1379fef2@limapholos.matflo.wg> References: <20180228155745.1379fef2@limapholos.matflo.wg> Message-ID: <30ab44be-5d93-e073-326e-57abb8b70e13@avidsoft.com.hk> Mattias Gaertner via Lazarus wrote: > The Lazarus team is glad to announce the release of Lazarus 1.8.2. This is a bugfix release. Thanks so much. I have been waiting for this upgrade. Dennis