From zoe at scootersoftware.com Wed Sep 2 01:50:39 2020 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Tue, 1 Sep 2020 18:50:39 -0500 Subject: [Lazarus] OS theme change via TAppProperties In-Reply-To: <42c6bb0c-454c-a465-35b7-f36ea4db6cbd@ya.ru> References: <42c6bb0c-454c-a465-35b7-f36ea4db6cbd@ya.ru> Message-ID: <11a2058e-47e0-942c-75f9-46cb63de8225@scootersoftware.com> ThemeServices has an OnThemeChange callback for this already. Adding it to TApplicationProperties wouldn't be a terrible idea, though it would probably be better to implement CM_THEMECHANGED/CM_STYLECHANGED in TControl, which would be VCL compatible.  I haven't tested it on most widgetsets, but I do see calls to IntfDoThemeChange in them.  When I tested with Qt5 on Mint Cinnamon, there were cases where it wasn't getting called correctly, but I haven't had a chance to research it fully yet.  Looks like Cocoa is just watching for the system colors to have changed; this question[1] on StackOverflow implies it'll we'll need to hook into DistributedNotificationCenter instead. 1) https://stackoverflow.com/questions/39048894/how-to-detect-switch-between-macos-default-dark-mode-using-swift-3 -- Zoë Peterson Scooter Software On 8/30/2020 11:43 AM, Alexey Tor. via lazarus wrote: > This forum topic is about how we can react to macOS theme change. > https://forum.lazarus.freepascal.org/index.php?topic=43111.msg376056;topicseen#new > > > and I had the idea to make all this task simpler. > we have the TApplicationProperties. let's add OnThemeChange there! > some widgetset funcs will be needed. > now it's the problem - do this reaction on macOS, on win32,... no one > knows how to do it on gtk2/qt... > I wrote to Dmitry (Cocoa developer) about this idea, then wrote here. > > Alexey Torgashin > From steveg at nevets.com.au Thu Sep 3 11:12:06 2020 From: steveg at nevets.com.au (SteveG) Date: Thu, 3 Sep 2020 19:12:06 +1000 Subject: [Lazarus] Find in Files Message-ID: Is it at all possible (without regular expressions) to find all lines 'containing this text', as long as 'not containing this' similar to the 'minus' on google search I guess Thanks From leledumbo_cool at yahoo.co.id Thu Sep 3 13:21:29 2020 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Thu, 3 Sep 2020 04:21:29 -0700 (MST) Subject: [Lazarus] Find in Files In-Reply-To: References: Message-ID: <1599132089478-0.post@n3.nabble.com> > without regular expressions why make your own life difficult? regex is there for complex cases like this. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From leledumbo_cool at yahoo.co.id Thu Sep 3 13:23:37 2020 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Thu, 3 Sep 2020 04:23:37 -0700 (MST) Subject: [Lazarus] Find in Files In-Reply-To: References: Message-ID: <1599132217143-0.post@n3.nabble.com> > without regular expressions why make your own life difficult? regex is there for complex cases like this. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From steveg at nevets.com.au Fri Sep 4 00:00:01 2020 From: steveg at nevets.com.au (SteveG) Date: Fri, 4 Sep 2020 08:00:01 +1000 Subject: [Lazarus] Find in Files In-Reply-To: <1599132089478-0.post@n3.nabble.com> References: <1599132089478-0.post@n3.nabble.com> Message-ID: <6bd8ba1c-2a00-2e6e-bd6c-2d1720458fbe@nevets.com.au> possibly true - was hoping for a simple ability to find each line containing a specific command unless commented out. Seems I use regex so infrequently I need google each time :) On 3/9/20 9:21 pm, leledumbo via lazarus wrote: >> without regular expressions > why make your own life difficult? regex is there for complex cases like > this. > > > > -- > Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From svaa at ciberpiula.net Tue Sep 8 21:00:24 2020 From: svaa at ciberpiula.net (Santiago A.) Date: Tue, 8 Sep 2020 21:00:24 +0200 Subject: [Lazarus] FormClose Message-ID: Hi: I recently have read a message where an object was created in the FormCreate and was freed in the formClose.  What if the form is not freed? I think that the the natural place to free objects created in formCreate is FormDestroy. In fact, I usually follow this pairs Created in FormCreate, freed in FormDestroy Created in FormActivate, freed in FormDeactivate Created in FormShow, freed in FormHide I seldom use formClose, just to change the default closeAction.  I can't see what else is formClose for. Do you use it form any other case? -- Saludos Santiago A. From vojtech.cihak at atlas.cz Wed Sep 9 16:13:36 2020 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=c4=9bch_=c4=8cih=c3=a1k?=) Date: Wed, 09 Sep 2020 16:13:36 +0200 Subject: [Lazarus] =?utf-8?q?FormClose?= In-Reply-To: References: Message-ID: <20200909161336.50634C72@atlas.cz> Hi,   FormClose is opposite to FormShow. The use-case is a modal form which exists always (i.e. is autocreated when app. starts and is freed when app. end). You can call ShowModal, create some objects in FormShow and free them in FormClose.   V. ______________________________________________________________ > Od: "Santiago A. via lazarus" > Komu: lazarus at lists.lazarus.freepascal.org > Datum: 08.09.2020 21:00 > Předmět: [Lazarus] FormClose > Hi: I recently have read a message where an object was created in the FormCreate and was freed in the formClose.  What if the form is not freed? I think that the the natural place to free objects created in formCreate is FormDestroy. In fact, I usually follow this pairs Created in FormCreate, freed in FormDestroy Created in FormActivate, freed in FormDeactivate Created in FormShow, freed in FormHide I seldom use formClose, just to change the default closeAction.  I can't see what else is formClose for. Do you use it form any other case? -- Saludos Santiago A. -- _______________________________________________ lazarus mailing list lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Fri Sep 11 12:14:59 2020 From: aaa5500 at ya.ru (Alexey Tor.) Date: Fri, 11 Sep 2020 13:14:59 +0300 Subject: [Lazarus] JCF2 patch in trunk Message-ID: <6c9256a8-c7d6-87bd-4029-093f5e7a82e1@ya.ru> https://github.com/graemeg/lazarus/commit/f4ffd5e0640948e9c396e1ef1b2aacd90512ac77    if StartsText('{$include',pcToken.SourceCode)=true then       lPos:=10     else if StartsStr('{$I',pcToken.SourceCode)=true then a) $include is searched case-insens? why no space after "$include" to avoid incorrect include? b) $I is searched case-insens? seems no! why no space after $I to avoid other directive? Regards, Alexey From bartjunk64 at gmail.com Fri Sep 11 13:05:25 2020 From: bartjunk64 at gmail.com (Bart) Date: Fri, 11 Sep 2020 13:05:25 +0200 Subject: [Lazarus] JCF2 patch in trunk In-Reply-To: <6c9256a8-c7d6-87bd-4029-093f5e7a82e1@ya.ru> References: <6c9256a8-c7d6-87bd-4029-093f5e7a82e1@ya.ru> Message-ID: On Fri, Sep 11, 2020 at 12:15 PM Alexey Tor. via lazarus wrote: > if StartsText('{$include',pcToken.SourceCode)=true then > lPos:=10 > else if StartsStr('{$I',pcToken.SourceCode)=true then I really dislike this "if BooleanExpression=true" (or: "if BooleanExpression=false"). A simple "if BooleanExpression" suffices (or: "if not BooleanExpression"). -- Bart From nc-gaertnma at netcologne.de Fri Sep 11 13:12:36 2020 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 11 Sep 2020 13:12:36 +0200 Subject: [Lazarus] JCF2 patch in trunk In-Reply-To: <6c9256a8-c7d6-87bd-4029-093f5e7a82e1@ya.ru> References: <6c9256a8-c7d6-87bd-4029-093f5e7a82e1@ya.ru> Message-ID: <20200911131236.4280437d@limapholos.matflo.wg> On Fri, 11 Sep 2020 13:14:59 +0300 "Alexey Tor. via lazarus" wrote: > https://github.com/graemeg/lazarus/commit/f4ffd5e0640948e9c396e1ef1b2aacd90512ac77 > >    if StartsText('{$include',pcToken.SourceCode)=true then >       lPos:=10 >     else if StartsStr('{$I',pcToken.SourceCode)=true then > > > a) $include is searched case-insens? why no space after "$include" to > avoid incorrect include? > > b) $I is searched case-insens? seems no! why no space after $I to > avoid other directive? Are these trick questions? Simply reading the code and using Find Declaration answers both questions in less time, than it takes to write this mail. Mattias From michael at freepascal.org Fri Sep 11 13:22:22 2020 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 11 Sep 2020 13:22:22 +0200 (CEST) Subject: [Lazarus] JCF2 patch in trunk In-Reply-To: <20200911131236.4280437d@limapholos.matflo.wg> References: <6c9256a8-c7d6-87bd-4029-093f5e7a82e1@ya.ru> <20200911131236.4280437d@limapholos.matflo.wg> Message-ID: On Fri, 11 Sep 2020, Mattias Gaertner via lazarus wrote: > On Fri, 11 Sep 2020 13:14:59 +0300 > "Alexey Tor. via lazarus" wrote: > >> https://github.com/graemeg/lazarus/commit/f4ffd5e0640948e9c396e1ef1b2aacd90512ac77 >> >>    if StartsText('{$include',pcToken.SourceCode)=true then >>       lPos:=10 >>     else if StartsStr('{$I',pcToken.SourceCode)=true then >> >> >> a) $include is searched case-insens? why no space after "$include" to >> avoid incorrect include? >> >> b) $I is searched case-insens? seems no! why no space after $I to >> avoid other directive? > > Are these trick questions? > Simply reading the code and using Find Declaration answers both > questions in less time, than it takes to write this mail. I think he tries to point out there is a discrepancy in case-sensitiveness treatment, and that it is safer to add ' ' after the directive to prevent false positives. Michael. From steveg at nevets.com.au Mon Sep 14 09:32:52 2020 From: steveg at nevets.com.au (SteveG) Date: Mon, 14 Sep 2020 17:32:52 +1000 Subject: [Lazarus] CrossCompile to Arm QT5 Message-ID: <8ec30279-64a2-a7c5-d4d1-215e02a6197e@nevets.com.au> I am programming on x86_64 gtk2, and want to x-compile to aarch64 qt5. Using fpcupDeluxe, I have managed aarch64 with gtk2. Anybody able to point me to steps on installing qt5 within then fpc/lazarus setup for x-compile ? Regards - SteveG From larrydalton71 at gmail.com Thu Sep 17 13:06:57 2020 From: larrydalton71 at gmail.com (larrydalton71) Date: Thu, 17 Sep 2020 07:06:57 -0400 Subject: [Lazarus] TSql57 replacement Message-ID: <5f634352.1c69fb81.1cb5f.0c71@mx.google.com> Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphone -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Thu Sep 17 13:14:09 2020 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 17 Sep 2020 13:14:09 +0200 (CEST) Subject: [Lazarus] TSql57 replacement In-Reply-To: <5f634352.1c69fb81.1cb5f.0c71@mx.google.com> References: <5f634352.1c69fb81.1cb5f.0c71@mx.google.com> Message-ID: On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote: > > Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphone These plans exist, but no date is determined yet. And it will not be 'replace' but 'add a new connection'. Michael. From larrydalton71 at gmail.com Thu Sep 17 13:47:07 2020 From: larrydalton71 at gmail.com (larrydalton71) Date: Thu, 17 Sep 2020 07:47:07 -0400 Subject: [Lazarus] TSql57 replacement In-Reply-To: Message-ID: <5f634cbc.1c69fb81.cdf97.64cb@mx.google.com> Is there another way to connect now? I don't want to install Mysql 57.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20 07:14 (GMT-05:00) To: larrydalton71 via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphoneThese plans exist, but no date is determined yet.And it will not be 'replace' but 'add a new connection'.Michael.-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Thu Sep 17 13:51:03 2020 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 17 Sep 2020 13:51:03 +0200 (CEST) Subject: [Lazarus] TSql57 replacement In-Reply-To: <5f634cbc.1c69fb81.cdf97.64cb@mx.google.com> References: <5f634cbc.1c69fb81.cdf97.64cb@mx.google.com> Message-ID: Use the ODBC connector. Michael. On Thu, 17 Sep 2020, larrydalton71 wrote: > > Is there another way to connect now? I don't want to install Mysql 57.Sent from my Verizon, Samsung Galaxy smartphone > -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20 07:14 (GMT-05:00) To: larrydalton71 via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphoneThese plans exist, but no date is determined yet.And it will not be 'replace' but 'add a new connection'.Michael.-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus From larrydalton71 at gmail.com Thu Sep 17 14:52:36 2020 From: larrydalton71 at gmail.com (larrydalton71) Date: Thu, 17 Sep 2020 08:52:36 -0400 Subject: [Lazarus] TSql57 replacement In-Reply-To: Message-ID: <5f635c15.1c69fb81.8393.8687@mx.google.com> Thanks!Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20 07:51 (GMT-05:00) To: Lazarus mailing list Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement Use the ODBC connector.Michael.On Thu, 17 Sep 2020, larrydalton71 wrote:>> Is there another way to connect now? I don't want to install Mysql 57.Sent from my Verizon, Samsung Galaxy smartphone> -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20  07:14  (GMT-05:00) To: larrydalton71 via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphoneThese plans exist, but no date is determined yet.And it will not be 'replace' but 'add a new connection'.Michael.-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From jyv110 at gmail.com Thu Sep 17 19:28:27 2020 From: jyv110 at gmail.com (Jy V) Date: Thu, 17 Sep 2020 19:28:27 +0200 Subject: [Lazarus] App for PinePhone In-Reply-To: References: <4f35c5a4-c6f1-1e9f-5786-09049754841e@nevets.com.au> Message-ID: On Sun, Aug 30, 2020 at 12:12 PM Francesco Sammarco via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Keep us informed, it interests me too. I just did some tests for the > application console. > PinePhone64 PostmarketOS arrived on the desktop, FpcUpDeluxe to setup Linux aarch64 RTL&co for FreePascal and latest Lazarus from trunk on Windows 10 cross-compiled from Windows 10 to Linux aarch64 a simple WriteLn('HelloWorld'); copy the 1MB binary using WinSCP from laptop to the PinePhone which is connected on the same Wifi network at home, using the admin user and password as declared 5 minutes before during the setup of PostmarketOS in Putty command line : pine64-pinephone:~$ ./HelloWorld -ash: ./HelloWorld: not found pine64-pinephone:~$ sudo apk add libc6-compat [sudo] password for admin: fetch http://postmarketos1.brixit.nl/postmarketos/v20.05/aarch64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/aarch64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/aarch64/APKINDEX.tar.gz (1/3) Installing libc6-compat (1.1.24-r9) (2/3) Installing dnsmasq (2.81-r0) Executing dnsmasq-2.81-r0.pre-install (3/3) Installing postmarketos-base-elogind (3-r38) Executing postmarketos-base-elogind-3-r38.post-install - Modifying: /etc/elogind/logind.conf Executing busybox-1.31.1-r19.trigger Executing postmarketos-base-3-r36.trigger Configuring a getty on port ttyS0 with baud rate 115200 OK: 967 MiB in 471 packages pine64-pinephone:~$ ./HelloWorld Hello world Lesson learn ! (thank you Michael) you need to sudo apk add libc6-compat using ldd ./HelloWorld will show you the missing parts: /lib/ld-linux-aarch64.so.1 (0xffffa55ab000) libpthread.so.0 => /lib/ld-linux-aarch64.so.1 (0xffffa55ab000) libdl.so.2 => /lib/ld-linux-aarch64.so.1 (0xffffa55ab000) libc.so.6 => /lib/ld-linux-aarch64.so.1 (0xffffa55ab000) Now let's compile the big beast over the week-end. -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrydalton71 at gmail.com Fri Sep 18 00:40:25 2020 From: larrydalton71 at gmail.com (larrydalton71) Date: Thu, 17 Sep 2020 18:40:25 -0400 Subject: [Lazarus] TSql57 replacement In-Reply-To: Message-ID: <5f63e5db.1c69fb81.1f123.5a27@mx.google.com> I hate to be so high maintenance, but I have been trying for two days to get a good tutorial on launching unix odbc or iodbc on linux. Any help?Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20 07:51 (GMT-05:00) To: Lazarus mailing list Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement Use the ODBC connector.Michael.On Thu, 17 Sep 2020, larrydalton71 wrote:>> Is there another way to connect now? I don't want to install Mysql 57.Sent from my Verizon, Samsung Galaxy smartphone> -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20  07:14  (GMT-05:00) To: larrydalton71 via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphoneThese plans exist, but no date is determined yet.And it will not be 'replace' but 'add a new connection'.Michael.-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From mguerra13 at gmail.com Fri Sep 18 03:36:04 2020 From: mguerra13 at gmail.com (Mario Guerra) Date: Thu, 17 Sep 2020 22:36:04 -0300 Subject: [Lazarus] TSql57 replacement In-Reply-To: <5f63e5db.1c69fb81.1f123.5a27@mx.google.com> References: <5f63e5db.1c69fb81.1f123.5a27@mx.google.com> Message-ID: Recently, in a project I used Zeos 7.2.6 to connect to MariaDB 10.3 with protocol "mysql". Zeos uses (for every database) the native client libraries, so, in Linux you only have to install the proper client to MySQL or MariaDB. https://wiki.lazarus.freepascal.org/Zeos_tutorial Hope it helps, Mario El 17/9/20 a las 19:40, larrydalton71 via lazarus escribió: > I hate to be so high maintenance, but I have been trying for two days > to get a good tutorial on launching unix odbc or iodbc on linux. Any help? > > > > Sent from my Verizon, Samsung Galaxy smartphone > > > -------- Original message -------- > From: Michael Van Canneyt via lazarus > Date: 9/17/20 07:51 (GMT-05:00) > To: Lazarus mailing list > Cc: Michael Van Canneyt > Subject: Re: [Lazarus] TSql57 replacement > > > Use the ODBC connector. > > Michael. > > On Thu, 17 Sep 2020, larrydalton71 wrote: > > > > > Is there another way to connect now? I don't want to install Mysql > 57.Sent from my Verizon, Samsung Galaxy smartphone > > -------- Original message --------From: Michael Van Canneyt via > lazarus Date: 9/17/20 07:14  > (GMT-05:00) To: larrydalton71 via lazarus > Cc: Michael Van Canneyt > Subject: Re: [Lazarus] TSql57 replacement On > Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any > plans to replace the T57SqlConnection? I have done a complete update > on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and > need to access my sql databasesSent from my Verizon, Samsung Galaxy > smartphoneThese plans exist, but no date is determined yet.And it will > not be 'replace' but 'add a new connection'.Michael.-- > _______________________________________________lazarus mailing > listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrydalton71 at gmail.com Fri Sep 18 04:15:11 2020 From: larrydalton71 at gmail.com (larrydalton71) Date: Thu, 17 Sep 2020 22:15:11 -0400 Subject: [Lazarus] TSql57 replacement In-Reply-To: Message-ID: <5f641831.1c69fb81.afe0e.8212@mx.google.com> Thanks, Mario I will try that.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Mario Guerra via lazarus Date: 9/17/20 21:35 (GMT-05:00) To: larrydalton71 via lazarus Cc: Mario Guerra Subject: Re: [Lazarus] TSql57 replacement Recently, in a project I used Zeos 7.2.6 to connect to MariaDB 10.3 with protocol "mysql". Zeos uses (for every database) the native client libraries, so, in Linux you only have to install the proper client to MySQL or MariaDB. https://wiki.lazarus.freepascal.org/Zeos_tutorial Hope it helps, Mario El 17/9/20 a las 19:40, larrydalton71 via lazarus escribió: I hate to be so high maintenance, but I have been trying for two days to get a good tutorial on launching unix odbc or iodbc on linux. Any help? Sent from my Verizon, Samsung Galaxy smartphone -------- Original message -------- From: Michael Van Canneyt via lazarus Date: 9/17/20 07:51 (GMT-05:00) To: Lazarus mailing list Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement Use the ODBC connector. Michael. On Thu, 17 Sep 2020, larrydalton71 wrote: > > Is there another way to connect now? I don't want to install Mysql 57.Sent from my Verizon, Samsung Galaxy smartphone > -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20  07:14  (GMT-05:00) To: larrydalton71 via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphoneThese plans exist, but no date is determined yet.And it will not be 'replace' but 'add a new connection'.Michael.-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus -- _______________________________________________ lazarus mailing list lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From petr at petrhlozek.cz Fri Sep 18 06:41:09 2020 From: petr at petrhlozek.cz (=?UTF-8?B?UGV0ciBIbG/FvmVr?=) Date: Fri, 18 Sep 2020 06:41:09 +0200 Subject: [Lazarus] TSql57 replacement In-Reply-To: <5f641831.1c69fb81.afe0e.8212@mx.google.com> References: <5f641831.1c69fb81.afe0e.8212@mx.google.com> Message-ID: Maybe it's not a good solution but right now works for me. I still use 57Connection with disabled version check. There is at least one disadvantage - I have to install libmysqlclient-dev package on debian based distributions. Petr pá 18. 9. 2020 v 4:15 odesílatel larrydalton71 via lazarus napsal: > > Thanks, Mario > I will try that. > > > > Sent from my Verizon, Samsung Galaxy smartphone > > > -------- Original message -------- > From: Mario Guerra via lazarus > Date: 9/17/20 21:35 (GMT-05:00) > To: larrydalton71 via lazarus > Cc: Mario Guerra > Subject: Re: [Lazarus] TSql57 replacement > > > Recently, in a project I used Zeos 7.2.6 to connect to MariaDB 10.3 with protocol "mysql". > Zeos uses (for every database) the native client libraries, so, in Linux you only have to install the proper client to MySQL or MariaDB. > > https://wiki.lazarus.freepascal.org/Zeos_tutorial > > Hope it helps, Mario > > > El 17/9/20 a las 19:40, larrydalton71 via lazarus escribió: > > I hate to be so high maintenance, but I have been trying for two days to get a good tutorial on launching unix odbc or iodbc on linux. Any help? > > > > Sent from my Verizon, Samsung Galaxy smartphone > > > -------- Original message -------- > From: Michael Van Canneyt via lazarus > Date: 9/17/20 07:51 (GMT-05:00) > To: Lazarus mailing list > Cc: Michael Van Canneyt > Subject: Re: [Lazarus] TSql57 replacement > > > Use the ODBC connector. > > Michael. > > On Thu, 17 Sep 2020, larrydalton71 wrote: > > > > > Is there another way to connect now? I don't want to install Mysql 57.Sent from my Verizon, Samsung Galaxy smartphone > > -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20 07:14 (GMT-05:00) To: larrydalton71 via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphoneThese plans exist, but no date is determined yet.And it will not be 'replace' but 'add a new connection'.Michael.-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus -- web: https://petrhlozek.cz email: petr at petrhlozek.cz hobby: https://www.ok2cqr.com/ From lacak at zoznam.sk Fri Sep 18 07:25:49 2020 From: lacak at zoznam.sk (LacaK) Date: Fri, 18 Sep 2020 07:25:49 +0200 Subject: [Lazarus] TSql57 replacement In-Reply-To: <5f634cbc.1c69fb81.cdf97.64cb@mx.google.com> References: <5f634cbc.1c69fb81.cdf97.64cb@mx.google.com> Message-ID: > Is there another way to connect now? I don't want to install Mysql 57. > Cann't you use TMySQL57Connection with SkipLibraryVersionCheck property set to True? -Laco. From larrydalton71 at gmail.com Fri Sep 18 15:43:45 2020 From: larrydalton71 at gmail.com (larrydalton71) Date: Fri, 18 Sep 2020 09:43:45 -0400 Subject: [Lazarus] TSql57 replacement In-Reply-To: Message-ID: <5f64b994.1c69fb81.d5fac.d59b@mx.google.com> That works. Thanks!Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Mario Guerra via lazarus Date: 9/17/20 21:35 (GMT-05:00) To: larrydalton71 via lazarus Cc: Mario Guerra Subject: Re: [Lazarus] TSql57 replacement Recently, in a project I used Zeos 7.2.6 to connect to MariaDB 10.3 with protocol "mysql". Zeos uses (for every database) the native client libraries, so, in Linux you only have to install the proper client to MySQL or MariaDB. https://wiki.lazarus.freepascal.org/Zeos_tutorial Hope it helps, Mario El 17/9/20 a las 19:40, larrydalton71 via lazarus escribió: I hate to be so high maintenance, but I have been trying for two days to get a good tutorial on launching unix odbc or iodbc on linux. Any help? Sent from my Verizon, Samsung Galaxy smartphone -------- Original message -------- From: Michael Van Canneyt via lazarus Date: 9/17/20 07:51 (GMT-05:00) To: Lazarus mailing list Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement Use the ODBC connector. Michael. On Thu, 17 Sep 2020, larrydalton71 wrote: > > Is there another way to connect now? I don't want to install Mysql 57.Sent from my Verizon, Samsung Galaxy smartphone > -------- Original message --------From: Michael Van Canneyt via lazarus Date: 9/17/20  07:14  (GMT-05:00) To: larrydalton71 via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TSql57 replacement On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any plans to replace the T57SqlConnection? I have done a complete update on a laptop with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my sql databasesSent from my Verizon, Samsung Galaxy smartphoneThese plans exist, but no date is determined yet.And it will not be 'replace' but 'add a new connection'.Michael.-- _______________________________________________lazarus mailing listlazarus at lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus -- _______________________________________________ lazarus mailing list lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Fri Sep 18 21:40:51 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 18 Sep 2020 21:40:51 +0200 Subject: [Lazarus] How to move installed component package sources? Message-ID: I have installed a custom component package on the palette of Lazarus. Now I realize that I did it the wrong way since the package sources are inside a project tree of many apps and other things. I want to have the sources moved to my Lazarus installation into the config dir below lazarus like for instance packages retrieved from OLPM are. Is there a simpler way to redirect Lazarus for the package location or do I have to this: - Uninstall the component package - Rebuild Lazarus without the package - Install the package based on sources in the right place - Rebuild Lazarus again to include the package It takes a really long time to build Lazarus on these machines so I'd rather not do that if at all possible... I have Lazarus on several machines (Windows, Linux)... -- Bo Berglund Developer in Sweden From nc-gaertnma at netcologne.de Fri Sep 18 21:48:04 2020 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 18 Sep 2020 21:48:04 +0200 Subject: [Lazarus] How to move installed component package sources? In-Reply-To: References: Message-ID: <20200918214804.1467c64f@limapholos.matflo.wg> On Fri, 18 Sep 2020 21:40:51 +0200 Bo Berglund via lazarus wrote: > I have installed a custom component package on the palette of Lazarus. > Now I realize that I did it the wrong way since the package sources > are inside a project tree of many apps and other things. > > I want to have the sources moved to my Lazarus installation into the > config dir below lazarus like for instance packages retrieved from > OLPM are. > > Is there a simpler way to redirect Lazarus for the package location or > do I have to this: > - Uninstall the component package > - Rebuild Lazarus without the package > - Install the package based on sources in the right place > - Rebuild Lazarus again to include the package Skip the second step. Mattias From bo.berglund at gmail.com Fri Sep 18 22:16:56 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 18 Sep 2020 22:16:56 +0200 Subject: [Lazarus] How to move installed component package sources? References: <20200918214804.1467c64f@limapholos.matflo.wg> Message-ID: On Fri, 18 Sep 2020 21:48:04 +0200, Mattias Gaertner via lazarus wrote: >> Is there a simpler way to redirect Lazarus for the package location or >> do I have to this: >> - Uninstall the component package >> - Rebuild Lazarus without the package >> - Install the package based on sources in the right place >> - Rebuild Lazarus again to include the package > >Skip the second step. Thanks! It worked fine. Only one Lazarus rebuild. -- Bo Berglund Developer in Sweden From michael at freepascal.org Sat Sep 19 09:50:24 2020 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 19 Sep 2020 09:50:24 +0200 (CEST) Subject: [Lazarus] How to move installed component package sources? In-Reply-To: References: Message-ID: On Fri, 18 Sep 2020, Bo Berglund via lazarus wrote: > I have installed a custom component package on the palette of Lazarus. > Now I realize that I did it the wrong way since the package sources > are inside a project tree of many apps and other things. > > I want to have the sources moved to my Lazarus installation into the > config dir below lazarus like for instance packages retrieved from > OLPM are. > > Is there a simpler way to redirect Lazarus for the package location or > do I have to this: > - Uninstall the component package > - Rebuild Lazarus without the package > - Install the package based on sources in the right place > - Rebuild Lazarus again to include the package > > It takes a really long time to build Lazarus on these machines so I'd > rather not do that if at all possible... > I have Lazarus on several machines (Windows, Linux)... AFAIK: Normally you can just open the package file in its new location. Next time when the IDE needs to be recompiled it will find the package. Michael. From nc-gaertnma at netcologne.de Sat Sep 19 10:00:52 2020 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 19 Sep 2020 10:00:52 +0200 Subject: [Lazarus] How to move installed component package sources? In-Reply-To: References: Message-ID: <20200919100052.4021299e@limapholos.matflo.wg> On Sat, 19 Sep 2020 09:50:24 +0200 (CEST) Michael Van Canneyt via lazarus wrote: > On Fri, 18 Sep 2020, Bo Berglund via lazarus wrote: > > > I have installed a custom component package on the palette of > > Lazarus. Now I realize that I did it the wrong way since the > > package sources are inside a project tree of many apps and other > > things. > > > > I want to have the sources moved to my Lazarus installation into the > > config dir below lazarus like for instance packages retrieved from > > OLPM are. > > > > Is there a simpler way to redirect Lazarus for the package location > > or do I have to this: > > - Uninstall the component package > > - Rebuild Lazarus without the package > > - Install the package based on sources in the right place > > - Rebuild Lazarus again to include the package > > > > It takes a really long time to build Lazarus on these machines so > > I'd rather not do that if at all possible... > > I have Lazarus on several machines (Windows, Linux)... > > AFAIK: > > Normally you can just open the package file in its new location. > Next time when the IDE needs to be recompiled it will find the > package. If the package name is the same, yes. Mattias From tobiasgiesen at gmail.com Sun Sep 20 14:17:33 2020 From: tobiasgiesen at gmail.com (Tobias Giesen) Date: Sun, 20 Sep 2020 14:17:33 +0200 Subject: [Lazarus] Mac: High DPI TImage and TTrayIcon Message-ID: <20200920141732.DC8D.7A733E13@gmail.com> Hello, I am finally trying to give my app some high DPI icons and graphics. Many thanks for the High DPI demos, which help a lot! However I have no idea if it is possible to have a high DPI TImage and TTrayIcon? Is there maybe some runtime code needed to make it possible? It would be so great if a TImage could get its picture from an image list. Is such a feature available anywhere, maybe in a third party component? Thanks. Tobias Giesen From lazarus at kluug.net Sun Sep 20 18:50:11 2020 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 20 Sep 2020 18:50:11 +0200 Subject: [Lazarus] Mac: High DPI TImage and TTrayIcon In-Reply-To: <20200920141732.DC8D.7A733E13@gmail.com> References: <20200920141732.DC8D.7A733E13@gmail.com> Message-ID: <383b3c6a-32eb-a31f-940e-cee1cc9dd4cc@kluug.net> On 20.09.2020 14:17, Tobias Giesen via lazarus wrote: > Hello, > > I am finally trying to give my app some high DPI icons and graphics. > > Many thanks for the High DPI demos, which help a lot! > > However I have no idea if it is possible to have a high DPI TImage and > TTrayIcon? Is there maybe some runtime code needed to make it possible? TImage: yes - just use an image with a higher resolution. TTrayIcon: no idea about mac. I haven't worked on this one. > It would be so great if a TImage could get its picture from an image list. > Is such a feature available anywhere, maybe in a third party component? Such a component is pretty easy to write - just a few lines of code. I wrote one myself. Ondrej From aaa5500 at ya.ru Mon Sep 21 00:12:31 2020 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 21 Sep 2020 01:12:31 +0300 Subject: [Lazarus] FileUtil.FindAllFiles - case-sensitive on Unix Message-ID: <606b6fc7-da73-d43d-3c59-379a951979b3@ya.ru> procedure FindAllFiles(AList: TStrings; const SearchPath: String;    Searcher.Search(SearchPath, SearchMask, SearchSubDirs); Here we miss parameter "CaseSensitive=False". So on Linux it is False and function does case-insens search. It is slower! Why not to add param True for Unix. Not sure about macOS. -- Regards, Alexey From michael at freepascal.org Mon Sep 21 00:16:38 2020 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 21 Sep 2020 00:16:38 +0200 (CEST) Subject: [Lazarus] FileUtil.FindAllFiles - case-sensitive on Unix In-Reply-To: <606b6fc7-da73-d43d-3c59-379a951979b3@ya.ru> References: <606b6fc7-da73-d43d-3c59-379a951979b3@ya.ru> Message-ID: On Mon, 21 Sep 2020, AlexeyT via lazarus wrote: > procedure FindAllFiles(AList: TStrings; const SearchPath: String; > > ?? Searcher.Search(SearchPath, SearchMask, SearchSubDirs); > > Here we miss parameter "CaseSensitive=False". So on Linux it is False > and function does case-insens search. It is slower! Why not to add param > True for Unix. Not sure about macOS. Did you try setting the list to case sensitive ? Michael. From aaa5500 at ya.ru Mon Sep 21 00:19:23 2020 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 21 Sep 2020 01:19:23 +0300 Subject: [Lazarus] FileUtil.FindAllFiles - changes strings inside Message-ID: procedure TFileSearcher.Search(ASearchPath: String; ASearchMask: String;   ASearchSubDirs: Boolean; CaseSensitive: Boolean = False);     while ASearchPath<>'' do begin       p:=Pos(FPathSeparator,ASearchPath);       if p<1 then         p:=length(ASearchPath)+1;       Dir:=ResolveDots(LeftStr(ASearchPath,p-1));       Delete(ASearchPath,1,p); you see that to iterate over all items in char-separated ASearchPath, code modifies str, ie deletes parts of it. It's slow! We should not modify str here. It's easy- save old-index, new-index, and get Copy(n1, n2-n1{+delta}). Didn't see why ASearchMask is not "const", maybe same bad. Alexey Torgashin From bo.berglund at gmail.com Mon Sep 21 00:49:12 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 21 Sep 2020 00:49:12 +0200 Subject: [Lazarus] Is there a TSpinButton component in Lazarus? Message-ID: <01mfmfdp3gad9j25257jk0gl5ge8qnblun@4ax.com> When I thought that I was close to getting through all of the problems porting an application from Delphi (I think D7-D2007) to FPC/Lazarus I ran across TSpinButton, which is located on a form where config items are set up. Since Lazarus is unable to load this form I cannot see what it does or how it looks like. Is there any such component avilable for Lazarus? According to Google there seems to be a "TSpinButton" in Delphi, but I cannot find it in Delphi7 at least (but I have also lost TSpinEdit from Delphi7...). What does TSpinButton do and is there a Lazarus companion? And is there a way in Lazarus to search for a component instead of flipping through all of the palette tabs looking for a candidate image? -- Bo Berglund Developer in Sweden From lazarus at kluug.net Mon Sep 21 08:20:33 2020 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 21 Sep 2020 08:20:33 +0200 Subject: [Lazarus] Is there a TSpinButton component in Lazarus? In-Reply-To: <01mfmfdp3gad9j25257jk0gl5ge8qnblun@4ax.com> References: <01mfmfdp3gad9j25257jk0gl5ge8qnblun@4ax.com> Message-ID: <023bbc43-2dab-d286-7e92-a06450374cbd@kluug.net> On 21.09.2020 00:49, Bo Berglund via lazarus wrote: > When I thought that I was close to getting through all of the problems > porting an application from Delphi (I think D7-D2007) to FPC/Lazarus I > ran across TSpinButton, which is located on a form where config items > are set up. > Since Lazarus is unable to load this form I cannot see what it does or > how it looks like. Delphi has TUpDown and TSpinButton. If I am correct they are very similar (TUpDown being the WIndows native and TSpinButton being a custom control). > Is there any such component avilable for Lazarus? The LCL has only the TUpDown. > According to Google there seems to be a "TSpinButton" in Delphi, but I > cannot find it in Delphi7 at least (but I have also lost TSpinEdit > from Delphi7...). > What does TSpinButton do and is there a Lazarus companion? > > And is there a way in Lazarus to search for a component instead of > flipping through all of the palette tabs looking for a candidate > image? Main Menu -> View -> Components. Ondrej From bartjunk64 at gmail.com Mon Sep 21 12:14:15 2020 From: bartjunk64 at gmail.com (Bart) Date: Mon, 21 Sep 2020 12:14:15 +0200 Subject: [Lazarus] FileUtil.FindAllFiles - case-sensitive on Unix In-Reply-To: <606b6fc7-da73-d43d-3c59-379a951979b3@ya.ru> References: <606b6fc7-da73-d43d-3c59-379a951979b3@ya.ru> Message-ID: On Mon, Sep 21, 2020 at 12:12 AM AlexeyT via lazarus wrote: > Here we miss parameter "CaseSensitive=False". So on Linux it is False > and function does case-insens search. It is slower! Why not to add param > True for Unix. Not sure about macOS. Please discuss this further in the bugreport you opened (see my comments there). No need to discuss this in several places at the same time. -- Bart From bartjunk64 at gmail.com Mon Sep 21 12:16:01 2020 From: bartjunk64 at gmail.com (Bart) Date: Mon, 21 Sep 2020 12:16:01 +0200 Subject: [Lazarus] FileUtil.FindAllFiles - changes strings inside In-Reply-To: References: Message-ID: On Mon, Sep 21, 2020 at 12:19 AM AlexeyT via lazarus wrote: > you see that to iterate over all items in char-separated ASearchPath, > code modifies str, ie deletes parts of it. It's slow! We should not > modify str here. It's easy- save old-index, new-index, and get Copy(n1, > n2-n1{+delta}). Premature optimization. File IO is orders of magnitude slower that iteration over a string. -- Bart From freedos.la at gmail.com Mon Sep 21 20:55:19 2020 From: freedos.la at gmail.com (Ralf Quint) Date: Mon, 21 Sep 2020 11:55:19 -0700 Subject: [Lazarus] FileUtil.FindAllFiles - changes strings inside In-Reply-To: References: Message-ID: <3571b4f2-0867-49f0-c964-28fb85c0f398@gmail.com> On 9/21/2020 3:16 AM, Bart via lazarus wrote: > On Mon, Sep 21, 2020 at 12:19 AM AlexeyT via lazarus > wrote: > >> you see that to iterate over all items in char-separated ASearchPath, >> code modifies str, ie deletes parts of it. It's slow! We should not >> modify str here. It's easy- save old-index, new-index, and get Copy(n1, >> n2-n1{+delta}). > Premature optimization. > File IO is orders of magnitude slower that iteration over a string. +1 -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From bo.berglund at gmail.com Mon Sep 21 20:59:04 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 21 Sep 2020 20:59:04 +0200 Subject: [Lazarus] Is there a TSpinButton component in Lazarus? References: <01mfmfdp3gad9j25257jk0gl5ge8qnblun@4ax.com> <023bbc43-2dab-d286-7e92-a06450374cbd@kluug.net> Message-ID: On Mon, 21 Sep 2020 08:20:33 +0200, Ondrej Pokorny via lazarus wrote: >On 21.09.2020 00:49, Bo Berglund via lazarus wrote: >> When I thought that I was close to getting through all of the problems >> porting an application from Delphi (I think D7-D2007) to FPC/Lazarus I >> ran across TSpinButton, which is located on a form where config items >> are set up. >> Since Lazarus is unable to load this form I cannot see what it does or >> how it looks like. > >Delphi has TUpDown and TSpinButton. If I am correct they are very >similar (TUpDown being the WIndows native and TSpinButton being a custom >control). > >> Is there any such component avilable for Lazarus? > >The LCL has only the TUpDown. > > >> And is there a way in Lazarus to search for a component instead of >> flipping through all of the palette tabs looking for a candidate >> image? > >Main Menu -> View -> Components. > Thanks this was useful! I could change the code to use TUpDown instead and the form looks OK now in Lazarus. Had to hand edit outside of lazarus... But now I have very strange errors when I am using Quick Compile to check syntax: FormTaskProperties.pas(38,14) Error: Identifier not found "TDateTimePicker" FormTaskProperties.pas(38,29) Error: Error in type definition FormTaskProperties.pas(38,5) Error: Symbol cannot be published, can be only a class FormTaskProperties.pas(39,14) Error: Identifier not found "TDateTimePicker" FormTaskProperties.pas(39,29) Error: Error in type definition FormTaskProperties.pas(39,5) Error: Symbol cannot be published, can be only a class it happens on these lines (38 and 39) in the source at the top where all form components are listed: dtpDate: TDateTimePicker; dtpTime: TDateTimePicker; If I switch to form view the two controls are perfectly visible, which I don't think would happen if the control is unknown. And the component itself *is* available on the Lazarus component palette (Common Controls). What is causing this really strange error??? And what can I do about it? Doing a build instead of Quick Compile does not help, same errors... -- Bo Berglund Developer in Sweden From aaa5500 at ya.ru Mon Sep 21 21:36:34 2020 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 21 Sep 2020 22:36:34 +0300 Subject: [Lazarus] Is there a TSpinButton component in Lazarus? In-Reply-To: References: <01mfmfdp3gad9j25257jk0gl5ge8qnblun@4ax.com> <023bbc43-2dab-d286-7e92-a06450374cbd@kluug.net> Message-ID: <944ff43d-6aec-7821-4755-c12df63e87e1@ya.ru> Maybe a) project don't "require" (project options) needed package for DateTimeCtrl. b) LFM file misses something, check it. > What is causing this really strange error??? > And what can I do about it? > Doing a build instead of Quick Compile does not help, same errors... -- Regards, Alexey From bo.berglund at gmail.com Wed Sep 23 18:59:58 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 23 Sep 2020 18:59:58 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? Message-ID: I am porting a Delphi application to Linux and as a stop I am first doing it from Delphi to Lazarus/Fpc on Windows. Now when I try to compile it throws an error inside a unit I did not even know it used. And to further complicate the issue I cannot find a reference to the unit in question when doing a search in the project dir inside all pas files. This unit is not mentioned anywhere and still causes a compile error due to a missing reference. I tried Lazarus Find In Files and set it to search "all files in project" and also search the project directory, but it comes up empty-handed... So now I wonder: Is there a Lazarus tool to trace why the unit is referenced in the first place? Is there such things as "chain of uses"? The application I am porting is a client communications app that talks to a service over TCP/IP. That service app uses the unit that pos up as erroneous now, but it should not be used by the client comm app at all. So I need to find out why it does. -- Bo Berglund Developer in Sweden From jmlandmesser at gmx.de Wed Sep 23 19:29:36 2020 From: jmlandmesser at gmx.de (John Landmesser) Date: Wed, 23 Sep 2020 19:29:36 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? In-Reply-To: References: Message-ID: Am 23.09.20 um 18:59 schrieb Bo Berglund via lazarus: > I am porting a Delphi application to Linux and as a stop I am first > doing it from Delphi to Lazarus/Fpc on Windows. > > Now when I try to compile it throws an error inside a unit I did not > even know it used. And to further complicate the issue I cannot find a > reference to the unit in question when doing a search in the project > dir inside all pas files. This unit is not mentioned anywhere and > still causes a compile error due to a missing reference. > > I tried Lazarus Find In Files and set it to search "all files in > project" and also search the project directory, but it comes up > empty-handed... > > So now I wonder: > Is there a Lazarus tool to trace why the unit is referenced in the > first place? Is there such things as "chain of uses"? > > The application I am porting is a client communications app that talks > to a service over TCP/IP. > That service app uses the unit that pos up as erroneous now, but it > should not be used by the client comm app at all. > So I need to find out why it does. > Perhaps it can be find in Projects properties? From nc-gaertnma at netcologne.de Wed Sep 23 20:51:54 2020 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 23 Sep 2020 20:51:54 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? In-Reply-To: References: Message-ID: <20200923205154.6201f52e@limapholos.matflo.wg> On Wed, 23 Sep 2020 18:59:58 +0200 Bo Berglund via lazarus wrote: >[...] > Now when I try to compile it throws an error inside a unit I did not > even know it used. And to further complicate the issue I cannot find a > reference to the unit in question when doing a search in the project > dir inside all pas files. This unit is not mentioned anywhere and > still causes a compile error due to a missing reference. > > I tried Lazarus Find In Files and set it to search "all files in > project" and also search the project directory, but it comes up > empty-handed... > > So now I wonder: > Is there a Lazarus tool to trace why the unit is referenced in the > first place? Is there such things as "chain of uses"? View / Unit Dependencies Mattias From bo.berglund at gmail.com Wed Sep 23 21:13:07 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 23 Sep 2020 21:13:07 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? References: Message-ID: On Wed, 23 Sep 2020 19:29:36 +0200, John Landmesser via lazarus wrote: >> So now I wonder: >> Is there a Lazarus tool to trace why the unit is referenced in the >> first place? Is there such things as "chain of uses"? >> >> The application I am porting is a client communications app that talks >> to a service over TCP/IP. >> That service app uses the unit that pos up as erroneous now, but it >> should not be used by the client comm app at all. >> So I need to find out why it does. >> > >Perhaps it can be find in Projects properties? Well, that only shows the units specifc to the application itself... I figured out that the reason this unit was brought in was via another unit that *is* used since it contains declarations of the different data records and classes handled by the server and the client. In this unit that extra unit is listed in uses since it contains stuff needed by functions inside this unit itself (but not needed by the client application). So there seems to be a chain reaction concerning units involved in the application.... -- Bo Berglund Developer in Sweden From pascaldragon at googlemail.com Thu Sep 24 07:53:24 2020 From: pascaldragon at googlemail.com (Sven Barth) Date: Thu, 24 Sep 2020 07:53:24 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? In-Reply-To: References: Message-ID: Bo Berglund via lazarus schrieb am Mi., 23. Sep. 2020, 21:13: > So there seems to be a chain reaction concerning units involved in the > application.... > If course there is. That's how the unit system is supposed to work after all. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Thu Sep 24 08:08:14 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 24 Sep 2020 08:08:14 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? References: Message-ID: On Thu, 24 Sep 2020 07:53:24 +0200, Sven Barth via lazarus wrote: >Bo Berglund via lazarus schrieb am Mi., 23. >Sep. 2020, 21:13: > >> So there seems to be a chain reaction concerning units involved in the >> application.... >> > >If course there is. That's how the unit system is supposed to work after >all. > Yes, I realize that now. It means that the client even though it will not interface to the hardware will have all of the code used to do that included in the app, right? The reason this was brought in is that the client app needs to know the structure of the data on the server but not really the implementatiuon on the server side inmcluding hardware interfacing details... Is it possible to have declaration of classes in one file and implementation in another? For example one file holding the declarations and another implementations and then the client just uses the first whereas the server uses both? Maybe this is where you can use inc files? Or I should just accept it and move on... -- Bo Berglund Developer in Sweden From pascaldragon at googlemail.com Thu Sep 24 11:04:41 2020 From: pascaldragon at googlemail.com (Sven Barth) Date: Thu, 24 Sep 2020 11:04:41 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? In-Reply-To: References: Message-ID: Bo Berglund via lazarus schrieb am Do., 24. Sep. 2020, 08:08: > On Thu, 24 Sep 2020 07:53:24 +0200, Sven Barth via lazarus > wrote: > > >Bo Berglund via lazarus schrieb am Mi., > 23. > >Sep. 2020, 21:13: > > > >> So there seems to be a chain reaction concerning units involved in the > >> application.... > >> > > > >If course there is. That's how the unit system is supposed to work after > >all. > > > Yes, I realize that now. > > It means that the client even though it will not interface to the > hardware will have all of the code used to do that included in the > app, right? > The compiler (and linker) only includes code that is used. Thus as long as you don't call the hardware functions anywhere in your program (this includes indirectly or through initialization/finalization sections) then the code won't be in the final binary either. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryansmithhe at gmail.com Thu Sep 24 12:19:26 2020 From: ryansmithhe at gmail.com (R.Smith) Date: Thu, 24 Sep 2020 12:19:26 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? In-Reply-To: References: Message-ID: On 2020/09/24 11:04, Sven Barth via lazarus wrote: > Bo Berglund via lazarus > schrieb am Do., 24. Sep. 2020, > 08:08: > > > >If course there is. That's how the unit system is supposed to > work after > >all. > > > Yes, I realize that now. > > It means that the client even though it will not interface to the > hardware will have all of the code used to do that included in the > app, right? > > > The compiler (and linker) only includes code that is used. Thus as > long as you don't call the hardware functions anywhere in your program > (this includes indirectly or through initialization/finalization > sections) then the code won't be in the final binary either. > > Regards, > Sven Sven, I believe Bo's problem is that even though he won't need the Code (which the linker/compiler will surely cleverly disregard), he also do not even wish to "need" the physical Unit files to be in view of the compiler - at least not the secondary-dependency units - when he references a unit file in which he only needs a few declarations visible. Sadly Bo, the entire premise of the Unit system is that every dependency will be in view, the compiler cannot decide BEFORE compiling that it would or wouldn't need a unit which appears in a "unit" clause lower down the dependency tree. Consider that a used unit may well declare a global variable that overrides one from a higher-up unit, for instance. So even though the program has all the participating symbols at hand without looking at this depended unit with the override, it will produce a different program (than when that override IS considered) and so cannot simply decide to ignore/not require a unit preemptively before actually parsing the physical file. All units you use, pluse every dependent unit they use, must be available and visible to the compiler. That rule is absolute. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Thu Sep 24 14:22:13 2020 From: pascaldragon at googlemail.com (Sven Barth) Date: Thu, 24 Sep 2020 14:22:13 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? In-Reply-To: References: Message-ID: R.Smith via lazarus schrieb am Do., 24. Sep. 2020, 12:19: > > On 2020/09/24 11:04, Sven Barth via lazarus wrote: > > Bo Berglund via lazarus schrieb am Do., > 24. Sep. 2020, 08:08: > >> >> >If course there is. That's how the unit system is supposed to work after >> >all. >> > >> Yes, I realize that now. >> >> It means that the client even though it will not interface to the >> hardware will have all of the code used to do that included in the >> app, right? >> > > The compiler (and linker) only includes code that is used. Thus as long as > you don't call the hardware functions anywhere in your program (this > includes indirectly or through initialization/finalization sections) then > the code won't be in the final binary either. > > Regards, > Sven > > > Sven, I believe Bo's problem is that even though he won't need the Code > (which the linker/compiler will surely cleverly disregard), he also do not > even wish to "need" the physical Unit files to be in view of the compiler - > at least not the secondary-dependency units - when he references a unit > file in which he only needs a few declarations visible. > Well, Bo could always split the data type declarations into a separate unit. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Thu Sep 24 15:22:12 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 24 Sep 2020 15:22:12 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? References: Message-ID: On Thu, 24 Sep 2020 14:22:13 +0200, Sven Barth via lazarus wrote: >Well, Bo could always split the data type declarations into a separate >unit. But I cannot wrap my head around this (constructed example): interface type TMyRecord = packed record Item1: word; Item2: Cardinal; end; TMyController = class private FGPIO_driver: TIoDriver; FGpF: TIoPort; function CheckValidRelay(Relay: byte): boolean; public constructor Create; destructor Destroy; override; procedure ClearRelays; function PulseRelay(Relay: byte; PulseTime: LongWord): boolean; function RelayOff(Relay: byte): boolean; function RelayOn(Relay: byte): boolean; function RelayState(Relay: byte): boolean; procedure Delay(T: LongWord); end; implementation ...All of the methods here... AFAIK the records could be declared elsewhere but the objects not since their methods, constructor, destructor etc reside in the same file below implementation, right? Just specifying a uses file with everything above the implementation will not cut it, right? But as I indicated I have just moved on and I am leaving this because it seems to do more harm than good and is a lot of work too. -- Bo Berglund Developer in Sweden From pascaldragon at googlemail.com Thu Sep 24 17:06:23 2020 From: pascaldragon at googlemail.com (Sven Barth) Date: Thu, 24 Sep 2020 17:06:23 +0200 Subject: [Lazarus] How to find out why a unit is used in a project? In-Reply-To: References: Message-ID: Bo Berglund via lazarus schrieb am Do., 24. Sep. 2020, 15:22: > On Thu, 24 Sep 2020 14:22:13 +0200, Sven Barth via lazarus > wrote: > > >Well, Bo could always split the data type declarations into a separate > >unit. > > But I cannot wrap my head around this (constructed example): > > interface > > type > TMyRecord = packed record > Item1: word; > Item2: Cardinal; > end; > > > TMyController = class > private > FGPIO_driver: TIoDriver; > FGpF: TIoPort; > function CheckValidRelay(Relay: byte): boolean; > public > constructor Create; > destructor Destroy; override; > procedure ClearRelays; > function PulseRelay(Relay: byte; PulseTime: LongWord): boolean; > function RelayOff(Relay: byte): boolean; > function RelayOn(Relay: byte): boolean; > function RelayState(Relay: byte): boolean; > procedure Delay(T: LongWord); > end; > > implementation > ...All of the methods here... > > AFAIK the records could be declared elsewhere but the objects not > since their methods, constructor, destructor etc reside in the same > file below implementation, right? > Would your code require the hypothetical TMyController or only the TMyRecord? If it only requires the later then you could indeed solve this by moving the record into a separate unit. If your code requires TMyController as well, then it can't be left out anyway (though the compiler will leave out any non-virtual method of that class which isn't used). > Just specifying a uses file with everything above the implementation > will not cut it, right? > No, that will not help. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Tue Sep 29 17:49:47 2020 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 29 Sep 2020 17:49:47 +0200 Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... Message-ID: So I am debugging an application that transfers data over a socket connection. I want to inspect received data so I put a breakpoint in the method that does the handling of the response. But when I get there and want to see what has been received Lazarus does not show it... Here is what I do: function TSSRemoteClient.StatusReadLog(DayNumber: integer; Body: TStrings): boolean; begin Result := false; if SendCommand(ccSTATLOG, 'DAY=' + IntToStr(DayNumber)) then begin WaitForResponse(ccSTATLOG); Body.Text := FRxArgs[ccSTATLOG]; Result := Body.Count > 0; //<== Put breakpoint here end; end; When I reach this breakpoint and I hover the mouse over Body.Text or Body.Count Lazarus shows a message saying: Body.Text = Type TSTRINGS has no component named TEXT and Body.Count = Type TSTRINGS has no component named COUNT What is that? If that was true then the code above would not even compile and here I am running into the line in the debugger... Result is set to true so obviously Body.Count contains some number > zero. If I hover over DayNumber instead then it resolves into 44103 Is there some setting I am missing to enable inspection of these kinds of data? -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Tue Sep 29 18:22:34 2020 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 29 Sep 2020 18:22:34 +0200 Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: References: Message-ID: On 29/09/2020 17:49, Bo Berglund via lazarus wrote: > When I reach this breakpoint and I hover the mouse over Body.Text or > Body.Count Lazarus shows a message saying: > > Body.Text = Type TSTRINGS has no component named TEXT > and > Body.Count = Type TSTRINGS has no component named COUNT > > What is that? Its a property, and calls a getter function. The debugger can not yet call any functions. So you can't inspect that property. It goes a step further, FPC whilst compiling does not actually add debug info for this property either. The dwarf standard (at least 2 or 3, need to check the higher ones) does not include the ability to describe properties. (and not sure, but stabs does probably neither, if it does fpc still does not use it) > Is there some setting I am missing to enable inspection of these kinds > of data? Unfortunately not.... Joost started working on extending fpdebug to do function calls. But its not yet available. (I did see it "working" for functions that 1: take no arguments 2: return basic types like integer only, 3: do not raise exceptions or errors 4: do not have user set breakpoints in the code while being called ....) And there are more issues up the road. - AFAIK: Calling a function that returns a string (GetText) needs a hidden var param in which the result will be returned. - Getting a string back, will cause a mem leak, unless the debugger can get enough info to decrement the strings reference So there is a lot of work ahead - Getting function calls to work in generic - fpc to add debug info for such properties (potentially via custom extensions to the dwarf standard) - fpc to add debug info for managed types (custom extensions to the dwarf standard) From lazarus at mfriebe.de Tue Sep 29 18:29:07 2020 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 29 Sep 2020 18:29:07 +0200 Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: References: Message-ID: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> On 29/09/2020 18:22, Martin Frb via lazarus wrote: > On 29/09/2020 17:49, Bo Berglund via lazarus wrote: >> When I reach this breakpoint and I hover the mouse over Body.Text or >> Body.Count Lazarus shows a message saying: >> >> Body.Text = Type TSTRINGS has no component named TEXT >> and >> Body.Count = Type TSTRINGS has no component named COUNT >> >> What is that? > > Its a property, and calls a getter function. For a Stringlist, you can inspect individual "items". Using the "debug inspector" you can click through (mylist.FLIST)^[0].FSTRING GDB may not be able to do this (not sure, but faint memory....) FpDebug can do this (at least in trunk) From michael at freepascal.org Wed Sep 30 10:55:36 2020 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 30 Sep 2020 10:55:36 +0200 (CEST) Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> References: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> Message-ID: On Tue, 29 Sep 2020, Martin Frb via lazarus wrote: > On 29/09/2020 18:22, Martin Frb via lazarus wrote: >> On 29/09/2020 17:49, Bo Berglund via lazarus wrote: >>> When I reach this breakpoint and I hover the mouse over Body.Text or >>> Body.Count Lazarus shows a message saying: >>> >>> Body.Text = Type TSTRINGS has no component named TEXT >>> and >>> Body.Count = Type TSTRINGS has no component named COUNT >>> >>> What is that? >> >> Its a property, and calls a getter function. > > For a Stringlist, you can inspect individual "items". > > Using the "debug inspector" you can click through (mylist.FLIST)^[0].FSTRING > > GDB may not be able to do this (not sure, but faint memory....) > FpDebug can do this (at least in trunk) Does Lazarus offer the functionality Delphi has (since quite some time, I might add): custom debug info visualizers ? See http://docwiki.embarcadero.com/RADStudio/Sydney/en/Debugger_Visualizers Seems like a useful addition. Don't know if it is technically feasible, though. Michael. From lazarus at kluug.net Wed Sep 30 11:12:29 2020 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 30 Sep 2020 11:12:29 +0200 Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: References: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> Message-ID: <0f5c8d88-6ad0-f970-6d4b-12a31d523681@kluug.net> On 30.09.2020 10:55, Michael Van Canneyt via lazarus wrote: > Does Lazarus offer the functionality Delphi has (since quite some time, I > might add):  custom debug info visualizers ? > > See > > http://docwiki.embarcadero.com/RADStudio/Sydney/en/Debugger_Visualizers > > Seems like a useful addition. Don't know if it is technically > feasible, though. Yes, I implemented them, IIRC. Don't remember the details, though. I added TDate, TDateTime and TTime formatters. It was quite a simple addon, should be easy to find in the sources. The problem of object-based visualizers like a visualizer for TStrings is that your Lazarus IDE has to be compiled with the same FPC version/codebase that you also use for the debugged program. In Delphi this is usually the case (if you don't fiddle with RTL sources to fix bugs). In FPC/Lazarus this doesn't need to apply. I usually build Lazarus IDE less frequently than I update and build FPC trunk. Or you can build Lazarus with FPC stable but develop applications with FPC trunk. In that case such additions are unsafe. Ondrej From michael at freepascal.org Wed Sep 30 11:33:33 2020 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 30 Sep 2020 11:33:33 +0200 (CEST) Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: <0f5c8d88-6ad0-f970-6d4b-12a31d523681@kluug.net> References: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> <0f5c8d88-6ad0-f970-6d4b-12a31d523681@kluug.net> Message-ID: On Wed, 30 Sep 2020, Ondrej Pokorny via lazarus wrote: > On 30.09.2020 10:55, Michael Van Canneyt via lazarus wrote: >> Does Lazarus offer the functionality Delphi has (since quite some time, I >> might add):  custom debug info visualizers ? >> >> See >> >> http://docwiki.embarcadero.com/RADStudio/Sydney/en/Debugger_Visualizers >> >> Seems like a useful addition. Don't know if it is technically >> feasible, though. > > Yes, I implemented them, IIRC. Don't remember the details, though. I > added TDate, TDateTime and TTime formatters. It was quite a simple > addon, should be easy to find in the sources. Good news :-) How to activate them ? Because everywhere I tried, a TDateTime is still displayed as a float: 44104.47848875 does not look like a date/time I can recognize... :-) I tried tooltip evaluation, evaluate/modifiy, inspect, local variables, watches. None of them seems to use this. > > The problem of object-based visualizers like a visualizer for TStrings > is that your Lazarus IDE has to be compiled with the same FPC > version/codebase that you also use for the debugged program. In Delphi > this is usually the case (if you don't fiddle with RTL sources to fix > bugs). In FPC/Lazarus this doesn't need to apply. I usually build > Lazarus IDE less frequently than I update and build FPC trunk. Or you > can build Lazarus with FPC stable but develop applications with FPC > trunk. In that case such additions are unsafe. I understand this need to keep versions aligned, but for the average user who simply installs Lazarus, this will always be the case: they get lazarus/FPC bundled. In this matter the Laz/FPC developers are the exception. (one could think "it's their own fault that they make it difficult" ;-) ) So with this caveat in mind, I think support for object-based visualizers should definitely be added. Lazarus can easily enough detect that the version of FPC it uses for a project differs from the FPC version the IDE was compiled with, and disable the object-based visualizers. Michael. From lazarus at kluug.net Wed Sep 30 11:54:34 2020 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 30 Sep 2020 11:54:34 +0200 Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: References: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> <0f5c8d88-6ad0-f970-6d4b-12a31d523681@kluug.net> Message-ID: On 30.09.2020 11:33, Michael Van Canneyt wrote: > On Wed, 30 Sep 2020, Ondrej Pokorny via lazarus wrote: >> Yes, I implemented them, IIRC. Don't remember the details, though. I >> added TDate, TDateTime and TTime formatters. It was quite a simple >> addon, should be easy to find in the sources. > > Good news :-) > > How to activate them ? Because everywhere I tried, a TDateTime is still > displayed as a float: 44104.47848875 does not look like a date/time I can > recognize...  :-) > > I tried tooltip evaluation, evaluate/modifiy, inspect, local variables, > watches. None of them seems to use this. Strange, they are enabled by default. They get activated in ide\debugmanager.pas : constructor TDebugManager.Create(TheOwner: TComponent); //...   RegisterValueFormatter(skSimple, 'TDate', @DBGDateTimeFormatter);   etc. Tooltip evaluation: works for me Watches: works for me Local Variables: doesn't work for me - strange, I have to re-check. I thought it worked here. Inspect: OK, I forgot about this one Evaluate/modify: forgot about this one as well - but probably we need the reversed function as well to be able to write the modified formatted value back. >> The problem of object-based visualizers like a visualizer for >> TStrings is that your Lazarus IDE has to be compiled with the same >> FPC version/codebase that you also use for the debugged program. In >> Delphi this is usually the case (if you don't fiddle with RTL sources >> to fix bugs). In FPC/Lazarus this doesn't need to apply. I usually >> build Lazarus IDE less frequently than I update and build FPC trunk. >> Or you can build Lazarus with FPC stable but develop applications >> with FPC trunk. In that case such additions are unsafe. > > I understand this need to keep versions aligned, but for the average > user who simply installs Lazarus, this will always be the case: they > get lazarus/FPC bundled. > > In this matter the Laz/FPC developers are the exception. > (one could think "it's their own fault that they make it difficult" ;-) ) > > So with this caveat in mind, I think support for object-based visualizers > should definitely be added. Lazarus can easily enough detect that the > version > of FPC it uses for a project differs from the FPC version the IDE was > compiled > with, and disable the object-based visualizers. I probably said bullshit here. We get the detailed information about the object contents from the debugger, we don't use the object directly. So it should be possible with different FPC/RTL versions. This, of course, needs a much more sophisticated visualizer support in the IDE than there currently is. But that should be not really hard to make. Ondrej From lazarus at mfriebe.de Wed Sep 30 12:34:40 2020 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 30 Sep 2020 12:34:40 +0200 Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: References: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> <0f5c8d88-6ad0-f970-6d4b-12a31d523681@kluug.net> Message-ID: On 30/09/2020 11:54, Ondrej Pokorny via lazarus wrote: > > > Tooltip evaluation: works for me > Watches: works for me > Local Variables: doesn't work for me - strange, I have to re-check. I > thought it worked here. Locals do not have the type info Gdb returns them as just a pair of name value strings. Of course the backend could run each of them a watch. That will be a bit slower though. Also that will need update of the debugger-intf. IIRC locals do not have the storage for the extra info. The current debugger-intf really is just an extraction of the gdbmi-based interface Now that fpdebug matures, it will be time to change it. If there is interest of any one to work on it, I have some ideas.... From lazarus at kluug.net Wed Sep 30 12:41:18 2020 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 30 Sep 2020 12:41:18 +0200 Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: References: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> <0f5c8d88-6ad0-f970-6d4b-12a31d523681@kluug.net> Message-ID: <5e2f7217-d5ea-de51-9dca-a0cdc6e9de2b@kluug.net> On 30.09.2020 12:34, Martin Frb via lazarus wrote: > On 30/09/2020 11:54, Ondrej Pokorny via lazarus wrote: >> Tooltip evaluation: works for me >> Watches: works for me >> Local Variables: doesn't work for me - strange, I have to re-check. I >> thought it worked here. > Locals do not have the type info > > Gdb returns them as just a pair of name value strings. > > Of course the backend could run each of them a watch. That will be a > bit slower though. Aahhh, thanks - I remember now. I did it for locals (I obtained the type info for every locals entry) but it made debugging so painfully slow that I reverted it. Thanks for the info - I don't have to check now again. Ondrej From lazarus at mfriebe.de Wed Sep 30 13:09:55 2020 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 30 Sep 2020 13:09:55 +0200 Subject: [Lazarus] Debugging in Lazarus, cannot inspect values at breakpoints... In-Reply-To: <5e2f7217-d5ea-de51-9dca-a0cdc6e9de2b@kluug.net> References: <4d7ac980-41a3-1387-60fc-0499b3ed06fe@mfriebe.de> <0f5c8d88-6ad0-f970-6d4b-12a31d523681@kluug.net> <5e2f7217-d5ea-de51-9dca-a0cdc6e9de2b@kluug.net> Message-ID: <5505b443-d215-dbff-a604-16c2c4da2e62@mfriebe.de> On 30/09/2020 12:41, Ondrej Pokorny via lazarus wrote: > On 30.09.2020 12:34, Martin Frb via lazarus wrote: >> On 30/09/2020 11:54, Ondrej Pokorny via lazarus wrote: >>> Tooltip evaluation: works for me >>> Watches: works for me >>> Local Variables: doesn't work for me - strange, I have to re-check. >>> I thought it worked here. >> Locals do not have the type info >> >> Gdb returns them as just a pair of name value strings. >> >> Of course the backend could run each of them a watch. That will be a >> bit slower though. > > Aahhh, thanks - I remember now. I did it for locals (I obtained the > type info for every locals entry) but it made debugging so painfully > slow that I reverted it. > > Thanks for the info - I don't have to check now again. Well the solution here would be that, once the gdbmi-debugger  get to idle (and if the user has not pressed continue/run/step) then it could start fetching more info on locals. But that would need to be driven by the backend. And it would mean that the storage for locals need to be changed, so the backend can store the info. If the debugger intf is changed, fpdebug can supply the info and it can do so real fast. But the intf changes need to be done careful....