From dle3ab at angelbase.com Wed Feb 1 04:36:16 2017 From: dle3ab at angelbase.com (David Emerson) Date: Tue, 31 Jan 2017 19:36:16 -0800 Subject: [Lazarus] debugging interface method calls Message-ID: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> Hi all, It seems that when I am stepping through my code, when there is an interface function call, the debugger will not step into the function call. Is there a way to make it step in? Or maybe there is a limitation with GDB or lazarus or something? Below is example code Thanks! ~David. program intf_debug; {$mode objfpc}{$H+} {$interfaces corba} uses classes, sysutils; type i_test = interface ['{aa}'] function do_test : boolean; end; t_test = class (tobject, i_test) function do_test : boolean; end; function t_test.do_test: boolean; begin writeln ('hi'); result := true; end; var t : t_test; i : i_test; begin t := t_test.create; t.do_test; // If I press F7 here, it steps into t_test.do_test supports (t, i_test, i); i.do_test; // F7 steps over, not into t_test.do_test end. From mailinglists at geldenhuys.co.uk Wed Feb 1 10:16:43 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 1 Feb 2017 09:16:43 +0000 Subject: [Lazarus] debugging interface method calls In-Reply-To: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> Message-ID: <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> On 2017-02-01 03:36, David Emerson via Lazarus wrote: > It seems that when I am stepping through my code, when there is an > interface function call, the debugger will not step into the function call. > > Is there a way to make it step in? No, and that is very annoying indeed. I believe I already reported it on Mantis some time ago, but can't seem to find the actual report now. Maybe it is worth adding a new Mantis report. 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 Wed Feb 1 10:24:18 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 1 Feb 2017 10:24:18 +0100 Subject: [Lazarus] debugging interface method calls In-Reply-To: <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> Message-ID: <058689ce-0795-7f1b-6606-2756d7911506@kluug.net> On 01.02.2017 10:16, Graeme Geldenhuys via Lazarus wrote: > On 2017-02-01 03:36, David Emerson via Lazarus wrote: >> It seems that when I am stepping through my code, when there is an >> interface function call, the debugger will not step into the function call. >> >> Is there a way to make it step in? > No, and that is very annoying indeed. Dwarf2 should support it, AFAIK. Ondrej From mlnglsts at bgss.hu Wed Feb 1 11:55:04 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Wed, 1 Feb 2017 11:55:04 +0100 Subject: [Lazarus] What is the estimated creation time of fixes_1_8 branch? Message-ID: <41fc1960-ef7f-5984-c48a-8df3624b5727@bgss.hu> Hi All, I want to switch from fixes_1_6 to ... Is the fixes_1_8 branch will be created in the near future? I want to skip switch to trunk if possible. Gabor From nc-gaertnma at netcologne.de Wed Feb 1 12:42:05 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 1 Feb 2017 12:42:05 +0100 Subject: [Lazarus] What is the estimated creation time of fixes_1_8 branch? In-Reply-To: <41fc1960-ef7f-5984-c48a-8df3624b5727@bgss.hu> References: <41fc1960-ef7f-5984-c48a-8df3624b5727@bgss.hu> Message-ID: <20170201124205.643cdd4e@limapholos.matflo.wg> On Wed, 1 Feb 2017 11:55:04 +0100 Gabor Boros via Lazarus wrote: > Hi All, > > I want to switch from fixes_1_6 to ... Is the fixes_1_8 branch will be > created in the near future? There is no date yet for 1.8. Probably 1.8 will be released soon after FPC 3.0.2. > I want to skip switch to trunk if possible. Mattias From lazarus at kluug.net Wed Feb 1 12:59:06 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 1 Feb 2017 12:59:06 +0100 Subject: [Lazarus] What is the estimated creation time of fixes_1_8 branch? In-Reply-To: <20170201124205.643cdd4e@limapholos.matflo.wg> References: <41fc1960-ef7f-5984-c48a-8df3624b5727@bgss.hu> <20170201124205.643cdd4e@limapholos.matflo.wg> Message-ID: <62229579-d1b3-e697-3ae1-4e4246841fac@kluug.net> On 01.02.2017 12:42, Mattias Gaertner via Lazarus wrote: > Probably 1.8 will be released soon after FPC 3.0.2. I still have some open issues for 1.8. The really important is only one - High DPI. I couldn't work on it recently but IMO I should be able to finish it (to a reasonable state) until reasonable time. Another one is "AnchorDocking + docked form designer + desktops" but this will have to be postponed (I am not working on it). And desktops need some polishment but that can be postponed as well. Ondrej From tc at epidata.info Wed Feb 1 13:00:23 2017 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Wed, 1 Feb 2017 13:00:23 +0100 Subject: [Lazarus] "protected" as class property incorrectly highlighted Message-ID: Hi List. I ran into this situation by random - but examplified here (using Lazarus IDE): As "protected" is not a reserved word (http://www.freepascal.org/docs-html/current/ref/refse3.html#x11-100001.3) in any modes I think this is a bug in the highlighter. Should I report it to the bugtracker? Kind regard, Torsten Bonde Christiansen. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ojaoldbacohheplb.png Type: image/png Size: 18371 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Wed Feb 1 13:38:03 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 1 Feb 2017 13:38:03 +0100 Subject: [Lazarus] "protected" as class property incorrectly highlighted In-Reply-To: References: Message-ID: <20170201133803.518d2931@limapholos.matflo.wg> On Wed, 1 Feb 2017 13:00:23 +0100 Torsten Bonde Christiansen via Lazarus wrote: >[...] > As "protected" is not a reserved word > (http://www.freepascal.org/docs-html/current/ref/refse3.html#x11-100001.3) > in any modes I think this is a bug in the highlighter. It is not a globally reserved word. Only in classes and similar elements with visibility. Note: Delphi highlights 'protected' globally too. > Should I report it to the bugtracker? I leave this to Martin. Mattias From lazarus at mfriebe.de Wed Feb 1 15:33:41 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 1 Feb 2017 14:33:41 +0000 Subject: [Lazarus] "protected" as class property incorrectly highlighted In-Reply-To: References: Message-ID: <4c68cfa7-6895-144e-cb76-e97e6d2aa8b5@mfriebe.de> On 01/02/2017 12:00, Torsten Bonde Christiansen via Lazarus wrote: > > > As "protected" is not a reserved word > (http://www.freepascal.org/docs-html/current/ref/refse3.html#x11-100001.3) > in any modes I think this is a bug in the highlighter. > > Should I report it to the bugtracker? > Yes, Please report on the bugtracker From dle3ab at angelbase.com Wed Feb 1 21:27:42 2017 From: dle3ab at angelbase.com (David Emerson) Date: Wed, 1 Feb 2017 12:27:42 -0800 Subject: [Lazarus] debugging interface method calls In-Reply-To: <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> Message-ID: On 02/01/2017 01:16 AM, Graeme Geldenhuys via Lazarus wrote: > On 2017-02-01 03:36, David Emerson via Lazarus wrote: >> It seems that when I am stepping through my code, when there is an >> interface function call, the debugger will not step into the function call. >> >> Is there a way to make it step in? > > No, and that is very annoying indeed. > > I believe I already reported it on Mantis some time ago, but can't seem > to find the actual report now. Maybe it is worth adding a new Mantis report. > > > Regards, > Graeme > Thanks! Too bad. http://mantis.freepascal.org/view.php?id=30541 I guess I should try fpdebug! ~David From dle3ab at angelbase.com Wed Feb 1 21:28:05 2017 From: dle3ab at angelbase.com (David Emerson) Date: Wed, 1 Feb 2017 12:28:05 -0800 Subject: [Lazarus] debugging interface method calls In-Reply-To: <058689ce-0795-7f1b-6606-2756d7911506@kluug.net> References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> <058689ce-0795-7f1b-6606-2756d7911506@kluug.net> Message-ID: <9cfa8915-db74-af5f-84c6-f6609987bc55@angelbase.com> On 02/01/2017 01:24 AM, Ondrej Pokorny via Lazarus wrote: > On 01.02.2017 10:16, Graeme Geldenhuys via Lazarus wrote: >> On 2017-02-01 03:36, David Emerson via Lazarus wrote: >>> It seems that when I am stepping through my code, when there is an >>> interface function call, the debugger will not step into the function >>> call. >>> >>> Is there a way to make it step in? >> No, and that is very annoying indeed. > > Dwarf2 should support it, AFAIK. > > Ondrej I tried all the debugging options: automatic; dwarf with sets; dwarf2; stabs; dwarf3 beta. None of them would step into the interface function call. fpc 3.0.0 / laz 1.6 / gdb 7.7.1 From lazarus at kluug.net Wed Feb 1 21:46:09 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 1 Feb 2017 21:46:09 +0100 Subject: [Lazarus] debugging interface method calls In-Reply-To: <9cfa8915-db74-af5f-84c6-f6609987bc55@angelbase.com> References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> <058689ce-0795-7f1b-6606-2756d7911506@kluug.net> <9cfa8915-db74-af5f-84c6-f6609987bc55@angelbase.com> Message-ID: <83ef2686-e655-2020-4856-faaf2ad2ddcf@kluug.net> On 01.02.2017 21:28, David Emerson via Lazarus wrote: > I tried all the debugging options: automatic; dwarf with sets; dwarf2; > stabs; dwarf3 beta. None of them would step into the interface > function call. fpc 3.0.0 / laz 1.6 / gdb 7.7.1 I tested as well. I was able to step in with automatic Debugger options (not dwarf2). I use GDB from 1.4.2 - no idea what version it is. Ondrej From mailinglists at geldenhuys.co.uk Wed Feb 1 21:54:41 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 1 Feb 2017 20:54:41 +0000 Subject: [Lazarus] debugging interface method calls In-Reply-To: References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> Message-ID: <8a229e10-f755-f624-1fa0-7756c7dd5d74@geldenhuys.co.uk> On 2017-02-01 20:27, David Emerson via Lazarus wrote: > I guess I should try fpdebug! That was my hope too, but fpdebug is not supported on FreeBSD (what I use). It seems only Linux and Windows is currently supported. :-/ 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 Wed Feb 1 21:57:12 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 1 Feb 2017 20:57:12 +0000 Subject: [Lazarus] debugging interface method calls In-Reply-To: References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> Message-ID: <1412d006-af42-d3c2-81f5-a4b88d01ba48@geldenhuys.co.uk> On 2017-02-01 20:27, David Emerson via Lazarus wrote: > > http://mantis.freepascal.org/view.php?id=30541 Thanks - no idea how you found that. :) You (or somebody else), please teach me how searching in Mantis works. The same goes for the Lazarus Forum. I can never find anything I search for - even with multiple combinations of words, + sign, quoted etc... Can it really be that hard. :-( Regards, Graeme From lazarus at kluug.net Wed Feb 1 22:09:58 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 1 Feb 2017 22:09:58 +0100 Subject: [Lazarus] debugging interface method calls In-Reply-To: <8a229e10-f755-f624-1fa0-7756c7dd5d74@geldenhuys.co.uk> References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> <8a229e10-f755-f624-1fa0-7756c7dd5d74@geldenhuys.co.uk> Message-ID: On 01.02.2017 21:54, Graeme Geldenhuys via Lazarus wrote: > On 2017-02-01 20:27, David Emerson via Lazarus wrote: >> I guess I should try fpdebug! > That was my hope too, but fpdebug is not supported on FreeBSD (what I > use). It seems only Linux and Windows is currently supported. :-/ Having a real pascal debugger would be the killer feature. Do you know the state of fpDebug? Who does develop it? Do you? https://github.com/graemeg/fpdebug doesn't show much recent progress :( Ondrej From bartjunk64 at gmail.com Wed Feb 1 23:27:16 2017 From: bartjunk64 at gmail.com (Bart) Date: Wed, 1 Feb 2017 23:27:16 +0100 Subject: [Lazarus] debugging interface method calls In-Reply-To: References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> <8a229e10-f755-f624-1fa0-7756c7dd5d74@geldenhuys.co.uk> Message-ID: On 2/1/17, Ondrej Pokorny via Lazarus wrote: > Who does develop it? Do you? Joost van der Sluis? Bart From emurashie at proengineered.com Wed Feb 1 23:41:09 2017 From: emurashie at proengineered.com (Ed Murashie) Date: Wed, 1 Feb 2017 14:41:09 -0800 Subject: [Lazarus] Running an app on boot Message-ID: <001101d27cdc$49420b00$dbc62100$@proengineered.com> I want to thank everyone for their comments and suggestions and give a summary of what worked for me. First my background and hardware I used. I am an electronics engineer with experience in C with PIC and Cortex M3/4 ARM processors and windows with Visual Studio. I had two weeks to learn enough Linux, BeagleBone Black and Lazarus to create a demo of a graphical thermostat using a BeagleBone Black Rev C and the 800x480 5" SEEED Studio LCD with resistive touch panel. What I finally did was the following: 1. Read most of Exploring BeagleBone by Derek Molloy. A great book that starts with very little knowledge of Linux, electronics and the BeagleBone and yet you wind up learning all the different type of programming methods including QT & GTK+ and interfacing to hardware. 2. Learned Lazarus and familiarized myself with Pascal which I learned 20+ years ago by watching the excellent School Freeware Pascal and Lazarus YouTube videos also at http://www.schoolfreeware.com/Free_Pascal_Lazarus_App_GUI_Tutorials_With_Example_Code_.html 3. Update the BeagleBone operating system to the latest Debian Jessie with the LXQt desktop. This is well documented at http://beagleboard.org/getting-started 4. In Lazarus, I set the Form properties BorderStyle to bsNone, the WindowState to wsMinimized and the FormStyle to fsSystemStayOnTop and built a simple application with buttons, pictures, labels, etc. Clicked on Build to build my program. 5. In LXQt I set the startup application to run on boot by going to Preferences, then LXQt Settings, then Session Settings and finally Autostart. Clicked Add, gave the startup a name and then browsed to the Lazarus executable I built in step 4 and left the Wait for system tray box unchecked. When I rebooted the system powered up into the application with no log on, task bar, etc. Next I am going to explore a stripped down operating system, X11 and fpGUI to see if I can speed up the bootup time. Thanks again, everyone who responded to my inquiry, Ed From dle3ab at angelbase.com Wed Feb 1 23:50:11 2017 From: dle3ab at angelbase.com (David Emerson) Date: Wed, 1 Feb 2017 14:50:11 -0800 Subject: [Lazarus] debugging interface method calls In-Reply-To: <1412d006-af42-d3c2-81f5-a4b88d01ba48@geldenhuys.co.uk> References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> <1412d006-af42-d3c2-81f5-a4b88d01ba48@geldenhuys.co.uk> Message-ID: <63d46c27-2c7c-00f2-ec15-72dba7770c54@angelbase.com> On 02/01/2017 12:57 PM, Graeme Geldenhuys via Lazarus wrote: > On 2017-02-01 20:27, David Emerson via Lazarus wrote: >> >> http://mantis.freepascal.org/view.php?id=30541 > > Thanks - no idea how you found that. :) > > You (or somebody else), please teach me how searching in Mantis works. > The same goes for the Lazarus Forum. I can never find anything I search > for - even with multiple combinations of words, + sign, quoted etc... > Can it really be that hard. :-( http://mantis.freepascal.org/view_all_bug_page.php Click "Reporter" - top left of the grid select name from ridiculous long list fill in search box, I searched for interface step click apply filter ~David From mailinglists at geldenhuys.co.uk Thu Feb 2 02:08:02 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 2 Feb 2017 01:08:02 +0000 Subject: [Lazarus] debugging interface method calls In-Reply-To: References: <632cda91-de8b-5df4-2b90-600ff6d7b824@angelbase.com> <8c21eb9c-64ca-f0ca-892c-e5c873cfb382@geldenhuys.co.uk> <8a229e10-f755-f624-1fa0-7756c7dd5d74@geldenhuys.co.uk> Message-ID: On 2017-02-01 21:09, Ondrej Pokorny via Lazarus wrote: > > Having a real pascal debugger would be the killer feature. Indeed! > Do you know the state of fpDebug? Who does develop it? Do you? > https://github.com/graemeg/fpdebug doesn't show much recent progress :( The one on my github page is different to the one include with Lazarus sources. Yes, other "paid work" priorities has pulled me away from continuing my fpdebug project. Unfortunately the name conflict is a bit confusing too. Both share some code from a prior Duby Debugger project too. I believe Joost and Martin are maintaining fpdebug included with Lazarus (/components/fpdebug/). 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 lazarus2 at de-brouwerij.be Thu Feb 2 19:52:37 2017 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Thu, 2 Feb 2017 19:52:37 +0100 Subject: [Lazarus] StringGrid & Accented characters Message-ID: <48985827-70e5-8836-15aa-455e302c3535@de-brouwerij.be> Hi, I need to bulk-create a number of accounts for some service. The data I get from an excel-file. Unfortunately, the user-names contain accents (e.g. é or è) which the service does not accept. So I'm trying to make a converter. I thought of using a StringGrid to "LoadfromCSV", modify the cells and then save the grid to CSV again. Unfortunatly, when I load the CSV, the StringGrid shows strange characters for the accented letters. Is a StringGrid capable of storing those accented letters ? If so, how could I change them to their plain equivalents ? Any thoughts ? Thanks, Koenraad. From bartjunk64 at gmail.com Thu Feb 2 20:46:46 2017 From: bartjunk64 at gmail.com (Bart) Date: Thu, 2 Feb 2017 20:46:46 +0100 Subject: [Lazarus] StringGrid & Accented characters In-Reply-To: <48985827-70e5-8836-15aa-455e302c3535@de-brouwerij.be> References: <48985827-70e5-8836-15aa-455e302c3535@de-brouwerij.be> Message-ID: On 2/2/17, Koenraad Lelong via Lazarus wrote: > I thought of using a StringGrid to "LoadfromCSV", modify the cells and > then save the grid to CSV again. > Unfortunatly, when I load the CSV, the StringGrid shows strange > characters for the accented letters. Is a StringGrid capable of storing > those accented letters ? Of course it is. Notice that Lazarus defaults strings to be UTF8-encoded. Your file probably is not. So you must change the encoding of the strings on the fly. And I'm afraid you will have to do so again when saving, because I guess also the file you are creating is expected to be in windows (cp1252) encoding. Bart From aaa5500 at ya.ru Mon Feb 6 01:41:46 2017 From: aaa5500 at ya.ru (Alexey) Date: Mon, 6 Feb 2017 03:41:46 +0300 Subject: [Lazarus] IDE Component-dialog: small button Message-ID: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru> In this dialog, button Use is too narrow. Can i make diff, to make it wide, e.g. 80pix? -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: compo-dlg.png Type: image/png Size: 21004 bytes Desc: not available URL: From wkitty42 at windstream.net Mon Feb 6 03:28:06 2017 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sun, 5 Feb 2017 21:28:06 -0500 Subject: [Lazarus] IDE Component-dialog: small button In-Reply-To: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru> References: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru> Message-ID: On 02/05/2017 07:41 PM, Alexey via Lazarus wrote: > In this dialog, button Use is too narrow. Can i make diff, to make it wide, e.g. > 80pix? ummm, it looks plenty big enough... all of the letters show with no clipping on either side... what am i missing?? -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From l at c-m-w.me.uk Mon Feb 6 09:49:15 2017 From: l at c-m-w.me.uk (C Western) Date: Mon, 6 Feb 2017 08:49:15 +0000 Subject: [Lazarus] IDE Component-dialog: small button In-Reply-To: References: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru> Message-ID: On 06/02/17 02:28, wkitty42--- via Lazarus wrote: > On 02/05/2017 07:41 PM, Alexey via Lazarus wrote: >> In this dialog, button Use is too narrow. Can i make diff, to make it >> wide, e.g. >> 80pix? > > ummm, it looks plenty big enough... all of the letters show with no > clipping on either side... what am i missing?? > It looks like a button that has been autosized; I must admit my feeling is that autosized buttons should have a minimum width, something like the width of a "Cancel" button, say. The general GUI convention seems to be to have all buttons of similar sizes, and the lazarus autosize algorithm produces buttons that can often look on the small side compared to most programs. Turning off autosizing is a bad idea because of the variety of system fonts. Colin From lazarus at kluug.net Mon Feb 6 10:02:31 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 6 Feb 2017 10:02:31 +0100 Subject: [Lazarus] IDE Component-dialog: small button In-Reply-To: References: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru> Message-ID: <83eb9bfe-50d2-bffd-02d1-0f35284d6752@kluug.net> On 06.02.2017 3:28, wkitty42--- via Lazarus wrote: > On 02/05/2017 07:41 PM, Alexey via Lazarus wrote: >> In this dialog, button Use is too narrow. Can i make diff, to make it >> wide, e.g. >> 80pix? > > ummm, it looks plenty big enough... all of the letters show with no > clipping on either side... what am i missing?? You don't miss anything. The button is just OK. Ondrej From lazarus at kluug.net Mon Feb 6 10:04:43 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 6 Feb 2017 10:04:43 +0100 Subject: [Lazarus] IDE Component-dialog: small button In-Reply-To: References: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru> Message-ID: On 06.02.2017 9:49, C Western via Lazarus wrote: > It looks like a button that has been autosized; I must admit my > feeling is that autosized buttons should have a minimum width You can use the Constraints property to set the minimum width in your own programs. Ondrej From l at c-m-w.me.uk Mon Feb 6 10:15:36 2017 From: l at c-m-w.me.uk (C Western) Date: Mon, 6 Feb 2017 09:15:36 +0000 Subject: [Lazarus] IDE Component-dialog: small button In-Reply-To: References: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru> Message-ID: On 06/02/17 09:04, Ondrej Pokorny via Lazarus wrote: > On 06.02.2017 9:49, C Western via Lazarus wrote: >> It looks like a button that has been autosized; I must admit my >> feeling is that autosized buttons should have a minimum width > > You can use the Constraints property to set the minimum width in your > own programs. > Indeed, though this minimum width should also depend on the font size, so requires some programming on each form (though maybe a single fixed value would work in most cases). Colin From lazarus at kluug.net Mon Feb 6 10:24:13 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 6 Feb 2017 10:24:13 +0100 Subject: [Lazarus] IDE Component-dialog: small button In-Reply-To: References: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru> Message-ID: <147d7128-9cf1-4f6d-f112-2d27d195edab@kluug.net> On 06.02.2017 10:15, C Western via Lazarus wrote: > Indeed, though this minimum width should also depend on the font size, > so requires some programming on each form (though maybe a single fixed > value would work in most cases). Constraints are scaled according to current DPI settings in Lazarus 1.7+ (with high DPI enabled). If you change the Font.Size property it's your own responsibility to assign a valid value to Constraints. Ondrej From aaa5500 at ya.ru Mon Feb 6 01:52:17 2017 From: aaa5500 at ya.ru (Alexey) Date: Mon, 6 Feb 2017 03:52:17 +0300 Subject: [Lazarus] DateTimePicker not installed? Message-ID: I installed pkg DateTimeControls. picture added. I dont see its controls: DateTimePicker (and DB version) in Components dialog (filter "date" dont show). And in CommonControls tab by hands - not there too. Rebuilt IDE. (even with Clean, no help). -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: datetim.png Type: image/png Size: 98670 bytes Desc: not available URL: From lazarus at kluug.net Mon Feb 6 10:35:14 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 6 Feb 2017 10:35:14 +0100 Subject: [Lazarus] DateTimePicker not installed? In-Reply-To: References: Message-ID: On 06.02.2017 1:52, Alexey via Lazarus wrote: > I installed pkg DateTimeControls. picture added. You have to install the design-time package DateTimeCtrlsDsgn. We have this documented (sometimes we don't forget :) ) http://wiki.freepascal.org/Lazarus_1.8.0_release_notes#DateTimeCtrls_split_into_DateTimeCtrls_and_DateTimeCtrlsDsgn_packages Ondrej From mschnell at lumino.de Mon Feb 6 11:20:51 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 6 Feb 2017 11:20:51 +0100 Subject: [Lazarus] Synedit tab Message-ID: <19ad0053-2d35-45db-cdf8-5f48fde84c5b@lumino.de> I tried to open an old project I once started to test using SynEdit. It does compile and work, but when trying to see the form I get an messages of not installed components. In fact the "sysEdit" tab that is described in the Wiki is not seen in the Lazarus IDE. How to activate it ? Thanks, -Michael From lazarus at kluug.net Mon Feb 6 11:30:13 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 6 Feb 2017 11:30:13 +0100 Subject: [Lazarus] Synedit tab In-Reply-To: <19ad0053-2d35-45db-cdf8-5f48fde84c5b@lumino.de> References: <19ad0053-2d35-45db-cdf8-5f48fde84c5b@lumino.de> Message-ID: On 06.02.2017 11:20, Michael Schnell via Lazarus wrote: > I tried to open an old project I once started to test using SynEdit. > It does compile and work, but when trying to see the form I get an > messages of not installed components. In fact the "sysEdit" tab that > is described in the Wiki is not seen in the Lazarus IDE. How to > activate it ? Check if you installed syneditdsgn package. Ondrej From mschnell at lumino.de Mon Feb 6 12:22:06 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 6 Feb 2017 12:22:06 +0100 Subject: [Lazarus] Synedit tab In-Reply-To: References: <19ad0053-2d35-45db-cdf8-5f48fde84c5b@lumino.de> Message-ID: <37a58a01-bbf4-8cf1-3135-be21fbb1c8e6@lumino.de> On 06.02.2017 11:30, Ondrej Pokorny via Lazarus wrote: > Check if you installed syneditdsgn package. In the "Install/Uninstall Packages" menu in the "Installed" Window there is "SynEditDsgn". But other than "SynEdit 1.0" same features a small green "+". No Idea if this is an error indication. In the "Package Info" it nonetheless says "not installed" (contradicting to it's being listed as "installed" ????). Doing "use" in the "open installed packages did the trick: now the SynEdit tab is shown. :-) (Regarding Packages there seems to be some ambiguity with "installed" "used" and "loaded". ) Thanks a lot ! -Michael From mschnell at lumino.de Mon Feb 6 12:42:34 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 6 Feb 2017 12:42:34 +0100 Subject: [Lazarus] Synedit Highligter: hide found character sequence Message-ID: <4c3a6499-6f8b-1192-b2fd-b697dadb6882@lumino.de> Hi SynEdit Experts, Doing a special kind of text editor (that in fact needs to feature an invisible signature for each word in the text): Is it possible to do a highlighter that results in hiding the character sequences found by the highlighting criterion (in fact on screen replaces it by a blank) ? Can we do software that with a cursor move event gets/finds the word under cursor plus the invisible "highlighted" string before that word ? Can the highlighted / invisible character sequence be protected from being modified by the user's text editing actions ? Is there a way to wrap the (visible) text to a predefined line length (using the usual line breaks as paragraph indicator) ? If such features are not available does it make sense to do a local fork of SynEdit to implement such options or would a different implementation be more viable ? Thanks for any comments ! -Michael From nc-gaertnma at netcologne.de Mon Feb 6 12:56:39 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 6 Feb 2017 12:56:39 +0100 Subject: [Lazarus] Synedit tab In-Reply-To: <37a58a01-bbf4-8cf1-3135-be21fbb1c8e6@lumino.de> References: <19ad0053-2d35-45db-cdf8-5f48fde84c5b@lumino.de> <37a58a01-bbf4-8cf1-3135-be21fbb1c8e6@lumino.de> Message-ID: <20170206125639.3054b2ea@limapholos.matflo.wg> On Mon, 6 Feb 2017 12:22:06 +0100 Michael Schnell via Lazarus wrote: >[...] > (Regarding Packages there seems to be some ambiguity with "installed" > "used" and "loaded". ) I hope this helps: http://wiki.lazarus.freepascal.org/Lazarus_Packages#Package_states Mattias From zmuogs at gmail.com Mon Feb 6 13:17:08 2017 From: zmuogs at gmail.com (=?UTF-8?Q?Valdas_Jank=c5=abnas?=) Date: Mon, 6 Feb 2017 14:17:08 +0200 Subject: [Lazarus] DockManager: how to truly close form Message-ID: <80fa8ec5-7969-fc53-8ea3-61cbd0deb96a@gmail.com> Hello, I decided to use DockManager in my project. I fount that closing secondary form by pressing a X button in window of that form it becomes hidden not destroyed. How to actually close (destroy and free) a secondary from when DockManager is used? "CloseAction:= caFree" not helped. I tried forcibly "Free" but that produces crash of app. ps: sorry for bad English. -- Valdas Jankūnas From vojtech.cihak at atlas.cz Mon Feb 6 13:17:16 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Mon, 06 Feb 2017 13:17:16 +0100 Subject: [Lazarus] =?utf-8?q?IDE_Component-dialog=3A_small_button?= In-Reply-To: 000000006d1a0000a02800ff5083 References: <750ee0e6-7ae1-bd47-f873-4b4b1f472743@ya.ru>, 000000006d1a0000a02800ff5083 Message-ID: <20170206131716.84C84F6D@atlas.cz> AFAIK in Lazarus dialogs is often used component TButtonPanel (Misc palette) with OK, Cancel, Close and Help buttons. These buttons are autosized with Constraints.MinWidth:=DefButtonSize.cx; (this value is taken from Themes: DefButtonSize := ThemeServices.GetDetailSize(Details); it is 75 on Qt).   V. ______________________________________________________________ > Od: C Western via Lazarus > Komu: Lazarus mailing list > Datum: 06.02.2017 09:49 > Předmět: Re: [Lazarus] IDE Component-dialog: small button > On 06/02/17 02:28, wkitty42--- via Lazarus wrote: > On 02/05/2017 07:41 PM, Alexey via Lazarus wrote: >> In this dialog, button Use is too narrow. Can i make diff, to make it >> wide, e.g. >> 80pix? > > ummm, it looks plenty big enough... all of the letters show with no > clipping on either side... what am i missing?? > It looks like a button that has been autosized; I must admit my feeling is that autosized buttons should have a minimum width, something like the width of a "Cancel" button, say. The general GUI convention seems to be to have all buttons of similar sizes, and the lazarus autosize algorithm produces buttons that can often look on the small side compared to most programs. Turning off autosizing is a bad idea because of the variety of system fonts. Colin -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Mon Feb 6 13:21:04 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 6 Feb 2017 13:21:04 +0100 Subject: [Lazarus] Synedit tab In-Reply-To: <20170206125639.3054b2ea@limapholos.matflo.wg> References: <19ad0053-2d35-45db-cdf8-5f48fde84c5b@lumino.de> <37a58a01-bbf4-8cf1-3135-be21fbb1c8e6@lumino.de> <20170206125639.3054b2ea@limapholos.matflo.wg> Message-ID: <0c456b65-1ef1-3f33-c547-2133a85a53f0@lumino.de> On 06.02.2017 12:56, Mattias Gaertner via Lazarus wrote: > I hope this helps: > http://wiki.lazarus.freepascal.org/Lazarus_Packages#Package_states Yep, perfect ! So seemingly the green cross should mean "not used". Great but doubleclicking moves it to the uninstalled list and there seems no means in the "Install/Uninstall Packages" menu to make it "used", or take you to the menu where it can be set to "used" (and the IDE be recompiled). And with that the text in the Package info window in the "Install/Uninstall Packages" menu it should not read "not installed" but "not used". (Using the current svn version of Lazarus.) Thanks, -Michael From freepascal at ypa-software.de Mon Feb 6 13:48:12 2017 From: freepascal at ypa-software.de (Michael Fuchs) Date: Mon, 6 Feb 2017 13:48:12 +0100 Subject: [Lazarus] Show a window under GTK2 in front without stealing the focus In-Reply-To: References: <54cd55bd-d68f-b577-8de1-49be6bcad13c@ypa-software.de> Message-ID: <77946d43-4e95-22a1-658f-76c293e16c88@ypa-software.de> Am 19.01.2017 um 15:04 schrieb zeljko: >> Under windows this works with >> ShowWindow(MyForm.Handle, SW_SHOWNOACTIVATE); >> But how can I do this under GTK2? > > Don't know now exactly, but gtk_window_set_focus_on_map(Window, > False) maybe could help. Have you looked into gtk2winapi ? eg Qt have > such flag and it can show window without activating. > > zeljko Hi, thanks for your help. With gtk_window_set_focus_on_map and gtk_window_set_accept_focusit seems to work under GTK. MyForm.Visible := True; // HACK: SW_SHOWNOACTIVATE is not implemented under GTK2, we will use a direct GTK calls {$IFDEF LCLGTK2} GtkWindow := PGtkWindow(MyForm.Handle); gtk_window_set_keep_above(GtkWindow, True); gtk_window_set_accept_focus(GtkWindow, False); gtk_window_set_focus_on_map(GtkWindow, False); gtk_window_present(GtkWindow); {$ELSE} ShowWindow(MyForm.Handle, SW_SHOWNOACTIVATE); {$ENDIF} Unfortunately I discovered that under Windows SW_SHOWNOACTIVATE does not work as I expected. So in the end, I build a form that inherits from THintWindow. This resolves my problem. From nc-gaertnma at netcologne.de Mon Feb 6 13:55:59 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 6 Feb 2017 13:55:59 +0100 Subject: [Lazarus] Synedit tab In-Reply-To: <0c456b65-1ef1-3f33-c547-2133a85a53f0@lumino.de> References: <19ad0053-2d35-45db-cdf8-5f48fde84c5b@lumino.de> <37a58a01-bbf4-8cf1-3135-be21fbb1c8e6@lumino.de> <20170206125639.3054b2ea@limapholos.matflo.wg> <0c456b65-1ef1-3f33-c547-2133a85a53f0@lumino.de> Message-ID: <20170206135559.19159c0e@limapholos.matflo.wg> On Mon, 6 Feb 2017 13:21:04 +0100 Michael Schnell via Lazarus wrote: > On 06.02.2017 12:56, Mattias Gaertner via Lazarus wrote: > > I hope this helps: > > http://wiki.lazarus.freepascal.org/Lazarus_Packages#Package_states > Yep, perfect ! > > So seemingly the green cross should mean "not used". The "Installed" was misleading. I changed to "Install". The term "used" in this dialog is somewhat difficult, because there are two sets of "used" IDE packages: The currently running and the future (used when the IDE is rebuilt). The left side (install) lists the future "used". Packages with a green cross are new, i.e. not yet running packages. > Great but > doubleclicking moves it to the uninstalled list and there seems no means > in the "Install/Uninstall Packages" menu to make it "used", or take you > to the menu where it can be set to "used" (and the IDE be recompiled). The dialog is simple: left side will be installed. Some packages of the right might be installed automatically due to dependencies. >[...] Mattias From lazarus at mfriebe.de Mon Feb 6 15:48:25 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 6 Feb 2017 14:48:25 +0000 Subject: [Lazarus] Synedit Highligter: hide found character sequence In-Reply-To: <4c3a6499-6f8b-1192-b2fd-b697dadb6882@lumino.de> References: <4c3a6499-6f8b-1192-b2fd-b697dadb6882@lumino.de> Message-ID: <37e1f84c-b0bc-5600-0bbf-521f55f580e9@mfriebe.de> On 06/02/2017 11:42, Michael Schnell via Lazarus wrote: > Hi SynEdit Experts, > > Doing a special kind of text editor (that in fact needs to feature an > invisible signature for each word in the text): > > Is it possible to do a highlighter that results in hiding the > character sequences found by the highlighting criterion (in fact on > screen replaces it by a blank) ? Not a highlighter, no. But it may (not sure) be possible writing your custom wrapper to the textbuffer. look at other sub classes to TSynEditStringsLinked Also look at TLazSynDisplayViewEx Look in SynEditFoldedView TLazSynDisplayFold is a TLazSynDisplayViewEx that visually adds the [...] at the end of a fold line. So TLazSynDisplayViewEx is the place to modify the text. If your TSynEditStringsLinked is up high enough in the chain (included before (search for) FTheLinesView ) then most parts of synedit will see this as the actual text. The TLazSynDisplayFold is included after FTheLinesView , so for display only (FDisplayView) ------------- You also must intercept all the Edit* methods in TSynEditStringsLinked . If the editor specifies an x pos, you must map it to the x pos with the invisible included and vice versa, also if the editor acts on a selection you may have to map the length too. Note some functions (like matching bracket highlight) require that the Highlighter itself delivers tokens for the visible part only (you can filter them in TLazSynDisplayViewEx , but that is for painting only) Of course if your highlighter does filter them, maybe you do not need TLazSynDisplayViewEx You do need to intercept all the Edit* calls. (And watch id new ones get added in future) > > Is there a way to wrap the (visible) text to a predefined line length > (using the usual line breaks as paragraph indicator) ? not yet again, all the elements from above will be involved. the tricky bit is to create a map between real line num and wrapped line num. this must be fast for - lookup in both direction - insert/remove/change of rows A normal array may not be efficient enough. (it may be for you, but not to include for everyone) From mschnell at lumino.de Mon Feb 6 16:37:47 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 6 Feb 2017 16:37:47 +0100 Subject: [Lazarus] Synedit Highligter: hide found character sequence In-Reply-To: <37e1f84c-b0bc-5600-0bbf-521f55f580e9@mfriebe.de> References: <4c3a6499-6f8b-1192-b2fd-b697dadb6882@lumino.de> <37e1f84c-b0bc-5600-0bbf-521f55f580e9@mfriebe.de> Message-ID: On 06.02.2017 15:48, Martin Frb via Lazarus wrote: > ... Martin, thanks a lot. So in fact there is some hope to tweak SynEdit for the task at hand. If so, it seems that this is a better idea than to write a new Editor from scratch. Thanks again, -Michael From badsectoracula at gmail.com Mon Feb 6 20:17:48 2017 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Mon, 6 Feb 2017 21:17:48 +0200 Subject: [Lazarus] TDataModule for non-database non-visual components Message-ID: Hi all, A simple question, is it ok to use a TDataModule for non-visual components that can be shared among forms (and generally contain app-wide stuff)? There doesn't seem to be a plain TModule or something like that. I ask because the docs do not make the distinction clear (the name doesn't help) and the wiki has it in the database section. I suspect this is the case and in Delphi/Embarcadero docs it explicitly mentions that you can use it for non-database components, i just want to make it sure it wont blow up in the future (and that there isn't another way to create non-visual components from the IDE) because i just realized that TDataModule can be used like that (currently i'm creating non-form-specific components either in the main form or manually via code in a dedicated unit). My use case is a few custom non-visual components which can be shared among forms (and to decouple the logic from the form when it has nothing to do with it). Kostas -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhkblaszyk at zeelandnet.nl Mon Feb 6 22:06:12 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Mon, 06 Feb 2017 22:06:12 +0100 Subject: [Lazarus] Embedded font In-Reply-To: References: Message-ID: Hi, Is it possible to embed a font for a GUI application in Lazarus in a platform independent way? I've been looking on the internet and I only found windows specific solutions so far. Regards, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Mon Feb 6 23:15:15 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 6 Feb 2017 23:15:15 +0100 Subject: [Lazarus] TDataModule for non-database non-visual components In-Reply-To: References: Message-ID: <20170206231515.5fddb503@limapholos.matflo.wg> On Mon, 6 Feb 2017 21:17:48 +0200 Kostas Michalopoulos via Lazarus wrote: > Hi all, > > A simple question, is it ok to use a TDataModule for non-visual components > that can be shared among forms (and generally contain app-wide stuff)? Yes. That's their purpose. >[...] Mattias From luca at wetron.es Tue Feb 7 00:00:42 2017 From: luca at wetron.es (Luca Olivetti) Date: Tue, 7 Feb 2017 00:00:42 +0100 Subject: [Lazarus] Embedded font In-Reply-To: References: Message-ID: El 06/02/17 a les 22:06, Darius Blaszyk via Lazarus ha escrit: > Hi, > > Is it possible to embed a font for a GUI application in Lazarus in a > platform independent way? I've been looking on the internet and I only > found windows specific solutions so far. You already know the windows way, so I'll omit it. With qt you can use QFontDatabase_addApplicationFont, e.g. uses qt4; ... procedure TForm1.FormCreate(Sender: TObject); var ws:WideString; begin ws:='/file/with/the/font.ttf'; QFontDatabase_addApplicationFont(@ws) end; There's also a addApplicationFontFromData if you want to load the font from a resource. With GTK you can use fontconfig, e.g. uses fontconfig; .... function FcConfigAppFontAddFile(config:pointer; fname:Pchar):FcBool;stdcall;external 'libfontconfig.so'; .... procedure TForm1.FormCreate(Sender: TObject); var res: FcBool; begin res:=FcConfigAppFontAddFile(nil,'/file/with/the/font.ttf'); end; There isn't a function to load the font from data, so if you want to use resources I guess you should save it to a temporary file and load the font from it. What I couldn't find is a way to know if the application is using qt or gtk (or win): LCLWidgetType is an ide macro, not a define. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From badsectoracula at gmail.com Tue Feb 7 09:47:59 2017 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Tue, 7 Feb 2017 10:47:59 +0200 Subject: [Lazarus] TDataModule for non-database non-visual components In-Reply-To: <20170206231515.5fddb503@limapholos.matflo.wg> References: <20170206231515.5fddb503@limapholos.matflo.wg> Message-ID: Great. But maybe that should be made clear in the docs like Embarcadero's docs mention? Because both the wiki and the name imply a database orientation. On Tue, Feb 7, 2017 at 12:15 AM, Mattias Gaertner via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Mon, 6 Feb 2017 21:17:48 +0200 > Kostas Michalopoulos via Lazarus wrote: > > > Hi all, > > > > A simple question, is it ok to use a TDataModule for non-visual > components > > that can be shared among forms (and generally contain app-wide stuff)? > > Yes. That's their purpose. > > > >[...] > > Mattias > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Tue Feb 7 15:47:59 2017 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 7 Feb 2017 15:47:59 +0100 Subject: [Lazarus] Synedit tab In-Reply-To: <20170206135559.19159c0e@limapholos.matflo.wg> References: <19ad0053-2d35-45db-cdf8-5f48fde84c5b@lumino.de> <37a58a01-bbf4-8cf1-3135-be21fbb1c8e6@lumino.de> <20170206125639.3054b2ea@limapholos.matflo.wg> <0c456b65-1ef1-3f33-c547-2133a85a53f0@lumino.de> <20170206135559.19159c0e@limapholos.matflo.wg> Message-ID: <7ad37392-3887-faf6-8361-68a50fb32f88@lumino.de> On 06.02.2017 13:55, Mattias Gaertner via Lazarus wrote: > The dialog is simple: left side will be installed. Yep. But if there are some that have a green cross (meaning "known" but not used/intstalled, as said SynEditDsgn claims: "Current state: selected for installation, not installed, RunAndDesignTime" ) the "save and rebuild" button is deactivated and so I can't make them "used" (or installed) in this dialog. (BTW.: this situation is triggered by "make clean all" for Lazarus.) -Michael From dhkblaszyk at zeelandnet.nl Tue Feb 7 17:16:55 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Tue, 07 Feb 2017 17:16:55 +0100 Subject: [Lazarus] Embedded font In-Reply-To: References: Message-ID: <8fa960e39eeac61a4de6384bdcbe2057@zeelandnet.nl> > With qt you can use QFontDatabase_addApplicationFont, e.g. > > ... > > With GTK you can use fontconfig, e.g. Thanks Luca! Does anyone how to make it natively work on the Mac? Regards, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Thu Feb 9 00:01:48 2017 From: bartjunk64 at gmail.com (Bart) Date: Thu, 9 Feb 2017 00:01:48 +0100 Subject: [Lazarus] CapsLock and KeyDown Message-ID: Hi, When I press CapsLock key and release it I expect to get: KeyDown: VK_CAPITAL followed by KeyUP: VK_CAPITAL However I get: KeyDown: VK_CAPITAL followed by KeyDown; $00E9 followed by KeyUP: VK_CAPITAL I thought it might be a bug in Lazarus, but the same happens in Delphi7. Does anybody know what this is all about? (Tested on Win7) Bart From vojtech.cihak at atlas.cz Thu Feb 9 00:18:56 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Thu, 09 Feb 2017 00:18:56 +0100 Subject: [Lazarus] =?utf-8?q?CapsLock_and_KeyDown?= In-Reply-To: 000000006d560000a7dc01005055 References: 000000006d560000a7dc01005055 Message-ID: <20170209001856.6FEB2F55@atlas.cz> Hi, so far I only found this commented line in LCLType:   // $E9-$F5 OEM specific   V.   ______________________________________________________________ > Od: Bart via Lazarus > Komu: Lazarus mailing list > Datum: 09.02.2017 00:01 > Předmět: [Lazarus] CapsLock and KeyDown > Hi, When I press CapsLock key and release it I expect to get: KeyDown: VK_CAPITAL followed by KeyUP: VK_CAPITAL However I get: KeyDown: VK_CAPITAL followed by KeyDown; $00E9 followed by KeyUP: VK_CAPITAL I thought it might be a bug in Lazarus, but the same happens in Delphi7. Does anybody know what this is all about? (Tested on Win7) Bart -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From lacak at zoznam.sk Thu Feb 9 10:30:12 2017 From: lacak at zoznam.sk (LacaK) Date: Thu, 9 Feb 2017 10:30:12 +0100 Subject: [Lazarus] Request for apply patch In-Reply-To: References: Message-ID: <0fac2e57-68d4-865e-f54a-24a951e9bf8a@zoznam.sk> Hi Lazarus Developers, can somebody please look at and if all okay apply patch in bug report http://bugs.freepascal.org/view.php?id=27764 There is one new unit which implements simple Delphi compatible Database Login Dialog. Thanks -Laco. From zeljko at holobit.net Thu Feb 9 10:52:14 2017 From: zeljko at holobit.net (zeljko) Date: Thu, 9 Feb 2017 10:52:14 +0100 Subject: [Lazarus] Request for apply patch In-Reply-To: <0fac2e57-68d4-865e-f54a-24a951e9bf8a@zoznam.sk> References: <0fac2e57-68d4-865e-f54a-24a951e9bf8a@zoznam.sk> Message-ID: On 02/09/2017 10:30 AM, LacaK via Lazarus wrote: > Hi Lazarus Developers, > can somebody please look at and if all okay apply patch in bug report > http://bugs.freepascal.org/view.php?id=27764 > There is one new unit which implements simple Delphi compatible Database > Login Dialog. There's no Server and Port entries in such dialog ? zeljko From lacak at zoznam.sk Thu Feb 9 12:03:41 2017 From: lacak at zoznam.sk (LacaK) Date: Thu, 9 Feb 2017 12:03:41 +0100 Subject: [Lazarus] Request for apply patch In-Reply-To: References: <0fac2e57-68d4-865e-f54a-24a951e9bf8a@zoznam.sk> Message-ID: <9704ab8d-50f8-a4d3-2cd9-a0eee0681033@zoznam.sk> >> Hi Lazarus Developers, >> can somebody please look at and if all okay apply patch in bug report >> http://bugs.freepascal.org/view.php?id=27764 >> There is one new unit which implements simple Delphi compatible Database >> Login Dialog. > > There's no Server and Port entries in such dialog ? As far as I can say there are not. See also http://docwiki.embarcadero.com/Libraries/Seattle/en/Vcl.DBLogDlg.LoginDialogEx Server and Port you must specify in TSQLConnection component. When LoginPrompt is also set then DBLogin dialog registered in callback LoginDialogExProc will be called upon connecting ... asking from user UserName and Password. But if there will be demand for such functionality I think, we can add extended dialog ... but it will require more work (at least add also Database input box not only Server and Port and pass parameters forth and back to original TSQLConnection component) L. From bartjunk64 at gmail.com Thu Feb 9 18:54:17 2017 From: bartjunk64 at gmail.com (Bart) Date: Thu, 9 Feb 2017 18:54:17 +0100 Subject: [Lazarus] CapsLock and KeyDown In-Reply-To: <20170209001856.6FEB2F55@atlas.cz> References: <20170209001856.6FEB2F55@atlas.cz> Message-ID: On 2/9/17, Vojtěch Čihák via Lazarus wrote: > so far I only found this commented line in LCLType: > > // $E9-$F5 OEM specific Hmm... B.t.w.: if I hold down the capsLock key I only see repeated KeyDowns with VK_CAPITAL (no more $00E9's). Bart From dhkblaszyk at zeelandnet.nl Sat Feb 11 09:26:02 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Sat, 11 Feb 2017 09:26:02 +0100 Subject: [Lazarus] copying files/ folders to clipboard Message-ID: Hi, Any hints or tips on how to copy files and folders to the clipboard in a platform independent way. The catch is that the user should be able to copy/paste the copied file or folder in the native file explorer. TIA, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sat Feb 11 11:22:23 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 11 Feb 2017 11:22:23 +0100 (CET) Subject: [Lazarus] Run parameters Message-ID: Hello, Currently, the options specified in 'Run - Parameters' are stored in the project.lpi file. I have always found this a strange choice. What is the rationale for this decision ? Logically, I would I think these parameters belong in the .lps file ? For example: a program that takes a filename. On my home PC, the file is in one location. At work, it is in another location. Since these parameters are in the lpi file, they also gets checked in into git or svn, when in fact nothing has necessarily changed in my project if I just did a debug session with different parameters... Thus causing many false 'modified' notifications, or often worse, conflicts when 2 different command-lines exist. Some programs accept a --username or --password option. I had several cases where my username/password were saved in a .lpi file and checked in, thus exposing my credentials to collegues... So, would it be an option to have the run parameters saved in the .lps file? This would avoid many of the pitfalls. Michael. From nc-gaertnma at netcologne.de Sat Feb 11 12:01:07 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 11 Feb 2017 12:01:07 +0100 Subject: [Lazarus] Run parameters In-Reply-To: References: Message-ID: <20170211120107.46c62cda@limapholos.matflo.wg> On Sat, 11 Feb 2017 11:22:23 +0100 (CET) Michael Van Canneyt via Lazarus wrote: > Hello, > > Currently, the options specified in 'Run - Parameters' are stored in the > project.lpi file. > > I have always found this a strange choice. > What is the rationale for this decision ? Some projects need the same run parameters on all machines. For example instantfpc projects can't run with the default run params. > Logically, I would I think these parameters belong in the .lps file ? I agree, there should be an option. Or even better would be a list of run modes. Some developers using build modes suggested to have different run parameters per build mode. So it would be nice if the list and build modes can be connected. For example when switching the build mode, the IDE automatically switches the run mode too. Mattias From michael at freepascal.org Sat Feb 11 12:15:04 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 11 Feb 2017 12:15:04 +0100 (CET) Subject: [Lazarus] Run parameters In-Reply-To: <20170211120107.46c62cda@limapholos.matflo.wg> References: <20170211120107.46c62cda@limapholos.matflo.wg> Message-ID: On Sat, 11 Feb 2017, Mattias Gaertner via Lazarus wrote: > On Sat, 11 Feb 2017 11:22:23 +0100 (CET) > Michael Van Canneyt via Lazarus wrote: > >> Hello, >> >> Currently, the options specified in 'Run - Parameters' are stored in the >> project.lpi file. >> >> I have always found this a strange choice. >> What is the rationale for this decision ? > > Some projects need the same run parameters on all machines. > For example instantfpc projects can't run with the default run > params. >From my personal experience, I really think this is a minority... For example, testsuites. I keep setting the --suite=TestA.MethodXYZ. My collegue sets it to --suite=TestB.MethodC. It gives me conflicts every time I update from SVN. And in this case you almost never use the same command-line twice. >> Logically, I would I think these parameters belong in the .lps file ? > > I agree, there should be an option. Or even better would be a list > of run modes. Don't get overenthousiastic. Keep it simple :) The trouble with a list is that you must maintain it, just as the build modes. I don't want that. So if you do decide to introduce it, please keep it optional, as the build modes. Not to say there is already a list, namely the history mechanism. > > Some developers using build modes suggested to have different run > parameters per build mode. So it would be nice if the list and build > modes can be connected. For example when switching the build mode, the > IDE automatically switches the run mode too. Well. If you can give a global option Save "run parameter" settings in [*] .lpi file [ ] .lps file [ ] run modes [ ] build mode I will be satisfied. You could use the ones in .lpi as a fallback, in case they are not set in the .lps Michael. From michael at freepascal.org Sat Feb 11 12:15:04 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 11 Feb 2017 12:15:04 +0100 (CET) Subject: [Lazarus] Run parameters In-Reply-To: <20170211120107.46c62cda@limapholos.matflo.wg> References: <20170211120107.46c62cda@limapholos.matflo.wg> Message-ID: On Sat, 11 Feb 2017, Mattias Gaertner via Lazarus wrote: > On Sat, 11 Feb 2017 11:22:23 +0100 (CET) > Michael Van Canneyt via Lazarus wrote: > >> Hello, >> >> Currently, the options specified in 'Run - Parameters' are stored in the >> project.lpi file. >> >> I have always found this a strange choice. >> What is the rationale for this decision ? > > Some projects need the same run parameters on all machines. > For example instantfpc projects can't run with the default run > params. >From my personal experience, I really think this is a minority... For example, testsuites. I keep setting the --suite=TestA.MethodXYZ. My collegue sets it to --suite=TestB.MethodC. It gives me conflicts every time I update from SVN. And in this case you almost never use the same command-line twice. >> Logically, I would I think these parameters belong in the .lps file ? > > I agree, there should be an option. Or even better would be a list > of run modes. Don't get overenthousiastic. Keep it simple :) The trouble with a list is that you must maintain it, just as the build modes. I don't want that. So if you do decide to introduce it, please keep it optional, as the build modes. Not to say there is already a list, namely the history mechanism. > > Some developers using build modes suggested to have different run > parameters per build mode. So it would be nice if the list and build > modes can be connected. For example when switching the build mode, the > IDE automatically switches the run mode too. Well. If you can give a global option Save "run parameter" settings in [*] .lpi file [ ] .lps file [ ] run modes [ ] build mode I will be satisfied. You could use the ones in .lpi as a fallback, in case they are not set in the .lps Michael. From badsectoracula at gmail.com Sat Feb 11 14:25:55 2017 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Sat, 11 Feb 2017 15:25:55 +0200 Subject: [Lazarus] Run parameters In-Reply-To: References: <20170211120107.46c62cda@limapholos.matflo.wg> Message-ID: I think having a list for run modes (i assume you mean the settings you specify in the Run -> Run Parameters dialog box) that you can select from a popup menu near the "play" button and have different run modes apply, like you can select the build mode from the "gear" button, is a good idea. Being able to switch configuration files and working directories from inside Lazarus for some of the tools i work with would be very nice. The only thing i disagree with is to have them per build mode since chances are you'd need them with different build modes (e.g. debug, release, profile, etc would have the same run modes) and even if you could copy them, it would still be an annoyance to make sure all are available. Instead i'd say to have a table with a column per build mode and a row per run mode, have checkboxes for those that will apply and those checkboxes would be enabled by default. Alternatively just use a global list that is the same across all build modes, but then you may have run modes that do not apply in all build modes and have them take up space (e.g. if one of your run modes causes a program to load a 32bit DLL and you are in a build mode that explicitly targets a 64bit OS this run mode wouldn't apply - of course one case wouldn't matter much, but the next thing i imagine after such a feature is available is being able to generate run modes automatically though a script :-P). Kostas On Sat, Feb 11, 2017 at 1:15 PM, Michael Van Canneyt via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Sat, 11 Feb 2017, Mattias Gaertner via Lazarus wrote: > > On Sat, 11 Feb 2017 11:22:23 +0100 (CET) >> Michael Van Canneyt via Lazarus wrote: >> >> Hello, >>> >>> Currently, the options specified in 'Run - Parameters' are stored in the >>> project.lpi file. >>> >>> I have always found this a strange choice. >>> What is the rationale for this decision ? >>> >> >> Some projects need the same run parameters on all machines. >> For example instantfpc projects can't run with the default run >> params. >> > > From my personal experience, I really think this is a minority... > > For example, testsuites. I keep setting the --suite=TestA.MethodXYZ. My > collegue sets it to --suite=TestB.MethodC. It gives me conflicts every time > I update from SVN. > > And in this case you almost never use the same command-line twice. > > Logically, I would I think these parameters belong in the .lps file ? >>> >> >> I agree, there should be an option. Or even better would be a list >> of run modes. >> > > Don't get overenthousiastic. Keep it simple :) > > The trouble with a list is that you must maintain it, just as the build > modes. I don't want that. > > So if you do decide to introduce it, please keep it optional, as the build > modes. > > Not to say there is already a list, namely the history mechanism. > > >> Some developers using build modes suggested to have different run >> parameters per build mode. So it would be nice if the list and build >> modes can be connected. For example when switching the build mode, the >> IDE automatically switches the run mode too. >> > > Well. If you can give a global option > > Save "run parameter" settings in > [*] .lpi file > [ ] .lps file [ ] run modes > [ ] build mode > > I will be satisfied. You could use the ones in .lpi as a fallback, in case > they are not set in > the .lps > > Michael. > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From badsectoracula at gmail.com Sat Feb 11 14:25:55 2017 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Sat, 11 Feb 2017 15:25:55 +0200 Subject: [Lazarus] Run parameters In-Reply-To: References: <20170211120107.46c62cda@limapholos.matflo.wg> Message-ID: I think having a list for run modes (i assume you mean the settings you specify in the Run -> Run Parameters dialog box) that you can select from a popup menu near the "play" button and have different run modes apply, like you can select the build mode from the "gear" button, is a good idea. Being able to switch configuration files and working directories from inside Lazarus for some of the tools i work with would be very nice. The only thing i disagree with is to have them per build mode since chances are you'd need them with different build modes (e.g. debug, release, profile, etc would have the same run modes) and even if you could copy them, it would still be an annoyance to make sure all are available. Instead i'd say to have a table with a column per build mode and a row per run mode, have checkboxes for those that will apply and those checkboxes would be enabled by default. Alternatively just use a global list that is the same across all build modes, but then you may have run modes that do not apply in all build modes and have them take up space (e.g. if one of your run modes causes a program to load a 32bit DLL and you are in a build mode that explicitly targets a 64bit OS this run mode wouldn't apply - of course one case wouldn't matter much, but the next thing i imagine after such a feature is available is being able to generate run modes automatically though a script :-P). Kostas On Sat, Feb 11, 2017 at 1:15 PM, Michael Van Canneyt via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Sat, 11 Feb 2017, Mattias Gaertner via Lazarus wrote: > > On Sat, 11 Feb 2017 11:22:23 +0100 (CET) >> Michael Van Canneyt via Lazarus wrote: >> >> Hello, >>> >>> Currently, the options specified in 'Run - Parameters' are stored in the >>> project.lpi file. >>> >>> I have always found this a strange choice. >>> What is the rationale for this decision ? >>> >> >> Some projects need the same run parameters on all machines. >> For example instantfpc projects can't run with the default run >> params. >> > > From my personal experience, I really think this is a minority... > > For example, testsuites. I keep setting the --suite=TestA.MethodXYZ. My > collegue sets it to --suite=TestB.MethodC. It gives me conflicts every time > I update from SVN. > > And in this case you almost never use the same command-line twice. > > Logically, I would I think these parameters belong in the .lps file ? >>> >> >> I agree, there should be an option. Or even better would be a list >> of run modes. >> > > Don't get overenthousiastic. Keep it simple :) > > The trouble with a list is that you must maintain it, just as the build > modes. I don't want that. > > So if you do decide to introduce it, please keep it optional, as the build > modes. > > Not to say there is already a list, namely the history mechanism. > > >> Some developers using build modes suggested to have different run >> parameters per build mode. So it would be nice if the list and build >> modes can be connected. For example when switching the build mode, the >> IDE automatically switches the run mode too. >> > > Well. If you can give a global option > > Save "run parameter" settings in > [*] .lpi file > [ ] .lps file [ ] run modes > [ ] build mode > > I will be satisfied. You could use the ones in .lpi as a fallback, in case > they are not set in > the .lps > > Michael. > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sat Feb 11 14:31:52 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 11 Feb 2017 14:31:52 +0100 (CET) Subject: [Lazarus] Run parameters In-Reply-To: References: <20170211120107.46c62cda@limapholos.matflo.wg> Message-ID: On Sat, 11 Feb 2017, Kostas Michalopoulos wrote: > I think having a list for run modes (i assume you mean the settings you > specify in the Run -> Run Parameters dialog box) that you can select from a > popup menu near the "play" button and have different run modes apply, like > you can select the build mode from the "gear" button, is a good idea. Being > able to switch configuration files and working directories from inside > Lazarus for some of the tools i work with would be very nice. > > The only thing i disagree with is to have them per build mode since chances > are you'd need them with different build modes (e.g. debug, release, > profile, etc would have the same run modes) and even if you could copy > them, it would still be an annoyance to make sure all are available. > > Instead i'd say to have a table with a column per build mode and a row per > run mode, have checkboxes for those that will apply and those checkboxes > would be enabled by default. > > Alternatively just use a global list that is the same across all build > modes, but then you may have run modes that do not apply in all build modes > and have them take up space (e.g. if one of your run modes causes a program > to load a 32bit DLL and you are in a build mode that explicitly targets a > 64bit OS this run mode wouldn't apply - of course one case wouldn't matter > much, but the next thing i imagine after such a feature is available is > being able to generate run modes automatically though a script :-P). If you want a list, I would simply allow to make a list as you suggest, and for each build mode you can simply specify which item in the list is used as default when pressing run. Being able to specify multiple run modes per build mode seems way overkill to me. I don't want to end up with Eclipse, where you need a Phd in Eclipse to be able to do even simple tasks in the IDE... Michael. From badsectoracula at gmail.com Sat Feb 11 16:57:45 2017 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Sat, 11 Feb 2017 17:57:45 +0200 Subject: [Lazarus] Run parameters In-Reply-To: References: <20170211120107.46c62cda@limapholos.matflo.wg> Message-ID: The problem of not associating build modes with run modes is that not all run modes will apply to all build modes. Note that i don't think run modes should be *part* of build modes, but only an association between build modes and run modes. Basically, what you say about a default run mode per build mode, i say to make it a list of what is *not* (from a UI perspective you'll see them as what is part, but only store what is not so that when you add a new run mode it is available to all build modes without the user needing to go at each one and enable it). On Sat, Feb 11, 2017 at 3:31 PM, Michael Van Canneyt via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Sat, 11 Feb 2017, Kostas Michalopoulos wrote: > > I think having a list for run modes (i assume you mean the settings you >> specify in the Run -> Run Parameters dialog box) that you can select from >> a >> popup menu near the "play" button and have different run modes apply, like >> you can select the build mode from the "gear" button, is a good idea. >> Being >> able to switch configuration files and working directories from inside >> Lazarus for some of the tools i work with would be very nice. >> >> The only thing i disagree with is to have them per build mode since >> chances >> are you'd need them with different build modes (e.g. debug, release, >> profile, etc would have the same run modes) and even if you could copy >> them, it would still be an annoyance to make sure all are available. >> >> Instead i'd say to have a table with a column per build mode and a row per >> run mode, have checkboxes for those that will apply and those checkboxes >> would be enabled by default. >> >> Alternatively just use a global list that is the same across all build >> modes, but then you may have run modes that do not apply in all build >> modes >> and have them take up space (e.g. if one of your run modes causes a >> program >> to load a 32bit DLL and you are in a build mode that explicitly targets a >> 64bit OS this run mode wouldn't apply - of course one case wouldn't matter >> much, but the next thing i imagine after such a feature is available is >> being able to generate run modes automatically though a script :-P). >> > > If you want a list, I would simply allow to make a list as you suggest, > and for each build mode you can simply specify which item in the list is > used as default when pressing run. Being able to specify multiple > run modes per build mode seems way overkill to me. > > I don't want to end up with Eclipse, where you need a Phd in Eclipse to be > able to do even simple tasks in the IDE... > > > Michael. > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Sat Feb 11 22:19:32 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 11 Feb 2017 21:19:32 +0000 Subject: [Lazarus] Run parameters In-Reply-To: References: Message-ID: <52a8ee65-2227-bc5b-b1bb-a6c488f090b6@geldenhuys.co.uk> On 2017-02-11 10:22, Michael Van Canneyt via Lazarus wrote: > Logically, I would I think these parameters belong in the .lps file ? I fully agree, they should be stored in the .lps - I don't care about lists or build modes and all that jazz. The accidental committing of user credentials into a code repository has bitten me a few times. The same goes for commit conflicts after getting a repository update because other developers tested with different parameters. All very annoying. 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 zikon770 at gmail.com Sun Feb 12 09:18:07 2017 From: zikon770 at gmail.com (Tom Lisjac) Date: Sun, 12 Feb 2017 01:18:07 -0700 Subject: [Lazarus] Disabling selected text boxes Message-ID: I would appreciate if someone could tell me how to disable the source editor from drawing boxes around selected text matches in 1.6.2? No idea what to google for as I don't have any idea what this option is called. Thanks, -Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sun Feb 12 09:53:42 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 12 Feb 2017 09:53:42 +0100 (CET) Subject: [Lazarus] Disabling selected text boxes In-Reply-To: References: Message-ID: On Sun, 12 Feb 2017, Tom Lisjac via Lazarus wrote: > I would appreciate if someone could tell me how to disable the source > editor from drawing boxes around selected text matches in 1.6.2? No idea > what to google for as I don't have any idea what this option is called. The options for this behaviour are under 'Editor-Display-Markup and Matches' "Highlight of word under Caret" And then the checkbox: 'Disable timer for markup current word' Michael. From fjf.vanleeuwen at quicknet.nl Sun Feb 12 14:40:08 2017 From: fjf.vanleeuwen at quicknet.nl (frans) Date: Sun, 12 Feb 2017 14:40:08 +0100 Subject: [Lazarus] IniPropStorage OnSaveProperties and OnSavingProperties Message-ID: <8c25267f-ba91-6728-816b-6d0bacd866f1@quicknet.nl> Hi. Can someone explain this to me. I'm testing the use of TIniPropStorage and I like it. But this I don't understand. The use of WriteBoolean i.e. only works in OnSaveProperties and not in OnSavingProperties. I like this direct method above the use of 'StoredValue[] := BoolToStr(). -- mvg Frans van Leeuwen M 06-51695390 From corpsman at web.de Sun Feb 12 15:39:31 2017 From: corpsman at web.de (corpsman at web.de) Date: Sun, 12 Feb 2017 15:39:31 +0100 Subject: [Lazarus] Run parameters In-Reply-To: <52a8ee65-2227-bc5b-b1bb-a6c488f090b6@geldenhuys.co.uk> References: <52a8ee65-2227-bc5b-b1bb-a6c488f090b6@geldenhuys.co.uk> Message-ID: <52068454-21d7-ff89-16d4-a4fcbb4d9f61@web.de> +1 On 11.02.2017 22:19, Graeme Geldenhuys via Lazarus wrote: > On 2017-02-11 10:22, Michael Van Canneyt via Lazarus wrote: >> Logically, I would I think these parameters belong in the .lps file ? > > I fully agree, they should be stored in the .lps - I don't care about > lists or build modes and all that jazz. The accidental committing of > user credentials into a code repository has bitten me a few times. The > same goes for commit conflicts after getting a repository update because > other developers tested with different parameters. All very annoying. > > Regards, > Graeme > From zikon770 at gmail.com Sun Feb 12 19:47:14 2017 From: zikon770 at gmail.com (Tom Lisjac) Date: Sun, 12 Feb 2017 11:47:14 -0700 Subject: [Lazarus] Disabling selected text boxes In-Reply-To: References: Message-ID: That did it... many thanks, Michael. On Sun, Feb 12, 2017 at 1:53 AM, Michael Van Canneyt via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Sun, 12 Feb 2017, Tom Lisjac via Lazarus wrote: > > I would appreciate if someone could tell me how to disable the source >> editor from drawing boxes around selected text matches in 1.6.2? No idea >> what to google for as I don't have any idea what this option is called. >> > > The options for this behaviour are under > 'Editor-Display-Markup and Matches' "Highlight of word under Caret" > > And then the checkbox: > 'Disable timer for markup current word' > > Michael. > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From markMLl.lazarus at telemetry.co.uk Mon Feb 13 10:23:35 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 13 Feb 2017 09:23:35 +0000 Subject: [Lazarus] Widget set definitions Message-ID: I've got a bit of diagnostic code that I add to most programs that retrieves things like Subversion revision numbers and link-time build ID. It also contains (*$IFDEF LCLQT *) widV= 'Linked with the Qt widget set'; (*$DEFINE WIDGETSET *) (*$ENDIF *) (*$IFDEF LCLFPGUI *) widV= 'Linked with the FPGUI widget set'; (*$DEFINE WIDGETSET *) (*$ENDIF *) and so on. Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, but where can I find this so that I can make sure that my code's kept in step? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From lazarus at kluug.net Mon Feb 13 10:46:32 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 13 Feb 2017 10:46:32 +0100 Subject: [Lazarus] Widget set definitions In-Reply-To: References: Message-ID: <71a78163-b596-4074-4da6-bf2440c0f9e9@kluug.net> On 13.02.2017 10:23, Mark Morgan Lloyd via Lazarus wrote: > Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, > but where can I find this so that I can make sure that my code's kept > in step? They are defined in the LCL package. See "package options -> usage -> custom" and "Compiler Options -> Custom Options". Ondrej From nc-gaertnma at netcologne.de Mon Feb 13 10:53:48 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 13 Feb 2017 10:53:48 +0100 Subject: [Lazarus] Widget set definitions In-Reply-To: References: Message-ID: <20170213105348.7d9dc9d1@limapholos.matflo.wg> On Mon, 13 Feb 2017 09:23:35 +0000 Mark Morgan Lloyd via Lazarus wrote: > I've got a bit of diagnostic code that I add to most programs that > retrieves things like Subversion revision numbers and link-time build > ID. It also contains > > (*$IFDEF LCLQT *) > widV= 'Linked with the Qt widget set'; > (*$DEFINE WIDGETSET *) > (*$ENDIF *) > (*$IFDEF LCLFPGUI *) > widV= 'Linked with the FPGUI widget set'; > (*$DEFINE WIDGETSET *) > (*$ENDIF *) > > and so on. > > Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, > but where can I find this so that I can make sure that my code's kept in > step? uses InterfaceBase, LCLPlatformDef; widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+' widget set'; Mattias From markMLl.lazarus at telemetry.co.uk Mon Feb 13 11:21:20 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 13 Feb 2017 10:21:20 +0000 Subject: [Lazarus] Widget set definitions In-Reply-To: <20170213105348.7d9dc9d1@limapholos.matflo.wg> References: <20170213105348.7d9dc9d1@limapholos.matflo.wg> Message-ID: On 13/02/17 10:00, Mattias Gaertner via Lazarus wrote: > On Mon, 13 Feb 2017 09:23:35 +0000Mark Morgan Lloyd via Lazarus wrote: >> I've got a bit of diagnostic code that I add to most programs that > retrieves things like Subversion revision numbers and link-time build > ID. It also contains> > (*$IFDEF LCLQT *)> widV= 'Linked with the Qt widget set';> (*$DEFINE WIDGETSET *)> (*$ENDIF *)> (*$IFDEF LCLFPGUI *)> widV= 'Linked with the FPGUI widget set';> (*$DEFINE WIDGETSET *)> (*$ENDIF *)> > and so on.> > Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, > but where can I find this so that I can make sure that my code's kept in > step? > uses InterfaceBase, LCLPlatformDef; > widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+'widget set'; OK, Thanks. So I can see how I can derive the names etc. from that, it appears to have been supported since the dawn of time, and linking to it is still going to be no more intrusive than some of the other stuff that's already in my diagnostic unit. But out of curiosity, I'd still be very interested to know how the compile-time definitions like the ones in my example are generated :-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From jmlandmesser at gmx.de Mon Feb 13 20:25:48 2017 From: jmlandmesser at gmx.de (John Landmesser) Date: Mon, 13 Feb 2017 20:25:48 +0100 Subject: [Lazarus] Does anybody know a TStrinGrid-Component capable of sorting Date. Time, Float ... Message-ID: <25f60371-7e26-4df8-e9f1-b7838c11da00@gmx.de> Hi, i searched some time for such a component ... in vain! So i developed myself a TStringGrid, that sorts columns with TDate, TTime, TFloat ... I can't believe that this doesn't allready exists for Lazarus?! For example i found http://www.tkweb.eu/en/delphicomp/kgrid.html BUT!! "Written as TCustomControl descendant, this is not a TCustomGrid enhancement" So, no LoadFromCSV etc ... very bad! Some sort of TSortGrid from Delphi-Zip would be nice. Tipps are welcome! From vojtech.cihak at atlas.cz Mon Feb 13 21:36:34 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Mon, 13 Feb 2017 21:36:34 +0100 Subject: [Lazarus] =?utf-8?q?Does_anybody_know_a_TStrinGrid-Component_capa?= =?utf-8?q?ble_of_sorting_Date=2E_Time=2C_Float_=2E=2E=2E?= In-Reply-To: 000000006d930000c20001014fed References: 000000006d930000c20001014fed Message-ID: <20170213213634.B811A6CD@atlas.cz> Hi, IMO such sorting is not very handy. TStringGrid is for strings. Consider what you do: 1) you have some data structure - dates, floats, integers 2) you fill stringgrid with the data Now you need to sort. You have three possibilities: 1) Sort data structure and fill string grid again - better or 2) Convert string from string grid back to data, and sort - worse or 3) do not use stringgrid at all and use DBGrid or DrawGrid - the best   V. ______________________________________________________________ > Od: John Landmesser via Lazarus > Komu: Lazarus at lists.lazarus-ide.org > Datum: 13.02.2017 20:25 > Předmět: [Lazarus] Does anybody know a TStrinGrid-Component capable of > Hi, i searched some time for such a component ... in vain! So i developed myself a TStringGrid,  that sorts columns with TDate, TTime, TFloat ... I can't believe that this doesn't allready exists for Lazarus?! For example i found http://www.tkweb.eu/en/delphicomp/kgrid.html BUT!! "Written as TCustomControl descendant, this is not a TCustomGrid enhancement" So, no LoadFromCSV etc ... very bad! Some sort of TSortGrid from Delphi-Zip would be nice. Tipps are welcome! -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From badsectoracula at gmail.com Mon Feb 13 22:48:31 2017 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Mon, 13 Feb 2017 23:48:31 +0200 Subject: [Lazarus] Widget set definitions In-Reply-To: References: <20170213105348.7d9dc9d1@limapholos.matflo.wg> Message-ID: The LCL package has this in custom definitions for dependent packages: -dLCL -dLCL$(LCLWidgetType) So Lazarus simply defines the LCL and LCL at compile time. is one of the subdirectories in lcl/interfaces. On Mon, Feb 13, 2017 at 12:21 PM, Mark Morgan Lloyd via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 13/02/17 10:00, Mattias Gaertner via Lazarus wrote: > >> On Mon, 13 Feb 2017 09:23:35 +0000Mark Morgan Lloyd via Lazarus < >> lazarus at lists.lazarus-ide.org> wrote: >> >>> I've got a bit of diagnostic code that I add to most programs that > >>> retrieves things like Subversion revision numbers and link-time build > ID. >>> It also contains> > (*$IFDEF LCLQT *)> widV= 'Linked with the Qt >>> widget set';> (*$DEFINE WIDGETSET *)> (*$ENDIF *)> (*$IFDEF >>> LCLFPGUI *)> widV= 'Linked with the FPGUI widget set';> (*$DEFINE >>> WIDGETSET *)> (*$ENDIF *)> > and so on.> > Presumably LCLQT and the >>> rest are defined somewhere in the IDE or LCL, > but where can I find this >>> so that I can make sure that my code's kept in > step? >>> >> uses InterfaceBase, LCLPlatformDef; >> widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+'widget >> set'; >> > > OK, Thanks. So I can see how I can derive the names etc. from that, it > appears to have been supported since the dawn of time, and linking to it is > still going to be no more intrusive than some of the other stuff that's > already in my diagnostic unit. > > But out of curiosity, I'd still be very interested to know how the > compile-time definitions like the ones in my example are generated :-) > > -- > Mark Morgan Lloyd > markMLl .AT. telemetry.co .DOT. uk > > [Opinions above are the author's, not those of his employers or colleagues] > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mse00000 at gmail.com Tue Feb 14 07:27:48 2017 From: mse00000 at gmail.com (Martin Schreiber) Date: Tue, 14 Feb 2017 07:27:48 +0100 Subject: [Lazarus] Does anybody know a TStrinGrid-Component capable of sorting Date. Time, Float ... In-Reply-To: <25f60371-7e26-4df8-e9f1-b7838c11da00@gmx.de> References: <25f60371-7e26-4df8-e9f1-b7838c11da00@gmx.de> Message-ID: <201702140727.48551.mse00000@gmail.com> On Monday 13 February 2017 20:25:48 John Landmesser via Lazarus wrote: > Hi, > > i searched some time for such a component ... in vain! > > So i developed myself a TStringGrid, that sorts columns with TDate, > TTime, TFloat ... > TWidgetGrid from MSEgui supports it. There TDataEdit descendendants (TStringEdit, TRealEdit, TDateEdit...) can be placed in the grid and build a column of the given type. TwidgetGrid does not inherit from TStringGrid but from TCustomGrid. There is also TDBWidgetGrid which connects to a TDatasource. The code is here: https://gitlab.com/mseide-msegui/mseide-msegui > I can't believe that this doesn't allready exists for Lazarus?! > The implementation is very complex... Martin From juergen.hestermann at gmx.de Tue Feb 14 18:03:44 2017 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Tue, 14 Feb 2017 18:03:44 +0100 Subject: [Lazarus] "Procedure list" level depth dependend? Message-ID: In my program the "Procedure List" function (Ctrl+G) does not list functions that are subfunctions of other functions. Is there a restriction to show only functions of level depth 1? If yes, why? I did not found any options influencing this. From aaa5500 at ya.ru Tue Feb 14 22:21:57 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 15 Feb 2017 00:21:57 +0300 Subject: [Lazarus] TaskDialog asking Message-ID: <465532f4-7459-41f4-4489-588bc26e8c64@ya.ru> I dont see how to - use Timer in taskdialog: I dont see event OnTimer or smth (flag for timer exists!) - show dialog with non-expanded style, ie how to use ExpandButtonCaption - set icon with some Std id. ie Stop, Warn, Shield- main icon, footer too -- Regards, Alexey From fluisgirardi at gmail.com Tue Feb 14 22:22:42 2017 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Tue, 14 Feb 2017 19:22:42 -0200 Subject: [Lazarus] allow/Deny user to show form Message-ID: Hi all! I'm rewriting the security system of my project, and I extended the support of my secure controls to all standard controls of Lazarus, including TForm and TFrame classes. The default behavior of all controls is if the user is not allowed to interact with it, the control is disabled, otherwise it's enabled. But with TForm, I have two ways of allow/Deny: ** Enable/disable whole form (done). ** Allow show if user is allowed to show the form, or hide/close if the user log out of the system or not authorized to view the form. My problem is: What's the best TForm method to override to abort form show via TForm.Show and TForm.ShowModal calls? -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Wed Feb 15 00:51:58 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Wed, 15 Feb 2017 00:51:58 +0100 Subject: [Lazarus] Does anybody know a TStrinGrid-Component capable of sorting Date. Time, Float ... In-Reply-To: <25f60371-7e26-4df8-e9f1-b7838c11da00@gmx.de> References: <25f60371-7e26-4df8-e9f1-b7838c11da00@gmx.de> Message-ID: Am 13.02.2017 um 20:25 schrieb John Landmesser via Lazarus: > Hi, > > i searched some time for such a component ... in vain! > > So i developed myself a TStringGrid, that sorts columns with TDate, > TTime, TFloat ... > > I can't believe that this doesn't allready exists for Lazarus?! > > For example i found http://www.tkweb.eu/en/delphicomp/kgrid.html > BUT!! "Written as TCustomControl descendant, this is not a TCustomGrid > enhancement" > So, no LoadFromCSV etc ... very bad! > > Some sort of TSortGrid from Delphi-Zip would be nice. > > Tipps are welcome! > > Try the TsWorksheetGrid from the fpspreadsheet package (http://wiki.lazarus.freepascal.org/TsWorksheetGrid). It derives from TCustomGrid, but be warned of some different behavior from the StringGrid here and there. From lazarus at kluug.net Wed Feb 15 09:41:57 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 15 Feb 2017 09:41:57 +0100 Subject: [Lazarus] TaskDialog asking In-Reply-To: <465532f4-7459-41f4-4489-588bc26e8c64@ya.ru> References: <465532f4-7459-41f4-4489-588bc26e8c64@ya.ru> Message-ID: <0ec0c7ad-702d-2929-a1f3-f2bcee53f0f4@kluug.net> On 14.02.2017 22:21, Alexey via Lazarus wrote: > - use Timer in taskdialog: I dont see event OnTimer or smth (flag for > timer exists!) What is it good for? I see that Delphi has it: http://docwiki.embarcadero.com/Libraries/XE7/en/Vcl.Dialogs.TCustomTaskDialog.OnTimer I didn't add this feature yet. > - show dialog with non-expanded style, ie how to use ExpandButtonCaption Set ExpandedText to something. > - set icon with some Std id. ie Stop, Warn, Shield- main icon, footer too You MainIcon and FooterIcon. Unfortunately they are interger properties (as it is in Delphi) but I will probably change it to enum (and introduce a Delphi incompability). Ondrej From sysrpl at gmail.com Wed Feb 15 18:22:57 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 15 Feb 2017 12:22:57 -0500 Subject: [Lazarus] allow/Deny user to show form In-Reply-To: References: Message-ID: What you probably should do is create a function to show a form of any class for you, and put that security check in that one place. Example: function ShowForm(FormClass: TFormClass; Modal: Boolean = False): Boolean; begin // your global function to check if a user can access a form class Result := UserSecurityCheck(FormClass); if Result then // make sure FormClass close action is caFree with FormClass.Create(Application) do if Modal then Result := ShowModal = mrOk else Show; end; -------------- next part -------------- An HTML attachment was scrubbed... URL: From fluisgirardi at gmail.com Wed Feb 15 21:39:03 2017 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Wed, 15 Feb 2017 18:39:03 -0200 Subject: [Lazarus] allow/Deny user to show form In-Reply-To: References: Message-ID: I don't know if the solution that I implemented last night is the best one. I did the following: //FIsEnabledBySecurity: the user can access the control? this variable is changed via another call, when user login or logout, checking the authorizations of the logged user. //FAllowUnauthorizedShowForm: value of a property that sets if not allowed users can show the form or not. procedure TpSCADASecureForm.SetVisible(Value: boolean); override; begin FIsPSCADAFormVisible:=Value; inherited SetVisible(FIsPSCADAFormVisible and (FIsEnabledBySecurity or FAllowUnauthorizedShowForm)); end; this do the job very well, showing and hiding the form across user login/logout changes, even if I call TsomePSCADAFormInstance = class(TpSCADASecureForm); somePSCADAFormInstance:TsomePSCADAFormInstance; somePSCADAFormInstance.Visible := true; somePSCADAFormInstance.Show; but when I call somePSCADAFormInstance.ShowModal; I got a Exception that says that somePSCADAFormInstance is not enabled (that is true, because I have a access try of a not allowed user), but this exception is not the real cause of the problem, that is access of a not allowed user or a not logged user. My solution at this point is override the ShowModal: //FSecurityCode is a property with a string that describes the permission that you will give or not for each user //GetPascalSCADAControlSecurityManager: class instance that manages the control interaction with users and their permissions, 44 //Each control that supports the interface ISecureControlInterface, should register/unregister with this manager, to be notified about user changes/permission changes. function TpSCADASecureForm.ShowModal: Integer; override; begin if GetPascalSCADAControlSecurityManager.CanAccess(FSecurityCode)=false then raise ESecuritySystemAccessDenied.Create(FSecurityCode); Result:=inherited ShowModal; end; What is your opinion? -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Wed Feb 15 23:29:58 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 16 Feb 2017 01:29:58 +0300 Subject: [Lazarus] TaskDialog asking In-Reply-To: <0ec0c7ad-702d-2929-a1f3-f2bcee53f0f4@kluug.net> References: <465532f4-7459-41f4-4489-588bc26e8c64@ya.ru> <0ec0c7ad-702d-2929-a1f3-f2bcee53f0f4@kluug.net> Message-ID: On 15.02.2017 11:41, Ondrej Pokorny via Lazarus wrote: >> use Timer in taskdialog: I dont see event OnTimer or smth (flag for >> timer exists!) To autoclose form, if e.g. app wants to show 8 seconds, and then do YES. e.g "Reboot OS now? Waiting 30 sec" -- Regards, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmlandmesser at gmx.de Thu Feb 16 08:26:22 2017 From: jmlandmesser at gmx.de (Landmesser John) Date: Thu, 16 Feb 2017 08:26:22 +0100 Subject: [Lazarus] When will the lazarus archive been gzip'd again? Message-ID: Hi, the gzip'd archive stops at May 2016. When will the Lazarus archives afterwards be gzip'd ? I use the very useful "Lazarus Mailinglist Reader" and that needs these gzip'd archives. Isn't that done automatic? Does the gzip'd stops due to an error? Quote: To see the collection of prior postings to the list, visit theLazarus Archives -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmlandmesser at gmx.de Thu Feb 16 08:49:33 2017 From: jmlandmesser at gmx.de (Landmesser John) Date: Thu, 16 Feb 2017 08:49:33 +0100 Subject: [Lazarus] When will the lazarus archive been gzip'd again? In-Reply-To: References: Message-ID: I'll mail that at lazarus-owner at lists.lazarus-ide.org Am 16.02.2017 um 08:26 schrieb Landmesser John via Lazarus: > Hi, > > the gzip'd archive stops at May 2016. When will the Lazarus archives > afterwards be gzip'd ? > > I use the very useful "Lazarus Mailinglist Reader" and that needs > these gzip'd archives. > > Isn't that done automatic? Does the gzip'd stops due to an error? > > Quote: > To see the collection of prior postings to the list, visit theLazarus > Archives > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Thu Feb 16 09:19:36 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Thu, 16 Feb 2017 09:19:36 +0100 Subject: [Lazarus] When will the lazarus archive been gzip'd again? In-Reply-To: References: Message-ID: Am 16.02.2017 um 08:26 schrieb Landmesser John via Lazarus: > the gzip'd archive stops at May 2016. When will the Lazarus archives > afterwards be gzip'd ? > > I use the very useful "Lazarus Mailinglist Reader" and that needs > these gzip'd archives. > > Isn't that done automatic? Does the gzip'd stops due to an error? Please get yourself the latest revision of Lazarus Mailinglist Reader. I realized that issue a couple of weeks ago and modified the reader to download also unzipped txt files. From jmlandmesser at gmx.de Thu Feb 16 10:15:15 2017 From: jmlandmesser at gmx.de (Landmesser John) Date: Thu, 16 Feb 2017 10:15:15 +0100 Subject: [Lazarus] When will the lazarus archive been gzip'd again? In-Reply-To: References: Message-ID: <2d641751-eff7-858c-32a8-b2eae1802978@gmx.de> thanks Werner, that solved the Problem! Am 16.02.2017 um 09:19 schrieb Werner Pamler via Lazarus: > > Please get yourself the latest revision of Lazarus Mailinglist Reader. > I realized that issue a couple of weeks ago and modified the reader to > download also unzipped txt files. > From mailinglists at geldenhuys.co.uk Thu Feb 16 11:54:44 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 16 Feb 2017 10:54:44 +0000 Subject: [Lazarus] $IF for Linux and FreeBSD platforms? Message-ID: <38886776-13b6-9c44-687e-2a08db30f455@geldenhuys.co.uk> Hi, Is the following allowed in LCL specific code? {$IFDEF LCLGTK2} {$IF declared(Linux) or declared(FreeBSD)} {$define something} {$endif} {$endif} The IDE shows that CodeTools knows about the FreeBSD variable, but the code doesn't seem to work, because later in the code the "something" compiler define seems undefined during compilation - yet the IDE correctly shades the {$IFDEF something} wrapped code as active. 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 Thu Feb 16 12:16:30 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 16 Feb 2017 11:16:30 +0000 Subject: [Lazarus] $IF for Linux and FreeBSD platforms? In-Reply-To: <38886776-13b6-9c44-687e-2a08db30f455@geldenhuys.co.uk> References: <38886776-13b6-9c44-687e-2a08db30f455@geldenhuys.co.uk> Message-ID: On 2017-02-16 10:54, Graeme Geldenhuys via Lazarus wrote: > The IDE shows that CodeTools knows about the FreeBSD variable, but the > code doesn't seem to work, Doing the following though does work, but it means I have to duplicate all $DEFINE lines in two places, which I don't really want to do. {$IFDEF LCLGTK2} {$IFDEF Linux} {$DEFINE something} ...snip. {$ENDIF} {$IFDEF FreeBSD} {$DEFINE something} ...snip. {$ENDIF} {$ENDIF} 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 Thu Feb 16 12:18:33 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 16 Feb 2017 12:18:33 +0100 Subject: [Lazarus] $IF for Linux and FreeBSD platforms? In-Reply-To: References: <38886776-13b6-9c44-687e-2a08db30f455@geldenhuys.co.uk> Message-ID: <75dc779a-471b-7f90-8ae4-1915b24dc90f@kluug.net> On 16.02.2017 12:16, Graeme Geldenhuys via Lazarus wrote: > On 2017-02-16 10:54, Graeme Geldenhuys via Lazarus wrote: >> The IDE shows that CodeTools knows about the FreeBSD variable, but the >> code doesn't seem to work, > > Doing the following though does work, but it means I have to duplicate > all $DEFINE lines in two places, which I don't really want to do. > > > {$IFDEF LCLGTK2} > {$IFDEF Linux} > {$DEFINE something} > ...snip. > {$ENDIF} > {$IFDEF FreeBSD} > {$DEFINE something} > ...snip. > {$ENDIF} > {$ENDIF} Well, you mixed up DEFINED and DECLARED macros. The following should work: {$IFDEF LCLGTK2} {$IF DEFINED(Linux) or DEFINED(FreeBSD)} {$define something} {$endif} {$endif} Ondrej From mailinglists at geldenhuys.co.uk Thu Feb 16 12:35:41 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 16 Feb 2017 11:35:41 +0000 Subject: [Lazarus] $IF for Linux and FreeBSD platforms? In-Reply-To: <75dc779a-471b-7f90-8ae4-1915b24dc90f@kluug.net> References: <38886776-13b6-9c44-687e-2a08db30f455@geldenhuys.co.uk> <75dc779a-471b-7f90-8ae4-1915b24dc90f@kluug.net> Message-ID: <776d4908-6718-a079-1da7-3dc3248b3e5f@geldenhuys.co.uk> On 2017-02-16 11:18, Ondrej Pokorny via Lazarus wrote: > Well, you mixed up DEFINED and DECLARED macros. Dope!!! Thanks for spotting that. I need more coffee. ;-) 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 kapibara.pas at aol.com Fri Feb 17 13:17:07 2017 From: kapibara.pas at aol.com (Kapibara Pas) Date: Fri, 17 Feb 2017 07:17:07 -0500 Subject: [Lazarus] Always on top: Object Inspector and Message Window Message-ID: <15a4c01214d-59e0-dcb0@webprd-m14.mail.aol.com> In Lazarus trunk, the message window and object inspector is alwas on top and hides everything thats behind it. It also hides the code completion window (ctrl+space) so you cant read some of it. See screenshot. This happened 1-2 months ago. I was about to report this in the bugtracker when I saw that it is only for up to Laz 1.63 SVN, not the trunk. kapibara -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Fri Feb 17 14:10:07 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 17 Feb 2017 15:10:07 +0200 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: <15a4c01214d-59e0-dcb0@webprd-m14.mail.aol.com> References: <15a4c01214d-59e0-dcb0@webprd-m14.mail.aol.com> Message-ID: On Fri, Feb 17, 2017 at 2:17 PM, Kapibara Pas via Lazarus wrote: > In Lazarus trunk, the message window and object inspector is alwas on top > and hides everything thats behind it. It also hides the code completion > window (ctrl+space) so you cant read some of it. See screenshot. This > happened 1-2 months ago. It works for me and for many other people. It must be a local config or build issue of some sort. > I was about to report this in the bugtracker when I saw that it is only for > up to Laz 1.63 SVN, not the trunk. I can see "1.7 (SVN)" there. It may be a user rights issue. All data may not be visible for everybody even if it should. Anyway, don't report unless somebody else can reproduce. Juha From aaa5500 at ya.ru Fri Feb 17 17:47:45 2017 From: aaa5500 at ya.ru (Alexey) Date: Fri, 17 Feb 2017 19:47:45 +0300 Subject: [Lazarus] IDE message-window - noise Message-ID: <78659cdb-9469-ea1f-3e1c-e19e82986463@ya.ru> I often make little change in code, press F9/CtrlF9, then, if error, Messages window (with errors info) pops up AND goes to foreground. It's vary bad- that it makes foregnd, coz I cannot change code by keyboard. I must close Msg window then. Only then i can correct the code error:( Ubuntu 14.4 gtk2. Cannot find option for not going to foreground -- Regards, Alex From lazarus at kluug.net Fri Feb 17 17:50:06 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 17 Feb 2017 17:50:06 +0100 Subject: [Lazarus] IDE message-window - noise In-Reply-To: <78659cdb-9469-ea1f-3e1c-e19e82986463@ya.ru> References: <78659cdb-9469-ea1f-3e1c-e19e82986463@ya.ru> Message-ID: <23bc77a0-54a0-4fe3-f016-7ae47121ac1f@kluug.net> On 17.02.2017 17:47, Alexey via Lazarus wrote: > I often make little change in code, press F9/CtrlF9, then, if error, > Messages window (with errors info) pops up AND goes to foreground. > It's vary bad- that it makes foregnd, coz I cannot change code by > keyboard. > > I must close Msg window then. Only then i can correct the code > error:( Ubuntu 14.4 gtk2. Cannot find option for not going to foreground IDE Options -> Messages Window -> Focus messages at compilation Ondrej From aaa5500 at ya.ru Fri Feb 17 17:52:20 2017 From: aaa5500 at ya.ru (Alexey) Date: Fri, 17 Feb 2017 19:52:20 +0300 Subject: [Lazarus] IDE message-window - noise In-Reply-To: <23bc77a0-54a0-4fe3-f016-7ae47121ac1f@kluug.net> References: <78659cdb-9469-ea1f-3e1c-e19e82986463@ya.ru> <23bc77a0-54a0-4fe3-f016-7ae47121ac1f@kluug.net> Message-ID: <7f2de883-2b12-ff03-d517-7012cba76d5c@ya.ru> On 17.02.2017 19:50, Ondrej Pokorny via Lazarus wrote: > > IDE Options -> Messages Window -> Focus messages at compilation > I know- it DONT work: i have it unchecked on 2 PCs. already. and still foreground Msg wnd. -- Regards, Alexey From michael at freepascal.org Fri Feb 17 17:57:40 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 17 Feb 2017 17:57:40 +0100 (CET) Subject: [Lazarus] IDE message-window - noise In-Reply-To: <7f2de883-2b12-ff03-d517-7012cba76d5c@ya.ru> References: <78659cdb-9469-ea1f-3e1c-e19e82986463@ya.ru> <23bc77a0-54a0-4fe3-f016-7ae47121ac1f@kluug.net> <7f2de883-2b12-ff03-d517-7012cba76d5c@ya.ru> Message-ID: On Fri, 17 Feb 2017, Alexey via Lazarus wrote: > On 17.02.2017 19:50, Ondrej Pokorny via Lazarus wrote: >> >> IDE Options -> Messages Window -> Focus messages at compilation >> > > I know- it DONT work: i have it unchecked on 2 PCs. already. and still > foreground Msg wnd. I have the same environment, and it does not happen here ? (I do work in KDE, but the IDE is gtk2) Michael. From lazarus at kluug.net Fri Feb 17 17:56:46 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 17 Feb 2017 17:56:46 +0100 Subject: [Lazarus] IDE message-window - noise In-Reply-To: <7f2de883-2b12-ff03-d517-7012cba76d5c@ya.ru> References: <78659cdb-9469-ea1f-3e1c-e19e82986463@ya.ru> <23bc77a0-54a0-4fe3-f016-7ae47121ac1f@kluug.net> <7f2de883-2b12-ff03-d517-7012cba76d5c@ya.ru> Message-ID: <7d07b9be-894b-c9c9-29ac-ed4c46790e3c@kluug.net> On 17.02.2017 17:52, Alexey via Lazarus wrote: > On 17.02.2017 19:50, Ondrej Pokorny via Lazarus wrote: >> >> IDE Options -> Messages Window -> Focus messages at compilation >> > > I know- it DONT work: i have it unchecked on 2 PCs. already. and still > foreground Msg wnd. This shouldn't happen. Run the IDE in another IDE to debug it, set the breakpoint to TCustomForm.Show and take a look what makes the message window go to foreground. Ondrej From marcov at stack.nl Fri Feb 17 18:55:56 2017 From: marcov at stack.nl (Marco van de Voort) Date: Fri, 17 Feb 2017 18:55:56 +0100 (CET) Subject: [Lazarus] FPC 3.0.2 released! Message-ID: <20170217175556.480B45082E@toad.stack.nl> Hello, Finally, FPC 3.0.2 has landed. FPC 3.0.2 is an update to 3.0.0 that contains some compiler bugfixes and library progress since 3.0.0 Building is still in progress and some formats (deb) and other minor targets might not be available yet. Changes that may break backwards compatibility are documented at: http://wiki.freepascal.org/User_Changes_3.0.2 Due to issues with mirroring, please use sourceforge as much as possible, http://sourceforge.net/projects/freepascal/files/ or the main (Hungarian) FTP server at ftp://www.hu.freepascal.org/pub/fpc/dist/3.0.2 Enjoy! The FreePascal team Free Pascal Compiler Version 3.0.2 ****************************************************************************** What's New in 3.0.2 ****************************************************************************** Free Pascal 3.0.2 is a point release of the 3.0.x fixes branch. Please also see http://wiki.freepascal.org/User_Changes_3.0.2 for a list of changes that may affect the behaviour of previously working code, and how to cope with these changes. Some highlights are: Rtl: * TRect, TPoint and similar types are now type compatible between Types and Windows unit, and are now advanced records. Packages: * googleapi and fcl-pdf packages. * fcl-db and web packages synchronized * unicode tables updated. See http://bugs.freepascal.org/changelog_page.php for the list of reported bugs which have been fixed in this release. From kapibara.pas at aol.com Fri Feb 17 23:37:26 2017 From: kapibara.pas at aol.com (Kapibara Pas) Date: Fri, 17 Feb 2017 17:37:26 -0500 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: Message-ID: <15a4e390de4-59e0-fc62@webprd-m14.mail.aol.com> Hi again. This issue exist only with Lazarus trunk and started a few months ago. Release and fixes doesn't have that problem. If I back down a few revisions, the "always on top" stops. So it is highly unlikely that rights, builds, configs or similar has anything to do with it. I don't know exactly when (or why) this was introduced. Could prolly track it down, but already spent a weeks share of time with the "Iron curtain bug". ;-) Btw, closing the "always on top" Message Window to be able to view the obscured code completion list hangs the list window and Lazarus has to be restarted. Linux GTK2. kapibara -----Original Message----- From: Juha Manninen via Lazarus To: Lazarus mailing list Cc: Juha Manninen Sent: Fri, Feb 17, 2017 2:10 pm Subject: Re: [Lazarus] Always on top: Object Inspector and Message Window On Fri, Feb 17, 2017 at 2:17 PM, Kapibara Pas via Lazarus wrote:> In Lazarus trunk, the message window and object inspector is alwas on top> and hides everything thats behind it. It also hides the code completion> window (ctrl+space) so you cant read some of it. See screenshot. This> happened 1-2 months ago.It works for me and for many other people. It must be a local configor build issue of some sort.> I was about to report this in the bugtracker when I saw that it is only for> up to Laz 1.63 SVN, not the trunk.I can see "1.7 (SVN)" there. It may be a user rights issue. All datamay not be visible for everybody even if it should.Anyway, don't report unless somebody else can reproduce.Juha-- _______________________________________________Lazarus mailing listLazarus at lists.lazarus-ide.orghttp://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Sat Feb 18 00:14:17 2017 From: bartjunk64 at gmail.com (Bart) Date: Sat, 18 Feb 2017 00:14:17 +0100 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: <15a4e390de4-59e0-fc62@webprd-m14.mail.aol.com> References: <15a4e390de4-59e0-fc62@webprd-m14.mail.aol.com> Message-ID: On 2/17/17, Kapibara Pas via Lazarus wrote: > Could prolly track it down, but already > spent a weeks share of time with the "Iron curtain bug". ;-) Please bisect the guilty revision! Bart From aaa5500 at ya.ru Sat Feb 18 01:44:46 2017 From: aaa5500 at ya.ru (Alexey) Date: Sat, 18 Feb 2017 03:44:46 +0300 Subject: [Lazarus] Check for 'default' font Message-ID: I find all places of 'default' in Laz- Here you see all variants... :( Pls, make one variant. SameText(..., 'default') is best. if AnsiCompare(.., 'default')=0 then if SameText(.., 'default') then if CompareText(... 'default')=0 then if CompareText(... 'default')<>0 then if ....='default' then -- Regards, Alexey From kapibara.pas at aol.com Sat Feb 18 03:17:31 2017 From: kapibara.pas at aol.com (Kapibara Pas) Date: Fri, 17 Feb 2017 21:17:31 -0500 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: Message-ID: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> Bart, rev. 53831 introduced the bug. http://bugs.freepascal.org/view.php?id=13051 I uploaded a patch for each affected file and added a note. lcl/interfaces/gtk2/gtk2wsforms.pp lcl/interfaces/gtk2/gtk2globals.pp Index: gtk2wsforms.pp =================================================================== --- gtk2wsforms.pp (revision 53831) +++ gtk2wsforms.pp (revision 53830) @@ -724,12 +724,8 @@ begin if AForm.HandleObjectShouldBeVisible and GTK_IS_WINDOW({%H-}PGtkWindow(AForm.Handle)) then - begin - gtk_window_set_type_hint({%H-}PGtkWindow(AForm.Handle), - GtkWindowTypeHints[AForm.BorderStyle]); gtk_window_set_keep_above({%H-}PGtkWindow(AForm.Handle), GBoolean(AForm.FormStyle in fsAllStayOnTop)) - end else if (AForm.FormStyle in fsAllStayOnTop) and not (csDestroying in AWinControl.ComponentState) then @@ -1041,16 +1037,10 @@ end; class procedure TGtk2WSHintWindow.ShowHide(const AWinControl: TWinControl); -var - bVisible: boolean; begin if not WSCheckHandleAllocated(AWinControl, 'SetColor') then exit; - - bVisible := AWinControl.HandleObjectShouldBeVisible; - if bVisible then - gtk_window_set_type_hint(PGtkWindow(AWinControl.Handle), GDK_WINDOW_TYPE_HINT_TOOLTIP); - Gtk2WidgetSet.SetVisible(AWinControl, bVisible); + Gtk2WidgetSet.SetVisible(AWinControl, AWinControl.HandleObjectShouldBeVisible); InvalidateLastWFPResult(AWinControl, AWinControl.BoundsRect); end; Index: gtk2globals.pp =================================================================== --- gtk2globals.pp (revision 53831) +++ gtk2globals.pp (revision 53830) @@ -73,18 +73,7 @@ var Styles : TStrings; - -const - //(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin); - GtkWindowTypeHints: array[TFormBorderStyle] of TGdkWindowTypeHint = ( - GDK_WINDOW_TYPE_HINT_NOTIFICATION, - GDK_WINDOW_TYPE_HINT_DIALOG, - GDK_WINDOW_TYPE_HINT_NORMAL, - GDK_WINDOW_TYPE_HINT_DIALOG, - GDK_WINDOW_TYPE_HINT_UTILITY, - GDK_WINDOW_TYPE_HINT_UTILITY - ); - + var DefaultPangoLayout: PPangoLayout = nil; -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Sat Feb 18 04:32:05 2017 From: aaa5500 at ya.ru (Alexey) Date: Sat, 18 Feb 2017 06:32:05 +0300 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> References: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> Message-ID: <315b337c-9764-eeff-cd38-834e73924906@ya.ru> Uploaded my tiny fix , there too On 18.02.2017 05:17, Kapibara Pas via Lazarus wrote: > I uploaded a patch for each affected file and added a note. -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From michalis.kambi at gmail.com Sat Feb 18 10:34:01 2017 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Sat, 18 Feb 2017 10:34:01 +0100 Subject: [Lazarus] Castle Game Engine 6.0 released Message-ID: Hi, We're proud to release Castle Game Engine 6.0, an open-source 3D and 2D game engine for Object Pascal. This release is a culmination of more than a year of intensive engine development. The main feature is that almost every part of the engine got significant improvement, and we have more "new features" than you probably care to read about:) You can download the engine, and read the documentation, from https://castle-engine.sourceforge.io/ The release annoucement, with more complete list of changes, is on https://castle-engine.sourceforge.io/wp/2017/02/18/castle-game-engine-6-0-release/ Some highlights of the new features: - New user interface features: auto-scaling, parents, anchors, many new components and properties, - New build tool features: automatic generation and usage of GPU-compressed and downscaled textures, --mode=valgrind, - A large number of "Android package components", that provide an integration with various 3rd party Android libraries on Android (Google Play Games, In-app Purchases, sound libraries, ad networks, analytics, vibrations...), - New castle-anim-frames format, with a Blender exporter, to export *any* animations from Blender to our engine (armature, shape keys, baking physics simulations, ....). Also, the website, and the manual on https://castle-engine.sourceforge.io/manual_intro.php, received a lot of additions and changes. Last but not least, I wanted to mention our new Patreon page. You can support the engine development and get some real rewards --- I'm devoting a weekend per month exclusively to the features requested by Patrons, you can get access to the "cloud build server" (continous integration) for your game projects, and I will have a 24h gamejam every month making a demo game requested by Patrons. Please check out our Patreon page on: https://www.patreon.com/castleengine P.S. Everything compiles with the today's announced FPC version 3.0.2 (and other FPC versions too) of course. Congratulations to the FPC team! Best regards, Michalis From bartjunk64 at gmail.com Sat Feb 18 13:56:39 2017 From: bartjunk64 at gmail.com (Bart) Date: Sat, 18 Feb 2017 13:56:39 +0100 Subject: [Lazarus] FPC 3.0.2 released! In-Reply-To: <20170217175556.480B45082E@toad.stack.nl> References: <20170217175556.480B45082E@toad.stack.nl> Message-ID: On 2/17/17, Marco van de Voort via Lazarus wrote: > Finally, FPC 3.0.2 has landed. FPC 3.0.2 is an update to 3.0.0 that > contains some compiler bugfixes and library progress since 3.0.0 The fpc-3.0.2.i386-win32.cross.arm-wince.exe seems to be corrupted. "The setup files are corrupted. Please obtain a new copy of the program." (I already thought it was a bit small, it's only 4.9 MB) Tried both SF and the hungarian ftp site. Note: MS Security Essentials flags this file as virus/malware. Bart From marcov at stack.nl Sat Feb 18 16:09:27 2017 From: marcov at stack.nl (Marco van de Voort) Date: Sat, 18 Feb 2017 16:09:27 +0100 Subject: [Lazarus] FPC 3.0.2 released! In-Reply-To: References: <20170217175556.480B45082E@toad.stack.nl> Message-ID: <20170218150927.GA10422@stack.nl> On Sat, Feb 18, 2017 at 01:56:39PM +0100, Bart via Lazarus wrote: > > > Finally, FPC 3.0.2 has landed. FPC 3.0.2 is an update to 3.0.0 that > > contains some compiler bugfixes and library progress since 3.0.0 > > The fpc-3.0.2.i386-win32.cross.arm-wince.exe seems to be corrupted. > > "The setup files are corrupted. Please obtain a new copy of the program." > > (I already thought it was a bit small, it's only 4.9 MB) > > Tried both SF and the hungarian ftp site. > > Note: MS Security Essentials flags this file as virus/malware. I had already seen it on the forum, and reported it to win32 builder Pierre; there were some issues with full disks during uploading. I assume it will be resolved in the current days. From bartjunk64 at gmail.com Sat Feb 18 16:27:37 2017 From: bartjunk64 at gmail.com (Bart) Date: Sat, 18 Feb 2017 16:27:37 +0100 Subject: [Lazarus] FPC 3.0.2 released! In-Reply-To: <20170218150927.GA10422@stack.nl> References: <20170217175556.480B45082E@toad.stack.nl> <20170218150927.GA10422@stack.nl> Message-ID: On 2/18/17, Marco van de Voort via Lazarus wrote: > I had already seen it on the forum, and reported it to win32 builder Pierre; > there were some issues with full disks during uploading. > > I assume it will be resolved in the current days. Thanks, I'll try again later on. Bart From marcov at stack.nl Sat Feb 18 17:19:42 2017 From: marcov at stack.nl (Marco van de Voort) Date: Sat, 18 Feb 2017 17:19:42 +0100 Subject: [Lazarus] FPC 3.0.2 released! In-Reply-To: References: <20170217175556.480B45082E@toad.stack.nl> <20170218150927.GA10422@stack.nl> Message-ID: <20170218161942.GA25299@stack.nl> On Sat, Feb 18, 2017 at 04:27:37PM +0100, Bart via Lazarus wrote: > > I had already seen it on the forum, and reported it to win32 builder Pierre; > > there were some issues with full disks during uploading. > > > > I assume it will be resolved in the current days. > > Thanks, I'll try again later on. Pierre has uploaded it to ftp.hu.freepascal.org (scenergy), and is uploading it to sf.net. I'll see if I can sync freepascal.stack.nl From bartjunk64 at gmail.com Sat Feb 18 22:26:27 2017 From: bartjunk64 at gmail.com (Bart) Date: Sat, 18 Feb 2017 22:26:27 +0100 Subject: [Lazarus] FPC 3.0.2 released! In-Reply-To: <20170218161942.GA25299@stack.nl> References: <20170217175556.480B45082E@toad.stack.nl> <20170218150927.GA10422@stack.nl> <20170218161942.GA25299@stack.nl> Message-ID: On 2/18/17, Marco van de Voort via Lazarus wrote: > Pierre has uploaded it to ftp.hu.freepascal.org (scenergy), and is uploading > it to sf.net. Downloaded from SF: installs correctly. Thanks. Bart From l at c-m-w.me.uk Sun Feb 19 11:18:37 2017 From: l at c-m-w.me.uk (C Western) Date: Sun, 19 Feb 2017 10:18:37 +0000 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> References: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> Message-ID: <51966196-2895-3c4a-a176-707fd24f5821@c-m-w.me.uk> On 18/02/17 02:17, Kapibara Pas via Lazarus wrote: > Bart, rev. 53831 introduced the bug. > http://bugs.freepascal.org/view.php?id=13051 > > I uploaded a patch for each affected file and added a note. I can confirm that I am seeing this bug (messages window always on top), and that the applying gtk2_modaldlg1.patch from that bug report fixes it for for me. I am using the XFCE window manager on Fedora. Colin From kapibara.pas at aol.com Sun Feb 19 16:47:15 2017 From: kapibara.pas at aol.com (kapibara) Date: Sun, 19 Feb 2017 16:47:15 +0100 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: <51966196-2895-3c4a-a176-707fd24f5821@c-m-w.me.uk> References: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> <51966196-2895-3c4a-a176-707fd24f5821@c-m-w.me.uk> Message-ID: <1a4bcf4b-c0f1-1ff8-f00c-603d6e2a05b5@aol.com> I am also using XFCE, but on Debian 9 On 02/19/2017 11:18 AM, C Western via Lazarus wrote: > On 18/02/17 02:17, Kapibara Pas via Lazarus wrote: >> Bart, rev. 53831 introduced the bug. >> http://bugs.freepascal.org/view.php?id=13051 >> >> I uploaded a patch for each affected file and added a note. > > I can confirm that I am seeing this bug (messages window always on > top), and that the applying gtk2_modaldlg1.patch from that bug report > fixes it for for me. I am using the XFCE window manager on Fedora. > > Colin > From bartjunk64 at gmail.com Sun Feb 19 18:02:31 2017 From: bartjunk64 at gmail.com (Bart) Date: Sun, 19 Feb 2017 18:02:31 +0100 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: <1a4bcf4b-c0f1-1ff8-f00c-603d6e2a05b5@aol.com> References: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> <51966196-2895-3c4a-a176-707fd24f5821@c-m-w.me.uk> <1a4bcf4b-c0f1-1ff8-f00c-603d6e2a05b5@aol.com> Message-ID: On 2/19/17, kapibara via Lazarus wrote: > I am also using XFCE, but on Debian 9 Please open a bugreport about it. Mention the revision that caused this for you. Don't forget to mention you use XFCE, it may be significant. Bart From l at c-m-w.me.uk Sun Feb 19 18:25:35 2017 From: l at c-m-w.me.uk (C Western) Date: Sun, 19 Feb 2017 17:25:35 +0000 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: References: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> <51966196-2895-3c4a-a176-707fd24f5821@c-m-w.me.uk> <1a4bcf4b-c0f1-1ff8-f00c-603d6e2a05b5@aol.com> Message-ID: <5340020d-228e-f639-add9-5c5f92a8cf4f@c-m-w.me.uk> On 19/02/17 17:02, Bart via Lazarus wrote: > On 2/19/17, kapibara via Lazarus wrote: > >> I am also using XFCE, but on Debian 9 > > Please open a bugreport about it. > Mention the revision that caused this for you. > Don't forget to mention you use XFCE, it may be significant. > > Bart > I added my comment to http://bugs.freepascal.org/view.php?id=13051 (It looks like different manifestations of the same underlying problem) Colin From lazarus at kluug.net Sun Feb 19 18:42:50 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 19 Feb 2017 18:42:50 +0100 Subject: [Lazarus] Always on top: Object Inspector and Message Window In-Reply-To: References: <15a4f028a74-59e0-10323@webprd-m14.mail.aol.com> <51966196-2895-3c4a-a176-707fd24f5821@c-m-w.me.uk> <1a4bcf4b-c0f1-1ff8-f00c-603d6e2a05b5@aol.com> Message-ID: On 19.02.2017 18:02, Bart via Lazarus wrote: > On 2/19/17, kapibara via Lazarus wrote: > >> I am also using XFCE, but on Debian 9 > Please open a bugreport about it. > Mention the revision that caused this for you. > Don't forget to mention you use XFCE, it may be significant. No need, the issue has been discussed on mantis http://bugs.freepascal.org/view.php?id=13051 . It was a consequence of a wrong patch from the issue report. I commited a fix. Ondrej From aaa5500 at ya.ru Sun Feb 19 21:30:08 2017 From: aaa5500 at ya.ru (Alexey) Date: Sun, 19 Feb 2017 23:30:08 +0300 Subject: [Lazarus] Check for 'default' font In-Reply-To: References: Message-ID: <80fc2bd5-f8bc-9a28-8142-f5f7645fcf1f@ya.ru> On 18.02.2017 03:44, Alexey via Lazarus wrote: > > if AnsiCompare(.., 'default')=0 then > > if SameText(.., 'default') then > > if CompareText(... 'default')=0 then > if CompareText(... 'default')<>0 then > > if ....='default' then @devs Can i make the pch, which adds IsFontNameDefault, and all places use this func? -- Regards, Alexey From nc-gaertnma at netcologne.de Mon Feb 20 02:23:36 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 20 Feb 2017 02:23:36 +0100 Subject: [Lazarus] Check for 'default' font In-Reply-To: References: Message-ID: <20170220022336.50107214@limapholos.matflo.wg> On Sat, 18 Feb 2017 03:44:46 +0300 Alexey via Lazarus wrote: > I find all places of 'default' in Laz- > > Here you see all variants... :( Pls, make one variant. SameText(..., > 'default') is best. Why is SameText best? Mattias > if AnsiCompare(.., 'default')=0 then > > if SameText(.., 'default') then > > if CompareText(... 'default')=0 then > if CompareText(... 'default')<>0 then > > if ....='default' then > > From werner.pamler at freenet.de Mon Feb 20 09:42:50 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 20 Feb 2017 09:42:50 +0100 Subject: [Lazarus] Cannot commit to ccr Message-ID: <2c4132aa-b5f9-870e-11ba-0f98379429fd@freenet.de> Hi I am having a bunch of updates for ccr, but all of a sudden I cannot commit anything to sourceforge any more since yesterday. The error message is: "Commit failed (details follow): Unable to connect to a repository at URL 'https://svn.code.sf.net/p/lazarus-ccr/svn/components/colorpalette'. Error running context: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte." - the German part of the message means: "Connection could not be created, refused by the destination computer". Even checking out from the read-only server (svn://svn.code.sf.net/p/lazarus-ccr/svn/) fails with a similar message. A ping to svn.code.sf.net is successful, and I did not find any notifications about sourceforge server problems in the internet. Is anybody else seeing these issues as well? Or, if this is a local issue of my account or my local computer, has anybody ever experienced something similar and can give me some advice on how to resolve it? Werner From ptrg at freemail.hu Mon Feb 20 10:18:15 2017 From: ptrg at freemail.hu (=?UTF-8?B?UMOpdGVyIEfDoWJvcg==?=) Date: Mon, 20 Feb 2017 10:18:15 +0100 Subject: [Lazarus] Cannot commit to ccr In-Reply-To: <2c4132aa-b5f9-870e-11ba-0f98379429fd@freenet.de> References: <2c4132aa-b5f9-870e-11ba-0f98379429fd@freenet.de> Message-ID: Hi! Read-only access (svn update) is impossible too: Error: Error while performing action: Unable to connect to a repository at URL 'svn://svn.code.sf.net/p/lazarus-ccr/svn' Can't connect to host 'svn.code.sf.net': Kapcsolat elutasítva Hungarian part of the message means: Connection refused 2017-02-20 09:42 keltezéssel, Werner Pamler via Lazarus írta: > Hi > > I am having a bunch of updates for ccr, but all of a sudden I cannot > commit anything to sourceforge any more since yesterday. The error > message is: "Commit failed (details follow): Unable to connect to a > repository at URL > 'https://svn.code.sf.net/p/lazarus-ccr/svn/components/colorpalette'. > Error running context: Es konnte keine Verbindung hergestellt werden, da > der Zielcomputer die Verbindung verweigerte." - the German part of the > message means: "Connection could not be created, refused by the > destination computer". > > Even checking out from the read-only server > (svn://svn.code.sf.net/p/lazarus-ccr/svn/) fails with a similar message. > > A ping to svn.code.sf.net is successful, and I did not find any > notifications about sourceforge server problems in the internet. > > Is anybody else seeing these issues as well? Or, if this is a local > issue of my account or my local computer, has anybody ever experienced > something similar and can give me some advice on how to resolve it? > > Werner > -- Péter Gábor ptrg at freemail.hu From werner.pamler at freenet.de Mon Feb 20 10:25:19 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 20 Feb 2017 10:25:19 +0100 Subject: [Lazarus] Cannot commit to ccr In-Reply-To: References: <2c4132aa-b5f9-870e-11ba-0f98379429fd@freenet.de> Message-ID: <1680788f-8109-23ef-a402-f0448e4bbca6@freenet.de> Am 20.02.2017 um 10:18 schrieb Péter Gábor via Lazarus: > Read-only access (svn update) is impossible too: > > Error: Error while performing action: Unable to connect to a repository > at URL 'svn://svn.code.sf.net/p/lazarus-ccr/svn' > Can't connect to host 'svn.code.sf.net': Kapcsolat elutasítva > > Hungarian part of the message means: Connection refused > Now I had the (straightforward...) idea to look for "sourceforge service", and there's a lot of tickets on this issue (https://sourceforge.net/p/forge/site-support/). So, hopefully they will fix it soon... From mailinglists at geldenhuys.co.uk Mon Feb 20 11:38:09 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 20 Feb 2017 10:38:09 +0000 Subject: [Lazarus] Cannot commit to ccr In-Reply-To: <1680788f-8109-23ef-a402-f0448e4bbca6@freenet.de> References: <2c4132aa-b5f9-870e-11ba-0f98379429fd@freenet.de> <1680788f-8109-23ef-a402-f0448e4bbca6@freenet.de> Message-ID: On 2017-02-20 09:25, Werner Pamler via Lazarus wrote: > Now I had the (straightforward...) idea to look for "sourceforge > service", and there's a lot of tickets on this issue > (https://sourceforge.net/p/forge/site-support/). So, hopefully they will > fix it soon... If only everybody used Git, then it would be business as usual without any downtime. ;-) ps: Git repos can be relocated (even if temporarily) in an instant (eg: to GitHub, GitLabs or even your own private server) Regards, Graeme From lazarus at kluug.net Mon Feb 20 17:46:13 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 20 Feb 2017 17:46:13 +0100 Subject: [Lazarus] LCL High-DPI Message-ID: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> I'd like to announce that I finished the concept of DPI scaling in Lazarus / LCL. It's quite easy for the programmer. Documented here: http://wiki.lazarus.freepascal.org/High_DPI (details are in "High DPI in Lazarus 1.7 and above"). 1.) I made the Lazarus IDE High-DPI aware - the IDE itself and its windows should scale correctly. 2.) To make your own application use the new LCL scaling and to make sure your layouts don't get destroyed, do the following: a.) Make sure you don't change the system DPI settings during the proccess. b.) Update the IDE to the latest trunk and rebuild it. c.) Open your project in the IDE. d.) Enable LCL scaling for your application DPI awarness in Project Options -> Application -> "Use LCL scaling (Hi-DPI). e.) On Windows: enable DPI awarness in Project Options -> Application. Decide if you want to support per monitor DPI awarness or not. f.) Make sure TForm.Scaled=True for all your forms (default value). g.) Make sure you use TControl.ScaleCoord() or ScaleCoord96() to scale coordinates during the run-time. And you are ready. Your forms will scale both in runtime and design time nicely. For those who followed my last announcement: as Zeljko and Michael requested, I removed the LCLScaleForms define and introduced the Application.Scaled property instead (that you set in step 2d). The default value is Application.Scaled=False. If you keep Application.Scaled=False, there won't be any changes in your application. Please report issues or comment on problems. I have still time to change things until Lazarus 1.8 is out (you can expect RC1 in April). Ondrej From denisgolovan at yandex.ru Mon Feb 20 21:37:22 2017 From: denisgolovan at yandex.ru (denisgolovan) Date: Mon, 20 Feb 2017 23:37:22 +0300 Subject: [Lazarus] GUI freeze under GTK2 Message-ID: <977611487623042@web13h.yandex.ru> Hi all Recently, I've started experiencing rather nasty bug - my GUI application started freezing when scrolling VirtualTreeView component vertically using scrollbar. VTV itself is rather old version (last commit from May 17 2015). FPC and Lazarus are from trunk, svn rev.35396 and rev.54204. I am under Gentoo x64, gtk2 widgetset, gtk+ library v2.24.31-r1. When paused after freezing, callstack always shows the following stack trace. So I assume there is some infinite loop running. #0 poll at :0 #1 ?? at :0 #2 ?? at :0 #3 xcb_wait_for_reply at :0 #4 _XReply at :0 #5 XGetGeometry at :0 #6 gdk_window_get_frame_extents at :0 #7 gdk_window_get_root_origin at :0 #8 GETWIDGETRELATIVEPOSITION(0x7fffed8cc490, 0, 0) at gtk2/gtk2proc.inc:7001 #9 SENDSIZENOTIFICATIONTOLCL(0x7fffed8cc490) at gtk2/gtk2proc.inc:6530 #10 GTKSIZE_ALLOCATECB(0x7fffed8cc490, 0x7fffffffcd20, 0x7fffed90a040) at gtk2/gtk2callback.inc:2530 #11 g_closure_invoke(0x7fffed93ac50, 0x0, 0x0, 2, 0x7fffffffcab0, 0x7fffffffcab0, 0x7fffffffca50, 0x7fffffffca50) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gclosure.c:804 #12 signal_emit_unlocked_R(0x7fffee036f40, 0x7fffee036f40, 0, 0, 0x7fffed8cc490, 0x7fffed8cc490, 0x0, 0x0, 0x7fffffffcab0, 0x7fffffffcab0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3629 #13 g_signal_emit_valist(, , , 0x7fffffffcc40, 0x7fffffffcc40) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3385 #14 g_signal_emit(, , ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3441 #15 gtk_widget_size_allocate at :0 #16 ?? at :0 #17 _g_closure_invoke_va(0x7fffed8c96a0, 0x7fffed8c96a0, 0x0, 0x0, 0x7fffed8cc490, 0x7fffed8cc490, 0x7fffffffd060, 0x7fffffffd060, , 0x0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gclosure.c:867 #18 g_signal_emit_valist(0x7fffed8cc490, , 0, 0x7fffffffd060, 0x7fffffffd060) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3294 #19 g_signal_emit(, , ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3441 #20 ?? at :0 #21 ?? at :0 #22 g_main_dispatch(0x7fffee0442c0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3154 #23 g_main_context_dispatch(0x7fffee0442c0, 0x7fffee0442c0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3769 #24 g_main_context_iterate(0x7fffee0442c0, 0x7fffee0442c0, 0, 0, 1, 1, ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3840 #25 g_main_context_iteration(0x7fffee0442c0, 0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3901 #26 APPPROCESSMESSAGES(0x7fffee1b6040) at gtk2/gtk2widgetset.inc:2328 #27 HANDLEMESSAGE(0x7fffee079540) at include/application.inc:1274 #28 RUNLOOP(0x7fffee079540) at include/application.inc:1411 #29 APPRUN(0x7fffee1b6040, {Proc = {procedure (POINTER)} 0x7fffffffd430, Self = 0x7fffee079540}) at include/interfacebase.inc:54 #30 RUN(0x7fffee079540) at include/application.inc:1399 Any hints on how to resolve? -- Regards, Denis Golovan From aaa5500 at ya.ru Mon Feb 20 21:38:09 2017 From: aaa5500 at ya.ru (Alexey) Date: Mon, 20 Feb 2017 23:38:09 +0300 Subject: [Lazarus] Check for 'default' font In-Reply-To: <20170220022336.50107214@limapholos.matflo.wg> References: <20170220022336.50107214@limapholos.matflo.wg> Message-ID: <28c653c9-d5e5-a226-4529-a7a0371e22bd@ya.ru> On 20.02.2017 04:23, Mattias Gaertner via Lazarus wrote: > Why is SameText best? > > Mattias Because it's working in all cases (for ansistring it's ok, for Unicode font names it will work too, yes?) and it's short -- Regards, Alexey From nc-gaertnma at netcologne.de Mon Feb 20 22:14:44 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 20 Feb 2017 22:14:44 +0100 Subject: [Lazarus] Check for 'default' font In-Reply-To: <28c653c9-d5e5-a226-4529-a7a0371e22bd@ya.ru> References: <20170220022336.50107214@limapholos.matflo.wg> <28c653c9-d5e5-a226-4529-a7a0371e22bd@ya.ru> Message-ID: <20170220221444.08f0a882@limapholos.matflo.wg> On Mon, 20 Feb 2017 23:38:09 +0300 Alexey via Lazarus wrote: > On 20.02.2017 04:23, Mattias Gaertner via Lazarus wrote: > > Why is SameText best? > > > > Mattias > Because it's working in all cases (for ansistring it's ok, for Unicode > font names it will work too, yes?) > and it's short 'default' is the same in all encodings. It does not matter if you use SameText, CompareText or AnsiCompareText. Btw, SameText uses CompareText. Mattias From dle3ab at angelbase.com Tue Feb 21 07:42:12 2017 From: dle3ab at angelbase.com (David Emerson) Date: Mon, 20 Feb 2017 22:42:12 -0800 Subject: [Lazarus] Castle Game Engine 6.0 released In-Reply-To: References: Message-ID: <9652f5ef-ef35-374f-336c-aff9faa2f113@angelbase.com> Congratulations Michalis! Thank you for sharing. ~David. From hnb.code at gmail.com Tue Feb 21 10:21:14 2017 From: hnb.code at gmail.com (Maciej Izak) Date: Tue, 21 Feb 2017 10:21:14 +0100 Subject: [Lazarus] LCL High-DPI In-Reply-To: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: 2017-02-20 17:46 GMT+01:00 Ondrej Pokorny via Lazarus < lazarus at lists.lazarus-ide.org>: > I'd like to announce that I finished the concept of DPI scaling in Lazarus > / LCL. Thanks to your work Lazarus is now much, much better than Delphi in this field ^^. -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Tue Feb 21 14:44:11 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 21 Feb 2017 16:44:11 +0300 Subject: [Lazarus] LCL High-DPI In-Reply-To: References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: <6faaf1d8-d6d6-8f22-0b7e-1b85c14660a8@ya.ru> On 21.02.2017 12:21, Maciej Izak via Lazarus wrote: > Thanks to your work Lazarus is now much, much better than Delphi in > this field ^^. > Yes, thanks to Ondrej, very good work -- Regards, Alexey From evvke at hotmail.com Tue Feb 21 15:47:05 2017 From: evvke at hotmail.com (Cyrax) Date: Tue, 21 Feb 2017 16:47:05 +0200 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: <977611487623042@web13h.yandex.ru> References: <977611487623042@web13h.yandex.ru> Message-ID: On 20.02.2017 22:37, denisgolovan via Lazarus wrote: > Hi all > > Recently, I've started experiencing rather nasty bug - my GUI application started freezing when scrolling VirtualTreeView component vertically using scrollbar. > VTV itself is rather old version (last commit from May 17 2015). FPC and Lazarus are from trunk, svn rev.35396 and rev.54204. > I am under Gentoo x64, gtk2 widgetset, gtk+ library v2.24.31-r1. > > When paused after freezing, callstack always shows the following stack trace. So I assume there is some infinite loop running. > > #0 poll at :0 > #1 ?? at :0 > #2 ?? at :0 > #3 xcb_wait_for_reply at :0 > #4 _XReply at :0 > #5 XGetGeometry at :0 > #6 gdk_window_get_frame_extents at :0 > #7 gdk_window_get_root_origin at :0 > #8 GETWIDGETRELATIVEPOSITION(0x7fffed8cc490, 0, 0) at gtk2/gtk2proc.inc:7001 > #9 SENDSIZENOTIFICATIONTOLCL(0x7fffed8cc490) at gtk2/gtk2proc.inc:6530 > #10 GTKSIZE_ALLOCATECB(0x7fffed8cc490, 0x7fffffffcd20, 0x7fffed90a040) at gtk2/gtk2callback.inc:2530 > #11 g_closure_invoke(0x7fffed93ac50, 0x0, 0x0, 2, 0x7fffffffcab0, 0x7fffffffcab0, 0x7fffffffca50, 0x7fffffffca50) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gclosure.c:804 > #12 signal_emit_unlocked_R(0x7fffee036f40, 0x7fffee036f40, 0, 0, 0x7fffed8cc490, 0x7fffed8cc490, 0x0, 0x0, 0x7fffffffcab0, 0x7fffffffcab0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3629 > #13 g_signal_emit_valist(, , , 0x7fffffffcc40, 0x7fffffffcc40) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3385 > #14 g_signal_emit(, , ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3441 > #15 gtk_widget_size_allocate at :0 > #16 ?? at :0 > #17 _g_closure_invoke_va(0x7fffed8c96a0, 0x7fffed8c96a0, 0x0, 0x0, 0x7fffed8cc490, 0x7fffed8cc490, 0x7fffffffd060, 0x7fffffffd060, , 0x0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gclosure.c:867 > #18 g_signal_emit_valist(0x7fffed8cc490, , 0, 0x7fffffffd060, 0x7fffffffd060) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3294 > #19 g_signal_emit(, , ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3441 > #20 ?? at :0 > #21 ?? at :0 > #22 g_main_dispatch(0x7fffee0442c0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3154 > #23 g_main_context_dispatch(0x7fffee0442c0, 0x7fffee0442c0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3769 > #24 g_main_context_iterate(0x7fffee0442c0, 0x7fffee0442c0, 0, 0, 1, 1, ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3840 > #25 g_main_context_iteration(0x7fffee0442c0, 0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3901 > #26 APPPROCESSMESSAGES(0x7fffee1b6040) at gtk2/gtk2widgetset.inc:2328 > #27 HANDLEMESSAGE(0x7fffee079540) at include/application.inc:1274 > #28 RUNLOOP(0x7fffee079540) at include/application.inc:1411 > #29 APPRUN(0x7fffee1b6040, {Proc = {procedure (POINTER)} 0x7fffffffd430, Self = 0x7fffee079540}) at include/interfacebase.inc:54 > #30 RUN(0x7fffee079540) at include/application.inc:1399 > > Any hints on how to resolve? > Can you try attached unit source file? You need to add in your main program sources before any LCL units and after cthreads/cmem units. -------------- next part -------------- unit unix_init_xlib; {$mode objfpc}{$H+} interface implementation uses xlib; Var AStatus : TStatus; initialization AStatus := XInitThreads; AStatus := AStatus; finalization end. From aaa5500 at ya.ru Tue Feb 21 16:21:17 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 21 Feb 2017 18:21:17 +0300 Subject: [Lazarus] Check for 'default' font In-Reply-To: <20170220221444.08f0a882@limapholos.matflo.wg> References: <20170220022336.50107214@limapholos.matflo.wg> <28c653c9-d5e5-a226-4529-a7a0371e22bd@ya.ru> <20170220221444.08f0a882@limapholos.matflo.wg> Message-ID: <1f652af1-6714-a852-352f-0fdb94d71204@ya.ru> On 21.02.2017 00:14, Mattias Gaertner via Lazarus wrote: > It does not matter if you use > SameText, CompareText or AnsiCompareText. Btw, SameText uses > CompareText. yes, it is right, I want to make diff, which uses SameText in all places, in IDE... -- Regards, Alexey From nc-gaertnma at netcologne.de Tue Feb 21 16:36:40 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 21 Feb 2017 16:36:40 +0100 Subject: [Lazarus] Check for 'default' font In-Reply-To: <1f652af1-6714-a852-352f-0fdb94d71204@ya.ru> References: <20170220022336.50107214@limapholos.matflo.wg> <28c653c9-d5e5-a226-4529-a7a0371e22bd@ya.ru> <20170220221444.08f0a882@limapholos.matflo.wg> <1f652af1-6714-a852-352f-0fdb94d71204@ya.ru> Message-ID: <20170221163640.53bdf9f2@limapholos.matflo.wg> On Tue, 21 Feb 2017 18:21:17 +0300 Alexey via Lazarus wrote: > On 21.02.2017 00:14, Mattias Gaertner via Lazarus wrote: > > It does not matter if you use > > SameText, CompareText or AnsiCompareText. Btw, SameText uses > > CompareText. > > yes, it is right, I want to make diff, which uses SameText in all > places, in IDE... As I wrote, SameText is merely a slightly slower version of CompareText. What are you up to? Mattias From donald at ziesig.org Tue Feb 21 16:40:02 2017 From: donald at ziesig.org (Donald Ziesig) Date: Tue, 21 Feb 2017 10:40:02 -0500 Subject: [Lazarus] LCL High-DPI In-Reply-To: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: <3873c2ba-34cb-7658-ff7e-fd8eb99f0bbd@ziesig.org> Hi Ondrej! Your work has made a major improvement in Lazarus. It is much more enjoyable to use. I have converted my most recent major APP using it and it was mostly straight forward. I will continue using it and report back to you as my work permits. Thank you, Don Ziesig On 02/20/2017 11:46 AM, Ondrej Pokorny via Lazarus wrote: > I'd like to announce that I finished the concept of DPI scaling in > Lazarus / LCL. > > It's quite easy for the programmer. Documented here: > http://wiki.lazarus.freepascal.org/High_DPI (details are in "High DPI > in Lazarus 1.7 and above"). > > 1.) I made the Lazarus IDE High-DPI aware - the IDE itself and its > windows should scale correctly. > > 2.) To make your own application use the new LCL scaling and to make > sure your layouts don't get destroyed, do the following: > > a.) Make sure you don't change the system DPI settings during the > proccess. > b.) Update the IDE to the latest trunk and rebuild it. > c.) Open your project in the IDE. > d.) Enable LCL scaling for your application DPI awarness in Project > Options -> Application -> "Use LCL scaling (Hi-DPI). > e.) On Windows: enable DPI awarness in Project Options -> Application. > Decide if you want to support per monitor DPI awarness or not. > f.) Make sure TForm.Scaled=True for all your forms (default value). > g.) Make sure you use TControl.ScaleCoord() or ScaleCoord96() to scale > coordinates during the run-time. > > And you are ready. Your forms will scale both in runtime and design > time nicely. > > For those who followed my last announcement: as Zeljko and Michael > requested, I removed the LCLScaleForms define and introduced the > Application.Scaled property instead (that you set in step 2d). The > default value is Application.Scaled=False. > > If you keep Application.Scaled=False, there won't be any changes in > your application. > > Please report issues or comment on problems. I have still time to > change things until Lazarus 1.8 is out (you can expect RC1 in April). > > Ondrej > From donald at ziesig.org Tue Feb 21 19:13:31 2017 From: donald at ziesig.org (Donald Ziesig) Date: Tue, 21 Feb 2017 13:13:31 -0500 Subject: [Lazarus] LCL High-DPI In-Reply-To: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: One more question. Where can I find documentation for TControl.ScaleCoord() or ScaleCoord96()? It is not in the CCR. I will search the source. Don On 02/20/2017 11:46 AM, Ondrej Pokorny via Lazarus wrote: > I'd like to announce that I finished the concept of DPI scaling in > Lazarus / LCL. > > It's quite easy for the programmer. Documented here: > http://wiki.lazarus.freepascal.org/High_DPI (details are in "High DPI > in Lazarus 1.7 and above"). > > 1.) I made the Lazarus IDE High-DPI aware - the IDE itself and its > windows should scale correctly. > > 2.) To make your own application use the new LCL scaling and to make > sure your layouts don't get destroyed, do the following: > > a.) Make sure you don't change the system DPI settings during the > proccess. > b.) Update the IDE to the latest trunk and rebuild it. > c.) Open your project in the IDE. > d.) Enable LCL scaling for your application DPI awarness in Project > Options -> Application -> "Use LCL scaling (Hi-DPI). > e.) On Windows: enable DPI awarness in Project Options -> Application. > Decide if you want to support per monitor DPI awarness or not. > f.) Make sure TForm.Scaled=True for all your forms (default value). > g.) Make sure you use TControl.ScaleCoord() or ScaleCoord96() to scale > coordinates during the run-time. > > And you are ready. Your forms will scale both in runtime and design > time nicely. > > For those who followed my last announcement: as Zeljko and Michael > requested, I removed the LCLScaleForms define and introduced the > Application.Scaled property instead (that you set in step 2d). The > default value is Application.Scaled=False. > > If you keep Application.Scaled=False, there won't be any changes in > your application. > > Please report issues or comment on problems. I have still time to > change things until Lazarus 1.8 is out (you can expect RC1 in April). > > Ondrej > From denisgolovan at yandex.ru Tue Feb 21 19:46:03 2017 From: denisgolovan at yandex.ru (denisgolovan) Date: Tue, 21 Feb 2017 21:46:03 +0300 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: References: <977611487623042@web13h.yandex.ru> Message-ID: <359971487702763@web2h.yandex.ru> Nope. No change with this unit. Still freezes, stack track is the same. BR, Denis 21.02.2017, 17:49, "Cyrax via Lazarus" : > On 20.02.2017 22:37, denisgolovan via Lazarus wrote: >>  Hi all >> >>  Recently, I've started experiencing rather nasty bug - my GUI application started freezing when scrolling VirtualTreeView component vertically using scrollbar. >>  VTV itself is rather old version (last commit from May 17 2015). FPC and Lazarus are from trunk, svn rev.35396 and rev.54204. >>  I am under Gentoo x64, gtk2 widgetset, gtk+ library v2.24.31-r1. >> >>  When paused after freezing, callstack always shows the following stack trace. So I assume there is some infinite loop running. >> >>  #0 poll at :0 >>  #1 ?? at :0 >>  #2 ?? at :0 >>  #3 xcb_wait_for_reply at :0 >>  #4 _XReply at :0 >>  #5 XGetGeometry at :0 >>  #6 gdk_window_get_frame_extents at :0 >>  #7 gdk_window_get_root_origin at :0 >>  #8 GETWIDGETRELATIVEPOSITION(0x7fffed8cc490, 0, 0) at gtk2/gtk2proc.inc:7001 >>  #9 SENDSIZENOTIFICATIONTOLCL(0x7fffed8cc490) at gtk2/gtk2proc.inc:6530 >>  #10 GTKSIZE_ALLOCATECB(0x7fffed8cc490, 0x7fffffffcd20, 0x7fffed90a040) at gtk2/gtk2callback.inc:2530 >>  #11 g_closure_invoke(0x7fffed93ac50, 0x0, 0x0, 2, 0x7fffffffcab0, 0x7fffffffcab0, 0x7fffffffca50, 0x7fffffffca50) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gclosure.c:804 >>  #12 signal_emit_unlocked_R(0x7fffee036f40, 0x7fffee036f40, 0, 0, 0x7fffed8cc490, 0x7fffed8cc490, 0x0, 0x0, 0x7fffffffcab0, 0x7fffffffcab0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3629 >>  #13 g_signal_emit_valist(, , , 0x7fffffffcc40, 0x7fffffffcc40) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3385 >>  #14 g_signal_emit(, , ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3441 >>  #15 gtk_widget_size_allocate at :0 >>  #16 ?? at :0 >>  #17 _g_closure_invoke_va(0x7fffed8c96a0, 0x7fffed8c96a0, 0x0, 0x0, 0x7fffed8cc490, 0x7fffed8cc490, 0x7fffffffd060, 0x7fffffffd060, , 0x0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gclosure.c:867 >>  #18 g_signal_emit_valist(0x7fffed8cc490, , 0, 0x7fffffffd060, 0x7fffffffd060) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3294 >>  #19 g_signal_emit(, , ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3441 >>  #20 ?? at :0 >>  #21 ?? at :0 >>  #22 g_main_dispatch(0x7fffee0442c0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3154 >>  #23 g_main_context_dispatch(0x7fffee0442c0, 0x7fffee0442c0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3769 >>  #24 g_main_context_iterate(0x7fffee0442c0, 0x7fffee0442c0, 0, 0, 1, 1, ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3840 >>  #25 g_main_context_iteration(0x7fffee0442c0, 0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3901 >>  #26 APPPROCESSMESSAGES(0x7fffee1b6040) at gtk2/gtk2widgetset.inc:2328 >>  #27 HANDLEMESSAGE(0x7fffee079540) at include/application.inc:1274 >>  #28 RUNLOOP(0x7fffee079540) at include/application.inc:1411 >>  #29 APPRUN(0x7fffee1b6040, {Proc = {procedure (POINTER)} 0x7fffffffd430, Self = 0x7fffee079540}) at include/interfacebase.inc:54 >>  #30 RUN(0x7fffee079540) at include/application.inc:1399 >> >>  Any hints on how to resolve? > > Can you try attached unit source file? You need to add in your main > program sources before any LCL units and after cthreads/cmem units. > ,-- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus -- Regards, Denis Golovan From denisgolovan at yandex.ru Tue Feb 21 19:46:03 2017 From: denisgolovan at yandex.ru (denisgolovan) Date: Tue, 21 Feb 2017 21:46:03 +0300 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: References: <977611487623042@web13h.yandex.ru> Message-ID: <359971487702763@web2h.yandex.ru> Nope. No change with this unit. Still freezes, stack track is the same. BR, Denis 21.02.2017, 17:49, "Cyrax via Lazarus" : > On 20.02.2017 22:37, denisgolovan via Lazarus wrote: >>  Hi all >> >>  Recently, I've started experiencing rather nasty bug - my GUI application started freezing when scrolling VirtualTreeView component vertically using scrollbar. >>  VTV itself is rather old version (last commit from May 17 2015). FPC and Lazarus are from trunk, svn rev.35396 and rev.54204. >>  I am under Gentoo x64, gtk2 widgetset, gtk+ library v2.24.31-r1. >> >>  When paused after freezing, callstack always shows the following stack trace. So I assume there is some infinite loop running. >> >>  #0 poll at :0 >>  #1 ?? at :0 >>  #2 ?? at :0 >>  #3 xcb_wait_for_reply at :0 >>  #4 _XReply at :0 >>  #5 XGetGeometry at :0 >>  #6 gdk_window_get_frame_extents at :0 >>  #7 gdk_window_get_root_origin at :0 >>  #8 GETWIDGETRELATIVEPOSITION(0x7fffed8cc490, 0, 0) at gtk2/gtk2proc.inc:7001 >>  #9 SENDSIZENOTIFICATIONTOLCL(0x7fffed8cc490) at gtk2/gtk2proc.inc:6530 >>  #10 GTKSIZE_ALLOCATECB(0x7fffed8cc490, 0x7fffffffcd20, 0x7fffed90a040) at gtk2/gtk2callback.inc:2530 >>  #11 g_closure_invoke(0x7fffed93ac50, 0x0, 0x0, 2, 0x7fffffffcab0, 0x7fffffffcab0, 0x7fffffffca50, 0x7fffffffca50) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gclosure.c:804 >>  #12 signal_emit_unlocked_R(0x7fffee036f40, 0x7fffee036f40, 0, 0, 0x7fffed8cc490, 0x7fffed8cc490, 0x0, 0x0, 0x7fffffffcab0, 0x7fffffffcab0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3629 >>  #13 g_signal_emit_valist(, , , 0x7fffffffcc40, 0x7fffffffcc40) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3385 >>  #14 g_signal_emit(, , ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3441 >>  #15 gtk_widget_size_allocate at :0 >>  #16 ?? at :0 >>  #17 _g_closure_invoke_va(0x7fffed8c96a0, 0x7fffed8c96a0, 0x0, 0x0, 0x7fffed8cc490, 0x7fffed8cc490, 0x7fffffffd060, 0x7fffffffd060, , 0x0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gclosure.c:867 >>  #18 g_signal_emit_valist(0x7fffed8cc490, , 0, 0x7fffffffd060, 0x7fffffffd060) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3294 >>  #19 g_signal_emit(, , ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/gobject/gsignal.c:3441 >>  #20 ?? at :0 >>  #21 ?? at :0 >>  #22 g_main_dispatch(0x7fffee0442c0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3154 >>  #23 g_main_context_dispatch(0x7fffee0442c0, 0x7fffee0442c0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3769 >>  #24 g_main_context_iterate(0x7fffee0442c0, 0x7fffee0442c0, 0, 0, 1, 1, ) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3840 >>  #25 g_main_context_iteration(0x7fffee0442c0, 0) at /var/tmp/paludis/dev-libs-glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3901 >>  #26 APPPROCESSMESSAGES(0x7fffee1b6040) at gtk2/gtk2widgetset.inc:2328 >>  #27 HANDLEMESSAGE(0x7fffee079540) at include/application.inc:1274 >>  #28 RUNLOOP(0x7fffee079540) at include/application.inc:1411 >>  #29 APPRUN(0x7fffee1b6040, {Proc = {procedure (POINTER)} 0x7fffffffd430, Self = 0x7fffee079540}) at include/interfacebase.inc:54 >>  #30 RUN(0x7fffee079540) at include/application.inc:1399 >> >>  Any hints on how to resolve? > > Can you try attached unit source file? You need to add in your main > program sources before any LCL units and after cthreads/cmem units. > ,-- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus -- Regards, Denis Golovan From lazarus at kluug.net Tue Feb 21 19:51:45 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 21 Feb 2017 19:51:45 +0100 Subject: [Lazarus] LCL High-DPI In-Reply-To: References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: <25e1070a-5ef2-63cb-b099-8c65b360da45@kluug.net> On 21.02.2017 19:13, Donald Ziesig via Lazarus wrote: > One more question. Where can I find documentation for > TControl.ScaleCoord() or ScaleCoord96()? It is not in the CCR. I > will search the source. The difference is in the scale basis: ScaleCoord96: hard-coded 96. ScaleCoord: DesignTimePPI (= the PPI of the IDE - be aware that it can change if you open your project on a different system with different DPI). ScaleCoord96 is to use for hard-coded values in 96 PPI. I'll document the functions in the CCR. Ondrej From donald at ziesig.org Tue Feb 21 19:03:06 2017 From: donald at ziesig.org (Donald Ziesig) Date: Tue, 21 Feb 2017 13:03:06 -0500 Subject: [Lazarus] LCL High-DPI minor IDE issues In-Reply-To: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: Hi Ondrej! I just ran into two issues with the IDE in High-DPI mode. The IDE main window changed from yesterday (when I first used it) to today. Yesterday all of the Buttons were larger (but the internal images were still small). Today the Buttons have returned to their small sizes. The internal images are still small). I don't know what caused the change. The "Watch Properties" window is erroneously scaled for the font. Thanks, Don Ziesig On 02/20/2017 11:46 AM, Ondrej Pokorny via Lazarus wrote: > I'd like to announce that I finished the concept of DPI scaling in > Lazarus / LCL. > > It's quite easy for the programmer. Documented here: > http://wiki.lazarus.freepascal.org/High_DPI (details are in "High DPI > in Lazarus 1.7 and above"). > > 1.) I made the Lazarus IDE High-DPI aware - the IDE itself and its > windows should scale correctly. > > 2.) To make your own application use the new LCL scaling and to make > sure your layouts don't get destroyed, do the following: > > a.) Make sure you don't change the system DPI settings during the > proccess. > b.) Update the IDE to the latest trunk and rebuild it. > c.) Open your project in the IDE. > d.) Enable LCL scaling for your application DPI awarness in Project > Options -> Application -> "Use LCL scaling (Hi-DPI). > e.) On Windows: enable DPI awarness in Project Options -> Application. > Decide if you want to support per monitor DPI awarness or not. > f.) Make sure TForm.Scaled=True for all your forms (default value). > g.) Make sure you use TControl.ScaleCoord() or ScaleCoord96() to scale > coordinates during the run-time. > > And you are ready. Your forms will scale both in runtime and design > time nicely. > > For those who followed my last announcement: as Zeljko and Michael > requested, I removed the LCLScaleForms define and introduced the > Application.Scaled property instead (that you set in step 2d). The > default value is Application.Scaled=False. > > If you keep Application.Scaled=False, there won't be any changes in > your application. > > Please report issues or comment on problems. I have still time to > change things until Lazarus 1.8 is out (you can expect RC1 in April). > > Ondrej > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot at 2017-02-21 12-52-52.png Type: image/png Size: 32517 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot at 2017-02-21 12-48-46.png Type: image/png Size: 50193 bytes Desc: not available URL: From denisgolovan at yandex.ru Tue Feb 21 21:40:10 2017 From: denisgolovan at yandex.ru (denisgolovan) Date: Tue, 21 Feb 2017 23:40:10 +0300 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: References: <977611487623042@web13h.yandex.ru> Message-ID: <650601487709610@web28h.yandex.ru> Hi Not sure if it can help, but I rebuilt Lazarus with -dVerboseSizeMsg -dVerboseFormPositioning and I got following in console after GUI freeze. Those exact lines repeat endlessly in console. TEngineObjectTree is virtualtreeview control. TWinControl.WMSize A :TEngineObjectTree Message=192,67 BoundsRealized=l=1,t=1,r=193,b=68 WChg=False HChg=False FromIntf=True ClientRectInvalid=False gtksize_allocate_client: pnlEngineTree:TPanel widget=00007FFFED971020 NewSize=194,69 Allocation=194x69 Requisiton=193x68 gtksize_allocateCB: pnlEngineTree:TPanel widget=00007FFFED9238E0=GtkFrame [RMVDFStPrNwDb] LCLObject=00007FFFEE1E3340=pnlEngineTree:TPanel fixwidget=00007FFFED971020 NewSize=194,69 GtkPos=428,0,194x69 LCLPos=428,0,194x69 gdkwindow=622x69 SendSizeNotificationToLCL checking ... pnlEngineTree:TPanel Widget=[RMVDFStPrNwDb] gtksize_allocate_client: frmMain:TfrmMain widget=00007FFFED840980 NewSize=622,69 Allocation=622x69 Requisiton=0x0 gtksize_allocateCB: frmMain:TfrmMain widget=00007FFFED8CD380=GtkWindow [RMVDStPrApDb] LCLObject=00007FFFED850040=frmMain:TfrmMain fixwidget=00007FFFED840980 NewSize=622,69 GtkPos=0,0,622x69 LCLPos=2471,264,622x69 gdkwindow=622x69 VFP gtksize_allocateCB: TfrmMain 0,0 SendSizeNotificationToLCL checking ... frmMain:TfrmMain Widget=[RMVDStPrApDb] VFP SendSizeNotificationToLCL frmMain:TfrmMain 2471,264,622x69 00007FFFED8CD380=GtkWindow [RMVDStPrApDb] LCLObject=00007FFFED850040=frmMain:TfrmMain gtksize_allocate_client: :TEngineObjectTree widget=00007FFFED840A30 NewSize=177,65 Allocation=177x65 Requisiton=0x0 gtksize_allocateCB: :TEngineObjectTree widget=00007FFFED8BFB50=LCLWinapiWidget [RMVDFStPrNwDb] LCLObject=00007FFFED899440=:TEngineObjectTree fixwidget=00007FFFED840A30 NewSize=192,67 GtkPos=1,1,192x67 LCLPos=1,1,192x67 gdkwindow=194x69 SendSizeNotificationToLCL checking ... :TEngineObjectTree Widget=[RMVDFStPrNwDb] SendSizeNotificationToLCL :TEngineObjectTree GTK=1,1,192x67 LCL=1,1,192x67 -- Regards, Denis Golovan From denisgolovan at yandex.ru Tue Feb 21 21:40:10 2017 From: denisgolovan at yandex.ru (denisgolovan) Date: Tue, 21 Feb 2017 23:40:10 +0300 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: References: <977611487623042@web13h.yandex.ru> Message-ID: <650601487709610@web28h.yandex.ru> Hi Not sure if it can help, but I rebuilt Lazarus with -dVerboseSizeMsg -dVerboseFormPositioning and I got following in console after GUI freeze. Those exact lines repeat endlessly in console. TEngineObjectTree is virtualtreeview control. TWinControl.WMSize A :TEngineObjectTree Message=192,67 BoundsRealized=l=1,t=1,r=193,b=68 WChg=False HChg=False FromIntf=True ClientRectInvalid=False gtksize_allocate_client: pnlEngineTree:TPanel widget=00007FFFED971020 NewSize=194,69 Allocation=194x69 Requisiton=193x68 gtksize_allocateCB: pnlEngineTree:TPanel widget=00007FFFED9238E0=GtkFrame [RMVDFStPrNwDb] LCLObject=00007FFFEE1E3340=pnlEngineTree:TPanel fixwidget=00007FFFED971020 NewSize=194,69 GtkPos=428,0,194x69 LCLPos=428,0,194x69 gdkwindow=622x69 SendSizeNotificationToLCL checking ... pnlEngineTree:TPanel Widget=[RMVDFStPrNwDb] gtksize_allocate_client: frmMain:TfrmMain widget=00007FFFED840980 NewSize=622,69 Allocation=622x69 Requisiton=0x0 gtksize_allocateCB: frmMain:TfrmMain widget=00007FFFED8CD380=GtkWindow [RMVDStPrApDb] LCLObject=00007FFFED850040=frmMain:TfrmMain fixwidget=00007FFFED840980 NewSize=622,69 GtkPos=0,0,622x69 LCLPos=2471,264,622x69 gdkwindow=622x69 VFP gtksize_allocateCB: TfrmMain 0,0 SendSizeNotificationToLCL checking ... frmMain:TfrmMain Widget=[RMVDStPrApDb] VFP SendSizeNotificationToLCL frmMain:TfrmMain 2471,264,622x69 00007FFFED8CD380=GtkWindow [RMVDStPrApDb] LCLObject=00007FFFED850040=frmMain:TfrmMain gtksize_allocate_client: :TEngineObjectTree widget=00007FFFED840A30 NewSize=177,65 Allocation=177x65 Requisiton=0x0 gtksize_allocateCB: :TEngineObjectTree widget=00007FFFED8BFB50=LCLWinapiWidget [RMVDFStPrNwDb] LCLObject=00007FFFED899440=:TEngineObjectTree fixwidget=00007FFFED840A30 NewSize=192,67 GtkPos=1,1,192x67 LCLPos=1,1,192x67 gdkwindow=194x69 SendSizeNotificationToLCL checking ... :TEngineObjectTree Widget=[RMVDFStPrNwDb] SendSizeNotificationToLCL :TEngineObjectTree GTK=1,1,192x67 LCL=1,1,192x67 -- Regards, Denis Golovan From lazarus at kluug.net Tue Feb 21 22:13:43 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 21 Feb 2017 22:13:43 +0100 Subject: [Lazarus] LCL High-DPI minor IDE issues In-Reply-To: References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: <5a82aac9-7ff7-674b-6838-9794d5c1f2d7@kluug.net> Strange, it looks good here (the latest revision): https://s17.postimg.org/9a9oa9cyn/Linux_120_DPI.png I've been working on High DPI today so maybe it was broken at some point during the day (?) Ondrej On 21.02.2017 19:03, Donald Ziesig via Lazarus wrote: > Hi Ondrej! > > I just ran into two issues with the IDE in High-DPI mode. > > The IDE main window changed from yesterday (when I first used it) to > today. Yesterday all of the Buttons were larger (but the internal > images were still small). Today the Buttons have returned to their > small sizes. The internal images are still small). > > > > I don't know what caused the change. > > The "Watch Properties" window is erroneously scaled for the font. > > > > > Thanks, > > Don Ziesig From donald at ziesig.org Tue Feb 21 22:38:35 2017 From: donald at ziesig.org (Donald Ziesig) Date: Tue, 21 Feb 2017 16:38:35 -0500 Subject: [Lazarus] LCL High-DPI minor IDE issues In-Reply-To: <5a82aac9-7ff7-674b-6838-9794d5c1f2d7@kluug.net> References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> <5a82aac9-7ff7-674b-6838-9794d5c1f2d7@kluug.net> Message-ID: <1078b166-da2f-9554-45e7-77a79b549ccd@ziesig.org> Very strange. I looked at all of the Form DesignTimePPI and they were set to 96! I shut down Lazarus and re-started it and they all changed back to 144 (and the little buttons got big!). My forms all look good again except for the "Watch Properties". I'll keep trying and let you know. Don On 02/21/2017 04:13 PM, Ondrej Pokorny via Lazarus wrote: > Strange, it looks good here (the latest revision): > https://s17.postimg.org/9a9oa9cyn/Linux_120_DPI.png > > I've been working on High DPI today so maybe it was broken at some > point during the day (?) > > Ondrej > > > > On 21.02.2017 19:03, Donald Ziesig via Lazarus wrote: >> Hi Ondrej! >> >> I just ran into two issues with the IDE in High-DPI mode. >> >> The IDE main window changed from yesterday (when I first used it) to >> today. Yesterday all of the Buttons were larger (but the internal >> images were still small). Today the Buttons have returned to their >> small sizes. The internal images are still small). >> >> >> >> I don't know what caused the change. >> >> The "Watch Properties" window is erroneously scaled for the font. >> >> >> >> >> Thanks, >> >> Don Ziesig > From lazarus at kluug.net Wed Feb 22 00:33:44 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 22 Feb 2017 00:33:44 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images Message-ID: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> Update: I worked further today (unfortunately...) I also added icon scaling support to the IDE. The IDE now can load 150% and 200% versions of the icons. If a High-DPI icon is missing, the normal icon is upscaled (with the worst algorithm, but that's what is available in the IDE). Request: search for volunteers who would add at least the most important IDE icons (open, save, desktops - basically what is visible in the coolbars). Please see images/README.txt for more info. Note: the High-DPI icons are used only from 144DPI (150%) upwards. 120DPI (125%) uses the original icons (which is default on Windows, AFAIK). Thanks Ondrej From juha.manninen62 at gmail.com Wed Feb 22 00:45:27 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 22 Feb 2017 01:45:27 +0200 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: <650601487709610@web28h.yandex.ru> References: <977611487623042@web13h.yandex.ru> <650601487709610@web28h.yandex.ru> Message-ID: What revision caused the freezing? http://wiki.freepascal.org/How_do_I_create_a_bug_report#Regression_caused_by_a_certain_revision Juha From vojtech.cihak at atlas.cz Wed Feb 22 02:32:44 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Wed, 22 Feb 2017 02:32:44 +0100 Subject: [Lazarus] =?utf-8?q?=22Procedure_list=22_level_depth_dependend=3F?= In-Reply-To: 000000006da3000081c00103501e References: 000000006da3000081c00103501e Message-ID: <20170222023244.00D66687@atlas.cz> Hello, I tested with Lazarus 1.7 r54239M FPC 3.0.2 x86_64-linux-qt and nested functions and procedures are listed well (I tested depth 3). The shortcut is Alt+G.   V. ______________________________________________________________ > Od: Jürgen Hestermann via Lazarus > Komu: Lazarus mailing list > Datum: 14.02.2017 18:03 > Předmět: [Lazarus] "Procedure list" level depth dependend? > In my program the "Procedure List" function (Ctrl+G) does not list functions that are subfunctions of other functions. Is there a restriction to show only functions of level depth 1? If yes, why? I did not found any options influencing this. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From tc at epidata.info Wed Feb 22 08:37:54 2017 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Wed, 22 Feb 2017 08:37:54 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> References: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> Message-ID: <78608bfa-38c9-3bed-5fbb-1174a16e85ee@epidata.info> How do i use icon scaling for user project? Regards Torsten. On 2017-02-22 00:33, Ondrej Pokorny via Lazarus wrote: > Update: I worked further today (unfortunately...) > > I also added icon scaling support to the IDE. The IDE now can load > 150% and 200% versions of the icons. If a High-DPI icon is missing, > the normal icon is upscaled (with the worst algorithm, but that's what > is available in the IDE). > > Request: search for volunteers who would add at least the most > important IDE icons (open, save, desktops - basically what is visible > in the coolbars). Please see images/README.txt for more info. > > Note: the High-DPI icons are used only from 144DPI (150%) upwards. > 120DPI (125%) uses the original icons (which is default on Windows, > AFAIK). > > Thanks > Ondrej > From lazarus at kluug.net Wed Feb 22 09:08:08 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 22 Feb 2017 09:08:08 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <78608bfa-38c9-3bed-5fbb-1174a16e85ee@epidata.info> References: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> <78608bfa-38c9-3bed-5fbb-1174a16e85ee@epidata.info> Message-ID: <6f41f8ed-e166-0399-353d-c75d3b399dbf@kluug.net> On 22.02.2017 8:37, Torsten Bonde Christiansen via Lazarus wrote: > How do i use icon scaling for user project? The LCL doesn't offer an automatic feature for that. You have to do it yourself - use different image lists for different scaling or load external images in the wanted scaling. The IDE does the same. I don't know if an automatic solution (one multi-resolution image list) is even possible - because e.g. some Win32 controls require usage of the Win32-native imagelist. Ondrej From mailinglists at geldenhuys.co.uk Wed Feb 22 10:38:51 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 22 Feb 2017 09:38:51 +0000 Subject: [Lazarus] Laz v1.3 Ctrl+Click "jump to implementation" behaviour Message-ID: <4a11c73c-e6cb-7eea-14dd-6415c96c34d0@geldenhuys.co.uk> Hi, I know v1.3 is an old version, but for specific reasons I can't upgrade (yet). Anyway, in this version of Lazarus (running under Windows), if I Ctrl+LeftClick, it jumps to the declaration of a method/procedure/function, and not actual implementation. Now in my Lazarus v1.3 I did see under IDE Options -> Editor -> Mouse, there is a "Ctrl Button" under the "Left 1" settings, which is set to "Jumps to implementation", but it actually jumps to the declaration (same as Alt+UpArrow behaviour). Is there some other setting I need to change so Ctrl+LeftClick actually jumps to the implementation, or was this simply a bug in v1.3 which was later fixed? I have a Laz v1.7 running under FreeBSD where the Ctrl+LeftClick behaviour is correct - it jumps to the actual implementation. 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 Wed Feb 22 11:35:15 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 22 Feb 2017 11:35:15 +0100 Subject: [Lazarus] Laz v1.3 Ctrl+Click "jump to implementation" behaviour In-Reply-To: <4a11c73c-e6cb-7eea-14dd-6415c96c34d0@geldenhuys.co.uk> References: <4a11c73c-e6cb-7eea-14dd-6415c96c34d0@geldenhuys.co.uk> Message-ID: <4ef8842b-98cf-4986-5cc0-70219265374e@kluug.net> On 22.02.2017 10:38, Graeme Geldenhuys via Lazarus wrote: > I know v1.3 is an old version, but for specific reasons I can't upgrade > (yet). Anyway, in this version of Lazarus (running under Windows), if I > Ctrl+LeftClick, it jumps to the declaration of a > method/procedure/function, and not actual implementation. > > Now in my Lazarus v1.3 I did see under IDE Options -> Editor -> Mouse, > there is a "Ctrl Button" under the "Left 1" settings, which is set to > "Jumps to implementation", but it actually jumps to the declaration > (same as Alt+UpArrow behaviour). > > Is there some other setting I need to change so Ctrl+LeftClick actually > jumps to the implementation, or was this simply a bug in v1.3 which was > later fixed? I have a Laz v1.7 running under FreeBSD where the > Ctrl+LeftClick behaviour is correct - it jumps to the actual implementation. It wasn't a bug but a missing feature. You surely can find the issue on mantis and maybe apply the commits to your 1.3 version as the commits didn't use anything fancy. Ondrej From mailinglists at geldenhuys.co.uk Wed Feb 22 12:48:06 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 22 Feb 2017 11:48:06 +0000 Subject: [Lazarus] Laz v1.3 Ctrl+Click "jump to implementation" behaviour In-Reply-To: <4ef8842b-98cf-4986-5cc0-70219265374e@kluug.net> References: <4a11c73c-e6cb-7eea-14dd-6415c96c34d0@geldenhuys.co.uk> <4ef8842b-98cf-4986-5cc0-70219265374e@kluug.net> Message-ID: On 2017-02-22 10:35, Ondrej Pokorny via Lazarus wrote: > It wasn't a bug but a missing feature. You surely can find the issue on > mantis Fantastic, I'll take a look in Mantis. Thanks. Regards, Graeme From juergen.hestermann at gmx.de Wed Feb 22 12:49:51 2017 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Wed, 22 Feb 2017 12:49:51 +0100 Subject: [Lazarus] "Procedure list" level depth dependend? In-Reply-To: <20170222023244.00D66687@atlas.cz> References: <20170222023244.00D66687@atlas.cz> Message-ID: <80da2109-775d-dd68-6020-c67d88e1acc8@gmx.de> Am 2017-02-22 um 02:32 schrieb Vojtěch Čihák via Lazarus: > I tested with Lazarus 1.7 r54239M FPC 3.0.2 x86_64-linux-qt and nested functions and procedures are listed well (I tested depth 3). I am using the last official release of Lazarus (1.6.2) on Windows 8.1. It does not show deeper nested functions. > The shortcut is Alt+G. Yes, you are right. It's Alt+G (not Ctrl+G). From mailinglists at geldenhuys.co.uk Wed Feb 22 13:02:58 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 22 Feb 2017 12:02:58 +0000 Subject: [Lazarus] "Procedure list" level depth dependend? In-Reply-To: <80da2109-775d-dd68-6020-c67d88e1acc8@gmx.de> References: <20170222023244.00D66687@atlas.cz> <80da2109-775d-dd68-6020-c67d88e1acc8@gmx.de> Message-ID: <59b659e4-d4cb-4159-06d3-634ce7844983@geldenhuys.co.uk> On 2017-02-22 11:49, Jürgen Hestermann via Lazarus wrote: > > The shortcut is Alt+G. > > Yes, you are right. It's Alt+G (not Ctrl+G). Technically it's user configurable, so can be anything. ;-) Mine is set as Ctrl+G. :) Regards, Graeme From vojtech.cihak at atlas.cz Wed Feb 22 13:55:08 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Wed, 22 Feb 2017 13:55:08 +0100 Subject: [Lazarus] =?utf-8?q?=22Procedure_list=22_level_depth_dependend=3F?= In-Reply-To: 000000006e0c0000f64001035022 References: <20170222023244.00D66687@atlas.cz> 000000006e0c0000f64001035022 Message-ID: <20170222135508.DE0DEFBD@atlas.cz> I just tested Lazarus 1.6 under Wine and I can confirm. It does not show nested procs and funcs at all. Someone else should test to find out if it is Windows only issue or if there were improving between 1.6.2 and 1.7. (There is mentioned that the autor of Procedure List is Graeme.)   V. ______________________________________________________________ > Od: Jürgen Hestermann via Lazarus > Komu: Lazarus mailing list > Datum: 22.02.2017 12:49 > Předmět: Re: [Lazarus] "Procedure list" level depth dependend? > Am 2017-02-22 um 02:32 schrieb Vojtěch Čihák via Lazarus: > I tested with Lazarus 1.7 r54239M FPC 3.0.2 x86_64-linux-qt and nested functions and procedures are listed well (I tested depth 3). I am using the last official release of Lazarus (1.6.2) on Windows 8.1. It does not show deeper nested functions. > The shortcut is Alt+G. Yes, you are right. It's Alt+G (not Ctrl+G). -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.mauri.75 at gmail.com Wed Feb 22 15:33:37 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Wed, 22 Feb 2017 15:33:37 +0100 Subject: [Lazarus] statusbar flickers Message-ID: Hello, I have an issue with TStausBar, when I update the text in a panel fastly it starts flickering. To test it, drop a label a button and a statusbar with at least one panel on a form. Then add this code to ButtonClick. procedure TForm1.Button1Click(Sender: TObject); var i: integer; begin i:= 0; while i < 10000 do begin Application.ProcessMessages; label1.Caption:= Format('Number: %d', [i]); statusbar1.Panels[0].Text:= Format('Number: %d', [i]); Inc(i); end; end; Tlabel does not flickers, Tstatusbar flickers. Tested on windows. Is it a known issue? Should I create a bug-report? Best regards, Andrea Mauri From mailinglists at geldenhuys.co.uk Wed Feb 22 15:40:34 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 22 Feb 2017 14:40:34 +0000 Subject: [Lazarus] "Procedure list" level depth dependend? In-Reply-To: References: Message-ID: On 2017-02-14 17:03, Jürgen Hestermann via Lazarus wrote: > Is there a restriction to show only functions of level depth 1? > If yes, why? > I did not found any options influencing this. I tested with Lazarus v1.3 and Lazarus v1.7. I can confirm that older Lazarus versions seem to limit itself to only top-level (depth of 1) methods, functions and procedures. It does work correctly in v1.7 though. I can also confirm that the original Procedure List implementation didn't use CodeTools internally - it had its own parser - and with that code it listed all methods/procedures/functions, no matter the nested depth. See attached screenshot. So I guess somewhere when Procedure List was converted to using CodeTools, this bug got introduced. It was definitely not the intent. Maybe a small patch can be applied to your Lazarus to resolve the issue locally. Maybe compare your version of Lazarus to the latest Procedure List in trunk and see what is done differently with CodeTools. I haven't looked at the Procedure List code in a very long time. If I have the time I'll try and take a look, but I'm extremely busy at the moment, so no guarantees. 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot01.png Type: image/png Size: 23694 bytes Desc: not available URL: From donald at ziesig.org Wed Feb 22 17:55:55 2017 From: donald at ziesig.org (Donald Ziesig) Date: Wed, 22 Feb 2017 11:55:55 -0500 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> References: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> Message-ID: Hi Ondrej! I downloaded the latest lazarus from svn. Then make bigide. When I started lazarus, the CoolBar is empty (except for the Save icon which is the correct size). The component icons are definitely bigger than the last version, but appear more like 125% rather than the 150% that I would expect for 144 dpi. I rebuilt the laz_images.res (at least the file time stamp changed) and the ide but there was no change in the empty CoolBar. images/README.txt says: To use a high-DPI icon, register the icon with the suffix "_150" (150%) or "_200" (200%). See e.g. actions/laz_save_150.png How do I do that? I can create the bigger icons with gimp and store them in the actions directory but that doesn't seem to help (tried this with the menu_run icon but it still uses the old one. Also, in the sub-menus there is only ONE icon (for File|Save). What am I missing? Thanks, Don On 02/21/2017 06:33 PM, Ondrej Pokorny via Lazarus wrote: > Update: I worked further today (unfortunately...) > > I also added icon scaling support to the IDE. The IDE now can load > 150% and 200% versions of the icons. If a High-DPI icon is missing, > the normal icon is upscaled (with the worst algorithm, but that's what > is available in the IDE). > > Request: search for volunteers who would add at least the most > important IDE icons (open, save, desktops - basically what is visible > in the coolbars). Please see images/README.txt for more info. > > Note: the High-DPI icons are used only from 144DPI (150%) upwards. > 120DPI (125%) uses the original icons (which is default on Windows, > AFAIK). > > Thanks > Ondrej > From donald at ziesig.org Wed Feb 22 19:40:14 2017 From: donald at ziesig.org (Donald Ziesig) Date: Wed, 22 Feb 2017 13:40:14 -0500 Subject: [Lazarus] LCL High-DPI Watch List is Blank. In-Reply-To: References: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> Message-ID: <2406c7c5-9fcc-3fc5-a367-8d9c8556fdbd@ziesig.org> On 02/22/2017 11:55 AM, Donald Ziesig via Lazarus wrote: > Hi Ondrej! > > I downloaded the latest lazarus from svn. Then make bigide. > > When I started lazarus, the CoolBar is empty (except for the Save icon > which is the correct size). The component icons are definitely bigger > than the last version, but appear more like 125% rather than the 150% > that I would expect for 144 dpi. > > I rebuilt the laz_images.res (at least the file time stamp changed) > and the ide but there was no change in the empty CoolBar. > > images/README.txt says: > > To use a high-DPI icon, register the icon with the suffix "_150" > (150%) or "_200" (200%). See e.g. actions/laz_save_150.png > > How do I do that? I can create the bigger icons with gimp and store > them in the actions directory but that doesn't seem to help (tried > this with the menu_run icon but it still uses the old one. > > Also, in the sub-menus there is only ONE icon (for File|Save). > > What am I missing? > > Thanks, > > Don > > > On 02/21/2017 06:33 PM, Ondrej Pokorny via Lazarus wrote: >> Update: I worked further today (unfortunately...) >> >> I also added icon scaling support to the IDE. The IDE now can load >> 150% and 200% versions of the icons. If a High-DPI icon is missing, >> the normal icon is upscaled (with the worst algorithm, but that's >> what is available in the IDE). >> >> Request: search for volunteers who would add at least the most >> important IDE icons (open, save, desktops - basically what is visible >> in the coolbars). Please see images/README.txt for more info. >> >> Note: the High-DPI icons are used only from 144DPI (150%) upwards. >> 120DPI (125%) uses the original icons (which is default on Windows, >> AFAIK). >> >> Thanks >> Ondrej >> > Hi Ondrej! I have a new issue this time with the "Watch List". The contents of the form are empty! There is no menu, no expression, nothing. When I right click, I get the appropriate pop-up menu which appears to operate correctly. When I add watches, I get an empty highlight bar at the appropriate position. After adding a few watches, it looks like this: It worked correctly yesterday before my latest re-install for improved Hi-Res buttons. Don -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot at 2017-02-22 13-35-32.png Type: image/png Size: 6492 bytes Desc: not available URL: From michael at freepascal.org Wed Feb 22 23:18:41 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 22 Feb 2017 23:18:41 +0100 (CET) Subject: [Lazarus] LCL High-DPI In-Reply-To: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: On Mon, 20 Feb 2017, Ondrej Pokorny via Lazarus wrote: > I'd like to announce that I finished the concept of DPI scaling in > Lazarus / LCL. > > It's quite easy for the programmer. Documented here: > http://wiki.lazarus.freepascal.org/High_DPI (details are in "High DPI in > Lazarus 1.7 and above"). > > 1.) I made the Lazarus IDE High-DPI aware - the IDE itself and its > windows should scale correctly. I have tried this. I see no effect whatsoever ? I have even specially opened 2 IDEs. One which is more than a year old, and the newly compiled one. They look identical. I checked, and I found Application.Scaled := True; in the sources. I checked dpi, xrdb reports DPI 192. Linux Mint 18.1, 64-bit, GTK 2 widgetset. Any hints ? Michael. From mailinglists at geldenhuys.co.uk Thu Feb 23 00:18:47 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 22 Feb 2017 23:18:47 +0000 Subject: [Lazarus] How to get access to TKeyCommandRelationList via the IDE Interfaces? Message-ID: Hi, I'm creating a IDE add-on package and using the IDEIntf. Now I have access to the IDECommands global variable, but most of its methods are abstract. Searching the IDE source code it seems the IDECommands is often casted to TKeyCommandRelationList before methods are called. The TKeyCommandRelationList is defined in the KeyMapping.pas unit. But if I include the KeyMapping unit in my add-on package's uses clause, that unit can't be found. So I assume there is another way to do this - maybe another interface? What I'm trying to do is look-up a IDE command by name, then execute that command. All done from inside my IDE add-on package. 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 aaa5500 at ya.ru Thu Feb 23 00:37:25 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 23 Feb 2017 02:37:25 +0300 Subject: [Lazarus] Hi-DPI property Message-ID: <36e98a1c-e468-0bb0-e050-7f9d13725331@ya.ru> Maybe add ApplicationProperties.nnnnn property, for new feature- >Enable LCL scaling for your application DPI awarness in Project Options -> Application -> "Use LCL scaling (Hi-DPI). ? -- Regards, Alexey From nc-gaertnma at netcologne.de Thu Feb 23 00:45:35 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 23 Feb 2017 00:45:35 +0100 Subject: [Lazarus] How to get access to TKeyCommandRelationList via the IDE Interfaces? In-Reply-To: References: Message-ID: <20170223004535.4574d9ef@limapholos.matflo.wg> On Wed, 22 Feb 2017 23:18:47 +0000 Graeme Geldenhuys via Lazarus wrote: >[...] > But if I include the KeyMapping unit in my add-on package's uses clause, > that unit can't be found. Yes, an IDE package can only use the IDEIntf units, not the IDE code itself. > So I assume there is another way to do this - > maybe another interface? > > What I'm trying to do is look-up a IDE command by name, then execute > that command. All done from inside my IDE add-on package. uses IDECommands; Cmd:=IDECommandList.FindCommandByName('name'); ExecuteIDECommand(Sender,Cmd.Command); Mattias From mailinglists at geldenhuys.co.uk Thu Feb 23 00:53:54 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 22 Feb 2017 23:53:54 +0000 Subject: [Lazarus] How to get access to TKeyCommandRelationList via the IDE Interfaces? In-Reply-To: <20170223004535.4574d9ef@limapholos.matflo.wg> References: <20170223004535.4574d9ef@limapholos.matflo.wg> Message-ID: On 2017-02-22 23:45, Mattias Gaertner via Lazarus wrote: > uses IDECommands; > > Cmd:=IDECommandList.FindCommandByName('name'); > ExecuteIDECommand(Sender,Cmd.Command); Umm, that's exactly what I tried, but in never finds the command. The code is as follows: =============================== cmd := IDECommandList.FindCommandByName('jcfAbout'); if Assigned(cmd) then begin writeln('PASS: We found the JCF About command'); ExecuteIDECommand(self, cmd.Command); end else writeln('FAIL: Unable to find JCF About command'); =============================== I have the Jedi Code Formatter package installed, and the menus are there in the IDE. I looked at the JCF package to see what the names are of the commands it registers. Just as a test, I'm trying to get the JCF About dialog to pop up, which was registered wit the 'jcfAbout' command name. But as I said, it never finds that command. Oh, and the above code is only triggered when I save a unit - so at that point the IDE is fully loaded. 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 Thu Feb 23 01:02:23 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Feb 2017 00:02:23 +0000 Subject: [Lazarus] How to get access to TKeyCommandRelationList via the IDE Interfaces? In-Reply-To: References: <20170223004535.4574d9ef@limapholos.matflo.wg> Message-ID: On 2017-02-22 23:53, Graeme Geldenhuys via Lazarus wrote: > Umm, that's exactly what I tried, but in never finds the command. As a work-around I went through the MenuIntf, found the JCF menu. Iterated that until I found the 'jcfAbout' menu. I then call it's MenuItem.Click() method. Pretty ugly, but it worked. :) Obviously I would like to get the Command Interface working though. 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 nc-gaertnma at netcologne.de Thu Feb 23 01:08:12 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 23 Feb 2017 01:08:12 +0100 Subject: [Lazarus] How to get access to TKeyCommandRelationList via the IDE Interfaces? In-Reply-To: References: <20170223004535.4574d9ef@limapholos.matflo.wg> Message-ID: <20170223010812.784c66df@limapholos.matflo.wg> On Wed, 22 Feb 2017 23:53:54 +0000 Graeme Geldenhuys via Lazarus wrote: >[...] > Umm, that's exactly what I tried, but in never finds the command. >[...] You can list all registered names with for c:=0 to IDECommandList.CategoryCount-1 do begin Cat:=IDECommandList.Categories[c]; for i:=0 to Cat.Count-1 do writeln(Cat.Name,' ',TIDECommand(Cat[i]).Name); end; If it is there, check its OnExecute event. > Oh, and the above code is only triggered when I save a unit - so at that > point the IDE is fully loaded. Mattias From mailinglists at geldenhuys.co.uk Thu Feb 23 01:35:16 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Feb 2017 00:35:16 +0000 Subject: [Lazarus] How to get access to TKeyCommandRelationList via the IDE Interfaces? In-Reply-To: <20170223010812.784c66df@limapholos.matflo.wg> References: <20170223004535.4574d9ef@limapholos.matflo.wg> <20170223010812.784c66df@limapholos.matflo.wg> Message-ID: On 2017-02-23 00:08, Mattias Gaertner via Lazarus wrote: > You can list all registered names with Ah, that was very useful thanks. I managed to fin the 'jcfCurrentEditorWindow' command, but there doesn't seem to be a 'jcfAbout' command. So the latter will explain why my "proof of concept" didn't work. Taking a closer look at the JcfIdeRegister unit, I now see my mistake. It does indeed only register one command. The other lines are RegisterIDEMenuCommand() calls, not the crutial RegisterIDECommand(). Dope!!! Many thanks for helping with this and your quick responses. JCF formatting is now triggered on every save. I did have to modify JCF though, as the dialog prompt was annoying. I'll see if I can make that configurable and send a patch to Mantis. 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 Thu Feb 23 01:40:13 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Feb 2017 00:40:13 +0000 Subject: [Lazarus] Format code on Save In-Reply-To: <20170127153708.1c9b8caf@limapholos.matflo.wg> References: <20170125141542.53444415@limapholos.matflo.wg> <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> <20170125151510.1d772bd6@limapholos.matflo.wg> <25855cc8-df38-1933-a647-acbba1cbc06d@geldenhuys.co.uk> <20170127153708.1c9b8caf@limapholos.matflo.wg> Message-ID: On 2017-01-27 14:37, Mattias Gaertner via Lazarus wrote: > I added the event. > > uses LazIDEIntf > > LazarusIDE.AddHandlerOnSaveEditorFile(@YourEvent); A bit late, but thank you for adding that functionality. I've now managed to create my IDE add-on and it works. But I noticed that with every save (Ctrl+S), the YourEvent gets called twice? Any idea why that is, and if it was by design or a bug? For example, I added a simple writeln() in my event handler and ran Lazarus from the command line to see the output. I changed a unit and pressed Ctrl+S. The writeln() output is shown twice... =========================== [lazarus]$ ./lazarus Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/graemeg/.lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-freebsd-gtk2 New=x86_64-freebsd-gtk2 FPC=True LCL=False PASS: We found the JCF command PASS: We found the JCF command =========================== 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 nc-gaertnma at netcologne.de Thu Feb 23 08:52:47 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 23 Feb 2017 08:52:47 +0100 Subject: [Lazarus] Format code on Save In-Reply-To: References: <20170125141542.53444415@limapholos.matflo.wg> <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> <20170125151510.1d772bd6@limapholos.matflo.wg> <25855cc8-df38-1933-a647-acbba1cbc06d@geldenhuys.co.uk> <20170127153708.1c9b8caf@limapholos.matflo.wg> Message-ID: <20170223085247.4c0a60d1@limapholos.matflo.wg> On Thu, 23 Feb 2017 00:40:13 +0000 Graeme Geldenhuys via Lazarus wrote: > On 2017-01-27 14:37, Mattias Gaertner via Lazarus wrote: >[...] > > LazarusIDE.AddHandlerOnSaveEditorFile(@YourEvent); > > > A bit late, but thank you for adding that functionality. I've now > managed to create my IDE add-on and it works. > > But I noticed that with every save (Ctrl+S), the YourEvent gets called > twice? Any idea why that is, and if it was by design or a bug? Check parameter SaveStep. Mattias From mailinglists at geldenhuys.co.uk Thu Feb 23 09:41:06 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Feb 2017 08:41:06 +0000 Subject: [Lazarus] Format code on Save In-Reply-To: <20170223085247.4c0a60d1@limapholos.matflo.wg> References: <20170125141542.53444415@limapholos.matflo.wg> <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> <20170125151510.1d772bd6@limapholos.matflo.wg> <25855cc8-df38-1933-a647-acbba1cbc06d@geldenhuys.co.uk> <20170127153708.1c9b8caf@limapholos.matflo.wg> <20170223085247.4c0a60d1@limapholos.matflo.wg> Message-ID: <3a745b04-75ff-4db2-32be-3d18d120d72d@geldenhuys.co.uk> On 2017-02-23 07:52, Mattias Gaertner via Lazarus wrote: >> But I noticed that with every save (Ctrl+S), the YourEvent gets called >> twice? Any idea why that is, and if it was by design or a bug? > > Check parameter SaveStep. I tried both sefsBeforeWrite and sefsAfterWrite - it made no difference to the issue of the method being called twice. Also, what does the AddHandlerOnSaveEditorFile()'s "AtLast" parameter mean and do? I also set the Return result to mrOK. Here is the whole implementation of the event handler and Register call. ========================== procedure Register; begin LazarusIDE.AddHandlerOnSaveEditorFile(@uJCFHandler.BeforeSaveCallJCF, False); end; function TJCFHandler.BeforeSaveCallJCF(Sender: TObject; aFile: TLazProjectFile; SaveStep: TSaveEditorFileStep; TargetFilename: string): TModalResult; var cmd: TIDECommand; begin SaveStep := sefsBeforeWrite; Result := mrOk; cmd := IDECommandList.FindCommandByName('jcfCurrentEditorWindow'); if Assigned(cmd) then begin writeln('PASS: We found the JCF command'); ExecuteIDECommand(Sender, cmd.Command); end; end; ========================== I'm using Lazarus 1.7 r54157 FPC 3.0.1 x86_64-freebsd-gtk2. 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 Thu Feb 23 10:01:25 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Feb 2017 09:01:25 +0000 Subject: [Lazarus] Feature Request: IDE user defined recorded macros Message-ID: Hi, Are there any plans to add user recorded macros support to Lazarus IDE? Many text editors have this built-in, and allows for a huge amount of “extending the editor’s features” without modify the underlying program's source code. We can simply record a sequence of actions, give it a name, assign it a keyboard shortcut and play it back when we need that functionality. I was quite surprised to see Lazarus IDE doesn’t have that. Maybe I’m simply overlooking the feature (very possible), or it’s enabled via an external IDE package add-on? See attached screenshot of a commercial text editor called EditPad Pro 7. It has extensive support for user recorded macros. You can even export the macro to a INI file, edit the macro and then import it again. Here is an example of an exported "join lines" macro. ================== [EditPadProMacro] Caption=Join Lines ShortCut=16458 CommandCount=6 C0=Editor.CaretDown C1=Editor.CaretHome C2=Editor.CaretEnd C3=Actions.ActionExtraTrimLeading C4=Editor.CaretUp C5=Editor.Backspace [EditPadProMacroC2] ExpandSel=1 ================== 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: user_recorded_macros.png Type: image/png Size: 6323 bytes Desc: not available URL: From mailinglists at geldenhuys.co.uk Thu Feb 23 10:05:00 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Feb 2017 09:05:00 +0000 Subject: [Lazarus] Feature Request: IDE user defined recorded macros In-Reply-To: References: Message-ID: <3756b111-7164-71e3-e2a1-b197f94350ce@geldenhuys.co.uk> Scratch that! I should have done better searching before I posted. I apparently asked a similar question back in 2015 and found my answer here... http://wiki.freepascal.org/IDE_Window:_Editor_Macros Sorry for the noise. :-/ Regards, Graeme From nc-gaertnma at netcologne.de Thu Feb 23 10:08:59 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 23 Feb 2017 10:08:59 +0100 Subject: [Lazarus] Format code on Save In-Reply-To: <3a745b04-75ff-4db2-32be-3d18d120d72d@geldenhuys.co.uk> References: <20170125141542.53444415@limapholos.matflo.wg> <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> <20170125151510.1d772bd6@limapholos.matflo.wg> <25855cc8-df38-1933-a647-acbba1cbc06d@geldenhuys.co.uk> <20170127153708.1c9b8caf@limapholos.matflo.wg> <20170223085247.4c0a60d1@limapholos.matflo.wg> <3a745b04-75ff-4db2-32be-3d18d120d72d@geldenhuys.co.uk> Message-ID: <20170223100859.159d434b@limapholos.matflo.wg> On Thu, 23 Feb 2017 08:41:06 +0000 Graeme Geldenhuys via Lazarus wrote: >[...] > > Check parameter SaveStep. > > I tried both sefsBeforeWrite and sefsAfterWrite - it made no difference > to the issue of the method being called twice. > > Also, what does the AddHandlerOnSaveEditorFile()'s "AtLast" parameter > mean and do? Prepend or append to the list of handlers. > I also set the Return result to mrOK. Good. > Here is the whole implementation of the event handler and Register call. > > > ========================== > procedure Register; > begin > LazarusIDE.AddHandlerOnSaveEditorFile(@uJCFHandler.BeforeSaveCallJCF, > False); > end; > > function TJCFHandler.BeforeSaveCallJCF(Sender: TObject; > aFile: TLazProjectFile; SaveStep: TSaveEditorFileStep; > TargetFilename: string): TModalResult; > var > cmd: TIDECommand; > begin > SaveStep := sefsBeforeWrite; You set a non var parameter? Think again. Mattias From mailinglists at geldenhuys.co.uk Thu Feb 23 10:19:50 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Feb 2017 09:19:50 +0000 Subject: [Lazarus] Format code on Save In-Reply-To: <20170223100859.159d434b@limapholos.matflo.wg> References: <20170125141542.53444415@limapholos.matflo.wg> <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> <20170125151510.1d772bd6@limapholos.matflo.wg> <25855cc8-df38-1933-a647-acbba1cbc06d@geldenhuys.co.uk> <20170127153708.1c9b8caf@limapholos.matflo.wg> <20170223085247.4c0a60d1@limapholos.matflo.wg> <3a745b04-75ff-4db2-32be-3d18d120d72d@geldenhuys.co.uk> <20170223100859.159d434b@limapholos.matflo.wg> Message-ID: <0f3bf151-fce9-eb77-62fd-c7bc344a0608@geldenhuys.co.uk> On 2017-02-23 09:08, Mattias Gaertner via Lazarus wrote: >> Also, what does the AddHandlerOnSaveEditorFile()'s "AtLast" parameter >> mean and do? > > Prepend or append to the list of handlers. Ah, thank. That would come in handy if the IDE Options ever have a GUI to manage such actions. eg: Eclipse has that, and that is also where I saw this feature (format code on save). > You set a non var parameter? Think again. Ah, too many late nights. Thanks for that pointer. Adding the following to the beginning of my event handler solves the problem. if SaveStep = sefsAfterWrite then Exit; Thanks for all your help. 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 Fri Feb 24 11:03:36 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 24 Feb 2017 11:03:36 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: References: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> Message-ID: <7624bc6c-6862-be97-3004-3aa076e281e2@kluug.net> On 22.02.2017 17:55, Donald Ziesig via Lazarus wrote: > Hi Ondrej! > > I downloaded the latest lazarus from svn. Then make bigide. > > When I started lazarus, the CoolBar is empty (except for the Save icon > which is the correct size). The component icons are definitely bigger > than the last version, but appear more like 125% rather than the 150% > that I would expect for 144 dpi. > > I rebuilt the laz_images.res (at least the file time stamp changed) > and the ide but there was no change in the empty CoolBar. > > images/README.txt says: > > To use a high-DPI icon, register the icon with the suffix "_150" > (150%) or "_200" (200%). See e.g. actions/laz_save_150.png > > How do I do that? I can create the bigger icons with gimp and store > them in the actions directory but that doesn't seem to help (tried > this with the menu_run icon but it still uses the old one. You have to register them in laz_images_list.txt as well and recreate res files. Please read the whole README.txt, not only the last chapter. > > Also, in the sub-menus there is only ONE icon (for File|Save). What is you OS/WidgetSet? It looks like the icons don't scale for you - you are obviously getting empty icons. Ondrej From lazarus at kluug.net Fri Feb 24 11:07:48 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 24 Feb 2017 11:07:48 +0100 Subject: [Lazarus] Hi-DPI property In-Reply-To: <36e98a1c-e468-0bb0-e050-7f9d13725331@ya.ru> References: <36e98a1c-e468-0bb0-e050-7f9d13725331@ya.ru> Message-ID: On 23.02.2017 0:37, Alexey via Lazarus wrote: > Maybe add ApplicationProperties.nnnnn property, for new feature- > > >Enable LCL scaling for your application DPI awarness in Project > Options -> Application -> "Use LCL scaling (Hi-DPI). I forgot about that. I'll check if it makes sense - usually you should set the appropriate value to Application.Scaled before creating any forms. I am not sure it will work reliably when it is changed during loading of a form. Ondrej From lazarus at kluug.net Fri Feb 24 11:12:15 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 24 Feb 2017 11:12:15 +0100 Subject: [Lazarus] LCL High-DPI In-Reply-To: References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: <3484f810-71f8-ae23-eb03-713c97a5f290@kluug.net> On 22.02.2017 23:18, Michael Van Canneyt via Lazarus wrote: > I have tried this. I see no effect whatsoever ? > > I have even specially opened 2 IDEs. One which is more than a year > old, and > the newly compiled one. They look identical. > > I checked, and I found > Application.Scaled := True; > in the sources. > > I checked dpi, xrdb reports DPI 192. > > Linux Mint 18.1, 64-bit, GTK 2 widgetset. > > Any hints ? Create an empty LCL application and check the TForm.DesignTimePPI property. What value does it show? Ondrej From lazarus at kluug.net Fri Feb 24 11:15:05 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 24 Feb 2017 11:15:05 +0100 Subject: [Lazarus] LCL High-DPI Watch List is Blank. In-Reply-To: <2406c7c5-9fcc-3fc5-a367-8d9c8556fdbd@ziesig.org> References: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> <2406c7c5-9fcc-3fc5-a367-8d9c8556fdbd@ziesig.org> Message-ID: On 22.02.2017 19:40, Donald Ziesig via Lazarus wrote: > After adding a few watches, it looks like this: > > > > > It worked correctly yesterday before my latest re-install for improved > Hi-Res buttons. The toolbar seems to have the problem with empty icons. It's strange that you don't get any text either. Again, what OS/WidgetSet? Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 6492 bytes Desc: not available URL: From lazarus at kluug.net Fri Feb 24 12:05:57 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 24 Feb 2017 12:05:57 +0100 Subject: [Lazarus] LCL High-DPI In-Reply-To: References: <0760cd28-8fee-33d7-aa2a-823dcf5d6466@kluug.net> Message-ID: <2b304429-b5fe-281b-4730-565305786a50@kluug.net> On 22.02.2017 23:18, Michael Van Canneyt via Lazarus wrote: > On Mon, 20 Feb 2017, Ondrej Pokorny via Lazarus wrote: > >> I'd like to announce that I finished the concept of DPI scaling in >> Lazarus / LCL. >> >> It's quite easy for the programmer. Documented here: >> http://wiki.lazarus.freepascal.org/High_DPI (details are in "High DPI >> in Lazarus 1.7 and above"). >> >> 1.) I made the Lazarus IDE High-DPI aware - the IDE itself and its >> windows should scale correctly. > > I have tried this. I see no effect whatsoever ? > > I have even specially opened 2 IDEs. One which is more than a year > old, and > the newly compiled one. They look identical. > > I checked, and I found > Application.Scaled := True; > in the sources. > > I checked dpi, xrdb reports DPI 192. Create an empty LCL application and check the TForm.DesignTimePPI property. What value does it show? Ondrej From donald at ziesig.org Fri Feb 24 17:23:44 2017 From: donald at ziesig.org (Donald Ziesig) Date: Fri, 24 Feb 2017 11:23:44 -0500 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <7624bc6c-6862-be97-3004-3aa076e281e2@kluug.net> References: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> <7624bc6c-6862-be97-3004-3aa076e281e2@kluug.net> Message-ID: On 02/24/2017 05:03 AM, Ondrej Pokorny via Lazarus wrote: > On 22.02.2017 17:55, Donald Ziesig via Lazarus wrote: >> Hi Ondrej! >> >> I downloaded the latest lazarus from svn. Then make bigide. >> >> When I started lazarus, the CoolBar is empty (except for the Save >> icon which is the correct size). The component icons are definitely >> bigger than the last version, but appear more like 125% rather than >> the 150% that I would expect for 144 dpi. >> >> I rebuilt the laz_images.res (at least the file time stamp changed) >> and the ide but there was no change in the empty CoolBar. >> >> images/README.txt says: >> >> To use a high-DPI icon, register the icon with the suffix "_150" >> (150%) or "_200" (200%). See e.g. actions/laz_save_150.png >> >> How do I do that? I can create the bigger icons with gimp and store >> them in the actions directory but that doesn't seem to help (tried >> this with the menu_run icon but it still uses the old one. > > You have to register them in laz_images_list.txt as well and recreate > res files. Please read the whole README.txt, not only the last chapter. > *I mis-understood what "register" meant. I thought there was a process that needed to be done, rather than just adding the image file name to the list. I am trying that now.* >> >> Also, in the sub-menus there is only ONE icon (for File|Save). > > What is you OS/WidgetSet? It looks like the icons don't scale for you > - you are obviously getting empty icons. *linux mint 18 / gtk2* > > Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From denisgolovan at yandex.ru Sat Feb 25 15:41:20 2017 From: denisgolovan at yandex.ru (denisgolovan) Date: Sat, 25 Feb 2017 17:41:20 +0300 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: References: <977611487623042@web13h.yandex.ru> <650601487709610@web28h.yandex.ru> Message-ID: <1157571488033680@web31j.yandex.ru> 22.02.2017, 02:45, "Juha Manninen via Lazarus" : > What revision caused the freezing? Unfortunately I wasn't able to track the culprit commit. I tried building with year old Lazarus sources (the earliest my project builds from), but the bug was still there. I reckon some changes in gtk/other libs triggered that. I managed to make a fix/hack for my case though. See attachment. Please take a look and comment. -- Regards, Denis Golovan -------------- next part -------------- A non-text attachment was scrubbed... Name: resize.patch Type: text/x-diff Size: 599 bytes Desc: not available URL: From markMLl.lazarus at telemetry.co.uk Sat Feb 25 16:16:55 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Sat, 25 Feb 2017 15:16:55 +0000 Subject: [Lazarus] Detecting anomalous DPI Message-ID: I've just been rereading the recent discussion on Hi-DPI, and the relevant bits of the Wiki. I've got a user with eyesight problems, who put a 48" TV on his desk as a monitor to a Linux system with KDE. Then he set the "Force fonts DPI" setting to something like 200, this increases the text size enormously but- obviously- messes up layout. Is there any way that a standard application can pick up that an anomalous setting is being used? Screen.PixelsPer Inch is still 96, ditto for Screen.SystemFont.Pixels, Screen.SystemFont.Size is zero. I'm not looking for a fix at this point, which I presume will be provided by the Hi-DPI support. But it would be very useful if a program could log the /actual/ DPI for support purposes. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From lazarus at kluug.net Sat Feb 25 19:27:37 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 25 Feb 2017 19:27:37 +0100 Subject: [Lazarus] Detecting anomalous DPI In-Reply-To: References: Message-ID: <78d47d91-5b26-cda5-2449-2cc75c646c1f@kluug.net> On 25.02.2017 16:16, Mark Morgan Lloyd via Lazarus wrote: > But it would be very useful if a program could log the /actual/ DPI > for support purposes. You have these properties: TScreen.PixelsPerInch and TMonitor.PixelsPerInch. You surely can log them. Ondrej From markMLl.lazarus at telemetry.co.uk Sat Feb 25 20:20:48 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Sat, 25 Feb 2017 19:20:48 +0000 Subject: [Lazarus] Detecting anomalous DPI In-Reply-To: <78d47d91-5b26-cda5-2449-2cc75c646c1f@kluug.net> References: <78d47d91-5b26-cda5-2449-2cc75c646c1f@kluug.net> Message-ID: On 25/02/17 18:30, Ondrej Pokorny via Lazarus wrote: > On 25.02.2017 16:16, Mark Morgan Lloyd via Lazarus wrote:> But it would > be very useful if a program could log the /actual/ DPI > for support > purposes. > You have these properties: TScreen.PixelsPerInch and > TMonitor.PixelsPerInch. You surely can log them. > Ondrej-- As I said in my original note, Screen.PixelsPerInch returns the nominal DPI not the override. I don't see TMonitor.PixelsPerInch documented. So I've got a test system in front of me where the "Force fonts DPI" is set to 108 but Screen.PixelsPerInch still returns 96 as does GetDeviceCaps(dc, LOGPIXELSX). The only thing I've found so far that does appear to vary predictably is the ascent and descent returned by GetTextMetrics, but I think that describes the fount that has been selected since it doesn't have a linear relationship to the DPI. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From vojtech.cihak at atlas.cz Sun Feb 26 16:33:14 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sun, 26 Feb 2017 16:33:14 +0100 Subject: [Lazarus] =?utf-8?q?LCL_High-DPI_request_for_help_adding_images?= In-Reply-To: 000000006e0400008b2001044ff0 References: 000000006e0400008b2001044ff0 Message-ID: <20170226163314.F17463EC@atlas.cz> Wouldn't be better (or would it be possible) to have *.svg icons in resources and generate *.png icons on start of IDE? Now you add 150% and 200%, later will come 250, 300% as 4k, 5k and 8k monitors come to market.   V. ______________________________________________________________ > Od: Ondrej Pokorny via Lazarus > Komu: Lazarus mailing list > Datum: 22.02.2017 00:33 > Předmět: [Lazarus] LCL High-DPI request for help adding images > Update: I worked further today (unfortunately...) I also added icon scaling support to the IDE. The IDE now can load 150% and 200% versions of the icons. If a High-DPI icon is missing, the normal icon is upscaled (with the worst algorithm, but that's what is available in the IDE). Request: search for volunteers who would add at least the most important IDE icons (open, save, desktops - basically what is visible in the coolbars). Please see images/README.txt for more info. Note: the High-DPI icons are used only from 144DPI (150%) upwards. 120DPI (125%) uses the original icons (which is default on Windows, AFAIK). Thanks Ondrej -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From donald at ziesig.org Sun Feb 26 17:01:19 2017 From: donald at ziesig.org (Donald Ziesig) Date: Sun, 26 Feb 2017 11:01:19 -0500 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <20170226163314.F17463EC@atlas.cz> References: <20170226163314.F17463EC@atlas.cz> Message-ID: On 02/26/2017 10:33 AM, Vojtěch Čihák via Lazarus wrote: > > Wouldn't be better (or would it be possible) to have *.svg icons in > resources and generate *.png icons on start of IDE? Now you add 150% > and 200%, later will come 250, 300% as 4k, 5k and 8k monitors come to > market. > > V. > > ______________________________________________________________ > > Od: Ondrej Pokorny via Lazarus > > Komu: Lazarus mailing list > > Datum: 22.02.2017 00:33 > > Předmět: [Lazarus] LCL High-DPI request for help adding images > > > > Update: I worked further today (unfortunately...) > > I also added icon scaling support to the IDE. The IDE now can load 150% > and 200% versions of the icons. If a High-DPI icon is missing, the > normal icon is upscaled (with the worst algorithm, but that's what is > available in the IDE). > > Request: search for volunteers who would add at least the most important > IDE icons (open, save, desktops - basically what is visible in the > coolbars). Please see images/README.txt for more info. > > Note: the High-DPI icons are used only from 144DPI (150%) upwards. > 120DPI (125%) uses the original icons (which is default on Windows, > AFAIK). > > Thanks > Ondrej > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > I agree. I just spent most of two days rescaling the icons with gimp, then registering them. It looks good, but I sure would not want to have to repeat for 200%, etc. Don -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Sun Feb 26 18:00:39 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sun, 26 Feb 2017 18:00:39 +0100 Subject: [Lazarus] =?utf-8?q?LCL_High-DPI_request_for_help_adding_images?= In-Reply-To: 000000006e3e0000c7840104502e References: <20170226163314.F17463EC@atlas.cz> 000000006e3e0000c7840104502e Message-ID: <20170226180039.07F089C7@atlas.cz> I use Inkscape for icons. I use some template 64*64 px (although px means nothing in vector format, it is moreless for help-grid only). Then I use rsv-convert tool to convert icons to *.png. The icons looks best with integer multiples/divisor (i.e. 16, 32, 64, 128 px etc.). The non-integer look is also accepatble (24, 48, 96 px).   V. ______________________________________________________________ > Od: Donald Ziesig via Lazarus > Komu: lazarus at lists.lazarus-ide.org > Datum: 26.02.2017 17:01 > Předmět: Re: [Lazarus] LCL High-DPI request for help adding images > On 02/26/2017 10:33 AM, Vojtěch Čihák via Lazarus wrote:Wouldn't be better (or would it be possible) to have *.svg icons in resources and generate *.png icons on start of IDE? Now you add 150% and 200%, later will come 250, 300% as 4k, 5k and 8k monitors come to market.   I agree.  I just spent most of two days rescaling the icons with gimp, then registering them.  It looks good, but I sure would not want to have to repeat for 200%, etc. Don ---------- -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Sun Feb 26 19:28:34 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 26 Feb 2017 19:28:34 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <20170226180039.07F089C7@atlas.cz> References: <20170226163314.F17463EC@atlas.cz> <20170226180039.07F089C7@atlas.cz> Message-ID: Am 26.02.2017 18:01 schrieb "Vojtěch Čihák via Lazarus" < lazarus at lists.lazarus-ide.org>: > > I use Inkscape for icons. I use some template 64*64 px (although px means nothing in vector format, it is moreless for help-grid only). Then I use rsv-convert tool to convert icons to *.png. The icons looks best with integer multiples/divisor (i.e. 16, 32, 64, 128 px etc.). The non-integer look is also accepatble (24, 48, 96 px). At my company we design each icon size by hand as the non-integer devisions would definitely not be acceptable due to aliasing and also the details of the icons can more easily be adjusted to fit the icon size. So if SVG support should be added there should always be the possibility to do it the "hard" way as well if one wants to have pixel perfect icons. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Sun Feb 26 19:44:00 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sun, 26 Feb 2017 19:44:00 +0100 Subject: [Lazarus] =?utf-8?q?LCL_High-DPI_request_for_help_adding_images?= In-Reply-To: 000000006e400000cb9c01045055 References: <20170226163314.F17463EC@atlas.cz>, <20170226180039.07F089C7@atlas.cz> 000000006e400000cb9c01045055 Message-ID: <20170226194400.4204D8FC@atlas.cz> Yes, I understand. But it also depend on the content of an icon. I added one example where the aliasing is visible.   V.   ______________________________________________________________ > Od: Sven Barth via Lazarus > Komu: Lazarus mailing list > Datum: 26.02.2017 19:28 > Předmět: Re: [Lazarus] LCL High-DPI request for help adding images > Am 26.02.2017 18:01 schrieb "Vojtěch Čihák via Lazarus" >: > > I use Inkscape for icons. I use some template 64*64 px (although px means nothing in vector format, it is moreless for help-grid only). Then I use rsv-convert tool to convert icons to *.png. The icons looks best with integer multiples/divisor (i.e. 16, 32, 64, 128 px etc.). The non-integer look is also accepatble (24, 48, 96 px). At my company we design each icon size by hand as the non-integer devisions would definitely not be acceptable due to aliasing and also the details of the icons can more easily be adjusted to fit the icon size. So if SVG support should be added there should always be the possibility to do it the "hard" way as well if one wants to have pixel perfect icons. Regards, Sven ---------- -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: arr20.png Type: image/png Size: 537 bytes Desc: arr20.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: arr24.png Type: image/png Size: 554 bytes Desc: arr24.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: arr32.png Type: image/png Size: 303 bytes Desc: arr32.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: arr48.png Type: image/png Size: 618 bytes Desc: arr48.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: arr64.png Type: image/png Size: 404 bytes Desc: arr64.png URL: From lazarus at kluug.net Sun Feb 26 22:11:58 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 26 Feb 2017 22:11:58 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <20170226163314.F17463EC@atlas.cz> References: <20170226163314.F17463EC@atlas.cz> Message-ID: <5b9209e4-7404-629b-e80f-5ddd71667b29@kluug.net> On 26.02.2017 16:33, Vojtěch Čihák via Lazarus wrote: > > Wouldn't be better (or would it be possible) to have *.svg icons in > resources and generate *.png icons on start of IDE? Now you add 150% > and 200%, later will come 250, 300% as 4k, 5k and 8k monitors come to > market. > You are welcome to implement such a feature. Low resolution icons (16px, 24px) have to stay in PNGs due to scaling/aliasing problems. But 4k, 5k and 8k monitor resolutions can be handled with SVG icons. I tested AggPas with some SVG icons and the results were not good. Icons that I tried couldn't be rendered at all. I am not sure fpvectorial is better. So first we need a good renderer and then we need a bunch of icons. Any help is appreciated. I won't do that. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Sun Feb 26 22:13:17 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 26 Feb 2017 22:13:17 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: References: <20170226163314.F17463EC@atlas.cz> Message-ID: <7efc0429-3117-fbd0-5066-b698300cb09b@kluug.net> On 26.02.2017 17:01, Donald Ziesig via Lazarus wrote: > I agree. I just spent most of two days rescaling the icons with gimp, > then registering them. It looks good, but I sure would not want to > have to repeat for 200%, etc. Do you mean that you took Lazarus original 16px icons, scaled them up to 24px one by one and registered them for Lazarus? Ondrej From badsectoracula at gmail.com Mon Feb 27 08:25:56 2017 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Mon, 27 Feb 2017 09:25:56 +0200 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <7efc0429-3117-fbd0-5066-b698300cb09b@kluug.net> References: <20170226163314.F17463EC@atlas.cz> <7efc0429-3117-fbd0-5066-b698300cb09b@kluug.net> Message-ID: SVN is not ideal for icon formats. Beyond being too big (it is a verbose XML file after all), vector icons do not good at arbitrary sizes. IMO the best approach for vector icons is what Haiku OS is doing by using a custom icon format that is designed for small sizes and -more importantly- different elements in an icon can have a LOD range so that some elements will be hidden in small sizes and others hidden in large sizes. Details and an example for LOD is here: https://www.haiku-os.org/docs/userguide/en/applications/icon-o-matic.html The icon with the four colored triangles only show numbers in large sizes and in small sizes the outline is replaced with a thicker one that is still visible despite the small size (the original outline would be a smudge at the smallest size). More technical details for Haiku's format can be found here: http://blog.leahhanson.us/post/recursecenter2016/haiku_icons.html Of course this is probably the hardest approach to take (at minimum one would need to make an editor for such icons), but IMO if a DPI-agnostic is to be made, it is better to go with the technically superior approach if such a solution is to remain around for years. (note that i do not think that using the haiku format directly is a good idea by itself, i'm just giving it as an example) AFAIK SVG itself does not support LODs, although it is possible to emulate it if the SVG loader supports CSS and media queries so one could use something like @media screen and (max-width: 32px) for selecting 32px and below sizes. With multiple of these one can adjust properties like stroke widths and hide elements. But i'm not sure if any non-browser SVG loader even support CSS, let alone CSS with media queries. Regardless if there is support for that, information can be found here for LOD: http://w3c.github.io/svgwg/specs/svg-authoring/ (search for 2.6. Responsive Images) FWIW personally i think a dedicated format for vector icons (like what Haiku uses) would be a better idea in the long term. On Sun, Feb 26, 2017 at 11:13 PM, Ondrej Pokorny via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 26.02.2017 17:01, Donald Ziesig via Lazarus wrote: > >> I agree. I just spent most of two days rescaling the icons with gimp, >> then registering them. It looks good, but I sure would not want to have to >> repeat for 200%, etc. >> > > Do you mean that you took Lazarus original 16px icons, scaled them up to > 24px one by one and registered them for Lazarus? > > > Ondrej > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Mon Feb 27 10:38:19 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 27 Feb 2017 09:38:19 +0000 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: References: <20170226163314.F17463EC@atlas.cz> <7efc0429-3117-fbd0-5066-b698300cb09b@kluug.net> Message-ID: <4fe4bbdc-9878-bfc3-9c85-3fb7631168ca@geldenhuys.co.uk> On 2017-02-27 07:25, Kostas Michalopoulos via Lazarus wrote: > IMO the > best approach for vector icons is what Haiku OS is doing by using a custom > icon format that is designed for small sizes and -more importantly- > different elements in an icon can have a LOD range Indeed, Haiku came up with a very clever system that seems to work really well. Regards, Graeme From lazarus at kluug.net Mon Feb 27 11:29:07 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 27 Feb 2017 11:29:07 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: References: <78d27332-a44c-98f1-a896-7a14c76b1f81@kluug.net> Message-ID: On 22.02.2017 17:55, Donald Ziesig via Lazarus wrote: > When I started lazarus, the CoolBar is empty (except for the Save icon > which is the correct size). I fixed that. > The component icons are definitely bigger than the last version, but > appear more like 125% rather than the 150% that I would expect for 144 > dpi. I fixed that as well. Ondrej From joshyfun at gmail.com Mon Feb 27 13:55:47 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 27 Feb 2017 13:55:47 +0100 Subject: [Lazarus] Animation library Message-ID: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> Hello, In the last days I was working in something like an animation library that allows me to perform flashing messages, collapsable panels, and other simple animation effects. The pre-requisites are no threading involved, it must be able to animate anything (abstraction) and life cycle must be handled by the engine. Finally I end with and alpha version which I wish to share with the community to get a bit of feedback before include it in Lazarus CCR or maybe in LCL itself. The current code has two "libraries", the "uanimationbasic" which handles the objects life cycle and coordinate operations and a derived "uanimationcontrol" with a series of animations to be used in form controls. As demos uses images the size of the package are quite big to be included in this email so you can download it from: http://dyn.consultem.org/jfanimlib.zip (268 Kb). Attached screenshot of controls sample. It has been tested with Lazarus 1.6 and fpc 3.0.0 in Windows, but Linux should work also. -- -------------- next part -------------- A non-text attachment was scrubbed... Name: jfanimlib.png Type: image/png Size: 28487 bytes Desc: not available URL: From michael at freepascal.org Mon Feb 27 14:25:00 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Feb 2017 14:25:00 +0100 (CET) Subject: [Lazarus] Animation library In-Reply-To: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> Message-ID: On Mon, 27 Feb 2017, José Mejuto via Lazarus wrote: > Hello, > > In the last days I was working in something like an animation library that > allows me to perform flashing messages, collapsable panels, and other simple > animation effects. > > The pre-requisites are no threading involved, it must be able to animate > anything (abstraction) and life cycle must be handled by the engine. > > Finally I end with and alpha version which I wish to share with the community > to get a bit of feedback before include it in Lazarus CCR or maybe in LCL > itself. > > The current code has two "libraries", the "uanimationbasic" which handles the > objects life cycle and coordinate operations and a derived > "uanimationcontrol" with a series of animations to be used in form controls. > > As demos uses images the size of the package are quite big to be included in > this email so you can download it from: > > http://dyn.consultem.org/jfanimlib.zip (268 Kb). > > Attached screenshot of controls sample. > > It has been tested with Lazarus 1.6 and fpc 3.0.0 in Windows, but Linux > should work also. I get an error on uanimationcontrol.pas, line 621: NRect.Width:=CalculateLinearPosition(FInitialRect.Width,FFinalRect.Width,GetElapsedMilliseconds,FDuration); NRect.Height:=CalculateLinearPosition(FInitialRect.Height,FFinalRect.Height,GetElapsedMilliseconds,FDuration); fpc 3.0.0, linux 64 bit. Michael. From mailinglists at geldenhuys.co.uk Mon Feb 27 14:50:37 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 27 Feb 2017 13:50:37 +0000 Subject: [Lazarus] Animation library In-Reply-To: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> Message-ID: <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> On 2017-02-27 12:55, José Mejuto via Lazarus wrote: > It has been tested with Lazarus 1.6 and fpc 3.0.0 in Windows, but Linux > should work also. I tried to compile the "Animated Controls Sample" project and got the following errors under 64bit FreeBSD using FPC 3.0.1 ============================== Hint: Start of reading config file /home/graemeg/.fpc.cfg Hint: End of reading config file /home/graemeg/.fpc.cfg Verbose: Free Pascal Compiler version 3.0.1 [2016/05/09] for x86_64 Verbose: Copyright (c) 1993-2015 by Florian Klaempfl and others Verbose: Target OS: FreeBSD for x86-64 Verbose: Compiling controlsample.lpr Verbose: Compiling frmcontrolsample.pas Verbose: Compiling /tmp/test/src/uanimationbasic.pas Verbose: Compiling /tmp/test/src/uanimationtypes.pas uanimationbasic.pas(619,3) Note: Local variable "lUseHighPrecision" not used Verbose: Compiling /tmp/test/src/uanimationcontrol.pas uanimationcontrol.pas(619,11) Error: identifier idents no member "Width" uanimationcontrol.pas(620,11) Error: identifier idents no member "Height" uanimationcontrol.pas(672,0) Verbose: There were 2 errors compiling module, stopping Verbose: Compilation aborted ============================== I then tried with FPC 3.0.0 and got the exact same error. According to FPC's types.pp unit, the TRect doesn't have a Width and Height property. ============================================ {$ifdef Windows} TRect = Windows.TRect; {$else} TRect = {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT} packed {$endif FPC_REQUIRES_PROPER_ALIGNMENT} record case Integer of 0: (Left,Top,Right,Bottom : Longint); 1: (TopLeft,BottomRight : TPoint); end; {$endif Windows} PRect = ^TRect; ============================================ 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 27 14:52:44 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 27 Feb 2017 14:52:44 +0100 Subject: [Lazarus] Animation library In-Reply-To: <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> Message-ID: <267e726b-7bd5-b4d9-c413-4dee2ddfa921@kluug.net> On 27.02.2017 14:50, Graeme Geldenhuys via Lazarus wrote: > According to FPC's types.pp unit, the TRect doesn't have a Width and > Height property. FPC 3.0.2 should have it (through a class helper). Ondrej From joshyfun at gmail.com Mon Feb 27 14:53:10 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 27 Feb 2017 14:53:10 +0100 Subject: [Lazarus] Animation library In-Reply-To: <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> Message-ID: El 27/02/2017 a las 14:50, Graeme Geldenhuys via Lazarus escribió: > uanimationcontrol.pas(619,11) Error: identifier idents no member "Width" > uanimationcontrol.pas(620,11) Error: identifier idents no member "Height" > ============================================ > {$ifdef Windows} > TRect = Windows.TRect; > {$else} > TRect = > {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT} > packed > {$endif FPC_REQUIRES_PROPER_ALIGNMENT} > record > case Integer of > 0: (Left,Top,Right,Bottom : Longint); > 1: (TopLeft,BottomRight : TPoint); > end; > {$endif Windows} > PRect = ^TRect; > ============================================ Hello, Correct, swapped compilers :-( a few days ago :-(. Just change declaration of NRect from TRect to TAnimationRect and a bit below the: DoMoveControlAsRect(NRect); to: DoMoveControlAsRect(NRect.GetAsRect); -- From marc at dommelstein.nl Mon Feb 27 15:12:06 2017 From: marc at dommelstein.nl (Marc Weustink) Date: Mon, 27 Feb 2017 15:12:06 +0100 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <5b9209e4-7404-629b-e80f-5ddd71667b29@kluug.net> References: <20170226163314.F17463EC@atlas.cz> <5b9209e4-7404-629b-e80f-5ddd71667b29@kluug.net> Message-ID: <369E758E-5196-4832-8F05-C8C38052CCF0@dommelstein.nl> On February 26, 2017 10:11:58 PM GMT+01:00, Ondrej Pokorny via Lazarus wrote: >On 26.02.2017 16:33, Vojtěch Čihák via Lazarus wrote: >> >> Wouldn't be better (or would it be possible) to have *.svg icons in >> resources and generate *.png icons on start of IDE? Now you add 150% >> and 200%, later will come 250, 300% as 4k, 5k and 8k monitors come to > >> market. >> > >You are welcome to implement such a feature. Low resolution icons >(16px, >24px) have to stay in PNGs due to scaling/aliasing problems. But 4k, 5k > >and 8k monitor resolutions can be handled with SVG icons. > >I tested AggPas with some SVG icons and the results were not good. >Icons >that I tried couldn't be rendered at all. I am not sure fpvectorial is >better. So first we need a good renderer and then we need a bunch of >icons. Any help is appreciated. I won't do that. That was also my experience. At work we use svg images and I wrote my own (limited) the svg parser and render the images with aggpas. For us this parser is OK, but it lacks a lot of svg features Marc From mailinglists at geldenhuys.co.uk Mon Feb 27 15:15:48 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 27 Feb 2017 14:15:48 +0000 Subject: [Lazarus] Animation library In-Reply-To: References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> Message-ID: <378912f2-f437-813f-ee45-064601207cb6@geldenhuys.co.uk> On 2017-02-27 13:53, José Mejuto via Lazarus wrote: > > Correct, swapped compilers :-( a few days ago :-(. Just change > declaration of NRect from TRect to TAnimationRect and a bit below the: Before I read your reply I simply adjusted the code as follows (which worked): NRect.Right := NRect.Left + CalculateLinearPosition(FInitialRect.Width,FFinalRect.Width,GetElapsedMilliseconds,FDuration); NRect.Bottom := NRect.Top + CalculateLinearPosition(FInitialRect.Height,FFinalRect.Height,GetElapsedMilliseconds,FDuration); The sample program runs and all animations (except "Alpha bend this form" functionality) works. Two points though: 1) The FPS counter in the form title doesn't seem to function. Instead of a FPS counter it seems to simply be a counter that constantly grows. 2) I have a 4 core system with hyper threading (ie: 4 cores and 4 virtual cores). Your sample application maxed out all 8 cores at 100% CPU load. Not really acceptable behaviour for a desktop application I would think. ;-) 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 donald at ziesig.org Mon Feb 27 15:50:41 2017 From: donald at ziesig.org (Donald Ziesig) Date: Mon, 27 Feb 2017 09:50:41 -0500 Subject: [Lazarus] LCL High-DPI request for help adding images In-Reply-To: <7efc0429-3117-fbd0-5066-b698300cb09b@kluug.net> References: <20170226163314.F17463EC@atlas.cz> <7efc0429-3117-fbd0-5066-b698300cb09b@kluug.net> Message-ID: <1ab65765-be82-e2f7-d4f9-1fc14bf785e2@ziesig.org> On 02/26/2017 04:13 PM, Ondrej Pokorny via Lazarus wrote: > On 26.02.2017 17:01, Donald Ziesig via Lazarus wrote: >> I agree. I just spent most of two days rescaling the icons with >> gimp, then registering them. It looks good, but I sure would not >> want to have to repeat for 200%, etc. > > Do you mean that you took Lazarus original 16px icons, scaled them up > to 24px one by one and registered them for Lazarus? > > Ondrej Precisely! :-D I tried to use Script-fu on Gimp, but I thought it would take me longer the learn it than doing the conversion manually. Don From joshyfun at gmail.com Mon Feb 27 16:05:52 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 27 Feb 2017 16:05:52 +0100 Subject: [Lazarus] Animation library In-Reply-To: <378912f2-f437-813f-ee45-064601207cb6@geldenhuys.co.uk> References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> <378912f2-f437-813f-ee45-064601207cb6@geldenhuys.co.uk> Message-ID: <85df34fb-c086-ba67-da52-d3726d7471f4@gmail.com> El 27/02/2017 a las 15:15, Graeme Geldenhuys via Lazarus escribió: > The sample program runs and all animations (except "Alpha bend this > form" functionality) works. Two points though: Hello, I don't know of the alpha blend form is possible in Linux and using you windows manager. > > 1) The FPS counter in the form title doesn't seem to function. Instead > of a FPS counter it seems to simply be a counter that constantly > grows. Hmmm... I must review it, in Windows works but maybe in Linux (not using getperformancecounter) it simply goes crazy. > 2) I have a 4 core system with hyper threading (ie: 4 cores and 4 > virtual cores). Your sample application maxed out all 8 cores at > 100% CPU load. Not really acceptable behaviour for a desktop > application I would think. ;-) The library animate controls properties, like position and color at the rate set by the "tmrAnimationCadence" timer. Maybe Linux LCL takes ages to update control positions or the backend widgetset. The CPU use for the library operations are almost 0% but repaint the form is CPU intensive specially in Linux, based in your observations. There is no reason that more than one core is used (no threading) so the widgetset or LCL interface is pushing it to its limits. You can try to remove the "Self.Refresh" in the tmrAnimationCadence event and also raise the tmrAnimationCadence.Interval to 30 (in the published code its value is 1, but it should be 15, but in Windows difference between 15 and 1 is zero, in Linux you can set timers with 1 ms. precision which is terrible overkill). -- From michael at freepascal.org Mon Feb 27 22:52:09 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Feb 2017 22:52:09 +0100 (CET) Subject: [Lazarus] Animation library In-Reply-To: <85df34fb-c086-ba67-da52-d3726d7471f4@gmail.com> References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> <378912f2-f437-813f-ee45-064601207cb6@geldenhuys.co.uk> <85df34fb-c086-ba67-da52-d3726d7471f4@gmail.com> Message-ID: On Mon, 27 Feb 2017, José Mejuto via Lazarus wrote: >> 2) I have a 4 core system with hyper threading (ie: 4 cores and 4 >> virtual cores). Your sample application maxed out all 8 cores at >> 100% CPU load. Not really acceptable behaviour for a desktop >> application I would think. ;-) > > The library animate controls properties, like position and color at the > rate set by the "tmrAnimationCadence" timer. Maybe Linux LCL takes ages > to update control positions or the backend widgetset. The CPU use for > the library operations are almost 0% but repaint the form is CPU > intensive specially in Linux, based in your observations. There is no > reason that more than one core is used (no threading) so the widgetset > or LCL interface is pushing it to its limits. > > You can try to remove the "Self.Refresh" in the tmrAnimationCadence > event and also raise the tmrAnimationCadence.Interval to 30 (in the > published code its value is 1, but it should be 15, but in Windows > difference between 15 and 1 is zero, in Linux you can set timers with 1 > ms. precision which is terrible overkill). I put it on 30, but as with Graeme, the CPU goes to well over 100% (2 cores are involved in the process, or so it seems) Michael. From nc-gaertnma at netcologne.de Mon Feb 27 23:49:42 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 27 Feb 2017 23:49:42 +0100 Subject: [Lazarus] Animation library In-Reply-To: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> Message-ID: <20170227234942.03ea0803@limapholos.matflo.wg> On Mon, 27 Feb 2017 13:55:47 +0100 José Mejuto via Lazarus wrote: >[...] > Finally I end with and alpha version which I wish to share with the > community to get a bit of feedback before include it in Lazarus CCR or > maybe in LCL itself. Instead of Repaint it should use Invalidate. And when changing multiple LCL properties, you should enclose it in DisableAutoSizing/EnableAutoSizing. For example: DisableAlign; AnimationQueue.PaintAll; EnableAlign; Mattias From friess at gmx.at Tue Feb 28 09:37:19 2017 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Tue, 28 Feb 2017 09:37:19 +0100 Subject: [Lazarus] Generics diffence between Lazarus and Delphi Berlin In-Reply-To: References: Message-ID: <7a010248-e1d4-7b9b-db6d-5ad390b53928@gmx.at> I have found some interesting working Generics construct. I want to translate this code to Lazarus, but there are Generics often used. In Delphi Berlin the following ist working, the inner array of Integer is normally 6 integer long, but once 7 integer and can filled in such way. Is it possible to do something similar in Lazarus ? Or how can i rewrite this to to the same in Lazarus/FPC Andreas var CODE_PATTERNS: TArray>; ........ CODE_PATTERNS := [[2, 1, 2, 2, 2, 2], // 0 [2, 2, 2, 1, 2, 2], [2, 2, 2, 2, 2, 1], [1, 2, 1, 2, 2, 3], [1, 2, 1, 3, 2, 2], [1, 3, 1, 2, 2, 2], // 5 [1, 2, 2, 2, 1, 3], [1, 2, 2, 3, 1, 2], [1, 3, 2, 2, 1, 2], [2, 2, 1, 2, 1, 3], [2, 2, 1, 3, 1, 2], // 10 [2, 3, 1, 2, 1, 2], [1, 1, 2, 2, 3, 2], [1, 2, 2, 1, 3, 2], [1, 2, 2, 2, 3, 1], [1, 1, 3, 2, 2, 2], // 15 [1, 2, 3, 1, 2, 2], [1, 2, 3, 2, 2, 1], [2, 2, 3, 2, 1, 1], [2, 2, 1, 1, 3, 2], [2, 2, 1, 2, 3, 1], // 20 [2, 1, 3, 2, 1, 2], [2, 2, 3, 1, 1, 2], [3, 1, 2, 1, 3, 1], [3, 1, 1, 2, 2, 2], [3, 2, 1, 1, 2, 2], // 25 [3, 2, 1, 2, 2, 1], [3, 1, 2, 2, 1, 2], [3, 2, 2, 1, 1, 2], [3, 2, 2, 2, 1, 1], [2, 1, 2, 1, 2, 3], // 30 [2, 1, 2, 3, 2, 1], [2, 3, 2, 1, 2, 1], [1, 1, 1, 3, 2, 3], [1, 3, 1, 1, 2, 3], [1, 3, 1, 3, 2, 1], // 35 [1, 1, 2, 3, 1, 3], [1, 3, 2, 1, 1, 3], [1, 3, 2, 3, 1, 1], [2, 1, 1, 3, 1, 3], [2, 3, 1, 1, 1, 3], // 40 [2, 3, 1, 3, 1, 1], [1, 1, 2, 1, 3, 3], [1, 1, 2, 3, 3, 1], [1, 3, 2, 1, 3, 1], [1, 1, 3, 1, 2, 3], // 45 [1, 1, 3, 3, 2, 1], [1, 3, 3, 1, 2, 1], [3, 1, 3, 1, 2, 1], [2, 1, 1, 3, 3, 1], [2, 3, 1, 1, 3, 1], // 50 [2, 1, 3, 1, 1, 3], [2, 1, 3, 3, 1, 1], [2, 1, 3, 1, 3, 1], [3, 1, 1, 1, 2, 3], [3, 1, 1, 3, 2, 1], // 55 [3, 3, 1, 1, 2, 1], [3, 1, 2, 1, 1, 3], [3, 1, 2, 3, 1, 1], [3, 3, 2, 1, 1, 1], [3, 1, 4, 1, 1, 1], // 60 [2, 2, 1, 4, 1, 1], [4, 3, 1, 1, 1, 1], [1, 1, 1, 2, 2, 4], [1, 1, 1, 4, 2, 2], [1, 2, 1, 1, 2, 4], // 65 [1, 2, 1, 4, 2, 1], [1, 4, 1, 1, 2, 2], [1, 4, 1, 2, 2, 1], [1, 1, 2, 2, 1, 4], [1, 1, 2, 4, 1, 2], // 70 [1, 2, 2, 1, 1, 4], [1, 2, 2, 4, 1, 1], [1, 4, 2, 1, 1, 2], [1, 4, 2, 2, 1, 1], [2, 4, 1, 2, 1, 1], // 75 [2, 2, 1, 1, 1, 4], [4, 1, 3, 1, 1, 1], [2, 4, 1, 1, 1, 2], [1, 3, 4, 1, 1, 1], [1, 1, 1, 2, 4, 2], // 80 [1, 2, 1, 1, 4, 2], [1, 2, 1, 2, 4, 1], [1, 1, 4, 2, 1, 2], [1, 2, 4, 1, 1, 2], [1, 2, 4, 2, 1, 1], // 85 [4, 1, 1, 2, 1, 2], [4, 2, 1, 1, 1, 2], [4, 2, 1, 2, 1, 1], [2, 1, 2, 1, 4, 1], [2, 1, 4, 1, 2, 1], // 90 [4, 1, 2, 1, 2, 1], [1, 1, 1, 1, 4, 3], [1, 1, 1, 3, 4, 1], [1, 3, 1, 1, 4, 1], [1, 1, 4, 1, 1, 3], // 95 [1, 1, 4, 3, 1, 1], [4, 1, 1, 1, 1, 3], [4, 1, 1, 3, 1, 1], [1, 1, 3, 1, 4, 1], [1, 1, 4, 1, 3, 1], // 100 [3, 1, 1, 1, 4, 1], [4, 1, 1, 1, 3, 1], [2, 1, 1, 4, 1, 2], [2, 1, 1, 2, 1, 4], [2, 1, 1, 2, 3, 2], // 105 [2, 3, 3, 1, 1, 1, 2]]; From mailinglists at geldenhuys.co.uk Tue Feb 28 12:45:41 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 28 Feb 2017 11:45:41 +0000 Subject: [Lazarus] Jedi Code Formatter (JCF) issues Message-ID: Hi, Is there an actual JCF (included with Lazarus) maintainer? I've recently been using it quite a bit and noticed a couple of problems. I'll obviously try and fix them myself (free time is very limited, but I'll try my best). The two most important ones for me: * Some code formatting is not applied (ignored) based on configuration settings. * Some configuration changes are not persisted, so user defined options can't actually be applied in the code formatting. 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 Tue Feb 28 13:11:58 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Tue, 28 Feb 2017 13:11:58 +0100 Subject: [Lazarus] Animation library In-Reply-To: References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> <0e2dfb39-957c-b881-c1b3-b13e359b2428@geldenhuys.co.uk> <378912f2-f437-813f-ee45-064601207cb6@geldenhuys.co.uk> <85df34fb-c086-ba67-da52-d3726d7471f4@gmail.com> Message-ID: <4de49a90-1611-bba5-5471-4b2bf720c8b3@gmail.com> El 27/02/2017 a las 22:52, Michael Van Canneyt via Lazarus escribió: >> published code its value is 1, but it should be 15, but in Windows >> difference between 15 and 1 is zero, in Linux you can set timers with >> 1 ms. precision which is terrible overkill). > > I put it on 30, but as with Graeme, the CPU goes to well over 100% > (2 cores are involved in the process, or so it seems) Hello, I'll investigate a bit why in Windows it takes low CPU usage but in Linux it overload CPU, maybe too much FPS or the Linux LCL behavior should be handled in a bit different way. Thank you for your tests. -- From joshyfun at gmail.com Tue Feb 28 13:16:57 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Tue, 28 Feb 2017 13:16:57 +0100 Subject: [Lazarus] Animation library In-Reply-To: <20170227234942.03ea0803@limapholos.matflo.wg> References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> <20170227234942.03ea0803@limapholos.matflo.wg> Message-ID: El 27/02/2017 a las 23:49, Mattias Gaertner via Lazarus escribió: > Instead of Repaint it should use Invalidate. Hello, Invalidate queues a paint but repaint calls an inmediate repaint do not? In other words, in Windows world Invalidate uses PostMessage and Repaint uses SendMessage, or am I wrong ? > And when changing multiple LCL properties, you should enclose it in > DisableAutoSizing/EnableAutoSizing. > DisableAlign; > AnimationQueue.PaintAll; > EnableAlign; Yes, I forgot to disable the autoaling, this for sure will reduce CPU when many controls are being moved at a time, thank you. This confirms that the lib is not ready to be used :-) -- From nc-gaertnma at netcologne.de Tue Feb 28 13:30:20 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 28 Feb 2017 13:30:20 +0100 Subject: [Lazarus] Animation library In-Reply-To: References: <1d1f8364-c75c-1540-4361-9c4a28219d7f@gmail.com> <20170227234942.03ea0803@limapholos.matflo.wg> Message-ID: <20170228133020.6436381c@limapholos.matflo.wg> On Tue, 28 Feb 2017 13:16:57 +0100 José Mejuto via Lazarus wrote: > El 27/02/2017 a las 23:49, Mattias Gaertner via Lazarus escribió: > > > Instead of Repaint it should use Invalidate. > > Hello, > > Invalidate queues a paint but repaint calls an inmediate repaint do not? Yes. The widgetset can combine multiple invalidates to one paint, avoiding congestion. Mattias From pascaldragon at googlemail.com Tue Feb 28 14:18:14 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Tue, 28 Feb 2017 14:18:14 +0100 Subject: [Lazarus] Generics diffence between Lazarus and Delphi Berlin In-Reply-To: <7a010248-e1d4-7b9b-db6d-5ad390b53928@gmx.at> References: <7a010248-e1d4-7b9b-db6d-5ad390b53928@gmx.at> Message-ID: Am 28.02.2017 09:37 schrieb "Andreas Frieß via Lazarus" < lazarus at lists.lazarus-ide.org>: > > I have found some interesting working Generics construct. I want to translate this code to Lazarus, but there are Generics often used. > In Delphi Berlin the following ist working, the inner array of Integer is normally 6 integer long, but once 7 integer and can filled in such way. Is it possible to do something similar in Lazarus ? Or how can i rewrite this to to the same in Lazarus/FPC That has nothing to do with generics, but with array initializers, which FPC currently doesn't support. You can work around this by explicitly declaring the types and then using .Create(). === code begin === type TInnerArray = TArray; TOuterArray = TArray; var CODE_PATTERNS: TOuterArray; begin CODE_PATTERN := TOuterArray.Create( TInnerArray.Create(2, 1, 2, 2, 2, 2), TInnerArray.Create(2, 2, 2, 1, 2, 2), TInnerArray.Create(2, 2, 2, 2, 2, 1), TInnerArray.Create(1, 2, 1, 2, 2, 3), ... ); end. === code end === While this looks quite verbose it should also work with Delphi. (In theory TArray.Create() and TArray>.Create() directly should work as well, but I think FPC's parser still barfs on that) Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From paco.mail.telepac.pt at gmail.com Tue Feb 28 17:34:45 2017 From: paco.mail.telepac.pt at gmail.com (Paulo Costa) Date: Tue, 28 Feb 2017 16:34:45 +0000 Subject: [Lazarus] Lazarus on Raspberry Pi 3 Message-ID: I'm using Lazarus on a Raspberry Pi 3. I have tested a few ways to get it working but the best one seems to be Bo Berglund's script and starting compiler. (Thanks) I had just one problem with it: an error would occur when the new fpc is being installed and I had to change line 150 from make install OPT="$OPTIONS" PREFIX=/home/pi || error_exit "$LINENO: Cannot make install! Aborting" to make install FPC="$FPCDIR/ppcarm" OPT="$OPTIONS" PREFIX=/home/pi || error_exit "$LINENO: Cannot make install! Aborting" Apparently, this line still needs FPC="$FPCDIR/ppcarm" I'm using Raspbian version 8.0 Linux raspberrypi 4.4.38-v7+ Paulo Costa From denisgolovan at yandex.ru Tue Feb 28 20:17:09 2017 From: denisgolovan at yandex.ru (denisgolovan) Date: Tue, 28 Feb 2017 22:17:09 +0300 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: References: <977611487623042@web13h.yandex.ru> <650601487709610@web28h.yandex.ru> <1157571488033680@web31j.yandex.ru> Message-ID: <523811488309429@web11j.yandex.ru> 28.02.2017, 12:31, "Juha Manninen" : > I tested it and could not see any problems. Everything works as > before. However I don't know how to reproduce the original bug. > The removed line may be needed for old GTK2 versions or for GTK1. > The LCL-GTK2 binding code was copied from LCL-GTK1 and has many > historical remains. > I applied the change in r54305. > Everybody please test with different GTK2 versions and desktop environments. Thanks. -- Regards, Denis Golovan From noreply at z505.com Tue Feb 28 20:37:32 2017 From: noreply at z505.com (noreply at z505.com) Date: Tue, 28 Feb 2017 13:37:32 -0600 Subject: [Lazarus] $IF for Linux and FreeBSD platforms? In-Reply-To: <776d4908-6718-a079-1da7-3dc3248b3e5f@geldenhuys.co.uk> References: <38886776-13b6-9c44-687e-2a08db30f455@geldenhuys.co.uk> <75dc779a-471b-7f90-8ae4-1915b24dc90f@kluug.net> <776d4908-6718-a079-1da7-3dc3248b3e5f@geldenhuys.co.uk> Message-ID: On 2017-02-16 05:35, Graeme Geldenhuys via Lazarus wrote: > On 2017-02-16 11:18, Ondrej Pokorny via Lazarus wrote: >> Well, you mixed up DEFINED and DECLARED macros. > Sorry newbie question regarding these $IF directives: can someone explain why you would use "$IF defined" instead of $IFDEF... Obviously there are likely reasons for using one over the other. > Dope!!! Thanks for spotting that. I need more coffee. ;-) Coffee being used as a crutch is bad. Use it for an extra burst, not as an hourly/daily reliance. IMHO Or IMAO A := 'arrogant'; From mailinglists at geldenhuys.co.uk Tue Feb 28 20:53:45 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 28 Feb 2017 19:53:45 +0000 Subject: [Lazarus] $IF for Linux and FreeBSD platforms? In-Reply-To: References: <38886776-13b6-9c44-687e-2a08db30f455@geldenhuys.co.uk> <75dc779a-471b-7f90-8ae4-1915b24dc90f@kluug.net> <776d4908-6718-a079-1da7-3dc3248b3e5f@geldenhuys.co.uk> Message-ID: <1140765e-60ce-ffd9-e74c-3969f51d6138@geldenhuys.co.uk> On 2017-02-28 19:37, Lars via Lazarus wrote: > can someone explain why you would use "$IF defined" instead of $IFDEF... In that case a piece of code applied to both Linux and FreeBSD platforms. I didn't see the need to duplicate the code with IFDEF statements - thus making code management more work. So use "$IF defined" to accept more that one define for a block of code. >> Dope!!! Thanks for spotting that. I need more coffee. ;-) > > Coffee being used as a crutch is bad. Use it for an extra burst, not as > an hourly/daily reliance. I live on coffee and Red Bull at the moment. Trying to survive lots of sleepless nights due to a little human teething! :-( Or how does the other saying go: Computer Programmer: We convert coffee and pizza into source code. :-) 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 pascaldragon at googlemail.com Tue Feb 28 23:12:53 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Tue, 28 Feb 2017 23:12:53 +0100 Subject: [Lazarus] $IF for Linux and FreeBSD platforms? In-Reply-To: References: <38886776-13b6-9c44-687e-2a08db30f455@geldenhuys.co.uk> <75dc779a-471b-7f90-8ae4-1915b24dc90f@kluug.net> <776d4908-6718-a079-1da7-3dc3248b3e5f@geldenhuys.co.uk> Message-ID: Am 28.02.2017 20:37 schrieb "Lars via Lazarus" < lazarus at lists.lazarus-ide.org>: > > On 2017-02-16 05:35, Graeme Geldenhuys via Lazarus wrote: >> >> On 2017-02-16 11:18, Ondrej Pokorny via Lazarus wrote: >>> >>> Well, you mixed up DEFINED and DECLARED macros. >> >> > > Sorry newbie question regarding these $IF directives: > > can someone explain why you would use "$IF defined" instead of $IFDEF... > > Obviously there are likely reasons for using one over the other. $IFDEF FOO is an abbreviation for $IF DEFINED(FOO). The latter also allows to combine multiple checks using AND and OR (and also allowing comparisons with constant values) while the former can always only check for a single define. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Tue Feb 28 23:53:06 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 28 Feb 2017 23:53:06 +0100 Subject: [Lazarus] Lazarus on Raspberry Pi 3 References: Message-ID: On Tue, 28 Feb 2017 16:34:45 +0000, Paulo Costa via Lazarus wrote: >I'm using Lazarus on a Raspberry Pi 3. >I have tested a few ways to get it working but the best one seems to be >Bo Berglund's script and starting compiler. (Thanks) > >I had just one problem with it: >an error would occur when the new fpc is being installed and I had to >change line 150 from > >make install OPT="$OPTIONS" PREFIX=/home/pi || error_exit "$LINENO: >Cannot make install! Aborting" > >to > >make install FPC="$FPCDIR/ppcarm" OPT="$OPTIONS" PREFIX=/home/pi || >error_exit "$LINENO: Cannot make install! Aborting" > >Apparently, this line still needs FPC="$FPCDIR/ppcarm" Hmmm, I thought that the previous lines created the new FPC compiler, which we want to install. The added FPC="$FPCDIR/ppcarm" will use the seed compiler rather than the one created by the previous make as far as I understand and that is not what we want. For others below are the affected lines (with the error exception code removed). Note that the seed compiler is located at "$FPCDIR/ppcarm" and the cd command moves to the top of the checked out FPC code by version number. echo "------- Building fpc and lazarus --------" echo "Building and installing version $FPCVER of FPC" cd "$FPCDIR/$FPCVER" make clean make all FPC="$FPCDIR/ppcarm" OPT="$OPTIONS" make install OPT="$OPTIONS" PREFIX=/home/pi So what will be the difference when using the above compared to: make install FPC="$FPCDIR/ppcarm" OPT="$OPTIONS" PREFIX=/home/pi I will have to make a test next time I have a blank RPi3 to install on. That could happen with FPC 3.0.2 now being released. > >I'm using Raspbian version 8.0 >Linux raspberrypi 4.4.38-v7+ What command(s) gives you this information? -- Bo Berglund Developer in Sweden