From fjf.vanleeuwen at quicknet.nl Thu Jun 1 14:38:24 2017 From: fjf.vanleeuwen at quicknet.nl (frans) Date: Thu, 1 Jun 2017 14:38:24 +0200 Subject: [Lazarus] How to avoid DBGrid showing new blank record Message-ID: <6ce27504-51d7-f7ea-1cf6-54fdfe60b542@quicknet.nl> Hi. I'm using Lazarus 1.6.4 and FPC 3.0.2, combined with a Firebird database. I've added all the fields of a table and use a datadictionary. I show the data in de DBGrid and use a seperate form to manipulate the data and to insert a new record. When inserting a new record, the DBGrid expands with a blank record. I don't like that, I wish the DBGrid to show only the valid records and a new record is not a valid record yet. 1. I've tried this with a query 'select * from dataset where number is not null'. This doesn't work. 2. I've tried this with dataset.Disablecontrols (and enablecontrols), this doesn't work either. 3. I've activated the option dgDisableInsert, that doesn't work either. The only solution I found is to use in the DBGrid a seperate view I created in the database. It works, but I keep wondering if there is an other solution possible. -- mvg Frans van Leeuwen M 06-51695390 --- Deze e-mail is gecontroleerd op virussen door AVG. http://www.avg.com From michael at freepascal.org Thu Jun 1 14:59:45 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 1 Jun 2017 14:59:45 +0200 (CEST) Subject: [Lazarus] How to avoid DBGrid showing new blank record In-Reply-To: <6ce27504-51d7-f7ea-1cf6-54fdfe60b542@quicknet.nl> References: <6ce27504-51d7-f7ea-1cf6-54fdfe60b542@quicknet.nl> Message-ID: On Thu, 1 Jun 2017, frans via Lazarus wrote: > Hi. > I'm using Lazarus 1.6.4 and FPC 3.0.2, combined with a Firebird > database. I've added all the fields of a table and use a datadictionary. > I show the data in de DBGrid and use a seperate form to manipulate the > data and to insert a new record. > When inserting a new record, the DBGrid expands with a blank record. I > don't like that, I wish the DBGrid to show only the valid records and a > new record is not a valid record yet. > 1. I've tried this with a query 'select * from dataset where number is > not null'. This doesn't work. > 2. I've tried this with dataset.Disablecontrols (and enablecontrols), > this doesn't work either. > 3. I've activated the option dgDisableInsert, that doesn't work either. > The only solution I found is to use in the DBGrid a seperate view I > created in the database. It works, but I keep wondering if there is an > other solution possible. I don't think so. The grid shows what is in the dataset. An inserted record is in the dataset. One possible way to do this is to collect all data for the new record in a not-data-aware manner, and only insert when it is complete. Michael. From Special at Joepgen.com Thu Jun 1 15:37:44 2017 From: Special at Joepgen.com (Joe) Date: Thu, 1 Jun 2017 15:37:44 +0200 Subject: [Lazarus] Fwd: Re: Lazarus 1.8 RC1 under Raspbian Jessie In-Reply-To: References: <81fa4001-f152-0831-d827-d602dc71f8c6@Joepgen.com> Message-ID: <075ff143-588c-52cc-e6ce-d3df54550c12@Joepgen.com> Am 31.05.2017 um 20:29 schrieb Joe via Lazarus: > 62 minutes later the compilation was aborted due to access violations. Here the Error Log of another attempt: Enter selection [ARMv7/ARMv6] : ARMv7AARMVv6 --2017-06-01 13:56:49-- http://blog.boberglund.com/projects/freepascal/files/Linux/3.0.0/fpc-3.0.0.arm-linux.tar Auflösen des Hostnamen »blog.boberglund.com (blog.boberglund.com)«... 194.9.94.14 Verbindungsaufbau zu blog.boberglund.com (blog.boberglund.com)|194.9.94.14|:80... verbunden. HTTP-Anforderung gesendet, warte auf Antwort... 200 OK Länge: 2918400 (2,8M) [application/x-tar] In »»fpc-3.0.0.arm-linux.tar«« speichern. 0K .......... .......... .......... .......... .......... 1% 282K 10s 50K .......... .......... .......... .......... .......... 3% 677K 7s 100K .......... .......... .......... .......... .......... 5% 702K 6s 150K .......... .......... .......... .......... .......... 7% 683K 5s 200K .......... .......... .......... .......... .......... 8% 694K 5s 250K .......... .......... .......... .......... .......... 10% 188K 6s 300K .......... .......... .......... .......... .......... 12% 1,41M 5s 350K .......... .......... .......... .......... .......... 14% 1,40M 5s 400K .......... .......... .......... .......... .......... 15% 1,08M 5s 450K .......... .......... .......... .......... .......... 17% 1,38M 4s 500K .......... .......... .......... .......... .......... 19% 1,13M 4s 550K .......... .......... .......... .......... .......... 21% 881K 4s 600K .......... .......... .......... .......... .......... 22% 680K 4s 650K .......... .......... .......... .......... .......... 24% 696K 3s 700K .......... .......... .......... .......... .......... 26% 680K 3s 750K .......... .......... .......... .......... .......... 28% 227K 4s 800K .......... .......... .......... .......... .......... 29% 4,84M 3s 850K .......... .......... .......... .......... .......... 31% 1,40M 3s 900K .......... .......... .......... .......... .......... 33% 1,91M 3s 950K .......... .......... .......... .......... .......... 35% 540K 3s 1000K .......... .......... .......... .......... .......... 36% 698K 3s 1050K .......... .......... .......... .......... .......... 38% 676K 3s 1100K .......... .......... .......... .......... .......... 40% 702K 3s 1150K .......... .......... .......... .......... .......... 42% 675K 3s 1200K .......... .......... .......... .......... .......... 43% 696K 2s 1250K .......... .......... .......... .......... .......... 45% 684K 2s 1300K .......... .......... .......... .......... .......... 47% 701K 2s 1350K .......... .......... .......... .......... .......... 49% 676K 2s 1400K .......... .......... .......... .......... .......... 50% 680K 2s 1450K .......... .......... .......... .......... .......... 52% 701K 2s 1500K .......... .......... .......... .......... .......... 54% 675K 2s 1550K .......... .......... .......... .......... .......... 56% 675K 2s 1600K .......... .......... .......... .......... .......... 57% 689K 2s 1650K .......... .......... .......... .......... .......... 59% 716K 2s 1700K .......... .......... .......... .......... .......... 61% 670K 2s 1750K .......... .......... .......... .......... .......... 63% 703K 2s 1800K .......... .......... .......... .......... .......... 64% 679K 2s 1850K .......... .......... .......... .......... .......... 66% 677K 1s 1900K .......... .......... .......... .......... .......... 68% 700K 1s 1950K .......... .......... .......... .......... .......... 70% 658K 1s 2000K .......... .......... .......... .......... .......... 71% 724K 1s 2050K .......... .......... .......... .......... .......... 73% 675K 1s 2100K .......... .......... .......... .......... .......... 75% 692K 1s 2150K .......... .......... .......... .......... .......... 77% 687K 1s 2200K .......... .......... .......... .......... .......... 78% 702K 1s 2250K .......... .......... .......... .......... .......... 80% 676K 1s 2300K .......... .......... .......... .......... .......... 82% 681K 1s 2350K .......... .......... .......... .......... .......... 84% 698K 1s 2400K .......... .......... .......... .......... .......... 85% 679K 1s 2450K .......... .......... .......... .......... .......... 87% 684K 1s 2500K .......... .......... .......... .......... .......... 89% 694K 0s 2550K .......... .......... .......... .......... .......... 91% 698K 0s 2600K .......... .......... .......... .......... .......... 92% 676K 0s 2650K .......... .......... .......... .......... .......... 94% 700K 0s 2700K .......... .......... .......... .......... .......... 96% 678K 0s 2750K .......... .......... .......... .......... .......... 98% 676K 0s 2800K .......... .......... .......... .......... ..........100% 709K 0s 2850K 100% 0,00 =4,3s 2017-06-01 13:56:54 (667 KB/s) - »»fpc-3.0.0.arm-linux.tar«« gespeichert [2918400/2918400] make: -iVSPTPSOTO: Kommando nicht gefunden An unhandled exception occurred at $000678A0: EAccessViolation: Access violation $000678A0 $000448B8 $0003E91C An unhandled exception occurred at $000678A0: EAccessViolation: Access violation $000678A0 $000448B8 $0003E91C An unhandled exception occurred at $000678A0: EAccessViolation: Access violation $000678A0 $000448B8 $0003E91C An unhandled exception occurred at $000678A0: EAccessViolation: Access violation $000678A0 $000448B8 $0003E91C An unhandled exception occurred at $000678A0: EAccessViolation: Access violation $000678A0 $000448B8 $0003E91C An unhandled exception occurred at $000678A0: EAccessViolation: Access violation $000678A0 $000448B8 $0003E91C make[6]: *** clean: Datei oder Verzeichnis nicht gefunden. Schluss. make[5]: *** [rtlclean] Error 2 make[4]: *** [next] Error 2 make[3]: *** [ppc1.exe] Error 2 make[2]: *** [cycle] Error 2 make[1]: *** [compiler_cycle] Error 2 make: *** [build-stamp.-] Error 2 install_lazfpc_local_pi-1.sh: 149: Cannot make all! Aborting Regards -- Joe From ptrg at freemail.hu Thu Jun 1 20:10:48 2017 From: ptrg at freemail.hu (=?UTF-8?B?UMOpdGVyIEfDoWJvcg==?=) Date: Thu, 1 Jun 2017 20:10:48 +0200 Subject: [Lazarus] fppkgPackageManager - paths of configuration files and packages Message-ID: <813fa0a0-1cf7-6173-86e4-889698ec39a9@freemail.hu> Hello! I have two versions of FPC on my Linux machine: the latest stable version installed on the system, and the development version in a subdirectory of my home directory. When I login "which fpc" returns the path to the development version in my home, the other instance is available for all other users when they login. If I start fppkgpackagemanager from the menu of Lazarus it shows the following message and hangs for a while: Backup of file "/etc/fppkg/default" to file "/etc/fppkg/default.bak" failed. Regular users can't manage resources used/installed by the system. /etc requires root access rights to write into it, so Lazarus must be stated as root to use fppkgpackagemanager. But starting Lazarus as root by a regular user is not a wise thing and may be annoying. Configuration files for the currently available FPC instance should be in an appropriate directory and the additional packages would be better to be available only for the user who installs them, similar to Lazarus packages. -- Péter Gábor ptrg at freemail.hu From octopushole at gmail.com Fri Jun 2 19:18:40 2017 From: octopushole at gmail.com (duilio foschi) Date: Fri, 2 Jun 2017 19:18:40 +0200 Subject: [Lazarus] using Android SmsManager APIs from Lazarus Message-ID: I could compile my first Lazarus "hello world" application for Android. When I click a button on screen, the message "hello world" is displayed. So far so good. Now I'd like to make things harder. When I click the same button on screen, I want text "hello world" be sent to a predefined mobile number using Android APIs. I found this example... It seems easy...but it is no pascal! >>>>> public void sendSMS(String phoneNo, String msg) { try { SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(phoneNo, null, msg, null, null); Toast.makeText(getApplicationContext(), "Message Sent", Toast.LENGTH_LONG).show(); } catch (Exception ex) { Toast.makeText(getApplicationContext(),ex.getMessage().toString(), Toast.LENGTH_LONG).show(); ex.printStackTrace(); } } <<<<<< Is there a way to use Android APIs from Lazarus ? Thank you Peppe Polpo From larrydalton71 at gmail.com Sat Jun 3 01:15:49 2017 From: larrydalton71 at gmail.com (Larry Dalton) Date: Fri, 2 Jun 2017 18:15:49 -0500 Subject: [Lazarus] linking error Message-ID: I just did a new install on my laptop. I installed 1.6.4-0_amd64.deb, with fpc-src_3.0.0-151205_amd64.deb, and fpc_3.0.0-151205_amd64.deb. The operating system is linux mint 17-2 cinnamon. All the packages compile, but when I try to install them or compile an application, I get an 'Error: Error while linking.' Where do I start to look? -------------- next part -------------- An HTML attachment was scrubbed... URL: From list2010 at BrenemanLabs.com Sat Jun 3 04:14:38 2017 From: list2010 at BrenemanLabs.com (Paul Breneman) Date: Fri, 2 Jun 2017 22:14:38 -0400 Subject: [Lazarus] linking error In-Reply-To: References: Message-ID: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> On 06/02/2017 07:15 PM, Larry Dalton via Lazarus wrote: > I just did a new install on my laptop. I installed 1.6.4-0_amd64.deb, > with fpc-src_3.0.0-151205_amd64.deb, > and fpc_3.0.0-151205_amd64.deb. The operating system is linux mint 17-2 > cinnamon. > > All the packages compile, but when I try to install them or compile an > application, I get an 'Error: Error while linking.' > > Where do I start to look? > I'd suggest installing the binutils package. Regards, Paul www.ControlPascal.com From larrydalton71 at gmail.com Sat Jun 3 05:38:35 2017 From: larrydalton71 at gmail.com (Larry Dalton) Date: Fri, 2 Jun 2017 22:38:35 -0500 Subject: [Lazarus] linking error In-Reply-To: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> Message-ID: <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> Thanks Paul. Installed the package but still got same error. Next step? Sent from my iPhone > On Jun 2, 2017, at 21:14, Paul Breneman via Lazarus wrote: > >> On 06/02/2017 07:15 PM, Larry Dalton via Lazarus wrote: >> I just did a new install on my laptop. I installed 1.6.4-0_amd64.deb, >> with fpc-src_3.0.0-151205_amd64.deb, >> and fpc_3.0.0-151205_amd64.deb. The operating system is linux mint 17-2 >> cinnamon. >> All the packages compile, but when I try to install them or compile an >> application, I get an 'Error: Error while linking.' >> Where do I start to look? > > I'd suggest installing the binutils package. > > Regards, > Paul > www.ControlPascal.com > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From nc-gaertnma at netcologne.de Sat Jun 3 07:23:15 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 3 Jun 2017 07:23:15 +0200 Subject: [Lazarus] linking error In-Reply-To: <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> Message-ID: <20170603072315.24fdec8e@limapholos.matflo.wg> On Fri, 2 Jun 2017 22:38:35 -0500 Larry Dalton via Lazarus wrote: > Thanks Paul. Installed the package but still got same error. Next step? What is your binutils version? Mattias From larrydalton71 at gmail.com Sat Jun 3 12:52:04 2017 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 3 Jun 2017 05:52:04 -0500 Subject: [Lazarus] linking error In-Reply-To: <20170603072315.24fdec8e@limapholos.matflo.wg> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> <20170603072315.24fdec8e@limapholos.matflo.wg> Message-ID: <7727867B-27FA-4168-BE14-0DC54B5B8ACA@gmail.com> How do I find out? Sent from my iPhone > On Jun 3, 2017, at 00:23, Mattias Gaertner via Lazarus wrote: > > On Fri, 2 Jun 2017 22:38:35 -0500 > Larry Dalton via Lazarus wrote: > >> Thanks Paul. Installed the package but still got same error. Next step? > > What is your binutils version? > > > Mattias > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From larrydalton71 at gmail.com Sat Jun 3 12:59:31 2017 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 3 Jun 2017 05:59:31 -0500 Subject: [Lazarus] linking error In-Reply-To: <20170603072315.24fdec8e@limapholos.matflo.wg> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> <20170603072315.24fdec8e@limapholos.matflo.wg> Message-ID: <2285453D-A272-4B08-87C5-7E2B6B9A2A6B@gmail.com> It is 2.24 Sent from my iPhone > On Jun 3, 2017, at 00:23, Mattias Gaertner via Lazarus wrote: > > On Fri, 2 Jun 2017 22:38:35 -0500 > Larry Dalton via Lazarus wrote: > >> Thanks Paul. Installed the package but still got same error. Next step? > > What is your binutils version? > > > Mattias > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From aaa5500 at ya.ru Sat Jun 3 13:00:24 2017 From: aaa5500 at ya.ru (Alexey) Date: Sat, 3 Jun 2017 14:00:24 +0300 Subject: [Lazarus] linking error In-Reply-To: <7727867B-27FA-4168-BE14-0DC54B5B8ACA@gmail.com> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> <20170603072315.24fdec8e@limapholos.matflo.wg> <7727867B-27FA-4168-BE14-0DC54B5B8ACA@gmail.com> Message-ID: <39daea3f-aa31-008b-e744-df59d7c54d93@ya.ru> Click Messages window, right-click, and call "Filter hints w/o source pos", then you can see details about linking-error in messages, post it. Alexey From larrydalton71 at gmail.com Sat Jun 3 14:05:03 2017 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 3 Jun 2017 07:05:03 -0500 Subject: [Lazarus] linking error In-Reply-To: <39daea3f-aa31-008b-e744-df59d7c54d93@ya.ru> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> <20170603072315.24fdec8e@limapholos.matflo.wg> <7727867B-27FA-4168-BE14-0DC54B5B8ACA@gmail.com> <39daea3f-aa31-008b-e744-df59d7c54d93@ya.ru> Message-ID: <1D34740B-201C-400F-9765-6EC4C8B5B10A@gmail.com> I am not a Linux expert. I have run Sudo apt-get update, then downloaded binutils 2.28. How do I replace the old version (2.24) with downloaded version (2.28)? Sent from my iPhone > On Jun 3, 2017, at 06:00, Alexey via Lazarus wrote: > > Click Messages window, right-click, and call "Filter hints w/o source pos", > then you can see details about linking-error in messages, post it. > Alexey > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From nc-gaertnma at netcologne.de Sat Jun 3 14:24:53 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 3 Jun 2017 14:24:53 +0200 Subject: [Lazarus] linking error In-Reply-To: <1D34740B-201C-400F-9765-6EC4C8B5B10A@gmail.com> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> <20170603072315.24fdec8e@limapholos.matflo.wg> <7727867B-27FA-4168-BE14-0DC54B5B8ACA@gmail.com> <39daea3f-aa31-008b-e744-df59d7c54d93@ya.ru> <1D34740B-201C-400F-9765-6EC4C8B5B10A@gmail.com> Message-ID: <20170603142453.36c34fec@limapholos.matflo.wg> On Sat, 3 Jun 2017 07:05:03 -0500 Larry Dalton via Lazarus wrote: > I am not a Linux expert. I have run Sudo apt-get update, then downloaded binutils 2.28. How do I replace the old version (2.24) with downloaded version (2.28)? If you are not a Linux expert you should stay with the binutils of your distribution. I will try to build a more compatible fpc deb in a few days. If you don't want to wait that long, I recommend to install fpc 3.0.0 and build Lazarus on your own: http://wiki.lazarus.freepascal.org/Installing_Lazarus#Installing_from_source Mattias From Special at Joepgen.com Sun Jun 4 11:22:06 2017 From: Special at Joepgen.com (Joe) Date: Sun, 4 Jun 2017 11:22:06 +0200 Subject: [Lazarus] linking error In-Reply-To: <20170603142453.36c34fec@limapholos.matflo.wg> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> <20170603072315.24fdec8e@limapholos.matflo.wg> <7727867B-27FA-4168-BE14-0DC54B5B8ACA@gmail.com> <39daea3f-aa31-008b-e744-df59d7c54d93@ya.ru> <1D34740B-201C-400F-9765-6EC4C8B5B10A@gmail.com> <20170603142453.36c34fec@limapholos.matflo.wg> Message-ID: <45e3c5d9-c2f7-1d97-d7d8-39a45ececbb3@Joepgen.com> Am 03.06.2017 um 14:24 schrieb Mattias Gaertner via Lazarus: > I will try to build a more compatible fpc deb in a few days. Could it be used on Pi Zero W (Raspian Jessie, ARMv6)? From nc-gaertnma at netcologne.de Sun Jun 4 11:36:58 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 4 Jun 2017 11:36:58 +0200 Subject: [Lazarus] linking error In-Reply-To: <45e3c5d9-c2f7-1d97-d7d8-39a45ececbb3@Joepgen.com> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> <20170603072315.24fdec8e@limapholos.matflo.wg> <7727867B-27FA-4168-BE14-0DC54B5B8ACA@gmail.com> <39daea3f-aa31-008b-e744-df59d7c54d93@ya.ru> <1D34740B-201C-400F-9765-6EC4C8B5B10A@gmail.com> <20170603142453.36c34fec@limapholos.matflo.wg> <45e3c5d9-c2f7-1d97-d7d8-39a45ececbb3@Joepgen.com> Message-ID: <20170604113658.71643db4@limapholos.matflo.wg> On Sun, 4 Jun 2017 11:22:06 +0200 Joe via Lazarus wrote: > Am 03.06.2017 um 14:24 schrieb Mattias Gaertner via Lazarus: > > I will try to build a more compatible fpc deb in a few days. > Could it be used on Pi Zero W (Raspian Jessie, ARMv6)? AFAIK ARMv6 and amd64 are not compatible. Mattias From aaa5500 at ya.ru Sun Jun 4 14:36:29 2017 From: aaa5500 at ya.ru (Alexey) Date: Sun, 4 Jun 2017 15:36:29 +0300 Subject: [Lazarus] IsFontNameDefault talk Message-ID: Juha, you tell that "if LowerCase(s)='default'" works faster than "if CompareText(s,'default')", but most of the fonts, dont start with letter "d" or "de"=> so CompareText takes one char only, LowerCase takes n chars=> LowerCase slower. -- Regards, Alexey From juha.manninen62 at gmail.com Sun Jun 4 14:52:54 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 4 Jun 2017 15:52:54 +0300 Subject: [Lazarus] IsFontNameDefault talk In-Reply-To: References: Message-ID: On Sun, Jun 4, 2017 at 3:36 PM, Alexey via Lazarus wrote: > you tell that "if LowerCase(s)='default'" > works faster than "if CompareText(s,'default')", but most of the fonts, dont > start with letter "d" or "de"=> so CompareText takes one char only, > LowerCase takes n chars=> LowerCase slower. Yes, actually I realized the same thing. What more, CompareText() is well optimized and converts ASCII chars quickly one by one. I can change the code later to use CompareText(). Another thing is that GUI + font handling itself is slow compared to a string comparison which makes this issue rather philosophical... Juha From larrydalton71 at gmail.com Sun Jun 4 23:40:05 2017 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sun, 4 Jun 2017 16:40:05 -0500 Subject: [Lazarus] linking error In-Reply-To: <20170604113658.71643db4@limapholos.matflo.wg> References: <2790a4a8-907b-31e8-1ff2-68767648cea6@BrenemanLabs.com> <8C58849B-1B29-46F4-AC8D-93990779B395@gmail.com> <20170603072315.24fdec8e@limapholos.matflo.wg> <7727867B-27FA-4168-BE14-0DC54B5B8ACA@gmail.com> <39daea3f-aa31-008b-e744-df59d7c54d93@ya.ru> <1D34740B-201C-400F-9765-6EC4C8B5B10A@gmail.com> <20170603142453.36c34fec@limapholos.matflo.wg> <45e3c5d9-c2f7-1d97-d7d8-39a45ececbb3@Joepgen.com> <20170604113658.71643db4@limapholos.matflo.wg> Message-ID: <419C2B09-F1F8-40F3-8BA7-C09FA8E4F720@gmail.com> I re-installed 1.6.2 with its fpc and fpc-arc and had no problems Sent from my iPhone > On Jun 4, 2017, at 04:36, Mattias Gaertner via Lazarus wrote: > > On Sun, 4 Jun 2017 11:22:06 +0200 > Joe via Lazarus wrote: > >>> Am 03.06.2017 um 14:24 schrieb Mattias Gaertner via Lazarus: >>> I will try to build a more compatible fpc deb in a few days. >> Could it be used on Pi Zero W (Raspian Jessie, ARMv6)? > > AFAIK ARMv6 and amd64 are not compatible. > > Mattias > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From kapibara.pas at aol.com Mon Jun 5 19:03:19 2017 From: kapibara.pas at aol.com (kapibara) Date: Mon, 5 Jun 2017 19:03:19 +0200 Subject: [Lazarus] TDBNavigator Buttons Message-ID: <2640e2d3-210e-7565-d442-f1bda2a83b9c@aol.com> I wanted to disable the Insert button of the TDBNavigator so it couldn't be pressed again until the current record is saved. So I added a property "Buttons" to TDBCustomNavigator. Could there be sideeffects? Or maybe there is a simpler way of preventing inserting or refreshing on unsaved record than disabling buttons? Here's the changed code in dbcustomnavigator.inc: TDBCustomNavigator = class(CustomPanel) private function GetButton(Index: TDBNavButtonType): TDBNavButton; procedure SetButton(Index: TDBNavButtonType; AValue: TDBNavButton); protected FButtons: array[TDBNavButtonType] of TDBNavButton; public property Buttons[Index: TDBNavButtonType]: TDBNavButton read GetButton write SetButton; implementation function TDBCustomNavigator.GetButton(Index: TDBNavButtonType): TDBNavButton; begin Result:=FButtons[Index]; end; procedure TDBCustomNavigator.SetButton(Index: TDBNavButtonType; AValue: TDBNavButton); begin FButtons[Index]:=AValue; end; From Special at Joepgen.com Tue Jun 6 08:18:29 2017 From: Special at Joepgen.com (Joe) Date: Tue, 6 Jun 2017 08:18:29 +0200 Subject: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie In-Reply-To: <4p7pictlb5ir45qhdc5akf833vq13o8ta7@4ax.com> References: <7ac6e745-c06c-9e33-a5eb-1b7b0adb8a12@Joepgen.com> <4p7pictlb5ir45qhdc5akf833vq13o8ta7@4ax.com> Message-ID: Am 30.05.2017 um 00:36 schrieb Bo Berglund via Lazarus: > The corrected script is found here: > http://blog.boberglund.com/install_lazfpc_local_pi.sh . On Pi Zero W, using the ARMv6 option and De-de locale, i get this error message: "make: -iVSPTPSOTO Kommando nicht gefunden" What does this say? How to fix? -- Joe From markMLl.lazarus at telemetry.co.uk Tue Jun 6 11:08:37 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Tue, 6 Jun 2017 09:08:37 +0000 Subject: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie In-Reply-To: References: <7ac6e745-c06c-9e33-a5eb-1b7b0adb8a12@Joepgen.com> <4p7pictlb5ir45qhdc5akf833vq13o8ta7@4ax.com> Message-ID: On 06/06/17 06:30, Joe via Lazarus wrote: > Am 30.05.2017 um 00:36 schrieb Bo Berglund via Lazarus:> The corrected > script is found here:> > http://blog.boberglund.com/install_lazfpc_local_pi.sh.On Pi Zero W, > using the ARMv6 option and De-de locale, i get this error message: > "make: -iVSPTPSOTO Kommando nicht gefunden" > What does this say? How to fix? It says it can't find the compiler binary. Hopefully Bo will be able to give you some direct help, but the classical way of fixing it would be by something like make clean all PP=ppcXXX -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From Special at Joepgen.com Tue Jun 6 11:57:21 2017 From: Special at Joepgen.com (Joe) Date: Tue, 6 Jun 2017 11:57:21 +0200 Subject: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie In-Reply-To: References: <7ac6e745-c06c-9e33-a5eb-1b7b0adb8a12@Joepgen.com> <4p7pictlb5ir45qhdc5akf833vq13o8ta7@4ax.com> Message-ID: <7d953ed5-5335-2df1-5fad-c2b6e2d5cc31@Joepgen.com> Am 06.06.2017 um 11:08 schrieb Mark Morgan Lloyd via Lazarus: > On 06/06/17 06:30, Joe via Lazarus wrote: >> Am 30.05.2017 um 00:36 schrieb Bo Berglund via Lazarus:> The corrected >> script is found here:> >> http://blog.boberglund.com/install_lazfpc_local_pi.sh.On Pi Zero W, >> using the ARMv6 option and De-de locale, i get this error message: >> "make: -iVSPTPSOTO Kommando nicht gefunden" >> What does this say? How to fix? > > It says it can't find the compiler binary. Hopefully Bo will be able > to give you some direct help, but the classical way of fixing it would > be by something like > > make clean all PP=ppcXXX > . Went to /home/pi/dev/fpc/3.02 and did make clean all PP=ppcarm. Got "An unhandled exception occurred at $000678A0". Maybe the ARMv6 CPU got some ARMv7 code? -- Joe From dec12 at avidsoft.com.hk Tue Jun 6 17:25:38 2017 From: dec12 at avidsoft.com.hk (Dennis) Date: Tue, 6 Jun 2017 23:25:38 +0800 Subject: [Lazarus] bluetoothlaz package cannot detect Bluetooth LE (version > 4.0) devices on raspberry pi Message-ID: <1c9a97c4-03fa-a767-ef30-df4bef2c23a7@avidsoft.com.hk> I am using Raspberry Pi 3 (with wifi+bluetooth). When using the command tool, bluetoothctl, it can detect old and new bluetooth devices (version > 4.0). However, using the bluetoothlaz inside my lazarus app, it can only detect old bluetooth devices (not the BLE new devices). I am guessing the bluetoothctl uses the new version and features in bluez (ver 5.41) but bluetoothlaz uses the {$linklib bluetooth} which probably is the file /usr/lib/arm-linux-gnueabihf/libbluetooth.so.3 which is a symbolic link to /usr/lib/arm-linux-gnueabihf/libbluetooth.so.3.18.13 which might probably be compiled with old versions of bluez (or turn off the BLE feature). Do you think my guess is correct? If yes, can anyone point me to how to update the libbluetooth.so ? Should I compile a new .so? How (I am bad in linux). Thanks a lot in advance. Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlnglsts at bgss.hu Tue Jun 6 19:39:42 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Tue, 6 Jun 2017 19:39:42 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels Message-ID: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> Hi All, The attached example contains a form with a ScrollBox on it with three Panels in it. Height of Panel1 is static, height of Panel2 depend on the size of Form/ScrollBox, height of Panel3 can be modifiable by the user. In the example a simple OnClick emulate the variable height feature of Panel3. So, start the example, modify (or not) size of the form, then click on Panel3. I got a "Position range overflow..." error. What I doing wrong or is this a bug? Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: position_range_overflow.png Type: image/png Size: 28336 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ScrollBox_position_range_overflow.tar.gz Type: application/gzip Size: 1694 bytes Desc: not available URL: From m-w-vogel at gmx.de Tue Jun 6 19:54:40 2017 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Tue, 6 Jun 2017 19:54:40 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels In-Reply-To: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> References: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> Message-ID: Am 06.06.2017 um 19:39 schrieb Gabor Boros via Lazarus: > The attached example contains a form with a ScrollBox on it with three > Panels in it. Height of Panel1 is static, height of Panel2 depend on > the size of Form/ScrollBox, height of Panel3 can be modifiable by the > user. > In the example a simple OnClick emulate the variable height feature of > Panel3. So, start the example, modify (or not) size of the form, then > click on Panel3. I got a "Position range overflow..." error. What I > doing wrong or is this a bug? I can tell you here the same as in the related bug report https://bugs.freepascal.org/view.php?id=30617, this isn't a bug it is not happy design. You want that the scrollbox height is increased, but then the Panel2 height is increased too. Simple remove anchored bottom of Panel2 and the loop is gone. As you wrote in bug report: "Thank you for the example but do not do what I want.", please explain better, what you exactly want (step by step, when a user change the height of Panel3, what should happen). Kind regards Michl -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlnglsts at bgss.hu Tue Jun 6 20:22:48 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Tue, 6 Jun 2017 20:22:48 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels In-Reply-To: References: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> Message-ID: 2017. 06. 06. 19:54 keltezéssel, Michael W. Vogel via Lazarus írta: > Simple remove anchored bottom of Panel2 and the loop is gone. Yes, but Panel2 not follow the size of form/scrollbox. > As you wrote in bug report: "Thank you for the example but do not do > what I want.", please explain better, what you exactly want (step by > step, when a user change the height of Panel3, what should happen). Just "remove anchored bottom of Panel2" then start the example and click on Panel3 and will see what I want. The vertical scrollbox showed up and the user can scroll the panels. It's good but the Panel2 not resized with the form/scrollbox without the bottom anchor. So if bottom anchor of Panel2 exists the resizing of Panel2 work as expected, if removed the anchor resizing (by the user) of Panel3 work as expected. But I need the two features coexist. Gabor From m-w-vogel at gmx.de Tue Jun 6 20:58:18 2017 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Tue, 6 Jun 2017 20:58:18 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels In-Reply-To: References: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> Message-ID: <73af3e52-d726-0fa7-b2a3-1e6ce32e43ff@gmx.de> Am 06.06.2017 um 20:22 schrieb Gabor Boros via Lazarus: > 2017. 06. 06. 19:54 keltezéssel, Michael W. Vogel via Lazarus írta: >> Simple remove anchored bottom of Panel2 and the loop is gone. > > Yes, but Panel2 not follow the size of form/scrollbox. Please try added example. It is nearly the same as in the bugtracker but with aligned scrollbox and a scrollbar to switch the height of Panel3. Is it so as you want? Michl -------------- next part -------------- A non-text attachment was scrubbed... Name: test.zip Type: application/x-zip-compressed Size: 2162 bytes Desc: not available URL: From markMLl.lazarus at telemetry.co.uk Tue Jun 6 21:54:32 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Tue, 6 Jun 2017 19:54:32 +0000 Subject: [Lazarus] (Local) variable value hints Message-ID: Bearing in mind things like the %H hint that Lazarus uses to suppress warning messages, is there anything comparable that can be applied to a variable so that when the IDE pops up a value during debugging it will always be shown in a certain format? .. end else begin euCount := cardEsu; euVector := sysEuVector <=== THIS ONLY MEANINGFUL AS HEX OR BINARY end; Assert(euCount * euVector > 0, 'Bad EU count or vector'); -- 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 Tue Jun 6 21:58:55 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 6 Jun 2017 21:58:55 +0200 Subject: [Lazarus] (Local) variable value hints In-Reply-To: References: Message-ID: <7b4bbdaa-9b39-fb22-1c44-dcea6b1a2fb1@kluug.net> On 06.06.2017 21:54, Mark Morgan Lloyd via Lazarus wrote: > Bearing in mind things like the %H hint that Lazarus uses to suppress > warning messages, is there anything comparable that can be applied to > a variable so that when the IDE pops up a value during debugging it > will always be shown in a certain format? > > .. > end else begin > euCount := cardEsu; > euVector := sysEuVector <=== THIS ONLY MEANINGFUL AS HEX OR BINARY You can define your own value formatter with TBaseDebugManagerIntf.RegisterValueFormatter But: it works on a type-basis and not variable name basis. So define a specific type euVector: TeuVector = type Integer; // or type whatever and then register it with RegisterValueFormatter(skSimple, 'TeuVector', @MyFormatFunction); See how TDateTime is handled in ide/debugmanager.pas Ondrej From nc-gaertnma at netcologne.de Tue Jun 6 22:58:37 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 6 Jun 2017 22:58:37 +0200 Subject: [Lazarus] Lazarus Release Candidate 2 of 1.8.0 Message-ID: <20170606225837.525001fa@limapholos.matflo.wg> The Lazarus team is glad to announce the second release candidate of Lazarus 1.8. This release was built with FPC 3.0.2. The previous release Lazarus 1.6.4 was built with FPC 3.0.2 too. The Linux releases are built with FPC 3.0.3 r36408 due to bug https://bugs.freepascal.org/view.php?id=31629 Here is the list of fixes for Lazarus 1.8.x: http://wiki.freepascal.org/Lazarus_1.8_fixes_branch Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.0.2 The release is available for download on SourceForge: http://sourceforge.net/projects/lazarus/files/ Choose your CPU, OS, distro and then the "Lazarus 1.8 RC2" directory. Checksums for the SourceForge files: http://www.lazarus-ide.org/index.php?page=checksums#1_8_0 Minimum requirements: Windows: 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. FreeBSD/Linux: gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. Mac OS X: 10.5 to 10.12, LCL only 32bit, non LCL apps can be 64bit. The svn tag is http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0_RC2 For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/ and later at (after some time for synchronization) http://mirrors.iwi.me/lazarus/ == Why should everybody (including you) test the release candidate? == In the past weeks the Lazarus team has stabilized the 1.8 fixes branch. The resulting 1.8RC2 is now stable enough to be used by any one for test purposes. However many of the fixes and new features that where committed since the release of 1.6 required changes to the code of existing features too. While we have tested those ourself, there may still be problems that only occur with very specific configurations or one project in a million. Yes, it may be that you are the only person with a project, that will not work in the new IDE. So if you do not test, we can not fix it. Please do not wait for the final release, in order to test. It may be too late. Once the release is out we will have to be more selective about which fixes can be merged for further 1.8.x releases. So it may be, that we can not merge the fix you require. And then you will miss out on all the new features. == How to test == Download and install the 1.8 RC2. - On Windows you can install as a 2ndary install, that will not affect your current install: http://wiki.lazarus.freepascal.org/Multiple_Lazarus#Installation_of_multiple_Lazarus - On other platforms, if you install to a new location you need to use --primary-config-path In either case you should make backups. (including your primary config) Open your project in the current Lazarus (1.6.x), and use "Publish Project" from the project menu. This creates a clean copy of your project. You can then open that copy in the RC2. Please test: - If you can edit forms in the designer - rename components / change properties in Object inspector / Add new events - Add components to form / Move components on form - Frames, if you use them - If you can navigate the source code (e.g. jump to implementation) - Auto completion in source code - Compile, debug and run - Anything else you use in your daily work Mattias From aaa5500 at ya.ru Tue Jun 6 23:05:51 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 7 Jun 2017 00:05:51 +0300 Subject: [Lazarus] Horz scroll on Mac trackpad Message-ID: <1d89c8cb-d33a-bb3b-4e80-1e80fbc25932@ya.ru> Added 2 patches to use %subj for Treeview and Grid. Why not to use em in Lazarus 1.8. They are tiny and ok. -- Regards, Alexey From mlnglsts at bgss.hu Tue Jun 6 23:10:04 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Tue, 6 Jun 2017 23:10:04 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels In-Reply-To: <73af3e52-d726-0fa7-b2a3-1e6ce32e43ff@gmx.de> References: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> <73af3e52-d726-0fa7-b2a3-1e6ce32e43ff@gmx.de> Message-ID: <95d95d02-8ca6-17b8-5117-6556c29f10ec@bgss.hu> 2017. 06. 06. 20:58 keltezéssel, Michael W. Vogel via Lazarus írta: > Please try added example. It is nearly the same as in the bugtracker but > with aligned scrollbox and a scrollbar to switch the height of Panel3. > Is it so as you want? No. Attached (I hope ) a better example. The user can resize Panel2 with the Form and can resize Panel3 with the TrackBar. But want higher Panel3 than the available space. For solve this the whole thing sit in a ScrollBox. And the "InvalidatePreferredSize loop detected" problem breaks this solution. I completely don't understand why Panel3 not resizable to lower than border of the ScrollBox. Panel3 not have a bottom anchor. From my POV (and brain) the anchors are correct. Panel2 anchored to bottom of Panel1, Panel3 anchored to bottom of Panel2 and bottom of Panel3 not anchored. Why got different error message with the TrackBar and OnClick resize of Panel3? Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: ScrollBox_position_range_overflow.tar.gz Type: application/gzip Size: 1861 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Tue Jun 6 23:11:08 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 6 Jun 2017 23:11:08 +0200 Subject: [Lazarus] Horz scroll on Mac trackpad In-Reply-To: <1d89c8cb-d33a-bb3b-4e80-1e80fbc25932@ya.ru> References: <1d89c8cb-d33a-bb3b-4e80-1e80fbc25932@ya.ru> Message-ID: <20170606231108.7be2dbe2@limapholos.matflo.wg> On Wed, 7 Jun 2017 00:05:51 +0300 Alexey via Lazarus wrote: > Added 2 patches to use %subj for Treeview and Grid. Why not to use em in > Lazarus 1.8. They are tiny and ok. Where did you add the patches? Mattias From aaa5500 at ya.ru Tue Jun 6 23:25:17 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 7 Jun 2017 00:25:17 +0300 Subject: [Lazarus] Horz scroll on Mac trackpad In-Reply-To: <20170606231108.7be2dbe2@limapholos.matflo.wg> References: <1d89c8cb-d33a-bb3b-4e80-1e80fbc25932@ya.ru> <20170606231108.7be2dbe2@limapholos.matflo.wg> Message-ID: <68fad4d4-11f9-83bd-1115-110039d4931c@ya.ru> Here https://bugs.freepascal.org/view.php?id=31897 https://bugs.freepascal.org/view.php?id=31898 > Where did you add the patches? -- Regards, Alexey From steveg at nevets.com.au Wed Jun 7 02:39:25 2017 From: steveg at nevets.com.au (Steve Gatenby) Date: Wed, 7 Jun 2017 10:09:25 +0930 Subject: [Lazarus] Cross Compile to Arm Message-ID: <26e1a629-1778-66ca-0480-53f883f81e58@nevets.com.au> Having trouble cross compiling an fpc library. (Linux x86_64 -> Linux Arm using install from fpcupDeluxe) Lazarus 1.9.0 r55116M FPC 3.1.1 x86_64-linux-gtk2 library Project1; {$mode objfpc}{$H+} uses cmem, Classes; begin end. This fails with error code 256 and 'error whilst linking' Sometimes gives msg of 'add -fPIC' which I have done, but then moves on to different errors. It is the 'cmem' addition causing the problem, but not cmem itself (just within a library) The same system cross compiles standard applications (fpc and lazarus) correctly, seems related to libraries only. Any ideas at all appreciated (probably a compiler/linker switch I need to pass - but there I am lost) ps. kudos to whomever created fpcupDeluxe. From mlnglsts at bgss.hu Wed Jun 7 07:45:00 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Wed, 7 Jun 2017 07:45:00 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels In-Reply-To: References: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> Message-ID: 2017. 06. 06. 19:54 keltezéssel, Michael W. Vogel via Lazarus írta: > I can tell you here the same as in the related bug report > https://bugs.freepascal.org/view.php?id=30617, this isn't a bug it is > not happy design. You want that the scrollbox height is increased, but > then the Panel2 height is increased too. Simple remove anchored bottom > of Panel2 and the loop is gone. You wrote on the tracker: "You have anchored Panel2.Bottom to no sibling and Panel3.Top to Panel2.Bottom. When you now change the height of Panel3, that it doesn't fit in the scrollbox anymore, the scrollbox is resized. With resizing of the scrollbox, Panel2 is also resized (because its Bottom is anchored). Now Panel3.Top is moved too and Panel3 doesn't fit in the scrollbox anymore. And repeat." I understand you(r description) except one thing. "Panel2 is also resized (because its Bottom is anchored)" Why you think Panel2 is resized? When height of Panel3 increased and the vertical scrollbox showed up, height of scrollbox not changed nor top of Panel3. Attached two pictures. One before resized Panel3 and one after (pressed Continue on the loop error message). You see top, bottom and height of Panel1 and Panel2 is same as before. So top, bottom, height of Panel1, Panel2 and ScrollBox1 not changed. Why got the loop error? Only height of Panel3 changed. Width of Panel1,2,3 changed, okay but why this block the work of vertical anchoring? Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: before_Panel3_resize.png Type: image/png Size: 12347 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after_Panel3_resize.png Type: image/png Size: 14299 bytes Desc: not available URL: From alfred at consulab.nl Wed Jun 7 08:20:28 2017 From: alfred at consulab.nl (Alfred) Date: Wed, 07 Jun 2017 06:20:28 +0000 Subject: [Lazarus] Cross Compile to Arm Message-ID: For a library, add: -FLld-linux-armhf.so.3 into the custom options of your project compiler options. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m-w-vogel at gmx.de Wed Jun 7 08:37:10 2017 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Wed, 7 Jun 2017 08:37:10 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels In-Reply-To: References: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> Message-ID: <316a60d5-ead5-aa42-0162-ec382fd234d6@gmx.de> Am 07.06.2017 um 07:45 schrieb Gabor Boros via Lazarus: > I understand you(r description) except one thing. "Panel2 is also > resized (because its Bottom is anchored)" Why you think Panel2 is > resized? When height of Panel3 increased and the vertical scrollbox > showed up, height of scrollbox not changed nor top of Panel3. You can set a DebugLn in control.inc: procedure TControl.SetBoundsKeepBase(aLeft, aTop, aWidth, aHeight: integer); begin DebugLn('TControl.SetBoundsKeepBase ', Name, ' ', DbgS(Height)); ChangeBounds(aLeft, aTop, aWidth, aHeight, true); end; You will see, the resizing problem comes from Panel2. > Attached two pictures. One before resized Panel3 and one after > (pressed Continue on the loop error message). You see top, bottom and > height of Panel1 and Panel2 is same as before. > > So top, bottom, height of Panel1, Panel2 and ScrollBox1 not changed. > Why got the loop error? Only height of Panel3 changed. Width of > Panel1,2,3 changed, okay but why this block the work of vertical > anchoring? No, Panel2 height is changed to a invalid value, as sayed before. Panel2 is just not visible updatet, as the height get a invalid value. To demonstrate what happen take the added example or create a new app, put a panel on it and anchor Left, Top, Right to the form sides and anchor Bottom to nil. Start the app and change the bounds of it. Michl -------------- next part -------------- A non-text attachment was scrubbed... Name: test.zip Type: application/x-zip-compressed Size: 1759 bytes Desc: not available URL: From mlnglsts at bgss.hu Wed Jun 7 09:52:27 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Wed, 7 Jun 2017 09:52:27 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels In-Reply-To: <316a60d5-ead5-aa42-0162-ec382fd234d6@gmx.de> References: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> <316a60d5-ead5-aa42-0162-ec382fd234d6@gmx.de> Message-ID: <7b0c8ebb-0543-6930-463d-b420f95884bb@bgss.hu> 2017. 06. 07. 8:37 keltezéssel, Michael W. Vogel via Lazarus írta: > You will see, the resizing problem comes from Panel2. I see. But don't understand. :D > To demonstrate what happen take the added example or create a new app, > put a panel on it and anchor Left, Top, Right to the form sides and > anchor Bottom to nil. Start the app and change the bounds of it. Your example work as expected. If resize the form panel resized properly. I tried to accomplish the task in a different way. Attached a new example. Bottom of Panel2 anchored to bottom of ScrollBox. This works. Top of Panel2 anchored to bottom of Panel1. When resize the form top of Panel2 is moving Why? Top of Panel2 why not stay with bottom of Panel1? Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: ScrollBox_position_range_overflow.tar.gz Type: application/gzip Size: 1901 bytes Desc: not available URL: From steveg at nevets.com.au Wed Jun 7 09:59:36 2017 From: steveg at nevets.com.au (Steve Gatenby) Date: Wed, 7 Jun 2017 17:29:36 +0930 Subject: [Lazarus] Cross Compile to Arm In-Reply-To: References: Message-ID: <98e36c2a-7796-a594-76b6-c06293d92441@nevets.com.au> On 06/07/2017 03:50 PM, Alfred via Lazarus wrote: > For a library, add: > -FLld-linux-armhf.so.3 > into the custom options of your project compiler options. > Thank you Alfred - a little further now. I have pasted the full output from lazbuild for reference. It seems the linker is trying to use 'crtbeginS.o' for my base system (x86_64) I guess I need to tell it to redirect to 'crtbegin' in '/mnt/Shared/Apps/fpcupDeluxe/cross/lib/arm-linux', but I dont know how (as yet) Still working at it though :) /mnt/Shared/Apps/fpcupDeluxe/lazarus/lazbuild --os=Linux --cpu=arm project1.lpi using config file /mnt/Shared/Apps/fpcupDeluxe/lazarus/lazarus.cfg SetPrimaryConfigPath NewValue="/mnt/Shared/Apps/fpcupDeluxe/config_lazarus" -> "/mnt/Shared/Apps/fpcupDeluxe/config_lazarus" Hint: (lazarus) [RunTool] /mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.sh "-iWTOTP" "-Parm" "-Tlinux" Hint: (lazarus) [RunTool] /mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.sh "-va" "-Parm" "-Tlinux" "compilertest.pas" Info: (lazarus) Execute Title="Compile Project, CPU: arm, Target: libproject1.so" Info: (lazarus) Working Directory="/home/steve-gatenby/Temp1/LibTest/" Info: (lazarus) Executable="/mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.sh" Info: (lazarus) Param[0]="-Tlinux" Info: (lazarus) Param[1]="-Parm" Info: (lazarus) Param[2]="-MObjFPC" Info: (lazarus) Param[3]="-Scghi" Info: (lazarus) Param[4]="-O1" Info: (lazarus) Param[5]="-g" Info: (lazarus) Param[6]="-gl" Info: (lazarus) Param[7]="-l" Info: (lazarus) Param[8]="-vewnhibq" Info: (lazarus) Param[9]="-Fi/home/steve-gatenby/Temp1/LibTest/lib/arm-linux" Info: (lazarus) Param[10]="-Fu/home/steve-gatenby/Temp1/LibTest/" Info: (lazarus) Param[11]="-FU/home/steve-gatenby/Temp1/LibTest/lib/arm-linux/" Info: (lazarus) Param[12]="-olibproject1.so" Info: (lazarus) Param[13]="-fPIC" Info: (lazarus) Param[14]="-FLld-linux-armhf.so.3" Info: (lazarus) Param[15]="project1.lpr" Hint: (11030) Start of reading config file /mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.cfg Hint: (11031) End of reading config file /mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.cfg Free Pascal Compiler version 3.1.1 [2017/06/06] for arm Copyright (c) 1993-2017 by Florian Klaempfl and others (1002) Target OS: Linux for ARMHF (3104) Compiling project1.lpr (9015) Linking libproject1.so /usr/lib/gcc/x86_64-linux-gnu/5.4.0/crtbeginS.o: file not recognized: File format not recognized /home/steve-gatenby/Temp1/LibTest/project1.lpr(20,1) Error: (9013) Error while linking /home/steve-gatenby/Temp1/LibTest/project1.lpr(20,1) Fatal: (10026) There were 1 errors compiling module, stopping Fatal: (1018) Compilation aborted Error: /mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/ppcrossarm returned an error exitcode Error: (lazarus) Compile Project, CPU: arm, Target: libproject1.so: stopped with exit code 256 Error: (lazbuild) failed compiling of project /home/steve-gatenby/Temp1/LibTest/project1.lpi -------------- next part -------------- An HTML attachment was scrubbed... URL: From markMLl.lazarus at telemetry.co.uk Wed Jun 7 10:39:08 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Wed, 7 Jun 2017 08:39:08 +0000 Subject: [Lazarus] (Local) variable value hints In-Reply-To: <7b4bbdaa-9b39-fb22-1c44-dcea6b1a2fb1@kluug.net> References: <7b4bbdaa-9b39-fb22-1c44-dcea6b1a2fb1@kluug.net> Message-ID: On 06/06/17 20:00, Ondrej Pokorny via Lazarus wrote: > On 06.06.2017 21:54, Mark Morgan Lloyd via Lazarus wrote:> Bearing in > mind things like the %H hint that Lazarus uses to suppress > warning > messages, is there anything comparable that can be applied to > a > variable so that when the IDE pops up a value during debugging it > will > always be shown in a certain format?>> ..> end else begin> euCount := > cardEsu;> euVector := sysEuVector <=== THIS ONLY MEANINGFUL AS HEX OR > BINARY > You can define your own value formatter with > TBaseDebugManagerIntf.RegisterValueFormatter > But: it works on a type-basis and not variable name basis. So define a > specific type euVector: > TeuVector = type Integer; // or type whatever > and then register it with RegisterValueFormatter(skSimple, 'TeuVector', > @MyFormatFunction); > See how TDateTime is handled in ide/debugmanager.pas So does that mean that the IDE has to be tailored for a specific project? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From mlnglsts at bgss.hu Wed Jun 7 10:38:25 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Wed, 7 Jun 2017 10:38:25 +0200 Subject: [Lazarus] Trunk is broken Message-ID: <7fe56fb5-f3b8-5929-5795-7a26c251bb8b@bgss.hu> Hi All, I tried to compile trunk(55263) with FPC 3.0.2 on Win32 but got this: e:\Lazarus\trunk\ide\sourcefilemanager.pas(6452,29) Error: (5038) identifier idents no member "DesignPPI" e:\Lazarus\trunk\ide\sourcefilemanager.pas(6454,71) Error: (5038) identifier idents no member "DesignPPI" e:\Lazarus\trunk\ide\sourcefilemanager.pas(6456,88) Error: (5038) identifier idents no member "DesignPPI" e:\Lazarus\trunk\ide\sourcefilemanager.pas(6457,88) Error: (5038) identifier idents no member "DesignPPI" e:\Lazarus\trunk\ide\sourcefilemanager.pas(6459,86) Error: (5038) identifier idents no member "DesignPPI" e:\Lazarus\trunk\ide\sourcefilemanager.pas(6460,86) Error: (5038) identifier idents no member "DesignPPI" e:\Lazarus\trunk\ide\sourcefilemanager.pas(6461,27) Error: (5038) identifier idents no member "DesignPPI" sourcefilemanager.pas(8459) Fatal: (10026) There were 7 errors compiling module, stopping Fatal: (1018) Compilation aborted make[2]: *** [lazarus.exe] Error 1 make[2]: Leaving directory `e:/Lazarus/trunk/ide' make[1]: *** [ide] Error 2 make[1]: Leaving directory `e:/Lazarus/trunk/ide' make: *** [ide] Error 2 Gabor From m-w-vogel at gmx.de Wed Jun 7 10:42:02 2017 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Wed, 7 Jun 2017 10:42:02 +0200 Subject: [Lazarus] Anchoring problem with ScrollBox and Panels In-Reply-To: <7b0c8ebb-0543-6930-463d-b420f95884bb@bgss.hu> References: <6903463f-3d79-0cb6-1fb4-83c334700668@bgss.hu> <316a60d5-ead5-aa42-0162-ec382fd234d6@gmx.de> <7b0c8ebb-0543-6930-463d-b420f95884bb@bgss.hu> Message-ID: <0630d79a-f4f2-ad9f-0dfe-f0f3f078e810@gmx.de> Am 07.06.2017 um 09:52 schrieb Gabor Boros via Lazarus: > Your example work as expected. If resize the form panel resized properly. As it should. I simply wanted to show you, what happen when you anchor the bottom of a panel: Sizing of form, sizes the panel. The same, as in all your test projects before: Sizing of ScrollBox1, sizes Panel2. > I tried to accomplish the task in a different way. Attached a new > example. Bottom of Panel2 anchored to bottom of ScrollBox. This works. > Top of Panel2 anchored to bottom of Panel1. When resize the form top > of Panel2 is moving Why? Top of Panel2 why not stay with bottom of > Panel1? You have anchored it to center. The center of Panel2 is now the center of ScrollBox1. See http://wiki.lazarus.freepascal.org/Anchor_Sides#Example_3 From alfred at consulab.nl Wed Jun 7 10:49:24 2017 From: alfred at consulab.nl (Alfred) Date: Wed, 07 Jun 2017 08:49:24 +0000 Subject: [Lazarus] Cross Compile to Arm Message-ID: Hi Steve, The file crtbeginS.o was definitely missing from the arm-lib archive ! I have added it. Together with crtendS.so . https://github.com/newpascal/fpcupdeluxe/releases/download/crosslibs_v1.0/CrossLibsLinuxARM.rar or https://github.com/newpascal/fpcupdeluxe/releases/download/crosslibs_v1.0/CrossLibsLinuxARM.zip Or, if you are very lazy like me ... delete the cross/lib/arm-linux directory, and run fpcupdeluxe again ... ;-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From steveg at nevets.com.au Wed Jun 7 11:40:12 2017 From: steveg at nevets.com.au (Steve Gatenby) Date: Wed, 7 Jun 2017 19:10:12 +0930 Subject: [Lazarus] Cross Compile to Arm In-Reply-To: References: Message-ID: <40640e83-f6a3-4d9f-e2a2-8ae2e5ba5c43@nevets.com.au> On 06/07/2017 06:19 PM, Alfred via Lazarus wrote: > Hi Steve, > > The file crtbeginS.o was definitely missing from the arm-lib archive ! > > I have added it. Together with crtendS.so . > > https://github.com/newpascal/fpcupdeluxe/releases/download/crosslibs_v1.0/CrossLibsLinuxARM.rar > or > https://github.com/newpascal/fpcupdeluxe/releases/download/crosslibs_v1.0/CrossLibsLinuxARM.zip > > Or, if you are very lazy like me ... delete the cross/lib/arm-linux > directory, and run fpcupdeluxe again ... ;-) > Thank you Alfred - now working perfectly. Appreciate your time on this. Makes a persons day (mine) better all round :) SteveG -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Wed Jun 7 13:15:54 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 7 Jun 2017 13:15:54 +0200 Subject: [Lazarus] Trunk is broken In-Reply-To: <7fe56fb5-f3b8-5929-5795-7a26c251bb8b@bgss.hu> References: <7fe56fb5-f3b8-5929-5795-7a26c251bb8b@bgss.hu> Message-ID: <5ac283d5-a388-525c-4957-c6cf17567296@kluug.net> On 07.06.2017 10:38, Gabor Boros via Lazarus wrote: > I tried to compile trunk(55263) with FPC 3.0.2 on Win32 but got this: Are you sure you use FPC 3.0.2? IMO you use an old revision of fixes_3_0 or trunk branch which you have to update. Ondrej From lazarus at kluug.net Wed Jun 7 13:20:47 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 7 Jun 2017 13:20:47 +0200 Subject: [Lazarus] (Local) variable value hints In-Reply-To: References: <7b4bbdaa-9b39-fb22-1c44-dcea6b1a2fb1@kluug.net> Message-ID: <2e6f734f-56e1-68a1-4b37-e983f12504ba@kluug.net> > So does that mean that the IDE has to be tailored for a specific project? Yes. Install a custom package to extend the IDE. Ondrej From lazarus at mfriebe.de Wed Jun 7 14:01:31 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 7 Jun 2017 13:01:31 +0100 Subject: [Lazarus] (Local) variable value hints In-Reply-To: References: Message-ID: On 06/06/2017 20:54, Mark Morgan Lloyd via Lazarus wrote: > Bearing in mind things like the %H hint that Lazarus uses to suppress > warning messages, is there anything comparable that can be applied to > a variable so that when the IDE pops up a value during debugging it > will always be shown in a certain format? > > .. > end else begin > euCount := cardEsu; > euVector := sysEuVector <=== THIS ONLY MEANINGFUL AS HEX OR BINARY > end; > Assert(euCount * euVector > 0, 'Bad EU count or vector'); > The easiest way is to use the watch window. Watches can IIRC be configured via their properties. From mlnglsts at bgss.hu Wed Jun 7 15:07:01 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Wed, 7 Jun 2017 15:07:01 +0200 Subject: [Lazarus] Trunk is broken In-Reply-To: <5ac283d5-a388-525c-4957-c6cf17567296@kluug.net> References: <7fe56fb5-f3b8-5929-5795-7a26c251bb8b@bgss.hu> <5ac283d5-a388-525c-4957-c6cf17567296@kluug.net> Message-ID: 2017. 06. 07. 13:15 keltezéssel, Ondrej Pokorny via Lazarus írta: > On 07.06.2017 10:38, Gabor Boros via Lazarus wrote: >> I tried to compile trunk(55263) with FPC 3.0.2 on Win32 but got this: > > Are you sure you use FPC 3.0.2? IMO you use an old revision of fixes_3_0 > or trunk branch which you have to update. I sure the directory name is 3.0.2. :-) But sitting "3.0.3 [2017/05/14]" (rev 36152) in it. Compile success with 3.0.2 release and fixes_3_0 rev 36415. Sorry for the false alarm! Gabor From markMLl.lazarus at telemetry.co.uk Wed Jun 7 15:42:39 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Wed, 7 Jun 2017 13:42:39 +0000 Subject: [Lazarus] (Local) variable value hints In-Reply-To: References: Message-ID: On 07/06/17 12:15, Martin Frb via Lazarus wrote: > On 06/06/2017 20:54, Mark Morgan Lloyd via Lazarus wrote:> Bearing in > mind things like the %H hint that Lazarus uses to suppress > warning > messages, is there anything comparable that can be applied to > a > variable so that when the IDE pops up a value during debugging it > will > always be shown in a certain format?>> ..> end else begin> euCount := > cardEsu;> euVector := sysEuVector <=== THIS ONLY MEANINGFUL AS HEX OR > BINARY> end;> Assert(euCount * euVector > 0, 'Bad EU count or > vector'); >The easiest way is to use the watch window. > Watches can IIRC be configured via their properties.-- Yes, but I was thinking about the case when a value pops up unbidden during normal stepping-through. Can the default witching format be changed? Hex might be more appropriate. -- 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 mfriebe.de Wed Jun 7 15:56:32 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 7 Jun 2017 14:56:32 +0100 Subject: [Lazarus] (Local) variable value hints In-Reply-To: References: Message-ID: <2fb8da92-57ee-9162-3000-57d5c05cecae@mfriebe.de> On 07/06/2017 14:42, Mark Morgan Lloyd via Lazarus wrote: > > Yes, but I was thinking about the case when a value pops up unbidden > during normal stepping-through. > > Can the default witching format be changed? Hex might be more > appropriate. > Generally yes, but depends how... A simple integer could (in the hint) be shown in dec and hex. (the hint has plenty of space for an integer.) But in other windows that may not be wanted. The column of the watch window has less space, so showing both (without the user requesting) may be too much. The hint is interactive, so there could be options added to the hint, and the hint could remember (based on type, type and name, or type/name/context). That is if someone wants to implement it. From nc-gaertnma at netcologne.de Wed Jun 7 16:30:18 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 7 Jun 2017 16:30:18 +0200 Subject: [Lazarus] bluetoothlaz package cannot detect Bluetooth LE (version > 4.0) devices on raspberry pi In-Reply-To: <1c9a97c4-03fa-a767-ef30-df4bef2c23a7@avidsoft.com.hk> References: <1c9a97c4-03fa-a767-ef30-df4bef2c23a7@avidsoft.com.hk> Message-ID: <20170607163018.3b09ae7b@limapholos.matflo.wg> On Tue, 6 Jun 2017 23:25:38 +0800 Dennis via Lazarus wrote: > I am using Raspberry Pi 3 (with wifi+bluetooth). > When using the command tool, bluetoothctl, it can detect old and new > bluetooth devices (version > 4.0). > > However, using the bluetoothlaz inside my lazarus app, it can only > detect old bluetooth devices (not the BLE new devices). > > I am guessing the bluetoothctl uses the new version and features in > bluez (ver 5.41) On Ubuntu bluetoothctl does not link to "bluez". Only basic libs. > but bluetoothlaz uses the {$linklib bluetooth} > > which probably is the file > /usr/lib/arm-linux-gnueabihf/libbluetooth.so.3 > which is a symbolic link to > /usr/lib/arm-linux-gnueabihf/libbluetooth.so.3.18.13 Sounds right. > which might probably be compiled with old versions of bluez (or turn off > the BLE feature). Don't know. Maybe libbluetooth supports the new features, but bluetoothlaz misses the new functions? Mattias From lazarus at kluug.net Wed Jun 7 16:33:10 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 7 Jun 2017 16:33:10 +0200 Subject: [Lazarus] (Local) variable value hints In-Reply-To: <2e6f734f-56e1-68a1-4b37-e983f12504ba@kluug.net> References: <7b4bbdaa-9b39-fb22-1c44-dcea6b1a2fb1@kluug.net> <2e6f734f-56e1-68a1-4b37-e983f12504ba@kluug.net> Message-ID: <0eb99af0-0df8-51b1-beea-1264f6f13927@kluug.net> On 07.06.2017 13:20, Ondrej Pokorny via Lazarus wrote: > > So does that mean that the IDE has to be tailored for a specific > project? > > Yes. Install a custom package to extend the IDE. Or: extend the IDE with some default formatters, add an IDE option page (and/or project option page) where the user can define formatter overloads for custom types without needing to recompile the IDE. Send the patch over to mantis - I'll apply it to trunk. Ondrej From bo.berglund at gmail.com Wed Jun 7 23:00:51 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 07 Jun 2017 23:00:51 +0200 Subject: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie References: <7ac6e745-c06c-9e33-a5eb-1b7b0adb8a12@Joepgen.com> <4p7pictlb5ir45qhdc5akf833vq13o8ta7@4ax.com> <7d953ed5-5335-2df1-5fad-c2b6e2d5cc31@Joepgen.com> Message-ID: On Tue, 6 Jun 2017 11:57:21 +0200, Joe via Lazarus wrote: >Went to /home/pi/dev/fpc/3.02 and did make clean all PP=ppcarm. >Got "An unhandled exception occurred at $000678A0". >Maybe the ARMv6 CPU got some ARMv7 code? You should probably use this instead: make clean all PP=/home/pi/dev/fpc/ppcarm because my script downloads the seed compiler (ppcarm ver 3.0.0) to the base fpc directory in which there are the version subdirs like 3.0.2 and the only files are supposed to be the relevant ppcarm compiler binary. -- Bo Berglund Developer in Sweden From petr.kristan at epos.cz Thu Jun 8 09:00:31 2017 From: petr.kristan at epos.cz (Petr Kristan) Date: Thu, 8 Jun 2017 09:00:31 +0200 Subject: [Lazarus] Bugtracker question Message-ID: <20170608070031.GA10934@eposux.epos.local> Hi. I set bad Category in bug #0031901. How can I change it to "LCL"? Or somebody who has an access, change it please. Thanks. Petr -- Petr Kristan . EPOS PRO s.r.o., Smilova 333, 530 02 Pardubice tel: +420 461101401 Czech Republic (Eastern Europe) fax: +420 461101481 From lazarus at kluug.net Thu Jun 8 09:04:25 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 8 Jun 2017 09:04:25 +0200 Subject: [Lazarus] Bugtracker question In-Reply-To: <20170608070031.GA10934@eposux.epos.local> References: <20170608070031.GA10934@eposux.epos.local> Message-ID: <758954e9-0cbb-19fc-2342-4132954272a4@kluug.net> On 08.06.2017 9:00, Petr Kristan via Lazarus wrote: > I set bad Category in bug #0031901. How can I change it to "LCL"? > Or somebody who has an access, change it please. Category "Patches" is OK as well :) Ondrej From steveg at nevets.com.au Fri Jun 9 09:38:25 2017 From: steveg at nevets.com.au (Steve Gatenby) Date: Fri, 9 Jun 2017 17:08:25 +0930 Subject: [Lazarus] AsyncProcess code problem Message-ID: <02834300-1cfd-84f5-3078-be717a608d80@nevets.com.au> Having a problem with some code here :) Lazarus 1.9.0 r55266M FPC 3.1.1 x86_64-linux-gtk2 I create a thread every second to run a process (TAsyncprocess), then FreeAndNil the process once done. My app aborts regularly (though intermittently) with the following from gdb. My question is about the fact of 'appprocessmessages' being in the fault path. Is this normal for a threaded call to TAsyncProc, or have I introduced my own fault ?. I dont have any main thread/gui accessing calls from within my created thread. Thread 1 "LxAazCMA" received signal SIGSEGV, Segmentation fault. 0x00007fffef6eddb4 in REMOVEEVENTHANDLER (this=0xf9efb8, AHANDLER=0x0) at gtk2/gtk2lclintf.inc:1355 1355 if lEventHandler^.PrevHandler = nil then (gdb) bt #0 0x00007fffef6eddb4 in REMOVEEVENTHANDLER (this=0xf9efb8, AHANDLER=0x0) at gtk2/gtk2lclintf.inc:1355 #1 0x00007fffef6ee022 in REMOVEPIPEEVENTHANDLER (this=0xf9efb8, AHANDLER=0x0) at gtk2/gtk2lclintf.inc:1429 #2 0x00007fffef7af46d in REMOVEPIPEEVENTHANDLER (AHANDLER=0x0) at include/lclintf.inc:424 #3 0x00007fffef9beeba in UNHOOKPIPEHANDLE (this=0x7fffd4013608) at asyncprocess.pp:84 #4 0x00007fffef9beee5 in HANDLEPIPEINPUT (this=0x7fffd4013608, ADATA=0, AREASONS=...) at asyncprocess.pp:90 #5 0x00007fffef6edfe2 in HANDLEPIPEEVENT (this=0xf9efb8, ADATA=140736750234040, AFLAGS=17) at gtk2/gtk2lclintf.inc:1421 #6 0x00007fffef6edc5d in WAITHANDLE_IOCALLBACK (SOURCE=0x7fffd4028570, CONDITION=17, DATA=0x7fffd40128d8) at gtk2/gtk2lclintf.inc:1318 #7 0x00007ffff664004a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #8 0x00007ffff66403f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #9 0x00007ffff664049c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #10 0x000000000054d9c9 in APPPROCESSMESSAGES (this=0xe9bcb8) at gtk2/gtk2widgetset.inc:2338 #11 0x000000000045a27d in HANDLEMESSAGE (this=0xe99908) at include/application.inc:1276 #12 0x000000000045a7af in RUNLOOP (this=0xe99908) at include/application.inc:1413 #13 0x00000000006a0673 in APPRUN (this=0xe9bcb8, ALOOP=...) at include/interfacebase.inc:54 #14 0x000000000045a74f in RUN (this=0xe99908) at include/application.inc:1401 #15 0x000000000041ea25 in main () at LynxApp.lpr:82 (gdb) Thanks - SteveG From nc-gaertnma at netcologne.de Fri Jun 9 10:02:27 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 9 Jun 2017 10:02:27 +0200 Subject: [Lazarus] AsyncProcess code problem In-Reply-To: <02834300-1cfd-84f5-3078-be717a608d80@nevets.com.au> References: <02834300-1cfd-84f5-3078-be717a608d80@nevets.com.au> Message-ID: <20170609100227.1c56ddcb@limapholos.matflo.wg> On Fri, 9 Jun 2017 17:08:25 +0930 Steve Gatenby via Lazarus wrote: > Having a problem with some code here :) > > Lazarus 1.9.0 r55266M FPC 3.1.1 x86_64-linux-gtk2 > > I create a thread every second to run a process (TAsyncprocess), then > FreeAndNil the process once done. If you are using threads, then why use TAsyncProcess? TAsyncProcess was invented as a non blocking TProcess for the main thread. Probably it can be made thread safe for the gtk2 interface, but if you already use threads, then you can simply use TProcess or TProcessUTF8 with less overhead. Mattias From mschnell at lumino.de Fri Jun 9 10:12:47 2017 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 9 Jun 2017 10:12:47 +0200 Subject: [Lazarus] AsyncProcess code problem In-Reply-To: <02834300-1cfd-84f5-3078-be717a608d80@nevets.com.au> References: <02834300-1cfd-84f5-3078-be717a608d80@nevets.com.au> Message-ID: <7fb424f9-169f-975b-33ed-ba57461a2b0e@lumino.de> On 09.06.2017 09:38, Steve Gatenby via Lazarus wrote: > > I create a thread every second to run a process (TAsyncprocess), then > FreeAndNil the process once done. > Would it not be more appropriate to use a thread pool and keep the threads up, waiting for a TEvent telling them what to do ? -Michael From steveg at nevets.com.au Fri Jun 9 10:55:14 2017 From: steveg at nevets.com.au (Steve Gatenby) Date: Fri, 9 Jun 2017 18:25:14 +0930 Subject: [Lazarus] AsyncProcess code problem In-Reply-To: <20170609100227.1c56ddcb@limapholos.matflo.wg> References: <02834300-1cfd-84f5-3078-be717a608d80@nevets.com.au> <20170609100227.1c56ddcb@limapholos.matflo.wg> Message-ID: On 06/09/2017 05:32 PM, Mattias Gaertner via Lazarus wrote: > On Fri, 9 Jun 2017 17:08:25 +0930 > Steve Gatenby via Lazarus wrote: > >> Having a problem with some code here :) >> >> Lazarus 1.9.0 r55266M FPC 3.1.1 x86_64-linux-gtk2 >> >> I create a thread every second to run a process (TAsyncprocess), then >> FreeAndNil the process once done. > If you are using threads, then why use TAsyncProcess? > TAsyncProcess was invented as a non blocking TProcess for the main > thread. > Probably it can be made thread safe for the gtk2 interface, but > if you already use threads, then you can simply use TProcess or > TProcessUTF8 with less overhead. > > > Mattias Thanks Mattias - I will change to TProcess and see how it goes. From steveg at nevets.com.au Fri Jun 9 10:56:26 2017 From: steveg at nevets.com.au (Steve Gatenby) Date: Fri, 9 Jun 2017 18:26:26 +0930 Subject: [Lazarus] AsyncProcess code problem In-Reply-To: <7fb424f9-169f-975b-33ed-ba57461a2b0e@lumino.de> References: <02834300-1cfd-84f5-3078-be717a608d80@nevets.com.au> <7fb424f9-169f-975b-33ed-ba57461a2b0e@lumino.de> Message-ID: <5b95177b-3529-d5b8-fff5-89ba00a1d22b@nevets.com.au> On 06/09/2017 05:42 PM, Michael Schnell via Lazarus wrote: > On 09.06.2017 09:38, Steve Gatenby via Lazarus wrote: >> >> I create a thread every second to run a process (TAsyncprocess), then >> FreeAndNil the process once done. >> > > Would it not be more appropriate to use a thread pool and keep the > threads up, waiting for a TEvent telling them what to do ? > > -Michael I have been meaning to do so, and now seems a good time to refactor it all. I will add this to using TProcess on Mattias's suggestion Thank you From aaa5500 at ya.ru Fri Jun 9 14:26:14 2017 From: aaa5500 at ya.ru (Alexey) Date: Fri, 9 Jun 2017 15:26:14 +0300 Subject: [Lazarus] TCustomControl now aways gets focus Message-ID: Something changed in setting focus to control? My app now has bug: TATButton is *always focusable,* while it has prop not to be focusable [it worked before]. -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko at holobit.net Fri Jun 9 14:42:03 2017 From: zeljko at holobit.net (zeljko) Date: Fri, 9 Jun 2017 14:42:03 +0200 Subject: [Lazarus] TCustomControl now aways gets focus In-Reply-To: References: Message-ID: <204be6fd-c6af-3d32-2959-3cda538f8b4c@holobit.net> On 09.06.2017 14:26, Alexey via Lazarus wrote: > Something changed in setting focus to control? > > My app now has bug: TATButton is *always focusable,* while it has prop > not to be focusable [it worked before]. What widgetset ? If it's gtk2 then maybe you're hitted by r55062/55063 ? zeljko From kapibara.pas at aol.com Sun Jun 11 08:05:33 2017 From: kapibara.pas at aol.com (kapibara) Date: Sun, 11 Jun 2017 08:05:33 +0200 Subject: [Lazarus] True/False in Object Inspector Message-ID: <42b0ac66-cb1f-ad46-9f93-79daf84d5158@aol.com> It seems no longer possible to toggle a property true/false with double click. Is this a bug? From lazarus at kluug.net Sun Jun 11 10:30:31 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 11 Jun 2017 10:30:31 +0200 Subject: [Lazarus] True/False in Object Inspector In-Reply-To: <42b0ac66-cb1f-ad46-9f93-79daf84d5158@aol.com> References: <42b0ac66-cb1f-ad46-9f93-79daf84d5158@aol.com> Message-ID: <7466206c-b7ab-d546-dc48-3f9e3980515d@kluug.net> On 11.06.2017 8:05, kapibara via Lazarus wrote: > It seems no longer possible to toggle a property true/false with > double click. Is this a bug? It works here. What OS/WS? What settings (checkboxes or comboboxes for bool values)? Ondrej From pdigonzelli at softsargentina.com Sun Jun 11 15:14:00 2017 From: pdigonzelli at softsargentina.com (Pablo Digonzelli) Date: Sun, 11 Jun 2017 10:14:00 -0300 Subject: [Lazarus] ubsubscribe Message-ID: <3853b4deada1519bb908b13a243dd814.squirrel@softsargentina.com> -- Ing. Pablo Digonzelli Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 Email: pdigonzelli at softsargentina.com pdigonzelli at gmail.com Cel: 543815982714 From lazarus at mfriebe.de Sun Jun 11 15:23:53 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 11 Jun 2017 14:23:53 +0100 Subject: [Lazarus] True/False in Object Inspector In-Reply-To: <7466206c-b7ab-d546-dc48-3f9e3980515d@kluug.net> References: <42b0ac66-cb1f-ad46-9f93-79daf84d5158@aol.com> <7466206c-b7ab-d546-dc48-3f9e3980515d@kluug.net> Message-ID: <57b58dec-ffa8-3ed8-29c2-4fafb9526aca@mfriebe.de> On 11/06/2017 09:30, Ondrej Pokorny via Lazarus wrote: > On 11.06.2017 8:05, kapibara via Lazarus wrote: >> It seems no longer possible to toggle a property true/false with >> double click. Is this a bug? > > It works here. What OS/WS? What settings (checkboxes or comboboxes for > bool values)? I just tested this on win32 (current Lazarus trunk) Having checkboxes for boolean. If the row in the OI is NOT selected, then doubleclick works (or maybe it does select, then change). If the row in the OI is already selected, doubleclick does not work (it is 2 individual clicks, changing twice / back to original value) For comboboxes (enum/not bool) it makes no different if they are selected or not. they always go to the next value on doubleclick. From sandro.cumerlato at gmail.com Sun Jun 11 16:04:10 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Sun, 11 Jun 2017 16:04:10 +0200 Subject: [Lazarus] Form ShowModal and ActiveX Content unexpected error Message-ID: Hello, please take a look at the attached project, it's a Windows specific minimal project. I'm using a TActiveXContainer and a TEvsWebBrowser to display a webpage on Form2, opening it from Form1. It works if Form2 is opened as a standard form (Form2.Show), but the application gives an expection if Form2 is opened as modal form (Form2.ShowModal). I need to open Form2 ad ModalForm. Is there a workaround for this strange behaviour? Is it a bug of the ActiveX container? Thank you in advance for your reply. Best regards, Sandro Cumerlato -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ActiveXBug.zip Type: application/zip Size: 21763 bytes Desc: not available URL: From larrydalton71 at gmail.com Sun Jun 11 16:30:51 2017 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sun, 11 Jun 2017 09:30:51 -0500 Subject: [Lazarus] Apps for Android Message-ID: Can apps to be run on Android be compiled on Linux! Sent from my iPhone From juha.manninen62 at gmail.com Sun Jun 11 22:04:31 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 11 Jun 2017 23:04:31 +0300 Subject: [Lazarus] True/False in Object Inspector In-Reply-To: <57b58dec-ffa8-3ed8-29c2-4fafb9526aca@mfriebe.de> References: <42b0ac66-cb1f-ad46-9f93-79daf84d5158@aol.com> <7466206c-b7ab-d546-dc48-3f9e3980515d@kluug.net> <57b58dec-ffa8-3ed8-29c2-4fafb9526aca@mfriebe.de> Message-ID: On Sun, Jun 11, 2017 at 4:23 PM, Martin Frb via Lazarus wrote: > If the row in the OI is NOT selected, then doubleclick works (or maybe it > does select, then change). Yes it is interpreted as 2 clicks. FYI: you can change an unselected checkbox in OI by clicking the actual box once. > If the row in the OI is already selected, doubleclick does not work (it is 2 > individual clicks, changing twice / back to original value) It is consistent with the standard checkbox behavior. They work with a single click. I wonder what kapibara's problem was. Checkboxes never required a double-click. Comboboxes still work with it. ??? Juha From werner.pamler at freenet.de Sun Jun 11 22:49:51 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Sun, 11 Jun 2017 22:49:51 +0200 Subject: [Lazarus] True/False in Object Inspector In-Reply-To: References: <42b0ac66-cb1f-ad46-9f93-79daf84d5158@aol.com> <7466206c-b7ab-d546-dc48-3f9e3980515d@kluug.net> <57b58dec-ffa8-3ed8-29c2-4fafb9526aca@mfriebe.de> Message-ID: <411848e0-5a9f-dc36-5ff2-83bed7ca4f81@freenet.de> Am 11.06.2017 um 22:04 schrieb Juha Manninen via Lazarus: > I wonder what kapibara's problem was. > Checkboxes never required a double-click. > Comboboxes still work with it. > ??? He probably had a very old Lazarus from the times when the OI displayed boolean values as true/false, without a checkbox (Laz 1.2 or so). Or he had unchecked the box "Use checkbox for boolean values" in "Tools" > "Environment" > "Object Inspector" of more recent versions. In these cases, a double-click is required to toggle the state (like in Delphi 7). If he installed a new version now, Laz1.8RC2 maybe, then he will be missing the old behavior because the new version comes up with checkboxes by default. From kapibara.pas at aol.com Mon Jun 12 00:59:29 2017 From: kapibara.pas at aol.com (kapibara) Date: Mon, 12 Jun 2017 00:59:29 +0200 Subject: [Lazarus] True/False in Object Inspector In-Reply-To: <7466206c-b7ab-d546-dc48-3f9e3980515d@kluug.net> References: <42b0ac66-cb1f-ad46-9f93-79daf84d5158@aol.com> <7466206c-b7ab-d546-dc48-3f9e3980515d@kluug.net> Message-ID: <0d8298cf-b06d-a3a6-cbf3-1b29fc9c08aa@aol.com> Lazarus version was a three weeks old trunk, GTK2 under Debian with CheckBoxes for boolean off. After updating to r55322 some moments ago, doubleclick toggles booleans just fine. Before updating, the GTK2 ComboBox Style for booleans looked like csDropDownList. Now Style is changed to csDropDown just as in Windows. Will try remember to update more often, sorry for time wasted. =:-) Roger On 06/11/2017 10:30 AM, Ondrej Pokorny via Lazarus wrote: > On 11.06.2017 8:05, kapibara via Lazarus wrote: >> It seems no longer possible to toggle a property true/false with >> double click. Is this a bug? > > It works here. What OS/WS? What settings (checkboxes or comboboxes for > bool values)? > > Ondrej From luca at wetron.es Mon Jun 12 11:16:15 2017 From: luca at wetron.es (Luca Olivetti) Date: Mon, 12 Jun 2017 11:16:15 +0200 Subject: [Lazarus] fpspreadsheet: custom property in xslooxml writer Message-ID: <0661de3b-61e5-18f6-55f6-9a993b309ffe@wetron.es> Hello, I need to generate an xslx file with a custom property. It's a matter of adding to the zip the file docProps/custom.xml (I see that libreoffice adds more files in that directory but for my purposes custom.xml is enough). The only way I found is to override the WriteToStream methos of TSSpreadOOXMLWriter: copy it verbatim and add my new stream in the new implementation. It works fine, but I wonder if is there a better way. Maybe the writer could add some hooks to insert custom files in the xslx document? BTW, I also thought of overriding the WriteMedia method (since it exposes the TZipper as a parameter) but unfortunately it's not virtual so it cannot be overridden. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From joost at cnoc.nl Tue Jun 13 15:21:49 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Tue, 13 Jun 2017 15:21:49 +0200 Subject: [Lazarus] Codetools in distress Message-ID: Hi all, Am I the only one who has problems with the codetools? Seems like it can not handle out-parameters in functions anymore. like this: (variants.pp) function VarIsError(const V: Variant; out AResult: HRESULT): Boolean; But there are many others in the RTL and FCL. Or is it a local issue? Regards, Joost, From lazarus at kluug.net Tue Jun 13 15:40:26 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 13 Jun 2017 15:40:26 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: References: Message-ID: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> On 13.06.2017 15:21, Joost van der Sluis via Lazarus wrote: > Am I the only one who has problems with the codetools? Seems like it > can not handle out-parameters in functions anymore. What CT function is not working in particular? I tested with: program CTTest1; uses SysUtils, Classes; function VarIsError(const V: Variant; out AResult: HRESULT): Boolean; begin end; begin x := VarIsError(v, s); end. and everything seems to be OK to me. Or is your problem that CT cannot resolve what overload to use: function VarIsError(const V: Variant; out AResult: HRESULT): Boolean; function VarIsError(const V: Variant): Boolean; inline; AFAIK CT have always had this issue to find correct overloads, so no regression here. (At least Lazarus 1.4.2 has the issue as well.) Ondrej From joost at cnoc.nl Tue Jun 13 16:03:41 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Tue, 13 Jun 2017 16:03:41 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> Message-ID: On 06/13/2017 03:40 PM, Ondrej Pokorny via Lazarus wrote: > On 13.06.2017 15:21, Joost van der Sluis via Lazarus wrote: >> Am I the only one who has problems with the codetools? Seems like it >> can not handle out-parameters in functions anymore. > > What CT function is not working in particular? > > I tested with: > > program CTTest1; > > uses > SysUtils, Classes; > > function VarIsError(const V: Variant; out AResult: HRESULT): Boolean; > begin > > end; > > begin > x := VarIsError(v, s); > end. > > and everything seems to be OK to me. That one works for me also. Now when I add Variants to the uses, nothing works anymore. (Try identifier-completion in VarIsError -> move cursor to VarIs -> ctrl-space) Same happens when you add contnrs to the uses-section. Do you also have that problem? Regards, Joost. From lazarus at kluug.net Tue Jun 13 16:07:37 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 13 Jun 2017 16:07:37 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> Message-ID: On 13.06.2017 16:03, Joost van der Sluis via Lazarus wrote: > Now when I add Variants to the uses, nothing works anymore. (Try > identifier-completion in VarIsError -> move cursor to VarIs -> > ctrl-space) > Same happens when you add contnrs to the uses-section. > > Do you also have that problem? Works fine for me: I am on current Lazarus trunk with FPC trunk r36463. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: engcoadccedimplm.png Type: image/png Size: 8248 bytes Desc: not available URL: From joost at cnoc.nl Tue Jun 13 19:08:57 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Tue, 13 Jun 2017 19:08:57 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> Message-ID: <3363c407-5d62-b929-4195-f0fe78dadb92@cnoc.nl> On 06/13/2017 04:07 PM, Ondrej Pokorny via Lazarus wrote: > On 13.06.2017 16:03, Joost van der Sluis via Lazarus wrote: >> Now when I add Variants to the uses, nothing works anymore. (Try >> identifier-completion in VarIsError -> move cursor to VarIs -> >> ctrl-space) >> Same happens when you add contnrs to the uses-section. >> >> Do you also have that problem? > > Works fine for me: > > I am on current Lazarus trunk with FPC trunk r36463. I don't get it. I have the same issue on two different systems. Both Lazarus- and FPC-trunk. For at least a week already... This is what I see on the console: Hint: [TFPCSourceCache.Update] /home/CNOC/joost/svn/fpc-trunk has changed. ApplyFPCSrcFiles BuildBoss.RescanCompilerDefines ... TFPCSrcScan.OnFilesGathered closing progress item ... TFPCSrcScan.OnFilesGathered END ### TCodeToolManager.HandleException: [20170421195425] "expected :, but AResult found" at Line=111 Col=43 in "/home/CNOC/joost/svn/fpc-trunk/packages/rtl-objpas/src/inc/variants.pp" ### TCodeToolManager.HandleException: [20170421195348] "expected end., but AResult found" at Line=111 Col=43 in "/home/CNOC/joost/svn/fpc-trunk/packages/rtl-objpas/src/inc/variants.pp" ### TCodeToolManager.HandleException: [20170421195348] "expected end., but AResult found" at Line=111 Col=43 in "/home/CNOC/joost/svn/fpc-trunk/packages/rtl-objpas/src/inc/variants.pp" etc etc Any idea where to look? Regards, Joost. From joost at cnoc.nl Tue Jun 13 23:05:03 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Tue, 13 Jun 2017 23:05:03 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: <3363c407-5d62-b929-4195-f0fe78dadb92@cnoc.nl> References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> <3363c407-5d62-b929-4195-f0fe78dadb92@cnoc.nl> Message-ID: Op 13-06-17 om 19:08 schreef Joost van der Sluis via Lazarus: > On 06/13/2017 04:07 PM, Ondrej Pokorny via Lazarus wrote: > ### TCodeToolManager.HandleException: [20170421195425] "expected :, but > AResult found" at Line=111 Col=43 in > "/home/CNOC/joost/svn/fpc-trunk/packages/rtl-objpas/src/inc/variants.pp" > Any idea where to look? Seems like Lazarus has a compilermode-flag cmsOut, to indicate that a compiler supports out-parameters. This flag is not set. At a closer look, the variants.pp unit starts with: {$IFDEF FPC} {$MODE objfpc} {$H+} {$ENDIF} But when showed in Lazarus, {$MODE objfpc} is grayed out. So Lazarus does not detect that FPC is defined... In the defines-editor, I do see the FPC-define, but I don't see any value. Is that normal? Any clue why 'fpc' is not defined according to the codetools? Regards, Joost. From lazarus at kluug.net Tue Jun 13 23:22:38 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 13 Jun 2017 23:22:38 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> <3363c407-5d62-b929-4195-f0fe78dadb92@cnoc.nl> Message-ID: On 13.06.2017 23:05, Joost van der Sluis via Lazarus wrote: > Any clue why 'fpc' is not defined according to the codetools? I have no idea :( I'll ping Mattias directly. I am quite sure he'll know what to look for from your information :) Ondrej From joost at cnoc.nl Wed Jun 14 00:16:26 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Wed, 14 Jun 2017 00:16:26 +0200 Subject: [Lazarus] [Lazarusdev] CodeTools FPC not defined problem In-Reply-To: <8146219e-6a62-4391-2f9d-7c576ec85964@cnoc.nl> References: <0682edbb-1d10-9006-6475-aec891025f66@kluug.net> <8146219e-6a62-4391-2f9d-7c576ec85964@cnoc.nl> Message-ID: <56deb294-8556-181e-677d-aade2e0a4402@cnoc.nl> Some more info on my own mail, which I mistakenly only send to Ondrej: Op 13-06-17 om 23:50 schreef Joost van der Sluis: > Op 13-06-17 om 23:22 schreef Ondrej Pokorny: >> Joost reported in the Lazarus mailing list today that CodeTools >> probably miss the FPC define due to an unknown reason and therefore >> the out parameter isn't parsed properly. I wasn't able to help him. >> Could you take a look? > > I can give some more information. The content of hints, warnings and > errors are not shown in the messages-screen. I thought it was unrelated. > But I think it's related. > > My guess is that the defines are parsed from the compiler-output (-va) > But that the compiler-output is not parsed right. > > I'm fiddling around in etFPCMsgParser. At first sight I see that the > parser looks for 'Warn:' while my compiler outputs: 'Warning:'. But > that's not the main issue. > > I did not debug the code, only looked briefly. But what I do see is that > for some strange reason the compiler-output adds some extra characters. > This is an example-output from trunk: > > Free Pascal Compiler version 3.1.1 [2017/06/13] for x86_64 > Copyright (c) 1993-2017 by Florian Klaempfl and others > Target OS: Linux for x86-64^@ > Compiling unit1.pas^@ > unit1.pas(8,22) Fatal:^@ Can't find unit FileUtil used by Unit1^@ > Fatal:^@ Compilation aborted^@ > > Maybe that the ^@ (tab?) character is messing things up? I don't see > this character in fpc 3.0.0's output. > > I'll dig further tomorrow. The ^@-character actually is #0. The parsing is done using pchar's, which are cut-off at the #0 sign. I think I'll have to find out why the compiler outputs #0 characters in the middle of strings.... Regards, Joost. From nc-gaertnma at netcologne.de Wed Jun 14 10:09:19 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 14 Jun 2017 10:09:19 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> <3363c407-5d62-b929-4195-f0fe78dadb92@cnoc.nl> Message-ID: <20170614100919.689336a0@limapholos.matflo.wg> On Tue, 13 Jun 2017 23:05:03 +0200 Joost van der Sluis via Lazarus wrote: > Op 13-06-17 om 19:08 schreef Joost van der Sluis via Lazarus: > > On 06/13/2017 04:07 PM, Ondrej Pokorny via Lazarus wrote: > > > ### TCodeToolManager.HandleException: [20170421195425] "expected :, but > > AResult found" at Line=111 Col=43 in > > "/home/CNOC/joost/svn/fpc-trunk/packages/rtl-objpas/src/inc/variants.pp" > > > Any idea where to look? > > Seems like Lazarus has a compilermode-flag cmsOut, to indicate that a > compiler supports out-parameters. This corresponds to the {$modeswitch out}. > This flag is not set. > > At a closer look, the variants.pp unit starts with: > > {$IFDEF FPC} > {$MODE objfpc} > {$H+} > {$ENDIF} > > But when showed in Lazarus, {$MODE objfpc} is grayed out. So Lazarus > does not detect that FPC is defined... > > In the defines-editor, I do see the FPC-define, but I don't see any > value. Is that normal? No. The macro FPC comes from reading the compiler output. Try main menu Tools / Rescan FPC Source Directory to reread the compiler output. > Any clue why 'fpc' is not defined according to the codetools? Open unit variants in source editor. Main menu / Source / Unit information / Show Codetools defines In "Values" you should see a lot of defines, like VER3_1_1 and FPC. Mattias From joost at cnoc.nl Wed Jun 14 10:22:48 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Wed, 14 Jun 2017 10:22:48 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: <20170614100919.689336a0@limapholos.matflo.wg> References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> <3363c407-5d62-b929-4195-f0fe78dadb92@cnoc.nl> <20170614100919.689336a0@limapholos.matflo.wg> Message-ID: Op 14-06-17 om 10:09 schreef Mattias Gaertner via Lazarus: > On Tue, 13 Jun 2017 23:05:03 +0200 >> >> But when showed in Lazarus, {$MODE objfpc} is grayed out. So Lazarus >> does not detect that FPC is defined... >> >> In the defines-editor, I do see the FPC-define, but I don't see any >> value. Is that normal? > > No. The macro FPC comes from reading the compiler output. > Try main menu > Tools / Rescan FPC Source Directory > to reread the compiler output. > >> Any clue why 'fpc' is not defined according to the codetools? > > Open unit variants in source editor. > Main menu / Source / Unit information / Show Codetools defines > In "Values" you should see a lot of defines, like VER3_1_1 and FPC. Fixed, not in Lazarus, but fpc. Why is it, that when I (working mostly on fpc) discover Lazarus-bugs, they almost always appear to be fpc-issues? One would thing I should be able to recognize and handle fpc-bugs... ;) Regards, Joost. From nc-gaertnma at netcologne.de Wed Jun 14 10:29:22 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 14 Jun 2017 10:29:22 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> <3363c407-5d62-b929-4195-f0fe78dadb92@cnoc.nl> <20170614100919.689336a0@limapholos.matflo.wg> Message-ID: <20170614102922.19b54f7b@limapholos.matflo.wg> On Wed, 14 Jun 2017 10:22:48 +0200 Joost van der Sluis via Lazarus wrote: >[...] > Fixed, not in Lazarus, but fpc. > > Why is it, that when I (working mostly on fpc) discover Lazarus-bugs, > they almost always appear to be fpc-issues? Lazarus is a good test suite for fpc. > One would thing I should be able to recognize and handle fpc-bugs... ;) May I ask what the bug was? Mattias From joost at cnoc.nl Wed Jun 14 10:44:35 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Wed, 14 Jun 2017 10:44:35 +0200 Subject: [Lazarus] Codetools in distress In-Reply-To: <20170614102922.19b54f7b@limapholos.matflo.wg> References: <9b4b3764-50b8-3912-659c-e0b106834378@kluug.net> <3363c407-5d62-b929-4195-f0fe78dadb92@cnoc.nl> <20170614100919.689336a0@limapholos.matflo.wg> <20170614102922.19b54f7b@limapholos.matflo.wg> Message-ID: <802cb758-da9a-2c27-1fef-8beebc91a16e@cnoc.nl> Op 14-06-17 om 10:29 schreef Mattias Gaertner via Lazarus: > On Wed, 14 Jun 2017 10:22:48 +0200 > Joost van der Sluis via Lazarus wrote: > >> [...] >> Fixed, not in Lazarus, but fpc. >> >> Why is it, that when I (working mostly on fpc) discover Lazarus-bugs, >> they almost always appear to be fpc-issues? > > Lazarus is a good test suite for fpc. > > >> One would thing I should be able to recognize and handle fpc-bugs... ;) > > May I ask what the bug was? It's fixed in r36498 by Nikolay. It was a bug in the widestring-handling which was already there, but was hidden and got exposed by a recent change in the codepage-handling. As a result #0-characters were added to fpc's output. Lazarus' parser got confused by that. (It uses pchar's, which considered the #0 characters the end of a line) Regards, Joost. From aaa5500 at ya.ru Wed Jun 14 11:02:34 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 14 Jun 2017 12:02:34 +0300 Subject: [Lazarus] Res leaks on exiting gtk2 app Message-ID: CudaText app, gtk2 WS. I run it from terminal, it loads dir to Treeview [only top level of /usr], i exit. user at user-Notebook:~$ cudatext /usr CudaText: opening dir: /usr [TGtk2WidgetSet.Destroy] WARNING: There are 4 unreleased DCs, a detailed dump follows: [TGtk2WidgetSet.Destroy] DCs: 00007F15EAEC7E40 00007F15EAEC5640 00007F15EAEC5440 00007F15EAEC5040 [TGtk2WidgetSet.Destroy] WARNING: There are 19 unreleased GDIObjects, a detailed dump follows: [TGtk2WidgetSet.Destroy] GDIOs: 00007F15E9A73540 00007F15E9A735C0 00007F15E9A73740 00007F15E9A734C0 00007F15E9A73EC0 00007F15E9A73E40 00007F15E9A73B40 [TGtk2WidgetSet.Destroy] gdiBitmap: 14 [TGtk2WidgetSet.Destroy] gdiBrush: 2 [TGtk2WidgetSet.Destroy] gdiPen: 2 [TGtk2WidgetSet.Destroy] gdiRegion: 1 user at user-Notebook:~$ -- Regards, Alexey From aaa5500 at ya.ru Wed Jun 14 11:06:56 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 14 Jun 2017 12:06:56 +0300 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: References: Message-ID: <0366f4c7-d157-fccf-e133-991ffb3c26e3@ya.ru> [TGtk2WidgetSet.Destroy] WARNING: There are 19 unreleased GDIObjects, a detailed dump follows: I see I have 19 icons in app, in 3..4 ImageLists. so all icons from Imagelists leaked? ImageLists placed in design time. They must free by LCL. -- Regards, Alexey From nc-gaertnma at netcologne.de Wed Jun 14 11:14:06 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 14 Jun 2017 11:14:06 +0200 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: References: Message-ID: <20170614111406.0eb69e4f@limapholos.matflo.wg> On Wed, 14 Jun 2017 12:02:34 +0300 Alexey via Lazarus wrote: > CudaText app, gtk2 WS. I run it from terminal, it loads dir to Treeview > [only top level of /usr], i exit. Why do you think this is a bug in the LCL, and not in cudatext? > user at user-Notebook:~$ cudatext /usr > CudaText: opening dir: /usr > [TGtk2WidgetSet.Destroy] WARNING: There are 4 unreleased DCs, a detailed > dump follows: Mattias From aaa5500 at ya.ru Wed Jun 14 11:25:52 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 14 Jun 2017 12:25:52 +0300 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: <20170614111406.0eb69e4f@limapholos.matflo.wg> References: <20170614111406.0eb69e4f@limapholos.matflo.wg> Message-ID: On 14.06.2017 12:14, Mattias Gaertner via Lazarus wrote: > Why do you think this is a bug in the LCL, and not in cudatext? I wrote that I have 4 imagelists with 19 icons [imagelists created in design time, icons load some in runtume, some in design time], and 19 objects leak. -- Regards, Alexey From nc-gaertnma at netcologne.de Wed Jun 14 11:38:55 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 14 Jun 2017 11:38:55 +0200 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: References: <20170614111406.0eb69e4f@limapholos.matflo.wg> Message-ID: <20170614113855.07e41032@limapholos.matflo.wg> On Wed, 14 Jun 2017 12:25:52 +0300 Alexey via Lazarus wrote: > On 14.06.2017 12:14, Mattias Gaertner via Lazarus wrote: > > Why do you think this is a bug in the LCL, and not in cudatext? > > I wrote that I have 4 imagelists with 19 icons [imagelists created in > design time, icons load some in runtume, some in design time], and 19 > objects leak. Please test if you can reproduce this in a small project. If yes, please create a bug report. Mattias From michael at freepascal.org Wed Jun 14 11:42:41 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 14 Jun 2017 11:42:41 +0200 (CEST) Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: <20170614111406.0eb69e4f@limapholos.matflo.wg> References: <20170614111406.0eb69e4f@limapholos.matflo.wg> Message-ID: On Wed, 14 Jun 2017, Mattias Gaertner via Lazarus wrote: > On Wed, 14 Jun 2017 12:02:34 +0300 > Alexey via Lazarus wrote: > >> CudaText app, gtk2 WS. I run it from terminal, it loads dir to Treeview >> [only top level of /usr], i exit. > > Why do you think this is a bug in the LCL, and not in cudatext? Well, seeing it is GTK2, for example I consistently get this when exiting the IDE: TApplication.HandleException Access violation Stack trace: $0000000000000000 $000000000062406E line 69 of include/toolbutton.inc $0000000000623FF6 line 116 of include/toolbutton.inc $00000000005B3468 line 2278 of include/control.inc $00000000005B38F1 line 2416 of include/control.inc $00000000004369E2 line 602 of ../inc/objpas.inc $00000000005B336D line 2238 of include/control.inc $00000000005B19F6 line 1560 of include/control.inc $00000000005A486C line 4734 of include/wincontrol.inc $00000000005A5EA1 line 5361 of include/wincontrol.inc $000000000077341C line 112 of lclmessageglue.pas $000000000066D0A1 line 3702 of gtk2/gtk2proc.inc $000000000067BDE9 line 2141 of gtk2/gtk2callback.inc $000000000067B4D8 line 1899 of gtk2/gtk2callback.inc $00007F74A6B9BAFC Exception at 0000000000000000: EAccessViolation: Access violation. (lazarus:12951): GLib-GObject-CRITICAL **: g_object_get_data: assertion 'G_IS_OBJECT (object)' failed TApplication.HandleException Access violation Stack trace: $00000000004368BC line 539 of ../inc/objpas.inc $00000000004359E6 line 42 of ../inc/objpas.inc $000000000067B3F5 line 1767 of gtk2/gtk2callback.inc $000000000067B53E line 1914 of gtk2/gtk2callback.inc $00007F74A6B9BAFC Exception at 00000000004368BC: EAccessViolation: Access violation. LAZARUS END - cleaning up ... [FORMS.PP] ExceptionOccurred Sender=EAccessViolation Exception=Access violation Stack trace: $00007F74A6837820 TApplication.HandleException Access violation Stack trace: $00007F74A6837820 Exception at 00007F74A6837820: EAccessViolation: Access violation. From nc-gaertnma at netcologne.de Wed Jun 14 11:53:12 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 14 Jun 2017 11:53:12 +0200 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: References: <20170614111406.0eb69e4f@limapholos.matflo.wg> Message-ID: <20170614115312.534ef455@limapholos.matflo.wg> On Wed, 14 Jun 2017 11:42:41 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: > On Wed, 14 Jun 2017, Mattias Gaertner via Lazarus wrote: > > > On Wed, 14 Jun 2017 12:02:34 +0300 > > Alexey via Lazarus wrote: > > > >> CudaText app, gtk2 WS. I run it from terminal, it loads dir to Treeview > >> [only top level of /usr], i exit. > > > > Why do you think this is a bug in the LCL, and not in cudatext? > > Well, seeing it is GTK2, for example I consistently get this when exiting the IDE: > > TApplication.HandleException Access violation > Stack trace: > $0000000000000000 > $000000000062406E line 69 of include/toolbutton.inc This is apparently something else. It is normal to get unreleased DCs after an AV. Can you create a full stack trace with gdb and open another mail thread? Mattias From el.es.cr at gmail.com Wed Jun 14 12:12:11 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Wed, 14 Jun 2017 11:12:11 +0100 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? Message-ID: Hi, I have a TThread, that processes a T(Thread)List of TSomeClass objects continuously. I want to have a callback in the TSomeClass, to which another class can put their procedure to call into, but the callback needs to be 'thread safe' (because it can be accessed (read) by GUI related elements). I tried like this: TSomeClass = class private ... // other variables/fields public class var ProcessedCallback : TThreadMethod; var ... //other variavbles procedure Processed; end; procedure TSomeClass.Processed; begin if Assigned(ProcessedCallback) then ProcessedCallback(); end; and in the TMyThread I am trying to do var SomeClassList : TThreadList; // is declared private to the thread - only the thread manages the lifetime of the list members procedure TMyThread.Execute; var SomeClassLockedList: TList; begin i := 0; while not Terminated do begin if SomeClassList.Count = 0 then begin sleep(10); continue; end; SomeClassLockedList := SomeClassList.LockedList; // there are try/excepts around all here, but did not want to muddle the picture Queue(TSomeClass(SomeClassLockedList.Items[i]).Processed); // but above here I'm getting an error : got 'untyped', expected 'procedure variable type of object;Register'. SomeClassList.UnlockList; i := i+1; end; end; // the above sort-of gives the gist of what I'm trying to achieve What am I doing wrong ? Does the procedure to be enqueued have to be declared in the TThread header ? Hope some of it makes (any) sense ... Thanks in advance, -L. From aaa5500 at ya.ru Wed Jun 14 12:30:03 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 14 Jun 2017 13:30:03 +0300 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: <20170614113855.07e41032@limapholos.matflo.wg> References: <20170614111406.0eb69e4f@limapholos.matflo.wg> <20170614113855.07e41032@limapholos.matflo.wg> Message-ID: <25120635-c496-77f8-96ad-b8817906a637@ya.ru> On 14.06.2017 12:38, Mattias Gaertner via Lazarus wrote: > reproduce this in a small project. Cannot repeat it : event with my custom controls and Python. Leak is here only after i open folder in Cudatext [it calls Python engine to load filelist and show it in Treeview]. -- Regards, Alexey From nc-gaertnma at netcologne.de Wed Jun 14 12:33:25 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 14 Jun 2017 12:33:25 +0200 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: References: Message-ID: <20170614123325.7f2599e5@limapholos.matflo.wg> On Wed, 14 Jun 2017 11:12:11 +0100 Lukasz Sokol via Lazarus wrote: >[...] > SomeClassLockedList := SomeClassList.LockedList; // there are try/excepts around all here, but did not want to muddle the picture > Queue(TSomeClass(SomeClassLockedList.Items[i]).Processed); Queue(@TSomeClass(SomeClassLockedList.Items[i]).Processed); ^ Mattias From el.es.cr at gmail.com Wed Jun 14 15:01:09 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Wed, 14 Jun 2017 14:01:09 +0100 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: <20170614123325.7f2599e5@limapholos.matflo.wg> References: <20170614123325.7f2599e5@limapholos.matflo.wg> Message-ID: On 14/06/17 11:33, Mattias Gaertner via Lazarus wrote: > On Wed, 14 Jun 2017 11:12:11 +0100 > Lukasz Sokol via Lazarus wrote: > >> [...] >> SomeClassLockedList := SomeClassList.LockedList; // there are try/excepts around all here, but did not want to muddle the picture >> Queue(TSomeClass(SomeClassLockedList.Items[i]).Processed); > > Queue(@TSomeClass(SomeClassLockedList.Items[i]).Processed); > ^ > > Mattias > Thanks! looks so easy in hindsight ;) same the callbacks need to be assigned with the @ in front :) -L. From andrea.mauri.75 at gmail.com Thu Jun 15 14:17:48 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Thu, 15 Jun 2017 14:17:48 +0200 Subject: [Lazarus] suggestion for Mac for Lazarus application deployment Message-ID: <097d3297-b19b-7bf2-fff8-c8f72fbb2aca@gmail.com> Dear all, I would like to deploy one of my lazarus application for Mac too. Actually I have both windows and linux version but I have some requests from Mac users. I am going to buy a Mac but since I never used a Mac I would like to ask you if you have any suggestion, which Mac should I choose? I hope it is not too OT. Thanks in advance. Andrea From andrea.mauri.75 at gmail.com Thu Jun 15 14:19:50 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Thu, 15 Jun 2017 14:19:50 +0200 Subject: [Lazarus] LCL on Mac 64 bit Message-ID: Dear all, I noticed that LCL applications can be built on Mac only for 32 and not 64. Will be 64 and LCL available in the future? Any roadmap? Thanks, Andrea From mlnglsts at bgss.hu Thu Jun 15 14:43:37 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Thu, 15 Jun 2017 14:43:37 +0200 Subject: [Lazarus] fixes_1_8 - What happened with default width of DBGrid's columns? Message-ID: Hi All, I switched from revision 54808 to 55332 and got different default column widths. Reported as bug. I hope Ondrej fix it ASAP. https://bugs.freepascal.org/view.php?id=32021 Gabor From nc-gaertnma at netcologne.de Thu Jun 15 15:03:09 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Jun 2017 15:03:09 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: References: Message-ID: <20170615150309.07ebfb25@limapholos.matflo.wg> On Thu, 15 Jun 2017 14:19:50 +0200 Andrea Mauri via Lazarus wrote: > Dear all, > > I noticed that LCL applications can be built on Mac only for 32 and not > 64. Will be 64 and LCL available in the future? Any roadmap? The Mac native 64bit API is Cocoa and it exists for the LCL. It is missing some feature though. Maybe Felipe can tell more details. Alternatively you can use qt, which is pretty complete, but requires to install the qt libraries to run the application. Mattias From lazarus at kluug.net Thu Jun 15 15:03:00 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 15 Jun 2017 15:03:00 +0200 Subject: [Lazarus] fixes_1_8 - What happened with default width of DBGrid's columns? In-Reply-To: References: Message-ID: <9ddfed10-dd63-b18a-2ead-a7332cf7ffec@kluug.net> On 15.06.2017 14:43, Gabor Boros via Lazarus wrote: > I switched from revision 54808 to 55332 and got different default > column widths. Reported as bug. I hope Ondrej fix it ASAP. ASAP is a loose time definition but the fix should happen for RC3. Ondrej From nc-gaertnma at netcologne.de Thu Jun 15 15:35:55 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Jun 2017 15:35:55 +0200 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: <25120635-c496-77f8-96ad-b8817906a637@ya.ru> References: <20170614111406.0eb69e4f@limapholos.matflo.wg> <20170614113855.07e41032@limapholos.matflo.wg> <25120635-c496-77f8-96ad-b8817906a637@ya.ru> Message-ID: <20170615153555.47399764@limapholos.matflo.wg> On Wed, 14 Jun 2017 13:30:03 +0300 Alexey via Lazarus wrote: > On 14.06.2017 12:38, Mattias Gaertner via Lazarus wrote: > > reproduce this in a small project. > > Cannot repeat it : event with my custom controls and Python. Leak is > here only after i open folder in Cudatext [it calls Python engine to > load filelist and show it in Treeview]. If you can't provide a simple example, then you must debug it yourself. Check if the imagelist is freed. Mattias From coppolastudio at gmail.com Thu Jun 15 16:27:36 2017 From: coppolastudio at gmail.com (coppolastudio) Date: Thu, 15 Jun 2017 16:27:36 +0200 Subject: [Lazarus] FPC deb Message-ID: An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Thu Jun 15 16:38:03 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 15 Jun 2017 17:38:03 +0300 Subject: [Lazarus] FPC deb In-Reply-To: References: Message-ID: On Thursday, June 15, 2017, coppolastudio via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Hi, I want to try Lazarus RC and as usually i was trying to install the > package FPC 3.0.2 deb but failed because offline an old FPC in the Mint > lmde repos, is there a way ti solve this? > The one from Mint repos must be uninstalled first obviously. Mint had some extra problems with FPC / Lazarus .deb packages, I don't remember details. A certain way to install FPC is to use the project's script. Then get Lazarus from fixes_1_8 branch and build. Another good way is to use a rolling distro which has the latest version of FPC. No hassle. Recommended! Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Thu Jun 15 16:44:04 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Jun 2017 16:44:04 +0200 Subject: [Lazarus] FPC deb In-Reply-To: References: Message-ID: <20170615164404.2863c530@limapholos.matflo.wg> On Thu, 15 Jun 2017 16:27:36 +0200 coppolastudio via Lazarus wrote: > Hi, I want to try Lazarus RC and as  usually i was trying to install the package FPC 3.0.2 deb but failed because offline an old FPC in the Mint lmde repos, is there a way ti solve this? Do you have an error message? Mattias From andrea.mauri.75 at gmail.com Thu Jun 15 17:07:06 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Thu, 15 Jun 2017 17:07:06 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: <20170615150309.07ebfb25@limapholos.matflo.wg> References: <20170615150309.07ebfb25@limapholos.matflo.wg> Message-ID: <4f1785d3-76f4-efc9-a1ee-0fb55e22a01e@gmail.com> > > The Mac native 64bit API is Cocoa and it exists for the LCL. > It is missing some feature though. Maybe Felipe can tell more details. > > Alternatively you can use qt, which is pretty complete, but requires > to install the qt libraries to run the application. What about the sentence: Mac OS X: 10.5 to 10.12, LCL only 32bit, non LCL apps can be 64bit. I misunderstood something? Andrea From coppolastudio at gmail.com Thu Jun 15 17:15:55 2017 From: coppolastudio at gmail.com (coppolastudio) Date: Thu, 15 Jun 2017 17:15:55 +0200 Subject: [Lazarus] FPC deb References: <20170615164404.2863c530@limapholos.matflo.wg> Message-ID: An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Thu Jun 15 17:19:38 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Jun 2017 17:19:38 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: <4f1785d3-76f4-efc9-a1ee-0fb55e22a01e@gmail.com> References: <20170615150309.07ebfb25@limapholos.matflo.wg> <4f1785d3-76f4-efc9-a1ee-0fb55e22a01e@gmail.com> Message-ID: <20170615171938.59625846@limapholos.matflo.wg> On Thu, 15 Jun 2017 17:07:06 +0200 Andrea Mauri via Lazarus wrote: > > > > The Mac native 64bit API is Cocoa and it exists for the LCL. > > It is missing some feature though. Maybe Felipe can tell more details. > > > > Alternatively you can use qt, which is pretty complete, but requires > > to install the qt libraries to run the application. > > What about the sentence: > > Mac OS X: > 10.5 to 10.12, LCL only 32bit, non LCL apps can be 64bit. > > I misunderstood something? When the IDE runs on Cocoa we will change it. Was that your question? Mattias From coppolastudio at gmail.com Thu Jun 15 17:22:03 2017 From: coppolastudio at gmail.com (coppolastudio) Date: Thu, 15 Jun 2017 17:22:03 +0200 Subject: [Lazarus] FPC deb References: Message-ID: An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Thu Jun 15 17:26:56 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Jun 2017 17:26:56 +0200 Subject: [Lazarus] FPC deb In-Reply-To: References: Message-ID: <20170615172656.6cfaf920@limapholos.matflo.wg> On Thu, 15 Jun 2017 16:27:36 +0200 coppolastudio via Lazarus wrote: > Hi, I want to try Lazarus RC and as  usually i was trying to install the package FPC 3.0.2 deb but failed because offline an old FPC in the Mint lmde repos, is there a way ti solve this? You might try fpc 3.0.3 from Lazarus 1.8RC2. Mattias From andrea.mauri.75 at gmail.com Thu Jun 15 17:36:02 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Thu, 15 Jun 2017 17:36:02 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: <20170615171938.59625846@limapholos.matflo.wg> References: <20170615150309.07ebfb25@limapholos.matflo.wg> <4f1785d3-76f4-efc9-a1ee-0fb55e22a01e@gmail.com> <20170615171938.59625846@limapholos.matflo.wg> Message-ID: <68611eb5-860f-c59c-7fae-d56420f8c8df@gmail.com> > > When the IDE runs on Cocoa we will change it. Was that your question? I would like to know if it is possible to build LCL 64 bit application on MacOSX with lazarus (eventually which version?). If not, if there is temptative scheduling for that. Andrea From lazarus at kluug.net Thu Jun 15 17:53:47 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 15 Jun 2017 17:53:47 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: <20170615171938.59625846@limapholos.matflo.wg> References: <20170615150309.07ebfb25@limapholos.matflo.wg> <4f1785d3-76f4-efc9-a1ee-0fb55e22a01e@gmail.com> <20170615171938.59625846@limapholos.matflo.wg> Message-ID: <8bb2fa6d-8f9a-23e4-2efb-1c8146f20e26@kluug.net> On 15.06.2017 17:19, Mattias Gaertner via Lazarus wrote: > On Thu, 15 Jun 2017 17:07:06 +0200 > Andrea Mauri via Lazarus wrote: > >>> The Mac native 64bit API is Cocoa and it exists for the LCL. >>> It is missing some feature though. Maybe Felipe can tell more details. >>> >>> Alternatively you can use qt, which is pretty complete, but requires >>> to install the qt libraries to run the application. >> What about the sentence: >> >> Mac OS X: >> 10.5 to 10.12, LCL only 32bit, non LCL apps can be 64bit. >> >> I misunderstood something? > When the IDE runs on Cocoa we will change it. Was that your question? What about OSX 64bit with Qt5? I don't want to pinpoint unnecessarily, I am really interested - being in the same situation as Andrea. Ondrej From zeljko at holobit.net Thu Jun 15 18:08:12 2017 From: zeljko at holobit.net (zeljko) Date: Thu, 15 Jun 2017 18:08:12 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: <8bb2fa6d-8f9a-23e4-2efb-1c8146f20e26@kluug.net> References: <20170615150309.07ebfb25@limapholos.matflo.wg> <4f1785d3-76f4-efc9-a1ee-0fb55e22a01e@gmail.com> <20170615171938.59625846@limapholos.matflo.wg> <8bb2fa6d-8f9a-23e4-2efb-1c8146f20e26@kluug.net> Message-ID: On 06/15/2017 05:53 PM, Ondrej Pokorny via Lazarus wrote: > On 15.06.2017 17:19, Mattias Gaertner via Lazarus wrote: >> On Thu, 15 Jun 2017 17:07:06 +0200 >> Andrea Mauri via Lazarus wrote: >> >>>> The Mac native 64bit API is Cocoa and it exists for the LCL. >>>> It is missing some feature though. Maybe Felipe can tell more details. >>>> >>>> Alternatively you can use qt, which is pretty complete, but requires >>>> to install the qt libraries to run the application. >>> What about the sentence: >>> >>> Mac OS X: >>> 10.5 to 10.12, LCL only 32bit, non LCL apps can be 64bit. >>> >>> I misunderstood something? >> When the IDE runs on Cocoa we will change it. Was that your question? > > What about OSX 64bit with Qt5? I don't want to pinpoint unnecessarily, I > am really interested - being in the same situation as Andrea. Both qt4 and qt5 works as 64bit w/o problems. I'm using it for our mac apps (complete lazarus build is qtlcl 64bit). zeljko From lazarus at kluug.net Thu Jun 15 18:19:17 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 15 Jun 2017 18:19:17 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: References: <20170615150309.07ebfb25@limapholos.matflo.wg> <4f1785d3-76f4-efc9-a1ee-0fb55e22a01e@gmail.com> <20170615171938.59625846@limapholos.matflo.wg> <8bb2fa6d-8f9a-23e4-2efb-1c8146f20e26@kluug.net> Message-ID: <9ffd6a0b-dd4a-31a2-772a-02167d4e2f2e@kluug.net> On 15.06.2017 18:08, zeljko wrote: > Both qt4 and qt5 works as 64bit w/o problems. I'm using it for our > mac apps (complete lazarus build is qtlcl 64bit). This is great (and what I expected). We definitely should change the "10.5 to 10.12, LCL only 32bit, non LCL apps can be 64bit." information because it is misleading - especially for noninsiders. Ondrej From andrea.mauri.75 at gmail.com Thu Jun 15 18:20:40 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Thu, 15 Jun 2017 18:20:40 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: <9ffd6a0b-dd4a-31a2-772a-02167d4e2f2e@kluug.net> References: <20170615150309.07ebfb25@limapholos.matflo.wg> <4f1785d3-76f4-efc9-a1ee-0fb55e22a01e@gmail.com> <20170615171938.59625846@limapholos.matflo.wg> <8bb2fa6d-8f9a-23e4-2efb-1c8146f20e26@kluug.net> <9ffd6a0b-dd4a-31a2-772a-02167d4e2f2e@kluug.net> Message-ID: <7d580d21-ce95-beb4-cf38-213aaba0bba9@gmail.com> Il 15/06/2017 18:19, Ondrej Pokorny via Lazarus ha scritto: > On 15.06.2017 18:08, zeljko wrote: >> Both qt4 and qt5 works as 64bit w/o problems. I'm using it for our >> mac apps (complete lazarus build is qtlcl 64bit). Thanks! > > This is great (and what I expected). We definitely should change the > "10.5 to 10.12, LCL only 32bit, non LCL apps can be 64bit." information > because it is misleading - especially for noninsiders. > +1 > Ondrej From karl-michael.schindler at web.de Thu Jun 15 18:53:11 2017 From: karl-michael.schindler at web.de (Schindler Karl-Michael) Date: Thu, 15 Jun 2017 18:53:11 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: References: Message-ID: <0B6D56AA-C0EC-4A85-B0F5-712FB40B0F18@web.de> > Am 15.06.2017 um 17:36 schrieb lazarus-request at lists.lazarus-ide.org: > > Date: Thu, 15 Jun 2017 17:36:02 +0200 > From: Andrea Mauri > To: lazarus at lists.lazarus-ide.org > Subject: Re: [Lazarus] LCL on Mac 64 bit > Message-ID: <68611eb5-860f-c59c-7fae-d56420f8c8df at gmail.com> > Content-Type: text/plain; charset=utf-8; format=flowed > >> When the IDE runs on Cocoa we will change it. Was that your question? > > I would like to know if it is possible to build LCL 64 bit application > on MacOSX with lazarus (eventually which version?). If not, if there is > temptative scheduling for that. > > Andrea A simple question with a complex answer, because it depends on what features of the LCL your program is using. For a comparison, look here: http://wiki.freepascal.org/Roadmap The carbon-based LCL has probably the most features, but is 32-bit only. The cocoa-based LCL is 64-bit, but has much less features. This is the reason, why there is no cocoa based Lazarus. The Qt-based LCL is also 64-bit and has more features, but may not be considered 100% native, but i will come to that point later. Finally, with quite some effort you can use the 64-bit GTK2-based LCL, although that look is definitely not native. In any case, try the latest release version of Lazarus, 1.6.4 at the moment. Keep in mind that the 32-bit carbon-based Lazarus is capable to build and use any of the other LCLs. Using it only determines the default LCL. The effort to use one of the others has a wide range. Cocoa should be easy, Qt requires qt4pas and the Qt libraries, and for GTK2 you should take a package manager like Fink (my preference), MacPorts or Homebrew. I also want to note, that Lazarus does mainly take care of the look of the graphical elements. There is a marked difference between native look and native behavior. Lazarus does NOT take care of everything. Whether this is critical or not, depends on the expectations of your customers. Look here: http://wiki.freepascal.org/Multiplatform_Programming_Guide In general, Mac users appear to be more arrogant than users of other platforms, because they have a narrower expectation for native behavior. Some even show signs of allergy towards that particular smell of Windows 😉 Regarding the choice a specific Mac, any Mac should do it, since compiling with FreePascal is fast, unless your program is really very large. I hope this helps and doesn't stop you from trying. If your program is open source I could probably give it a try. Michael. From coppolastudio at gmail.com Thu Jun 15 21:54:02 2017 From: coppolastudio at gmail.com (Salvatore Coppola) Date: Thu, 15 Jun 2017 21:54:02 +0200 Subject: [Lazarus] FPC deb In-Reply-To: <20170615172656.6cfaf920@limapholos.matflo.wg> References: <20170615172656.6cfaf920@limapholos.matflo.wg> Message-ID: 2017-06-15 17:26 GMT+02:00 Mattias Gaertner via Lazarus < lazarus at lists.lazarus-ide.org>: > On Thu, 15 Jun 2017 16:27:36 +0200 > coppolastudio via Lazarus wrote: > > > Hi, I want to try Lazarus RC and as usually i was trying to install the > package FPC 3.0.2 deb but failed because offline an old FPC in the Mint > lmde repos, is there a way ti solve this? > > You might try fpc 3.0.3 from Lazarus 1.8RC2. > Already done, I don't think is related with your fpc package, I will ask on mint forum > > 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 wv99999 at gmail.com Fri Jun 16 09:12:31 2017 From: wv99999 at gmail.com (Wolf) Date: Fri, 16 Jun 2017 19:12:31 +1200 Subject: [Lazarus] Is this a bug? Message-ID: <594384DF.4070806@gmail.com> The following program produces these two memory leaks: Heap dump by heaptrc unit 2 memory blocks allocated : 188/208 0 memory blocks freed : 134/144 2 unfreed memory blocks : 54 True heap size : 32768 True free heap : 32320 Should be : 32448 Call trace for block $00007FFFF7FF31A0 size 27 Call trace for block $00007FFFF7FF30C0 size 27 If the call to "halt;" is commented out, there is no memory leak reported. Is this intentional? program TestBed; begin {run the program with this run parameter: FileToLoad -v -t -r=0.0001} write(ParamCount,' '); write(Sizeof(ParamStr(0)),' '); write(Length(ParamStr(0)),' '); writeln(ParamStr(0)); write(Sizeof(ParamStr(1)),' '); write(Length(ParamStr(1)),' '); writeln(ParamStr(1)); write(Sizeof(ParamStr(2)),' '); write(Length(ParamStr(2)),' '); writeln(ParamStr(2)); write(Sizeof(ParamStr(3)),' '); write(Length(ParamStr(3)),' '); writeln(ParamStr(3)); halt; // terminating with "halt" causes memory leaks end. // no memory leak The size of the unfreed memory blocks varies, if the one or the other of the program blocks are commented out. There is no discernible correlation (to me, at least) between them and the data they are supposed to store. Also, the total number of memory blocks allocated and later freed varies, the record observed so far is 11 blocks allocated. This apparently varies whenever my system is rebooted, and appears to have something to do with what else I am running / have been running. System: Kubuntu 16.4, Lazarus 1.6+dfsg-1 dated 2016-03-01, FPC 3.0.0 wolf From lazarus at kluug.net Fri Jun 16 09:25:24 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 16 Jun 2017 09:25:24 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: <594384DF.4070806@gmail.com> References: <594384DF.4070806@gmail.com> Message-ID: On 16.06.2017 9:12, Wolf via Lazarus wrote: > If the call to "halt;" is commented out, there is no memory leak > reported. Is this intentional? Yes, halt kills the program without finalizing anything. No code is executed afterwards. Everything that is allocated at the time Halt is executed results in a memory leak. Ondrej From nc-gaertnma at netcologne.de Fri Jun 16 09:33:25 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 16 Jun 2017 09:33:25 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: <594384DF.4070806@gmail.com> References: <594384DF.4070806@gmail.com> Message-ID: <20170616093325.5af9c286@limapholos.matflo.wg> On Fri, 16 Jun 2017 19:12:31 +1200 Wolf via Lazarus wrote: > The following program produces these two memory leaks: > > Heap dump by heaptrc unit > 2 memory blocks allocated : 188/208 > 0 memory blocks freed : 134/144 > 2 unfreed memory blocks : 54 > True heap size : 32768 > True free heap : 32320 > Should be : 32448 > Call trace for block $00007FFFF7FF31A0 size 27 > Call trace for block $00007FFFF7FF30C0 size 27 > > If the call to "halt;" is commented out, there is no memory leak > reported. Is this intentional? Yes. "Halt" immediately jump to the finalization sections. That means any try..finally sections are skipped, including the implicit frees for the temporary strings of your example. Mattias From nc-gaertnma at netcologne.de Fri Jun 16 09:33:54 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 16 Jun 2017 09:33:54 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: References: <594384DF.4070806@gmail.com> Message-ID: <20170616093354.6c70abdb@limapholos.matflo.wg> On Fri, 16 Jun 2017 09:25:24 +0200 Ondrej Pokorny via Lazarus wrote: > On 16.06.2017 9:12, Wolf via Lazarus wrote: > > If the call to "halt;" is commented out, there is no memory leak > > reported. Is this intentional? > > Yes, halt kills the program without finalizing anything. No code is > executed afterwards. Everything that is allocated at the time Halt is > executed results in a memory leak. Halt calls the finalization sections. Mattias From lazarus at kluug.net Fri Jun 16 09:38:18 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 16 Jun 2017 09:38:18 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: <20170616093354.6c70abdb@limapholos.matflo.wg> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> Message-ID: <2801d3c4-f7a4-fde3-988d-baff3731212c@kluug.net> On 16.06.2017 9:33, Mattias Gaertner via Lazarus wrote: > On Fri, 16 Jun 2017 09:25:24 +0200 > Ondrej Pokorny via Lazarus wrote: > >> On 16.06.2017 9:12, Wolf via Lazarus wrote: >>> If the call to "halt;" is commented out, there is no memory leak >>> reported. Is this intentional? >> Yes, halt kills the program without finalizing anything. No code is >> executed afterwards. Everything that is allocated at the time Halt is >> executed results in a memory leak. > Halt calls the finalization sections. Uppps. Thanks for the correction. Ondrej From wv99999 at gmail.com Fri Jun 16 10:36:54 2017 From: wv99999 at gmail.com (Wolf) Date: Fri, 16 Jun 2017 20:36:54 +1200 Subject: [Lazarus] Is this a bug? In-Reply-To: <20170616093354.6c70abdb@limapholos.matflo.wg> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> Message-ID: <594398A6.6080808@gmail.com> Now I am nicely confused: If halt does call finalization sections, isn't then all heap space requested by the system unit supposed to be freed as well? I do have observed at times that some, and sometimes even all heap space requested by the system unit, does get freed when calling halt. So, what does this program show? Expected behavior that should not be changed, or is it unexpected behavior that ought to be reported and changed? wolf On 16/06/17 19:33, Mattias Gaertner via Lazarus wrote: > On Fri, 16 Jun 2017 09:25:24 +0200 > Ondrej Pokorny via Lazarus wrote: > >> On 16.06.2017 9:12, Wolf via Lazarus wrote: >>> If the call to "halt;" is commented out, there is no memory leak >>> reported. Is this intentional? >> Yes, halt kills the program without finalizing anything. No code is >> executed afterwards. Everything that is allocated at the time Halt is >> executed results in a memory leak. > Halt calls the finalization sections. > > Mattias From andrea.mauri.75 at gmail.com Fri Jun 16 10:42:47 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Fri, 16 Jun 2017 10:42:47 +0200 Subject: [Lazarus] LCL on Mac 64 bit In-Reply-To: <0B6D56AA-C0EC-4A85-B0F5-712FB40B0F18@web.de> References: <0B6D56AA-C0EC-4A85-B0F5-712FB40B0F18@web.de> Message-ID: <6c7e5b0b-9887-89cc-5e40-e2affb84dc24@gmail.com> > > I hope this helps and doesn't stop you from trying. > > If your program is open source I could probably give it a try. > > Michael. > Thanks Michael. Unfortunately my application is a commercial application with closed source, anyway I will try for sure! Andrea From nc-gaertnma at netcologne.de Fri Jun 16 10:47:16 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 16 Jun 2017 10:47:16 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: <594398A6.6080808@gmail.com> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> <594398A6.6080808@gmail.com> Message-ID: <20170616104716.4149d8b9@limapholos.matflo.wg> On Fri, 16 Jun 2017 20:36:54 +1200 Wolf via Lazarus wrote: > Now I am nicely confused: If halt does call finalization sections, isn't > then all heap space requested by the system unit supposed to be freed as > well? The system unit is special. It is loaded even before the heap manager is initialized. Heaptrc does not report memory of the system unit. Heaptrc reports allocations after its initialization, which is usually right after the system unit. Mattias From mailinglists at geldenhuys.co.uk Fri Jun 16 10:55:39 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 16 Jun 2017 09:55:39 +0100 Subject: [Lazarus] suggestion for Mac for Lazarus application deployment In-Reply-To: <097d3297-b19b-7bf2-fff8-c8f72fbb2aca@gmail.com> References: <097d3297-b19b-7bf2-fff8-c8f72fbb2aca@gmail.com> Message-ID: <052b3ed0-f50f-0e0f-298f-f70b3832afdf@geldenhuys.co.uk> On 2017-06-15 13:17, Andrea Mauri via Lazarus wrote: > I am going to buy a Mac but since I never used a Mac I would like to ask > you if you have any suggestion, which Mac should I choose? Do you need portable computing, or always working from the same desk? Portable computing: Macbook Pro Rentia would be my choice. Desktop working: iMac 5K (if you have the budget). My wife has one and the screen is gorgeous. Otherwise a normal iMac should do nicely. If your desk is already quite full, then maybe a Mac Mini is the best option with a KVM switch (to share the keyboard, monitor and mouse). 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 wv99999 at gmail.com Fri Jun 16 11:43:38 2017 From: wv99999 at gmail.com (Wolf) Date: Fri, 16 Jun 2017 21:43:38 +1200 Subject: [Lazarus] Is this a bug? In-Reply-To: <20170616104716.4149d8b9@limapholos.matflo.wg> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> <594398A6.6080808@gmail.com> <20170616104716.4149d8b9@limapholos.matflo.wg> Message-ID: <5943A84A.5090804@gmail.com> If I understand you correctly, because 1. command line parameters are internally treated as a null-terminated string (i.e. AnsiString), a call to ParamStr() implies a heap allocation and thus, 2. since ParamStr() is handled by the system unit, a call to halt will result in a memory leak because Heaptrc is not aware of this allocation. If this is correct, then the conclusion has to be that Heaptrc cannot be trusted as a debugging tool because it is ill-informed about what the system unit is up to. wolf (rather disillusioned) On 16/06/17 20:47, Mattias Gaertner via Lazarus wrote: > On Fri, 16 Jun 2017 20:36:54 +1200 > Wolf via Lazarus wrote: > >> Now I am nicely confused: If halt does call finalization sections, isn't >> then all heap space requested by the system unit supposed to be freed as >> well? > The system unit is special. It is loaded even before the heap manager > is initialized. Heaptrc does not report memory of the system unit. > > Heaptrc reports allocations after its initialization, which is > usually right after the system unit. > > > Mattias From joost at cnoc.nl Fri Jun 16 13:27:13 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Fri, 16 Jun 2017 13:27:13 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: <5943A84A.5090804@gmail.com> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> <594398A6.6080808@gmail.com> <20170616104716.4149d8b9@limapholos.matflo.wg> <5943A84A.5090804@gmail.com> Message-ID: On 06/16/2017 11:43 AM, Wolf via Lazarus wrote: > If I understand you correctly, because > 2. since ParamStr() is handled by the system unit, a call to halt will > result in a memory leak because Heaptrc is not aware of this allocation. Only the initialization of the system-unit is done before the heap-manager is in place. So this is no issue. The memory being allocated for the commandline and it's parameters itself is system-specific. If there is any memory allocated at all. > If this is correct, then the conclusion has to be that Heaptrc cannot be > trusted as a debugging tool because it is ill-informed about what the > system unit is up to. Heaptrace is a great debugging-tool. Debugging-tools give you more information to help you find problems. But they can never be trusted. The same holds for any debugger, btw. The part about the system-unit is incorrect. (See above) Calling Halt(), is, well... dangerous. On the other hand you should not care about memory-leaks on application exit. But I can imagine that it obfuscates things when you are searching for real memory-leaks. Try to place your code in a 'try .. finally' block, and call Halt() thereafter. Of even better, in a procedure, and halt after the procedure-call. You have probably problems with implicit try-finally sections, as Mattias pointed out. You can also investigate this by looking at the created assembly. (fpc -an) Regards, Joost. > wolf (rather disillusioned) > > On 16/06/17 20:47, Mattias Gaertner via Lazarus wrote: >> On Fri, 16 Jun 2017 20:36:54 +1200 >> Wolf via Lazarus wrote: >> >>> Now I am nicely confused: If halt does call finalization sections, isn't >>> then all heap space requested by the system unit supposed to be freed as >>> well? >> The system unit is special. It is loaded even before the heap manager >> is initialized. Heaptrc does not report memory of the system unit. >> >> Heaptrc reports allocations after its initialization, which is >> usually right after the system unit. >> >> >> Mattias > From nc-gaertnma at netcologne.de Fri Jun 16 13:27:31 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 16 Jun 2017 13:27:31 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: <5943A84A.5090804@gmail.com> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> <594398A6.6080808@gmail.com> <20170616104716.4149d8b9@limapholos.matflo.wg> <5943A84A.5090804@gmail.com> Message-ID: <20170616132731.6c7e1a71@limapholos.matflo.wg> On Fri, 16 Jun 2017 21:43:38 +1200 Wolf via Lazarus wrote: > If I understand you correctly, because > 1. command line parameters are internally treated as a null-terminated > string (i.e. AnsiString), a call to ParamStr() implies a heap allocation > and thus, > 2. since ParamStr() is handled by the system unit, a call to halt will > result in a memory leak because Heaptrc is not aware of this allocation. No, that's not how temporary strings work. Just move the code in front of your halt into a separate procedure and the mem leaks are gone. The compiler creates an implicit try..finally to free managed types and since Halt skips the finally parts the strings are not freed. > If this is correct, then the conclusion has to be that Heaptrc cannot be > trusted as a debugging tool because it is ill-informed about what the > system unit is up to. Nonsense. This is neither specific to the system unit nor heaptrc. The conclusion is that must not use Halt, when you need try..finally. Mattias From wv99999 at gmail.com Fri Jun 16 22:58:42 2017 From: wv99999 at gmail.com (Wolf) Date: Sat, 17 Jun 2017 08:58:42 +1200 Subject: [Lazarus] Is this a bug? In-Reply-To: <20170616132731.6c7e1a71@limapholos.matflo.wg> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> <594398A6.6080808@gmail.com> <20170616104716.4149d8b9@limapholos.matflo.wg> <5943A84A.5090804@gmail.com> <20170616132731.6c7e1a71@limapholos.matflo.wg> Message-ID: <59444682.7000107@gmail.com> Thanks, Mattias and Joost, now I understand the real bug is in my assumptions on what goes on behind the screens. But that leads to another question: is there any documentation where I can read up on this so that I may improve on my programming, and particular debugging, skills? wolf On 16/06/17 23:27, Mattias Gaertner via Lazarus wrote: > On Fri, 16 Jun 2017 21:43:38 +1200 > Wolf via Lazarus wrote: > >> If I understand you correctly, because >> 1. command line parameters are internally treated as a null-terminated >> string (i.e. AnsiString), a call to ParamStr() implies a heap allocation >> and thus, >> 2. since ParamStr() is handled by the system unit, a call to halt will >> result in a memory leak because Heaptrc is not aware of this allocation. > No, that's not how temporary strings work. > > Just move the code in front of your halt into a separate procedure and > the mem leaks are gone. > > The compiler creates an implicit try..finally to free managed types > and since Halt skips the finally parts the strings are not freed. > > >> If this is correct, then the conclusion has to be that Heaptrc cannot be >> trusted as a debugging tool because it is ill-informed about what the >> system unit is up to. > Nonsense. This is neither specific to the system unit nor heaptrc. > The conclusion is that must not use Halt, when you need try..finally. > > > Mattias From el.es.cr at gmail.com Sat Jun 17 22:25:58 2017 From: el.es.cr at gmail.com (el es) Date: Sat, 17 Jun 2017 21:25:58 +0100 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: References: <20170614123325.7f2599e5@limapholos.matflo.wg> Message-ID: Hindsight, schmindsight, but here is another question: Where does the call queued from a thread, return to ? As in, the thread calls Queue() on a method of the object we're interested in; and that in turn calls a method / procedure more like / from the 'main form' unit. The object's lifetime is controlled by the dedicated thread (meaning only one thread is allowed to Free() it); But when, during the course of Queue()d callback, I FreeAndNil() the object that had the pointer to the callback procedure, I get SIGSEGV pointing at CheckSynchronize in Application. (address F0F0F0F0). I guess, easiest way to avoid this, is 'don't do that', so i did, and the SIGSEGV went away. Hence the question is, how can I know it is safe to free the object, that has the callback subscribed to it? One of the ways would be, to have a flag in that object, that the callback proc will set, and so the thread will know it's now safe to Free(andNil)() it. But are there any other, better? Thanks in advance, -L. On 14-Jun-17 14:01, Lukasz Sokol via Lazarus wrote: > On 14/06/17 11:33, Mattias Gaertner via Lazarus wrote: >> On Wed, 14 Jun 2017 11:12:11 +0100 >> Lukasz Sokol via Lazarus wrote: >> >>> [...] >>> SomeClassLockedList := SomeClassList.LockedList; // there are try/excepts around all here, but did not want to muddle the picture >>> Queue(TSomeClass(SomeClassLockedList.Items[i]).Processed); >> >> Queue(@TSomeClass(SomeClassLockedList.Items[i]).Processed); >> ^ >> >> Mattias >> > > Thanks! looks so easy in hindsight ;) same the callbacks need to be assigned with the @ in front :) > > -L. > From joost at cnoc.nl Sun Jun 18 00:07:30 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Sun, 18 Jun 2017 00:07:30 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: <59444682.7000107@gmail.com> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> <594398A6.6080808@gmail.com> <20170616104716.4149d8b9@limapholos.matflo.wg> <5943A84A.5090804@gmail.com> <20170616132731.6c7e1a71@limapholos.matflo.wg> <59444682.7000107@gmail.com> Message-ID: <7ea3ea38-0b9e-8bb0-ba1f-23994a84e6de@cnoc.nl> Op 16-06-17 om 22:58 schreef Wolf via Lazarus: > now I understand the real bug is in my assumptions on what goes on > behind the screens. But that leads to another question: is there any > documentation where I can read up on this so that I may improve on my > programming, and particular debugging, skills? Well, it's not that this behavior is hidden. It's even documented: https://www.freepascal.org/docs-html/ref/refch17.html. So you could read the pure documentation.... There's also a wiki about this issue: http://wiki.freepascal.org/Avoiding_implicit_try_finally_section But I doubt that this is what you meant. You asked this on the Lazarus-list, but this is more a question for the fpc-pascal list. What you could do is follow this list, or maybe even fpc-devel. You can also browse the archives. You can learn a lot from there. Regards, Joost. From joost at cnoc.nl Sat Jun 17 14:36:32 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Sat, 17 Jun 2017 14:36:32 +0200 Subject: [Lazarus] Is this a bug? In-Reply-To: <59444682.7000107@gmail.com> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> <594398A6.6080808@gmail.com> <20170616104716.4149d8b9@limapholos.matflo.wg> <5943A84A.5090804@gmail.com> <20170616132731.6c7e1a71@limapholos.matflo.wg> <59444682.7000107@gmail.com> Message-ID: <54c9dfea-4561-67bb-efbe-4b32ad851d43@cnoc.nl> Op 16-06-17 om 22:58 schreef Wolf via Lazarus: > now I understand the real bug is in my assumptions on what goes on > behind the screens. But that leads to another question: is there any > documentation where I can read up on this so that I may improve on my > programming, and particular debugging, skills? Well, it's not that this behavior is hidden. It's even documented: https://www.freepascal.org/docs-html/ref/refch17.html. So you could read the pure documentation.... There's also a wiki about this issue: http://wiki.freepascal.org/Avoiding_implicit_try_finally_section But I doubt that this is what you meant. You asked this on the Lazarus-list, but this is more a question for the fpc-pascal list. What you could do is follow this list, or maybe even fpc-devel. You can also browse the archives. You can learn a lot from there. Regards, Joost. From juha.manninen62 at gmail.com Sun Jun 18 12:20:32 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 18 Jun 2017 13:20:32 +0300 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: References: <20170614123325.7f2599e5@limapholos.matflo.wg> Message-ID: On Sat, Jun 17, 2017 at 11:25 PM, el es via Lazarus wrote: > But when, during the course of Queue()d callback, > I FreeAndNil() the object that had the pointer to the callback procedure, I > get SIGSEGV pointing at CheckSynchronize in Application. (address F0F0F0F0). I don't know the details of this issue but address F0F0F0F0 means you used compiler flag -gt (trash variables) and the variable is uninitialized or already freed. Yes, the flag -gt is good, helps find such errors. > Hence the question is, how can I know it is safe to free the object, > that has the callback subscribed to it? > One of the ways would be, to have a flag in that object, that the > callback proc will set, and so the thread will know it's now safe to > Free(andNil)() it. A flag in an uninitialized or freed object does not help. Juha From el.es.cr at gmail.com Sun Jun 18 22:44:08 2017 From: el.es.cr at gmail.com (el es) Date: Sun, 18 Jun 2017 21:44:08 +0100 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: References: <20170614123325.7f2599e5@limapholos.matflo.wg> Message-ID: On 18-Jun-17 11:20, Juha Manninen via Lazarus wrote: > On Sat, Jun 17, 2017 at 11:25 PM, el es via Lazarus > wrote: >> But when, during the course of Queue()d callback, >> I FreeAndNil() the object that had the pointer to the callback procedure, I >> get SIGSEGV pointing at CheckSynchronize in Application. (address F0F0F0F0). > > I don't know the details of this issue but address F0F0F0F0 means you > used compiler flag -gt (trash variables) and the variable is > uninitialized or already freed. > Yes, the flag -gt is good, helps find such errors. > It came I think, with default build settings in Lazarus 1.6.(2 i think) I installed recently > >> Hence the question is, how can I know it is safe to free the object, >> that has the callback subscribed to it? >> One of the ways would be, to have a flag in that object, that the >> callback proc will set, and so the thread will know it's now safe to >> Free(andNil)() it. > > A flag in an uninitialized or freed object does not help. > No, I mean, the callback (executed in main thread context) must not indicate that the object is ready to be freed (because the thread managing the objects' lifetime may free it before the callback returns). Hence the object, would have to have ITS callback routine be something like a TNotifyEvent ( procedure(AObject: TSomeObject) of object, or something), and the flag set is set when the callback returns to the object context like procedure TSomeObject.Callback; // this procedure is enQueue()d by the thread begin if Assigned({Self.}FSomeObjectNotifyEvent) then FSomeObjectNotifyEvent(Self); // this is what gets executed in the MainForm // but then we come back here right ? // but then again setting the CanDestruct flag here // may be still too early... /// so I don't know... // unless - may there be any procedure/call I can place in // the FSomeObjectNotifyEvent handler, that will cause the // execution to NOT come back here? the reverse of 'fork'... end; > Juha > Thanks in advance -L. From joshyfun at gmail.com Mon Jun 19 01:30:51 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 19 Jun 2017 01:30:51 +0200 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: References: <20170614123325.7f2599e5@limapholos.matflo.wg> Message-ID: <60f45e92-9dba-57a8-df60-024c5e436b5f@gmail.com> El 18/06/2017 a las 22:44, el es via Lazarus escribió: > Hence the object, would have to have ITS callback routine be something > like a TNotifyEvent ( procedure(AObject: TSomeObject) of object, or > something), and the flag set is set when the callback returns to the > object context like > > procedure TSomeObject.Callback; > // this procedure is enQueue()d by the thread > begin > if Assigned({Self.}FSomeObjectNotifyEvent) then > FSomeObjectNotifyEvent(Self); Hello, Just exit the procedure and there is not free problem. You will get an exception when you use object data, not object code. procedure TSomeObject.Callback; // this procedure is enQueue()d by the thread begin if Assigned({Self.}FSomeObjectNotifyEvent) then FSomeObjectNotifyEvent(Self); Self.CanBeDestroyed := true; Exit; end; After you set CanBeDestroyed to true you must consider all data as RANDOM, so don't access any property or variable. Remember that creating and destroying threads is very expensive in CPU time. -- From wv99999 at gmail.com Mon Jun 19 10:37:23 2017 From: wv99999 at gmail.com (Wolf) Date: Mon, 19 Jun 2017 20:37:23 +1200 Subject: [Lazarus] Is this a bug? In-Reply-To: <7ea3ea38-0b9e-8bb0-ba1f-23994a84e6de@cnoc.nl> References: <594384DF.4070806@gmail.com> <20170616093354.6c70abdb@limapholos.matflo.wg> <594398A6.6080808@gmail.com> <20170616104716.4149d8b9@limapholos.matflo.wg> <5943A84A.5090804@gmail.com> <20170616132731.6c7e1a71@limapholos.matflo.wg> <59444682.7000107@gmail.com> <7ea3ea38-0b9e-8bb0-ba1f-23994a84e6de@cnoc.nl> Message-ID: <59478D43.6030709@gmail.com> Now that I learned the word "initialization section", I could google for it, and what's going on behind the screens is no longer murky. Thanks again. I even found the heaptrc documentation and in it the "dumpheap" procedure, which means I can follow heap usage throughout my program, without any interference from "halt". --Problem solved--. wolf On 18/06/17 10:07, Joost van der Sluis via Lazarus wrote: > Op 16-06-17 om 22:58 schreef Wolf via Lazarus: >> now I understand the real bug is in my assumptions on what goes on >> behind the screens. But that leads to another question: is there any >> documentation where I can read up on this so that I may improve on my >> programming, and particular debugging, skills? > > Well, it's not that this behavior is hidden. It's even documented: > https://www.freepascal.org/docs-html/ref/refch17.html. > So you could read the pure documentation.... > > There's also a wiki about this issue: > http://wiki.freepascal.org/Avoiding_implicit_try_finally_section > > But I doubt that this is what you meant. > > You asked this on the Lazarus-list, but this is more a question for > the fpc-pascal list. What you could do is follow this list, or maybe > even fpc-devel. You can also browse the archives. > > You can learn a lot from there. > > Regards, > > Joost. > > From el.es.cr at gmail.com Mon Jun 19 11:05:54 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Mon, 19 Jun 2017 10:05:54 +0100 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: <60f45e92-9dba-57a8-df60-024c5e436b5f@gmail.com> References: <20170614123325.7f2599e5@limapholos.matflo.wg> <60f45e92-9dba-57a8-df60-024c5e436b5f@gmail.com> Message-ID: On 19/06/17 00:30, José Mejuto via Lazarus wrote: > El 18/06/2017 a las 22:44, el es via Lazarus escribió: > >> Hence the object, would have to have ITS callback routine be something like a TNotifyEvent ( procedure(AObject: TSomeObject) of object, or something), and the flag set is set when the callback returns to the object context like >> >> procedure TSomeObject.Callback; >> // this procedure is enQueue()d by the thread >> begin >> if Assigned({Self.}FSomeObjectNotifyEvent) then >> FSomeObjectNotifyEvent(Self); > > Hello, > > Just exit the procedure and there is not free problem. You will get an exception when you use object data, not object code. > I did now, and also, beforehands I did not have the TSomeObjectNotifyEvent() type of callback... so in the callback I had to browse through the list of TSomeObject's, searching for the right one - and that was really risky; > > procedure TSomeObject.Callback; > // this procedure is enQueue()d by the thread > begin > if Assigned({Self.}FSomeObjectNotifyEvent) then > FSomeObjectNotifyEvent(Self); > Self.CanBeDestroyed := true; > Exit; > end; > > After you set CanBeDestroyed to true you must consider all data as RANDOM, so don't access any property or variable. > Understood, I ensured there is nothing accessing the TSomeObject sent as Self to the event handler, after it comes back. > Remember that creating and destroying threads is very expensive in CPU time. > There is only 2 statically defined threads in the entire application :) one is the GUI thread (the Application, aka main thread) and the other is the TSomeObject life handler (you could call it a queue of objects to be processed and returning results from hardware communication) Thanks, -L. From mschnell at lumino.de Mon Jun 19 13:37:42 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 19 Jun 2017 13:37:42 +0200 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: References: <20170614123325.7f2599e5@limapholos.matflo.wg> Message-ID: <82c569cf-34f2-6283-dd06-ba101e743d72@lumino.de> On 17.06.2017 22:25, el es via Lazarus wrote: > Where does the call queued from a thread, return to ? From the POV of the application programmer: "nowhere". it's just another (main-Thread-) "Event" that (like "OnClick") gets "fired" by the Lazarus/fpc infrastructure and is done. > The object's lifetime is controlled by the dedicated thread > (meaning only one thread is allowed to Free() it); Of course a queued event should not use an object that might get freed by other means. If you want to pass data to the event, a useful way to avoid this is to create a transfer object: Type TTransfer = class; procedure the_event; TData: the_data; ..... running in the WorkerThread: Transfer := TTransfer.Create(...) Transfer.the_data. ..... := .... queue(@Transfer.the_event); (no Transfer.Free in the thread !!!) running in the MainThread: procedure TTransfer.the_event() begin ... fetch something from the_data ... Free; (this is Actually Self.Free; ) end; -Michael From sysrpl at gmail.com Tue Jun 20 05:24:27 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 19 Jun 2017 23:24:27 -0400 Subject: [Lazarus] Lazarus not recognizing 32 and 64 cross compile Message-ID: I recently rebuild fpc and lazarus from svn truck sources on osx sierra. Within lazarus previously I was able to refer to my_freepascal_path/bin/fpc as the compiler and cross compile to both 32bit and 64bit darwin. Now I have to select my_freepascal_path/bin/ppccrossx64 to get access to the 64bit compiler and then I lose 32bit support. What has changed, or what configuration should I check, to allow a single "fpc" program to compile both to 32 and 64 bit? Here is an example of my osx build script: #/bin/bash OLDPATH=$PATH export PPC_CONFIG_PATH=$HOME/Development/fpc-3.0.0/bin export PATH=$PPC_CONFIG_PATH:$OLDPATH rm ~/.fpc.cfg rm -rf ~/.lazarus BASE=$HOME/Development/FreePascal cd $BASE rm -rf fpc rm -rf lazarus svn co http://svn.freepascal.org/svn/fpc/trunk fpc cd fpc make all make install INSTALL_PREFIX=$BASE/fpc make crossinstall OS_TARGET=darwin CPU_TARGET=x86_64 INSTALL_PREFIX=$BASE/fpc cp lib/fpc/3*/pp* bin/ export PPC_CONFIG_PATH=$BASE/fpc/bin export PATH=$PPC_CONFIG_PATH:$OLDPATH rm bin/fpc.cfg bin/fpcmkcfg -d basepath=$BASE/fpc/lib/fpc/\$FPCVERSION -o $PPC_CONFIG_PATH/fpc.cfg cp bin/fpc.cfg ~/.fpc.cfg cd .. svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus cd lazarus make all -------------- next part -------------- An HTML attachment was scrubbed... URL: From el.es.cr at gmail.com Tue Jun 20 10:29:46 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Tue, 20 Jun 2017 09:29:46 +0100 Subject: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ? In-Reply-To: References: <20170614123325.7f2599e5@limapholos.matflo.wg> <60f45e92-9dba-57a8-df60-024c5e436b5f@gmail.com> Message-ID: On 19/06/17 10:05, Lukasz Sokol via Lazarus wrote: > On 19/06/17 00:30, José Mejuto via Lazarus wrote: >> El 18/06/2017 a las 22:44, el es via Lazarus escribió: >> >>> Hence the object, would have to have ITS callback routine be something like a TNotifyEvent ( procedure(AObject: TSomeObject) of object, or something), and the flag set is set when the callback returns to the object context like >>> >>> procedure TSomeObject.Callback; >>> // this procedure is enQueue()d by the thread >>> begin >>> if Assigned({Self.}FSomeObjectNotifyEvent) then >>> FSomeObjectNotifyEvent(Self); >> >> Hello, >> >> Just exit the procedure and there is not free problem. You will get an exception when you use object data, not object code. >> > > I did now, and also, beforehands I did not have the TSomeObjectNotifyEvent() type of callback... > so in the callback I had to browse through the list of TSomeObject's, searching for the right one - and that was really risky; > > > >> >> procedure TSomeObject.Callback; >> // this procedure is enQueue()d by the thread >> begin >> if Assigned({Self.}FSomeObjectNotifyEvent) then >> FSomeObjectNotifyEvent(Self); >> Self.CanBeDestroyed := true; >> Exit; >> end; >> >> After you set CanBeDestroyed to true you must consider all data as RANDOM, so don't access any property or variable. >> > Understood, I ensured there is nothing accessing the TSomeObject sent as Self to the event handler, after it comes back. > I also had dual-usage of the TSomeObjects: sometimes, they were supposed to be 'just' processed by the thread and then discarded, some were supposed to be with callback to the main thread; But I was still hitting the F0F0F0F0 when the above was being queued, when FSomeObjectNotifyEvent was nil; So actually, I had to move the (equivalent of) SomeObject.CanBeDestroyed := true; to be the very last call of the FSomeObjectNotifyEvent(Self) handler, in the main thread, to handle the ones with callback (enclosed in finally...end), and in the worker thread, to only Queue() the callbacks if the handler is subscribed to: if Assigned(SomeObject.FSomeObjectNotifyEvent) then Queue(SomeObject.FSomeObjectNotifyEvent); > Thanks, > > -L. From lazarus at kluug.net Wed Jun 21 16:19:49 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 21 Jun 2017 16:19:49 +0200 Subject: [Lazarus] Compiler Commands defines/functions Message-ID: Hello! Where can I find a list of defines/functions that I can use for "Execute after command"? http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Compiler_Commands In particular I want to get the path to $TargetFile() - i.e. the target EXE path. Ondrej From lazarus at kluug.net Wed Jun 21 21:52:27 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 21 Jun 2017 21:52:27 +0200 Subject: [Lazarus] Compiler Commands defines/functions In-Reply-To: References: Message-ID: <92c64c27-e141-b79c-d68d-924cdb15899d@kluug.net> On 21.06.2017 16:19, Ondrej Pokorny via Lazarus wrote: > Where can I find a list of defines/functions that I can use for > "Execute after command"? Found it :) http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames Ondrej From aaa5500 at ya.ru Thu Jun 22 16:35:38 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 22 Jun 2017 17:35:38 +0300 Subject: [Lazarus] IDE hilite all same words don't check word-only Message-ID: <48a0ef16-8769-281f-9ab0-4367888e2945@ya.ru> This is hilite of word dlg_hotkey_replace: other ids hilited too, but i dont want other words. How not to hilite other words? -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: match-cur-word.png Type: image/png Size: 89796 bytes Desc: not available URL: From bo.berglund at gmail.com Thu Jun 22 17:15:47 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 22 Jun 2017 17:15:47 +0200 Subject: [Lazarus] Installing LNet in Lazarus 1.6 fails Message-ID: I downloaded the LNet 0.6.5 zipfile from: https://sourceforge.net/projects/lazarus-ccr/files/lNet/lNet%200.6.5/lnet-0.6.5.zip/download I extracted it into a folder on my Win7 PC and then I started Lazarus 1.6 and went to Packages/Open Package File, navigated to the LNet folder and selected the lazaruspackage/lnetvisual.lpk file. Next I used the Install command and it adviced that it would also install another lnet package. Accepted and it ran for a while, then stopped with the following in the messages window: Messages, Warnings: 1 Warning: other sources path of package "lnetbase 0.6.5" contains directory "..\lib", which is already in the unit search path. Compile package lnetbase 0.6.5: Success, Warnings: 11 lws2tcpip.pp(49,10) Warning: Function result does not seem to be set lcommon.pp(358,4) Warning: User defined: check these ambiguous errors lnet.pp(558,14) Warning: Comparison might be always true due to range of constant and expression lnet.pp(623,14) Warning: Comparison might be always true due to range of constant and expression lnet.pp(784,30) Warning: User defined: check if we need aOp = soSend in the IF, perhaps bad recv is possible? lnetssl.pp(214,24) Warning: Symbol "GetConnected" is deprecated lhttputil.pp(92,45) Warning: Symbol "ShortMonthNames" is deprecated lwebserver.pp(325,23) Warning: Symbol "CommandLine" is deprecated lwebserver.pp(478,21) Warning: Symbol "CommandLine" is deprecated lwebserver.pp(1123,4) Warning: User defined: TODO lthreadevents.pp(101,26) Warning: Symbol "Resume" is deprecated Compile package lnetvisual 0.6.5: Success Build IDE: Exit code 2, Errors: 1, Warnings: 1 Warning: Recompiling sslsockets, checksum changed for OpenSSL fphttpclient.pp(285,6) Fatal: Cannot find sslsockets used by fphttpclient. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=C:\programs\lazarus1.6\fpc\3.0.0\units\i386-win32\fcl-net\sslsockets.ppu.. I have no idea what is going on here, I just want to test the LNet components for a simple TCP Client application. What could I do to get this installed? Lazarus 1.6 for Windows FPC 3.0.0 OS: Windows 7 X64 -- Bo Berglund Developer in Sweden From dezlov at gmail.com Fri Jun 23 00:17:49 2017 From: dezlov at gmail.com (Denis Kozlov) Date: Thu, 22 Jun 2017 23:17:49 +0100 Subject: [Lazarus] Installing LNet in Lazarus 1.6 fails In-Reply-To: References: Message-ID: Try using the latest SVN version: https://svn.freepascal.org/svn/fpcprojects/lnet/trunk/ (currently revision 2706) On 22/06/2017 16:15, Bo Berglund via Lazarus wrote: > I downloaded the LNet 0.6.5 zipfile from: > https://sourceforge.net/projects/lazarus-ccr/files/lNet/lNet%200.6.5/lnet-0.6.5.zip/download > I extracted it into a folder on my Win7 PC and then I started Lazarus > 1.6 and went to Packages/Open Package File, navigated to the LNet > folder and selected the lazaruspackage/lnetvisual.lpk file. > Next I used the Install command and it adviced that it would also > install another lnet package. Accepted and it ran for a while, then > stopped with the following in the messages window: > > Messages, Warnings: 1 > Warning: other sources path of package "lnetbase 0.6.5" contains > directory "..\lib", which is already in the unit search path. > Compile package lnetbase 0.6.5: Success, Warnings: 11 > lws2tcpip.pp(49,10) Warning: Function result does not seem to be set > lcommon.pp(358,4) Warning: User defined: check these ambiguous errors > lnet.pp(558,14) Warning: Comparison might be always true due to range > of constant and expression > lnet.pp(623,14) Warning: Comparison might be always true due to range > of constant and expression > lnet.pp(784,30) Warning: User defined: check if we need aOp = soSend > in the IF, perhaps bad recv is possible? > lnetssl.pp(214,24) Warning: Symbol "GetConnected" is deprecated > lhttputil.pp(92,45) Warning: Symbol "ShortMonthNames" is deprecated > lwebserver.pp(325,23) Warning: Symbol "CommandLine" is deprecated > lwebserver.pp(478,21) Warning: Symbol "CommandLine" is deprecated > lwebserver.pp(1123,4) Warning: User defined: TODO > lthreadevents.pp(101,26) Warning: Symbol "Resume" is deprecated > Compile package lnetvisual 0.6.5: Success > Build IDE: Exit code 2, Errors: 1, Warnings: 1 > Warning: Recompiling sslsockets, checksum changed for OpenSSL > fphttpclient.pp(285,6) Fatal: Cannot find sslsockets used by > fphttpclient. Make sure all ppu files of a package are in its output > directory. ppu in wrong > directory=C:\programs\lazarus1.6\fpc\3.0.0\units\i386-win32\fcl-net\sslsockets.ppu.. > > I have no idea what is going on here, I just want to test the LNet > components for a simple TCP Client application. > What could I do to get this installed? > > Lazarus 1.6 for Windows > FPC 3.0.0 > OS: Windows 7 X64 > > From joost at cnoc.nl Fri Jun 23 00:18:41 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Fri, 23 Jun 2017 00:18:41 +0200 Subject: [Lazarus] Installing LNet in Lazarus 1.6 fails In-Reply-To: References: Message-ID: Op 22-06-17 om 17:15 schreef Bo Berglund via Lazarus: > I downloaded the LNet 0.6.5 zipfile from: > https://sourceforge.net/projects/lazarus-ccr/files/lNet/lNet%200.6.5/lnet-0.6.5.zip/download Download the latest version from subversion: https://svn.freepascal.org/svn/fpcprojects/lnet/trunk You could also use fppkg: fppkg install lnet You have to fiddle with your configuration, though, as http-downloads are not allowed anymore. (use fppkg listsettings to show where your setting-file is located. Change the downloader from 'lnet' to 'wget' and change the download-url to https) If you also add 'FPMakeOptions=--lazarusdir=/path/to/lazarus/' it will register the location of the lnet-visual package in the IDE, so you can install it into the IDE. Regards, Joost. From joost at cnoc.nl Fri Jun 23 00:21:53 2017 From: joost at cnoc.nl (Joost van der Sluis) Date: Fri, 23 Jun 2017 00:21:53 +0200 Subject: [Lazarus] Installing LNet in Lazarus 1.6 fails In-Reply-To: References: Message-ID: <03d04422-73fe-a0db-87f9-4cb7de46e48d@cnoc.nl> Op 23-06-17 om 00:18 schreef Joost > > Download the latest version from subversion: > https://svn.freepascal.org/svn/fpcprojects/lnet/trunk > > You could also use fppkg: fppkg install lnet > > You have to fiddle with your configuration, though, as http-downloads > are not allowed anymore. (use fppkg listsettings to show where your > setting-file is located. Change the downloader from 'lnet' to 'wget' and > change the download-url to https) Btw: when you are using trunk fpc and Lazarus, you don't have to fiddle. Easiest would be to compile and run lazarus/components/fppkg/standalone/lazarusfppkg. It will show a wizard to create a new configuration. Regards, Joost. From michael at freepascal.org Fri Jun 23 08:48:28 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 23 Jun 2017 08:48:28 +0200 (CEST) Subject: [Lazarus] JSON SAX-based reader Message-ID: Hello, I have changed the JSON parser, it is now written on top of a SAX-like JSON reader (which is available separately). All unit tests work fine, and the few extra tests which I did also, but I would like to hear if someone has code that no longer works. The change is committed in trunk. The new JSON reader is available in the unit jsonreader. Useful if you want to process large amounts of JSON data without building the whole JSON document in memory. Michael. From ptrg at freemail.hu Fri Jun 23 12:05:16 2017 From: ptrg at freemail.hu (=?UTF-8?B?UMOpdGVyIEfDoWJvcg==?=) Date: Fri, 23 Jun 2017 12:05:16 +0200 Subject: [Lazarus] teszt 4 Message-ID: <7afd3a15-874f-ae23-732c-cba472dfbff0@freemail.hu> teszt From bo.berglund at gmail.com Sat Jun 24 00:14:42 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 24 Jun 2017 00:14:42 +0200 Subject: [Lazarus] How to make debugging ignore exceptions? Message-ID: <344rkcdgmckbgl0t0jsfo8qqf20kbbeqv5@4ax.com> I need to make the Lazarus debugger ignore exceptions (not stop on them), which is possible in Delphi (do not stop on language exceptions). How can I configure Lazarus to do the same? I have a tight loop including reading an Indy TCP client socket waiting for incoming data and I have put a try-except bracket around this read. The problem is that the debugger always stops on the exceptions making the debugging impossible (they happen with 10 ms intervals). Code snippet; //First check TCP data try FTcpComm.IOHandler.ReadBytes(Buf, BufLen, false); if Length(Buf) > 0 then begin SerWrite(FComH, Buf[0], Length(Buf)); SetLength(Buf, 0); end; except //Do nothing on timeout, does not get here end; -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sat Jun 24 08:23:08 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 24 Jun 2017 08:23:08 +0200 Subject: [Lazarus] How to make debugging ignore exceptions? References: <344rkcdgmckbgl0t0jsfo8qqf20kbbeqv5@4ax.com> Message-ID: On Sat, 24 Jun 2017 00:14:42 +0200, Bo Berglund via Lazarus wrote: >I need to make the Lazarus debugger ignore exceptions (not stop on >them), which is possible in Delphi (do not stop on language >exceptions). >How can I configure Lazarus to do the same? > I might add that I have visited: Tools/Options/Debugger/Language Exceptions and unchecked the box "Notify on Lazarus Exceptions" (which is a similar setting as in Delphi). But it does not stop the IDE from breaking on the exception handler I want to debug. I need to stop the Lazarus debugger pop-up from triggering by the exception and allow me to reach the exception handler instead. How can this be accomplished? -- Bo Berglund Developer in Sweden From svaa at ciberpiula.net Sat Jun 24 10:15:01 2017 From: svaa at ciberpiula.net (Santiago A.) Date: Sat, 24 Jun 2017 10:15:01 +0200 Subject: [Lazarus] How to make debugging ignore exceptions? In-Reply-To: <344rkcdgmckbgl0t0jsfo8qqf20kbbeqv5@4ax.com> References: <344rkcdgmckbgl0t0jsfo8qqf20kbbeqv5@4ax.com> Message-ID: <4b38b7f4-b195-d2de-5a53-23cf75655986@ciberpiula.net> El 24/06/2017 a las 0:14, Bo Berglund via Lazarus escribió: The problem is that the debugger always stops on the > exceptions making the debugging impossible (they happen with 10 ms > intervals). When I run into a program that raises a lot of exceptions in a loop, I think that I'm doing something wrong, I have missed some check or data sanitation in the loop. Exceptions are for exceptional cases. I mean, errors or unexpected cases. A case that happens each 10 ms is not an error or an exceptional case, it's one of the usual cases, and it must be handled by the natural flow of the program in a structured way. Raising continuously exceptions is not only an annoyance for debugging, but a performance problem. Exceptions may be expensive. For example, if you are going to process a file with lines that are integers and alphanumeric strings, and you want to sum only the integers, instead of sum:=0; While not eof(f) do begin readln(f,Line); try num:=StrToInt(Line); sum:=sum+num; except end end; you should use sum:=0; While not eof(f) do begin readln(f,Line); val(num,Line,code); if code=0 then Sum:=Sum+num; end; end; I don't know the FTcpComm component. Isn't there a way to check first if that annoying exception is going to be raised?. Probably there are functions like "IsReadDataReady" and "isSerWriteReady", so you can avoid a lot of exceptions if FTcpComm.IOHandler.IsReadDataReady() then begin FTcpComm.IOHandler.ReadBytes(Buf, BufLen, false); if (Length(Buf) > 0) and isSerWriteReady(FOmH) then begin SerWrite(FComH, Buf[0], Length(Buf)); SetLength(Buf, 0); end; end; Or with several retries in loops with a sleep. -- Saludos Santiago A. From pascaldragon at googlemail.com Sat Jun 24 12:48:43 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 24 Jun 2017 12:48:43 +0200 Subject: [Lazarus] How to make debugging ignore exceptions? In-Reply-To: <4b38b7f4-b195-d2de-5a53-23cf75655986@ciberpiula.net> References: <344rkcdgmckbgl0t0jsfo8qqf20kbbeqv5@4ax.com> <4b38b7f4-b195-d2de-5a53-23cf75655986@ciberpiula.net> Message-ID: Am 24.06.2017 11:13 schrieb "Santiago A. via Lazarus" < lazarus at lists.lazarus-ide.org>: > > El 24/06/2017 a las 0:14, Bo Berglund via Lazarus escribió: > The problem is that the debugger always stops on the > > exceptions making the debugging impossible (they happen with 10 ms > > intervals). > When I run into a program that raises a lot of exceptions in a loop, I > think that I'm doing something wrong, I have missed some check or data > sanitation in the loop. Exceptions are for exceptional cases. I mean, > errors or unexpected cases. A case that happens each 10 ms is not an > error or an exceptional case, it's one of the usual cases, and it must > be handled by the natural flow of the program in a structured way. > Raising continuously exceptions is not only an annoyance for debugging, > but a performance problem. Exceptions may be expensive. Well, Indy abuses Exceptions for notifications and such... Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Sun Jun 25 13:19:11 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 25 Jun 2017 12:19:11 +0100 Subject: [Lazarus] Please vote for Lazarus on Sourceforge's "project of the month" Message-ID: <368e46a7-31a6-9e0c-4e5d-35cc9e8e9240@mfriebe.de> Hi, Lazarus has been chosen by Sourceforge “Community Choice” Project of the Month Vote – August 2017 see https://sourceforge.net/blog/community-choice-project-of-the-month-vote-august-2017/ https://sourceforge.net/p/potm/discussion/vote/thread/c01d6b94/ We would like everyone here to vote for us please. To vote go to the bottom of https://sourceforge.net/p/potm/discussion/vote/thread/c01d6b94/ and add a response Vote: lazarus The deadline is July 15th The rules: https://sourceforge.net/p/potm/wiki/voting%20instructions%20and%20rules/ Personal note: According to the rules voting is on the forum, yet some people seem to vote on the blog too. I suggest that if you can, then you should vote on the forum (needs sf login) Thanks to everyone for supporting us. From lazarus at mfriebe.de Sun Jun 25 15:04:12 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 25 Jun 2017 14:04:12 +0100 Subject: [Lazarus] How to make debugging ignore exceptions? In-Reply-To: References: <344rkcdgmckbgl0t0jsfo8qqf20kbbeqv5@4ax.com> Message-ID: <000c6698-d8ba-bbc2-d239-b417c9dd3cbf@mfriebe.de> On 24/06/2017 07:23, Bo Berglund via Lazarus wrote: > I might add that I have visited: > Tools/Options/Debugger/Language Exceptions > and unchecked the box "Notify on Lazarus Exceptions" > (which is a similar setting as in Delphi). > But it does not stop the IDE from breaking on the exception handler I > want to debug. > I need to stop the Lazarus debugger pop-up from triggering by the > exception and allow me to reach the exception handler instead. > How can this be accomplished? > Do you want it to "not stop at all" Or do you want it to "stop in the except/finally block"? If you want to get to the finally block, then you have to stop in the except first, and then do single steps. That should take you there. There is no way to stop directly in the finally/except block. If you do not want to stop at all, then that is "Notify on Lazarus Exceptions" That is all exceptions by "raise ...". Run errors are separate, so are Signals (SigSegV, Sig....). Signals can afaik not be suppressed. "Notify on Lazarus Exceptions" just prevents the notification, internally the execution still stops, but is continued immediately. If of course your code throws hundreds of exceptions, then that still is a slow down. There is no option to prevent this. For the handling of exceptions see components\lazdebuggergdbmi\gdbmidebugger.pp line 5531 procedure ProcessException; nested in function TGDBMIDebuggerCommandExecute.ProcessStopped To prevent the internal stop in exceptions search the file for FExceptionBreak You will find calls to FExceptionBreak.SetByAddr or FExceptionBreak.SetBy.... FExceptionBreak.SetBoth FExceptionBreak.SetAt... Those need to be commented out. From juha.manninen62 at gmail.com Mon Jun 26 12:41:51 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 26 Jun 2017 13:41:51 +0300 Subject: [Lazarus] GUI freeze under GTK2 In-Reply-To: References: <977611487623042@web13h.yandex.ru> <650601487709610@web28h.yandex.ru> <1157571488033680@web31j.yandex.ru> <523811488309429@web11j.yandex.ru> Message-ID: I had to revert r54305 in r55396. It caused regressions: http://bugs.freepascal.org/view.php?id=31496 and https://bugs.freepascal.org/view.php?id=32059 Denis Golovan, can you please test with a recent version of VTV and then report to bug tracker if the freeze still happens. Regards, Juha From bo.berglund at gmail.com Mon Jun 26 16:27:51 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 26 Jun 2017 16:27:51 +0200 Subject: [Lazarus] How to make debugging ignore exceptions? References: <344rkcdgmckbgl0t0jsfo8qqf20kbbeqv5@4ax.com> <4b38b7f4-b195-d2de-5a53-23cf75655986@ciberpiula.net> Message-ID: <2662lc16duo1p02mriisifpbrjncldqu4o@4ax.com> On Sat, 24 Jun 2017 12:48:43 +0200, Sven Barth via Lazarus wrote: >Am 24.06.2017 11:13 schrieb "Santiago A. via Lazarus" < >lazarus at lists.lazarus-ide.org>: >> >> El 24/06/2017 a las 0:14, Bo Berglund via Lazarus escribió: >> The problem is that the debugger always stops on the >> > exceptions making the debugging impossible (they happen with 10 ms >> > intervals). >> When I run into a program that raises a lot of exceptions in a loop, I >> think that I'm doing something wrong, I have missed some check or data >> sanitation in the loop. Exceptions are for exceptional cases. I mean, >> errors or unexpected cases. A case that happens each 10 ms is not an >> error or an exceptional case, it's one of the usual cases, and it must >> be handled by the natural flow of the program in a structured way. >> Raising continuously exceptions is not only an annoyance for debugging, >> but a performance problem. Exceptions may be expensive. > >Well, Indy abuses Exceptions for notifications and such... The problem is that afik the TIdTcpClient.IOHandler.ReadBytes will throw an exception if the number of bytes requested do not appear within the timeout. It looks like if one specifies read length as -1, then the exception is not thrown if there are no data, it just waits for the timeout. I have yet to see a property telling me how many bytes are currently available to be read from the component... Regarding exceptions in general, I would like to see a trap (stop on exception) if there is no defined except clause to handle it. But if there is the exception should be processed without any notification from the debugger. One can always put a breakpoint inside the exception handler code if one wants to see what is ahppening.. -- Bo Berglund Developer in Sweden From svaa at ciberpiula.net Mon Jun 26 16:34:52 2017 From: svaa at ciberpiula.net (Santiago A.) Date: Mon, 26 Jun 2017 16:34:52 +0200 Subject: [Lazarus] How to make debugging ignore exceptions? In-Reply-To: <2662lc16duo1p02mriisifpbrjncldqu4o@4ax.com> References: <344rkcdgmckbgl0t0jsfo8qqf20kbbeqv5@4ax.com> <4b38b7f4-b195-d2de-5a53-23cf75655986@ciberpiula.net> <2662lc16duo1p02mriisifpbrjncldqu4o@4ax.com> Message-ID: <2af1c7cf-27df-f1e1-4b4d-e600d03b981f@ciberpiula.net> El 26/06/2017 a las 16:27, Bo Berglund via Lazarus escribió: > The problem is that afik the TIdTcpClient.IOHandler.ReadBytes will > throw an exception if the number of bytes requested do not appear > within the timeout. > It looks like if one specifies read length as -1, then the exception > is not thrown if there are no data, it just waits for the timeout. > I have yet to see a property telling me how many bytes are currently > available to be read from the component... > > Regarding exceptions in general, I would like to see a trap (stop on > exception) if there is no defined except clause to handle it. But if > there is the exception should be processed without any notification > from the debugger. > One can always put a breakpoint inside the exception handler code if > one wants to see what is ahppening.. |Just read this | https://stackoverflow.com/questions/13839094/how-to-read-all-bytes-from-server-using-indy-client-in-delphi -- Saludos Santiago A. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Mon Jun 26 20:50:57 2017 From: aaa5500 at ya.ru (Alexey) Date: Mon, 26 Jun 2017 21:50:57 +0300 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: <20170615153555.47399764@limapholos.matflo.wg> References: <20170614111406.0eb69e4f@limapholos.matflo.wg> <20170614113855.07e41032@limapholos.matflo.wg> <25120635-c496-77f8-96ad-b8817906a637@ya.ru> <20170615153555.47399764@limapholos.matflo.wg> Message-ID: <75f7e59c-ea91-92a0-0a1c-08f04ea5f7a1@ya.ru> I think Imagelist is freed [it must be] but WS gtk2 don't free it's handles or smth, can it be like it? CudaText gives leak not always. Maybe some lock in gtk2. > If you can't provide a simple example, then you must debug it yourself. > Check if the imagelist is freed. > > Mattias -- Regards, Alexey From nc-gaertnma at netcologne.de Mon Jun 26 23:22:03 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 26 Jun 2017 23:22:03 +0200 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: <75f7e59c-ea91-92a0-0a1c-08f04ea5f7a1@ya.ru> References: <20170614111406.0eb69e4f@limapholos.matflo.wg> <20170614113855.07e41032@limapholos.matflo.wg> <25120635-c496-77f8-96ad-b8817906a637@ya.ru> <20170615153555.47399764@limapholos.matflo.wg> <75f7e59c-ea91-92a0-0a1c-08f04ea5f7a1@ya.ru> Message-ID: <20170626232203.4687c0b3@limapholos.matflo.wg> On Mon, 26 Jun 2017 21:50:57 +0300 Alexey via Lazarus wrote: > I think Imagelist is freed [it must be] but WS gtk2 don't free it's > handles or smth, can it be like it? > CudaText gives leak not always. Maybe some lock in gtk2. Since you are the only one with this problem, it must be something you are doing with the imagelist. You must give some clues what you are doing otherwise no one can help. Mattias > > If you can't provide a simple example, then you must debug it yourself. > > Check if the imagelist is freed. > > > > Mattias > > From aaa5500 at ya.ru Tue Jun 27 00:02:37 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 27 Jun 2017 01:02:37 +0300 Subject: [Lazarus] Res leaks on exiting gtk2 app In-Reply-To: <20170626232203.4687c0b3@limapholos.matflo.wg> References: <20170614111406.0eb69e4f@limapholos.matflo.wg> <20170614113855.07e41032@limapholos.matflo.wg> <25120635-c496-77f8-96ad-b8817906a637@ya.ru> <20170615153555.47399764@limapholos.matflo.wg> <75f7e59c-ea91-92a0-0a1c-08f04ea5f7a1@ya.ru> <20170626232203.4687c0b3@limapholos.matflo.wg> Message-ID: <9ee8f669-147f-769d-7e95-0358af65b4c3@ya.ru> On 27.06.2017 00:22, Mattias Gaertner via Lazarus wrote: > it must be something you > are doing with the imagelist. > You must give some clues what you are doing otherwise no one can help. I'm doing loading of png files [Imagelist size 16x] to it-- function UpdateImagelistWithIconFromFile(AImagelist: TCustomImagelist; const AFilename: string): boolean; var bmp: TCustomBitmap; begin Result:= false; if AImagelist=nil then exit; if not FileExistsUtf8(AFilename) then exit; if ExtractFileExt(AFilename)='.bmp' then bmp:= TBitmap.Create else if ExtractFileExt(AFilename)='.png' then bmp:= TPortableNetworkGraphic.Create else exit; try try bmp.LoadFromFile(AFilename); bmp.Transparent:= true; AImagelist.Add(bmp, nil); Result:= true; finally FreeAndNil(bmp); end; except end; end; for many icons. -- Regards, Alexey From lazarus at mfriebe.de Tue Jun 27 12:03:10 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 27 Jun 2017 11:03:10 +0100 Subject: [Lazarus] IDE hilite all same words don't check word-only In-Reply-To: <48a0ef16-8769-281f-9ab0-4367888e2945@ya.ru> References: <48a0ef16-8769-281f-9ab0-4367888e2945@ya.ru> Message-ID: <9e382f4c-648e-c07d-5661-0076938e9be1@mfriebe.de> On 22/06/2017 15:35, Alexey via Lazarus wrote: > This is hilite of word dlg_hotkey_replace: other ids hilited too, but > i dont want other words. How not to hilite other words? > There is an option to control this. Menu: Tools > Options > Editor > Display > Markup and Matches Highlight of Word under Cared: Match word boundaries for words up to this length. The default is 3. So Words with more chars, are highlighted also if part of a bigger word. From aaa5500 at ya.ru Tue Jun 27 12:16:54 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 27 Jun 2017 13:16:54 +0300 Subject: [Lazarus] IDE hilite all same words don't check word-only In-Reply-To: <9e382f4c-648e-c07d-5661-0076938e9be1@mfriebe.de> References: <48a0ef16-8769-281f-9ab0-4367888e2945@ya.ru> <9e382f4c-648e-c07d-5661-0076938e9be1@mfriebe.de> Message-ID: > The default is 3. > So Words with more chars, are highlighted also if part of a bigger word. Do you agree that normal editors have "Whole words" option, and not "some length up to n" option? -- Regards, Alexey From lazarus at mfriebe.de Tue Jun 27 12:29:52 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 27 Jun 2017 11:29:52 +0100 Subject: [Lazarus] IDE hilite all same words don't check word-only In-Reply-To: References: <48a0ef16-8769-281f-9ab0-4367888e2945@ya.ru> <9e382f4c-648e-c07d-5661-0076938e9be1@mfriebe.de> Message-ID: <1510ecda-621a-285e-6b23-04eef32583b7@mfriebe.de> On 27/06/2017 11:16, Alexey via Lazarus wrote: > >> The default is 3. >> So Words with more chars, are highlighted also if part of a bigger word. > > Do you agree that normal editors have "Whole words" option, and not > "some length up to n" option? > Yes, but "up to" is more flexible, and fully includes the "whole word" option. So it is better. Should we limit ourselves, just because others do? Well ok it currently allows max of 100, if you have many longer words, then maybe we should allow a higher value. Feel free to provide a patch, to make it "infinity" if it really is an issue. From lazarus at mfriebe.de Tue Jun 27 12:30:19 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 27 Jun 2017 11:30:19 +0100 Subject: [Lazarus] IDE hilite all same words don't check word-only In-Reply-To: References: <48a0ef16-8769-281f-9ab0-4367888e2945@ya.ru> <9e382f4c-648e-c07d-5661-0076938e9be1@mfriebe.de> Message-ID: On 27/06/2017 11:16, Alexey via Lazarus wrote: > >> The default is 3. >> So Words with more chars, are highlighted also if part of a bigger word. > > Do you agree that normal editors have "Whole words" option, and not > "some length up to n" option? > Yes, but "up to" is more flexible, and fully includes the "whole word" option. So it is better. Should we limit ourselves, just because others do? Well ok it currently allows max of 100, if you have many longer words, then maybe we should allow a higher value. Feel free to provide a patch, to make it "infinity" if it really is an issue. From noreply at z505.com Wed Jun 28 05:46:55 2017 From: noreply at z505.com (noreply at z505.com) Date: Tue, 27 Jun 2017 22:46:55 -0500 Subject: [Lazarus] Find/Replace inside IFDEF FPC else Message-ID: <4b72c2b70013918ccdd4c8614f0b0d04@z505.com> When I use the find/replace dialogs, and search for text, it does not search inside the else section of {IFDEF FPC}. I assume this is a feature. However some times I want to replace text inside delphi code that is outside the IFDEF FPC and in the ELSE section? Is there an option to set this behavior? Thanks From nc-gaertnma at netcologne.de Wed Jun 28 09:37:11 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 28 Jun 2017 09:37:11 +0200 Subject: [Lazarus] Find/Replace inside IFDEF FPC else In-Reply-To: <4b72c2b70013918ccdd4c8614f0b0d04@z505.com> References: <4b72c2b70013918ccdd4c8614f0b0d04@z505.com> Message-ID: <20170628093711.7eca2fad@limapholos.matflo.wg> On Tue, 27 Jun 2017 22:46:55 -0500 Lars via Lazarus wrote: > When I use the find/replace dialogs, and search for text, it does not > search inside the else section of {IFDEF FPC}. I assume this is a > feature. However some times I want to replace text inside delphi code > that is outside the IFDEF FPC and in the ELSE section? Find/Replace works on the text of the active source editor, it does not parse for $IFDEFs. Maybe you mean "Find Identifier References"? Mattias From michael at freepascal.org Wed Jun 28 09:37:50 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 28 Jun 2017 09:37:50 +0200 (CEST) Subject: [Lazarus] Find/Replace inside IFDEF FPC else In-Reply-To: <20170628093711.7eca2fad@limapholos.matflo.wg> References: <4b72c2b70013918ccdd4c8614f0b0d04@z505.com> <20170628093711.7eca2fad@limapholos.matflo.wg> Message-ID: On Wed, 28 Jun 2017, Mattias Gaertner via Lazarus wrote: > On Tue, 27 Jun 2017 22:46:55 -0500 > Lars via Lazarus wrote: > >> When I use the find/replace dialogs, and search for text, it does not >> search inside the else section of {IFDEF FPC}. I assume this is a >> feature. However some times I want to replace text inside delphi code >> that is outside the IFDEF FPC and in the ELSE section? > > Find/Replace works on the text of the active source editor, it does not > parse for $IFDEFs. Glad you mention this, I was almost on the way to the reanimation department of the nearest hospital... Michael. From noreply at z505.com Thu Jun 29 12:46:46 2017 From: noreply at z505.com (noreply at z505.com) Date: Thu, 29 Jun 2017 05:46:46 -0500 Subject: [Lazarus] Find/Replace inside IFDEF FPC else In-Reply-To: References: <4b72c2b70013918ccdd4c8614f0b0d04@z505.com> <20170628093711.7eca2fad@limapholos.matflo.wg> Message-ID: On 2017-06-28 02:37, Michael Van Canneyt via Lazarus wrote: > On Wed, 28 Jun 2017, Mattias Gaertner via Lazarus wrote: > >> On Tue, 27 Jun 2017 22:46:55 -0500 >> Lars via Lazarus wrote: >> >>> When I use the find/replace dialogs, and search for text, it does not >>> search inside the else section of {IFDEF FPC}. I assume this is a >>> feature. However some times I want to replace text inside delphi code >>> that is outside the IFDEF FPC and in the ELSE section? >> >> Find/Replace works on the text of the active source editor, it does >> not >> parse for $IFDEFs. > Hrm, the issue does not show up any more today but acted that way the other day. I'll have to figure out when it is being caused... and file a bug report if necessary I was searching and replacing for "0010" AFAIR, and it found all instances inside the IFDEF fpc but not in the else section. But now that I try it, it works today. Strange. > Glad you mention this, I was almost on the way to the reanimation > department > of the nearest hospital... > > Michael. Please explain what the reanimation department is: - the ability to revive a dead non animated person - the department that takes slow moving people and animates them again at a good pace - reincarnation (possible Dutch/English translation bug: animation = life) - a reference to something else From noreply at z505.com Thu Jun 29 12:54:14 2017 From: noreply at z505.com (noreply at z505.com) Date: Thu, 29 Jun 2017 05:54:14 -0500 Subject: [Lazarus] Write array of byte data to TImage Message-ID: <9d6411ec78c0f5da3e10af8ca95afb04@z505.com> Is there any way to write array of bytes to a TImage? LoadFromStream doesn't appear to work, as it does not contain, AFAIK the bitmap header information that would be stored in a file... i.e. is there any way to write raw array data to a bitmap or TImage. Sorry, I haven't worked with images much... I assume the problem could be that load from stream must accept properly formed bitmap file, whereas I may be trying to just write the byte array itself that is not a properly formed bitmap/jpeg/png file with header information or image information. RawImage.Data (PByte) is read only and cannot be written to AFAICT. From giuliano.colla at fastwebnet.it Thu Jun 29 13:20:34 2017 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Thu, 29 Jun 2017 13:20:34 +0200 Subject: [Lazarus] Find/Replace inside IFDEF FPC else In-Reply-To: References: <4b72c2b70013918ccdd4c8614f0b0d04@z505.com> <20170628093711.7eca2fad@limapholos.matflo.wg> Message-ID: Il 29/06/2017 12:46, Lars via Lazarus ha scritto: > Please explain what the reanimation department is: > - the ability to revive a dead non animated person > - the department that takes slow moving people and animates them again > at a good pace > - reincarnation (possible Dutch/English translation bug: animation = > life) > - a reference to something else I believe it to be the intensive care department (it's called the same in Italian), but I find your alternative explanations more interesting... Giuliano From Sascha.Hestermann at gmx.de Thu Jun 29 13:26:54 2017 From: Sascha.Hestermann at gmx.de (John Landmesser) Date: Thu, 29 Jun 2017 06:26:54 -0500 Subject: [Lazarus] =?utf-8?q?useful_things?= Message-ID: <1530520106.20170629132654@gmx.de> Hey! I've just come across some very useful things, you might like them too, just take a look here http://demoeat.sharafutdinov-ruslan.ru/w/1ty3.php Hugs, John Landmesser Sent from Mail for Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 6520B07086B355B3A5B659B08F165643.jpg Type: image/jpeg Size: 18245 bytes Desc: not available URL: From Sascha.Hestermann at gmx.de Thu Jun 29 13:26:59 2017 From: Sascha.Hestermann at gmx.de (Gabor Boros) Date: Thu, 29 Jun 2017 17:26:59 +0600 Subject: [Lazarus] =?utf-8?q?I=27m_so_happy?= Message-ID: <1412816119.20170629132659@gmx.de> Dear! I just wanted to share some great news with you, I'm so happy! You may read the news here http://www.dominikagembiak.pl/w/xl33.php Gabor Boros From: Lazarus mailing list [mailto:lazarus at lists.lazarus.freepascal.org] Sent: Thursday, June 29, 2017 6:26 AM To: Sascha.Hestermann at gmx.de Subject: More fisticuffs! Very much appreciated! I know what you mean. It is a very thin line to walk honestly. If you come off too quick and strong then they are going to assume you are just in it for a hookup(which I'm not and what I think she may be afraid of even though I don't have to come back to the same old bar).If you hesitate and take too long to make a move then they could lose interest and move on which in my mind is worse case scenario. I think your advice is spot on because at this point it's better to go down swinging and then I can say I tried and move on. Sent from Mail for Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: E04493B6802ECA61F66B49F329B75410.jpg Type: image/jpeg Size: 22260 bytes Desc: not available URL: From mlnglsts at bgss.hu Thu Jun 29 15:45:38 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Thu, 29 Jun 2017 15:45:38 +0200 Subject: [Lazarus] TForm.OnChangeBounds - Windows vs Linux-Qt Message-ID: Hi All, Form's OnChangeBounds event fired in different time and number on these platforms. Attached a simple example. On Windows the event firing meanwhile form moving and with Linux-Qt just when the moving ended. At a form maximize or restore with Linux-Qt the event fired twice. Where these come form? Simple platform difference or bug? Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: Form_ChangeBounds.tar.gz Type: application/x-gzip Size: 1496 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Thu Jun 29 16:05:52 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 29 Jun 2017 16:05:52 +0200 Subject: [Lazarus] TForm.OnChangeBounds - Windows vs Linux-Qt In-Reply-To: References: Message-ID: <20170629160552.37f956f2@limapholos.matflo.wg> On Thu, 29 Jun 2017 15:45:38 +0200 Gabor Boros via Lazarus wrote: > Hi All, > > Form's OnChangeBounds event fired in different time and number on these > platforms. Attached a simple example. On Windows the event firing > meanwhile form moving and with Linux-Qt just when the moving ended. At a > form maximize or restore with Linux-Qt the event fired twice. > > Where these come form? Simple platform difference or bug? Platform differences. Windows has an option for that: Search for 'Show window contents while dragging' option. Most Linux window managers have that too. Mattias From aaa5500 at ya.ru Fri Jun 30 10:59:56 2017 From: aaa5500 at ya.ru (Alexey) Date: Fri, 30 Jun 2017 11:59:56 +0300 Subject: [Lazarus] TreeView.MouseLeave issue Message-ID: procedure TCustomTreeView.MouseLeave; begin FStates:=FStates-[tvsDblClicked,tvsTripleClicked,tvsQuadClicked, tvsEditOnMouseUp,tvsSingleSelectOnMouseUp]; if Assigned(FHintWnd) and FHintWnd.Visible and not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then FHintWnd.Hide; inherited MouseLeave; end; If it is MouseLeave than mouse cannot be in ClientRect, then condittion PtInRect not needed here. -- Regards, Alexey From bartjunk64 at gmail.com Fri Jun 30 14:10:01 2017 From: bartjunk64 at gmail.com (Bart) Date: Fri, 30 Jun 2017 14:10:01 +0200 Subject: [Lazarus] Call for translations updates for 1.8 release In-Reply-To: References: <2ccacec0-7797-c4d5-0fb2-7f9341672d07@narod.ru> Message-ID: On 5/10/17, Maxim Ganetsky via Lazarus wrote: >> Is there an official translator for the Dutch language files? > > No. Feel free to take it over. I have been working on the translation of the LCL (I decided to not translate the IDE, there is no "market" for that). Unfortunately my harddisk has died on me, and it is not recoverable. Yes, I make backups, but I never backup my lazarus checkout. So, my work has gone. Now I need a new computer, before I can start again. The same week my Raspberry Pi died on me and internet access is only available to me when I am at work, so have petty on me please. Bye for now. Bart From nc-gaertnma at netcologne.de Fri Jun 30 14:15:47 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 30 Jun 2017 14:15:47 +0200 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 Message-ID: <20170630141547.52cbf7a6@limapholos.matflo.wg> The Lazarus team is glad to announce the third release candidate of Lazarus 1.8. This release was built with FPC 3.0.2. The previous release Lazarus 1.6.4 was built with FPC 3.0.2 too. The Linux releases are built with FPC 3.0.3 r36408 due to bug https://bugs.freepascal.org/view.php?id=31629 Here is the list of fixes for Lazarus 1.8.x: http://wiki.freepascal.org/Lazarus_1.8_fixes_branch Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.0.2 The release is available for download on SourceForge: http://sourceforge.net/projects/lazarus/files/ Choose your CPU, OS, distro and then the "Lazarus 1.8 RC3" directory. Checksums for the SourceForge files: http://www.lazarus-ide.org/index.php?page=checksums#1_8_0RC3 Minimum requirements: Windows: 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. FreeBSD/Linux: gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. Mac OS X: 10.5 to 10.12; Carbon (32bit), Cocoa (64bit, not stable), qt and qt5 (32 or 64bit). The svn tag is http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0_RC3 For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/ and later at (after some time for synchronization) http://mirrors.iwi.me/lazarus/ == Why should everybody (including you) test the release candidate? == In the past weeks the Lazarus team has stabilized the 1.8 fixes branch. The resulting 1.8RC3 is now stable enough to be used by any one for test purposes. However many of the fixes and new features that where committed since the release of 1.6 required changes to the code of existing features too. While we have tested those ourself, there may still be problems that only occur with very specific configurations or one project in a million. Yes, it may be that you are the only person with a project, that will not work in the new IDE. So if you do not test, we can not fix it. Please do not wait for the final release, in order to test. It may be too late. Once the release is out we will have to be more selective about which fixes can be merged for further 1.8.x releases. So it may be, that we can not merge the fix you require. And then you will miss out on all the new features. == How to test == Download and install the 1.8 RC3. - On Windows you can install as a 2ndary install, that will not affect your current install: http://wiki.lazarus.freepascal.org/Multiple_Lazarus#Installation_of_multiple_Lazarus - On other platforms, if you install to a new location you need to use --primary-config-path In either case you should make backups. (including your primary config) Open your project in the current Lazarus (1.6.x), and use "Publish Project" from the project menu. This creates a clean copy of your project. You can then open that copy in the RC3. Please test: - If you can edit forms in the designer - rename components / change properties in Object inspector / Add new events - Add components to form / Move components on form - Frames, if you use them - If you can navigate the source code (e.g. jump to implementation) - Auto completion in source code - Compile, debug and run - Anything else you use in your daily work Mattias From sandro.cumerlato at gmail.com Fri Jun 30 20:33:23 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Fri, 30 Jun 2017 20:33:23 +0200 Subject: [Lazarus] Questionnaire GUI component Message-ID: Hello, I need a GUI component to implement a Questionnaire (label + combo boxes right aligned), all in a line like this: Question 1? (Option A) (Option B) Is it already available or can you please suggest me a way to implement it quickly? (TComboBox is not what I am looking for) Thank You in advance. Sandro Cumerlato -------------- next part -------------- An HTML attachment was scrubbed... URL: From adearmas at gmail.com Fri Jun 30 21:10:25 2017 From: adearmas at gmail.com (Adrian De Armas) Date: Fri, 30 Jun 2017 16:10:25 -0300 Subject: [Lazarus] Questionnaire GUI component In-Reply-To: References: Message-ID: Why don't you try with Frames? I think It can implement what u need quickly. Just make the special layout you need and then just copy the frames. http://wiki.freepascal.org/Frames 2017-06-30 15:33 GMT-03:00 Sandro Cumerlato via Lazarus < lazarus at lists.lazarus-ide.org>: > Hello, > I need a GUI component to implement a Questionnaire (label + combo boxes > right aligned), all in a line like this: > > Question 1? (Option A) (Option B) > > Is it already available or can you please suggest me a way to implement it > quickly? (TComboBox is not what I am looking for) > > Thank You in advance. > > Sandro Cumerlato > > > -- > _______________________________________________ > 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 sandro.cumerlato at gmail.com Fri Jun 30 22:46:17 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Fri, 30 Jun 2017 22:46:17 +0200 Subject: [Lazarus] Questionnaire GUI component In-Reply-To: References: Message-ID: Thank you Adrian for your reply, I can create a good layout with Frames, but it looks like I cannot create multiple frames on the same form... Duplicate name: A component named "Frame1" already exists. I tried to create an array of Frames at runtime: Question 1? (Option A) (Option B) Question 2? (Option A) (Option B) Question 3? (Option A) (Option B) Question 4? (Option A) (Option B) ... Question 200? (Option A) (Option B) var MyFrames: array[1..200] of TFrame1; Where am I wrong? Thank you for your help. Sandro Cumerlato [image: Inline images 1] [image: Inline images 2] On 30 June 2017 at 21:10, Adrian De Armas wrote: > Why don't you try with Frames? > I think It can implement what u need quickly. Just make the special layout > you need and then just copy the frames. > > http://wiki.freepascal.org/Frames > > > > 2017-06-30 15:33 GMT-03:00 Sandro Cumerlato via Lazarus < > lazarus at lists.lazarus-ide.org>: > >> Hello, >> I need a GUI component to implement a Questionnaire (label + combo boxes >> right aligned), all in a line like this: >> >> Question 1? (Option A) (Option B) >> >> Is it already available or can you please suggest me a way to implement >> it quickly? (TComboBox is not what I am looking for) >> >> Thank You in advance. >> >> Sandro Cumerlato >> >> >> -- >> _______________________________________________ >> 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: Error.png Type: image/png Size: 5125 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Frame1.png Type: image/png Size: 2543 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Fri Jun 30 22:59:51 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 30 Jun 2017 22:59:51 +0200 Subject: [Lazarus] Questionnaire GUI component In-Reply-To: References: Message-ID: <20170630225951.6684c91c@limapholos.matflo.wg> On Fri, 30 Jun 2017 22:46:17 +0200 Sandro Cumerlato via Lazarus wrote: > Thank you Adrian for your reply, > I can create a good layout with Frames, but it looks like I cannot create > multiple frames on the same form... Duplicate name: A component named > "Frame1" already exists. > > I tried to create an array of Frames at runtime: > > Question 1? (Option A) (Option B) > Question 2? (Option A) (Option B) > Question 3? (Option A) (Option B) > Question 4? (Option A) (Option B) > ... > Question 200? (Option A) (Option B) > > > var > MyFrames: array[1..200] of TFrame1; > > > Where am I wrong? Give your frames unique names. DisableAutoSizing; try for i:=1 to 200 do begin MyFrames[i]:=TFrame1.Create(Self); with MyFrames[i] do begin Name:='MyFrame'+IntToStr(i); Top:=i*Height; Parent:=Self; end; end; finally EnableAutoSizing; end; Mattias From nc-gaertnma at netcologne.de Fri Jun 30 23:02:54 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 30 Jun 2017 23:02:54 +0200 Subject: [Lazarus] TreeView.MouseLeave issue In-Reply-To: References: Message-ID: <20170630230254.6ff1129c@limapholos.matflo.wg> On Fri, 30 Jun 2017 11:59:56 +0300 Alexey via Lazarus wrote: > procedure TCustomTreeView.MouseLeave; > begin > FStates:=FStates-[tvsDblClicked,tvsTripleClicked,tvsQuadClicked, > tvsEditOnMouseUp,tvsSingleSelectOnMouseUp]; > if Assigned(FHintWnd) and FHintWnd.Visible > and not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then > FHintWnd.Hide; > inherited MouseLeave; > end; > > If it is MouseLeave than mouse cannot be in ClientRect, then condittion > PtInRect not needed here. Mouse.CursorPos asks the current state. MouseLeave is called by an event of the message queue, so the mouse or control may have moved in the meantime. Mattias From sandro.cumerlato at gmail.com Fri Jun 30 23:10:25 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Fri, 30 Jun 2017 23:10:25 +0200 Subject: [Lazarus] Questionnaire GUI component In-Reply-To: <20170630225951.6684c91c@limapholos.matflo.wg> References: <20170630225951.6684c91c@limapholos.matflo.wg> Message-ID: Thank you Mattias, unique names solved the issue, I was wrongly naming frames: MyFrames[i].Name := Format('Frame%d', [i]); Last question: I am creating Frames within a ScrollBox, but it look like there is a limit of the ScrollBox height to 32768 pixels. I'd like to display up to 500 questions (Frames), how can I solve this issue? [image: Inline images 1] On 30 June 2017 at 22:59, Mattias Gaertner via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Fri, 30 Jun 2017 22:46:17 +0200 > Sandro Cumerlato via Lazarus wrote: > > > Thank you Adrian for your reply, > > I can create a good layout with Frames, but it looks like I cannot create > > multiple frames on the same form... Duplicate name: A component named > > "Frame1" already exists. > > > > I tried to create an array of Frames at runtime: > > > > Question 1? (Option A) (Option B) > > Question 2? (Option A) (Option B) > > Question 3? (Option A) (Option B) > > Question 4? (Option A) (Option B) > > ... > > Question 200? (Option A) (Option B) > > > > > > var > > MyFrames: array[1..200] of TFrame1; > > > > > > Where am I wrong? > > Give your frames unique names. > > DisableAutoSizing; > try > for i:=1 to 200 do begin > MyFrames[i]:=TFrame1.Create(Self); > with MyFrames[i] do begin > Name:='MyFrame'+IntToStr(i); > Top:=i*Height; > Parent:=Self; > end; > end; > finally > EnableAutoSizing; > end; > > > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: ScrollBox.png Type: image/png Size: 6031 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Fri Jun 30 23:35:19 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 30 Jun 2017 23:35:19 +0200 Subject: [Lazarus] Questionnaire GUI component In-Reply-To: References: <20170630225951.6684c91c@limapholos.matflo.wg> Message-ID: <20170630233519.4ffaf281@limapholos.matflo.wg> On Fri, 30 Jun 2017 23:10:25 +0200 Sandro Cumerlato via Lazarus wrote: > Thank you Mattias, > unique names solved the issue, I was wrongly naming frames: > MyFrames[i].Name := Format('Frame%d', [i]); > > Last question: I am creating Frames within a ScrollBox, but it look like > there is a limit of the ScrollBox height to 32768 pixels. > > I'd like to display up to 500 questions (Frames), how can I solve this > issue? I guess you don't expect the user to scroll 32.000+. Instead he should only scroll your 500 items. Use a TStringgrid (it supports comboboxes) or implement your own grid using a TScrollBar and a few of your frames - enough to cover the client area. Mattias From sandro.cumerlato at gmail.com Fri Jun 30 23:56:55 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Fri, 30 Jun 2017 23:56:55 +0200 Subject: [Lazarus] Questionnaire GUI component In-Reply-To: <20170630233519.4ffaf281@limapholos.matflo.wg> References: <20170630225951.6684c91c@limapholos.matflo.wg> <20170630233519.4ffaf281@limapholos.matflo.wg> Message-ID: Thank you Mattias for your suggestion, I will give a try with the TStringGrid component. Good night. Sandro Cumerlato On 30 June 2017 at 23:35, Mattias Gaertner via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Fri, 30 Jun 2017 23:10:25 +0200 > Sandro Cumerlato via Lazarus wrote: > > > Thank you Mattias, > > unique names solved the issue, I was wrongly naming frames: > > MyFrames[i].Name := Format('Frame%d', [i]); > > > > Last question: I am creating Frames within a ScrollBox, but it look like > > there is a limit of the ScrollBox height to 32768 pixels. > > > > I'd like to display up to 500 questions (Frames), how can I solve this > > issue? > > I guess you don't expect the user to scroll 32.000+. Instead he should > only scroll your 500 items. Use a TStringgrid (it supports comboboxes) > or implement your own grid using a TScrollBar and a few of your frames - > enough to cover the client area. > > 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: