From parkingspace26 at yahoo.com Wed Jun 1 01:11:39 2016 From: parkingspace26 at yahoo.com (Bob B.) Date: Tue, 31 May 2016 23:11:39 +0000 (UTC) Subject: [Lazarus] OpenRefine with Lazarus/FreePascal/fpSpreedsheet References: <1569350912.2592096.1464736299971.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1569350912.2592096.1464736299971.JavaMail.yahoo@mail.yahoo.com> How best to use with open source data wrangler OpenRefine (formerly Google Refine)? https://OpenRefine.orghttps://en.wikipedia.org/wiki/OpenRefine ThanksBob B. -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.rame at griensu.com Wed Jun 1 20:03:32 2016 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Wed, 1 Jun 2016 15:03:32 -0300 Subject: [Lazarus] Test Message-ID: <574F2374.2050806@griensu.com> Just testing. -- Leonardo M. Ramé Medical IT - Griensu S.A. Av. Colón 636 - Piso 8 Of. A X5000EPT -- Córdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54 9 (011) 40871877 From schalk.stefan at googlemail.com Thu Jun 2 15:02:34 2016 From: schalk.stefan at googlemail.com (Stefan Schalk) Date: Thu, 2 Jun 2016 15:02:34 +0200 Subject: [Lazarus] Memory leak with Synchronize on external threads In-Reply-To: <574DF285.1060102@googlemail.com> References: <001d01d1bb39$3326b600$99742200$@googlemail.com> <574DF285.1060102@googlemail.com> Message-ID: <000c01d1bccf$087df660$1979e320$@googlemail.com> Hi Sven, many thanks for your quick response and solution! I tried the new FPC sources (Revision 33878) and ran in a segmentation fault. In classes.inc line 345 the SizeOf gets the length from the pointer but I think the length of the structure is needed: currently: FillChar(syncentry^, SizeOf(syncentry), 0); suggestion: FillChar(syncentry^, SizeOf(TThreadQueueEntry), 0); Because of that, the uninitialized structure member "Next" will lead to a segmentation fault afterwards. I tried the suggestion and everything works fine (no SIGSEGV, no memory leak). Can you please review my suggestion? Best regards, Stefan -----Ursprüngliche Nachricht----- Von: Lazarus [mailto:lazarus-bounces at lists.lazarus-ide.org] Im Auftrag von Sven Barth Gesendet: Dienstag, 31. Mai 2016 22:22 An: lazarus at lists.lazarus-ide.org Betreff: Re: [Lazarus] Memory leak with Synchronize on external threads I've committed a fix in FPC revision 33863 and if all goes well it should be merged to 3.0.1 as well, thus becoming part of 3.0.2. A check with Delphi has shown that the WakeMainThread event gets Nil as Sender argument with an external thread, so I can avoid the use of CurrentThread which triggered the memory usage. Please note that this is however not a leak as CurrentThread will create a TExternalThread instance for a thread that hasn't been created by TThread (and for which no instance exists yet) and this instance must (sadly) be kept around until the program terminates. Regards, Sven -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 2982 bytes Desc: not available URL: From luizamericop at gmail.com Thu Jun 2 17:52:00 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Thu, 2 Jun 2016 12:52:00 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release Message-ID: The LCL port of VirtualTreeView component has a new home: https://github.com/blikblum/VirtualTreeView-Lazarus It's now a direct fork of Delphi repository making easier to keep in sync Two versions are released - 4.8.7 - 5.5.3 Major changes: - Uses native resources instead of Lazarus resources: smaller binary - Fix reported bugs: remaining bugs also affects original code or is a side effect of bugs in other parts of LCL Remarks: - The users of 4.x must be warned that 5.x has breaking changes. Search for VTMajorVersion directives at the 5.x version of the demos to some of the incompatibilities - Tested in windows with fpc 2.6.4, fpc 3.0 and fpc trunk - Under linux the test was fairly basic. Only gtk2 with fpc 2.6.4, compiled and run advanced demo Downloads at https://github.com/blikblum/VirtualTreeView-Lazarus/releases Bugs should be reported in github although i will still monitor mantis Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Jun 2 18:10:52 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 2 Jun 2016 17:10:52 +0100 Subject: [Lazarus] Refactoring functionality is broken Message-ID: Hi, I'm using Lazarus 1.7 r52282 FPC 2.6.4 x86_64-linux-gtk2. None of the refactoring functionality seems to be working in my copy of Lazarus. Not sure if this was a known issue and already fixed, but I thought I would mention it here, in case this issue went unnoticed. I tried "Make resourcestring" and "Extract procedure". Both got halfway with the refactoring - by that I mean the string constant got replaced with the resource string name, but the actual resource string variable never got defined. In the case of the Extract Procedure, a similar thing happened. The selected code got replaced with the new procedure name, but the actual procedure never got defined. In both cases I received an error (see attached screenshot), and then the editor highlighting went totally out of whack. I had to close down Lazarus, restore my code from the code repository and then start Lazarus again. Needless to say, I didn't attempt any further refactoring. I think the only refactoring that does work on my system is "Rename Identifier" - but that is probably because it is the simplest refactoring of the available options - equivalent to a Search & Replace. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot at 2016-06-02 15:49:06.png Type: image/png Size: 9278 bytes Desc: not available URL: From dezlov at gmail.com Thu Jun 2 18:53:31 2016 From: dezlov at gmail.com (Denis Kozlov) Date: Thu, 2 Jun 2016 17:53:31 +0100 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: On 2 June 2016 at 16:52, Luiz Americo Pereira Camara wrote: > The LCL port of VirtualTreeView component has a new home: > https://github.com/blikblum/VirtualTreeView-Lazarus > That's great! How does it compare to a copy in Lazarus CCR? https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/virtualtreeview-new/ Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Thu Jun 2 19:19:38 2016 From: lazarus at mfriebe.de (Martin Frb) Date: Thu, 2 Jun 2016 18:19:38 +0100 Subject: [Lazarus] Refactoring functionality is broken In-Reply-To: References: Message-ID: On 02/06/2016 17:10, Graeme Geldenhuys wrote: > Hi, > > I'm using Lazarus 1.7 r52282 FPC 2.6.4 x86_64-linux-gtk2. None of the .... > In both cases I received an error (see attached screenshot), and then > the editor highlighting went totally out of whack. I had to close down > Lazarus, restore my code from the code repository and then start Lazarus > again. Needless to say, I didn't attempt any further refactoring. > Have you got any code to reproduce this? You might be able to work around by switching off ifdef lowlight ing. (set all involved colors to none) From mailinglists at geldenhuys.co.uk Thu Jun 2 19:22:29 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 2 Jun 2016 18:22:29 +0100 Subject: [Lazarus] Refactoring functionality is broken In-Reply-To: References: Message-ID: On 2016-06-02 18:19, Martin Frb wrote: > Have you got any code to reproduce this? Unfortunately I am not allowed to share/publish any of the code I'm currently working on. But I will test the behaviour on open source code and let you know. > You might be able to work around by switching off ifdef lowlight ing. Will do, and report back tomorrow. 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 luizamericop at gmail.com Thu Jun 2 23:55:52 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Thu, 2 Jun 2016 18:55:52 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: 2016-06-02 13:53 GMT-03:00 Denis Kozlov : > On 2 June 2016 at 16:52, Luiz Americo Pereira Camara < > luizamericop at gmail.com> wrote: > >> The LCL port of VirtualTreeView component has a new home: >> https://github.com/blikblum/VirtualTreeView-Lazarus >> > > That's great! > > How does it compare to a copy in Lazarus CCR? > > https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/virtualtreeview-new/ > Github is newer All new development will go there Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From tc at epidata.info Fri Jun 3 08:49:35 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Fri, 3 Jun 2016 08:49:35 +0200 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: On 2016-06-02 17:52, Luiz Americo Pereira Camara wrote: > The LCL port of VirtualTreeView component has a new home: > https://github.com/blikblum/VirtualTreeView-Lazarus > > It's now a direct fork of Delphi repository making easier to keep in sync > > Two versions are released > - 4.8.7 > - 5.5.3 > > Major changes: > - Uses native resources instead of Lazarus resources: smaller binary > - Fix reported bugs: remaining bugs also affects original code or is a > side effect of bugs in other parts of LCL > > Remarks: > - The users of 4.x must be warned that 5.x has breaking changes. > Search for VTMajorVersion directives at the 5.x version of the demos > to some of the incompatibilities > - Tested in windows with fpc 2.6.4, fpc 3.0 and fpc trunk > - Under linux the test was fairly basic. Only gtk2 with fpc 2.6.4, > compiled and run advanced demo I get a compile-time error when compiling the lazarus package: Free Pascal Compiler version 3.0.0 [2015/11/26] for x86_64 Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Linux for x86-64 (3104) Compiling lclextensions_package.pas < ... snip ... > /home/torsten/FreePascal/VirtualTreeView-Lazarus/Source/VirtualTrees.pas(3083,25) Fatal: (2003) Syntax error, ":" expected but "<" found Fatal: (1018) Compilation aborted Error: /home/torsten/FreePascal/fpc/bin/ppcx64 returned an error exitcode Kind regards, Torsten. From tc at epidata.info Fri Jun 3 09:25:10 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Fri, 3 Jun 2016 09:25:10 +0200 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: <67fc4c0b-e69d-fb31-f8e8-3f258c1ab2d6@epidata.info> On 2016-06-03 08:49, Torsten Bonde Christiansen wrote: > On 2016-06-02 17:52, Luiz Americo Pereira Camara wrote: >> The LCL port of VirtualTreeView component has a new home: >> https://github.com/blikblum/VirtualTreeView-Lazarus >> >> It's now a direct fork of Delphi repository making easier to keep in >> sync >> >> Two versions are released >> - 4.8.7 >> - 5.5.3 >> >> Major changes: >> - Uses native resources instead of Lazarus resources: smaller binary >> - Fix reported bugs: remaining bugs also affects original code or is >> a side effect of bugs in other parts of LCL >> >> Remarks: >> - The users of 4.x must be warned that 5.x has breaking changes. >> Search for VTMajorVersion directives at the 5.x version of the demos >> to some of the incompatibilities >> - Tested in windows with fpc 2.6.4, fpc 3.0 and fpc trunk >> - Under linux the test was fairly basic. Only gtk2 with fpc 2.6.4, >> compiled and run advanced demo > I get a compile-time error when compiling the lazarus package: > > > Free Pascal Compiler version 3.0.0 [2015/11/26] for x86_64 > Copyright (c) 1993-2015 by Florian Klaempfl and others > (1002) Target OS: Linux for x86-64 > (3104) Compiling lclextensions_package.pas > > < ... snip ... > > > /home/torsten/FreePascal/VirtualTreeView-Lazarus/Source/VirtualTrees.pas(3083,25) > Fatal: (2003) Syntax error, ":" expected but "<" found > Fatal: (1018) Compilation aborted > Error: /home/torsten/FreePascal/fpc/bin/ppcx64 returned an error exitcode Sorry - this was from the master repository, not from the releases. The releases are working fine on linux x86_64, fpc 3.0 -Torsten. From tc at epidata.info Fri Jun 3 10:03:12 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Fri, 3 Jun 2016 10:03:12 +0200 Subject: [Lazarus] Incorrect highlighting for {$IF}..{$ENDIF} Message-ID: <94baadc0-2865-3563-ba5d-2db089eaa58f@epidata.info> Hi. I notices that the highligter in synedit is incorrect in a special case of IFDEF'ed code, please see attached picture: This snippet of code does compile in fpc 3.0, and if run through debugger both the statements "a:=2" are executed as expected. However, as the picture shows, the highlighting is incorrect when using a constant as parameter to the {$IF} condition. Should a create a bug report for it? Kind regards, Torsten. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mkdkfmknlcncgapc.png Type: image/png Size: 19642 bytes Desc: not available URL: From dezlov at gmail.com Fri Jun 3 10:55:47 2016 From: dezlov at gmail.com (Denis Kozlov) Date: Fri, 3 Jun 2016 09:55:47 +0100 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: On 2 June 2016 at 22:55, Luiz Americo Pereira Camara wrote: > On 2 June 2016 at 16:52, Luiz Americo Pereira Camara < >> luizamericop at gmail.com> wrote: >> >>> The LCL port of VirtualTreeView component has a new home: >>> https://github.com/blikblum/VirtualTreeView-Lazarus >>> >> >> All new development will go there > Can you update the wiki when you get a chance? It's google's first result for "virtualtreeview lazarus", but it doesn't even mention the new home. http://wiki.freepascal.org/VirtualTreeview Are you planning to maintain a copy on CCR SVN uptodate? Or is it going to be removed? Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Fri Jun 3 11:18:33 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 3 Jun 2016 10:18:33 +0100 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: <11d3dca8-c37b-2881-4a33-c260b8aa8701@geldenhuys.co.uk> On 2016-06-03 09:55, Denis Kozlov wrote: > Are you planning to maintain a copy on CCR SVN uptodate? Or is it going to > be removed? If the github one is more up to date, I would recommend removing the code in Lazarus CCR to prevent confusion. There are enough duplicate [component] efforts already, and more confusion is probably not wanted. Regards, Graeme From luizamericop at gmail.com Fri Jun 3 13:19:47 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Fri, 3 Jun 2016 08:19:47 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: 2016-06-03 5:55 GMT-03:00 Denis Kozlov : > On 2 June 2016 at 22:55, Luiz Americo Pereira Camara < > luizamericop at gmail.com> wrote: > >> On 2 June 2016 at 16:52, Luiz Americo Pereira Camara < >>> luizamericop at gmail.com> wrote: >>> >>>> The LCL port of VirtualTreeView component has a new home: >>>> https://github.com/blikblum/VirtualTreeView-Lazarus >>>> >>> >>> All new development will go there >> > > Can you update the wiki when you get a chance? It's google's first result > for "virtualtreeview lazarus", but it doesn't even mention the new home. > > http://wiki.freepascal.org/VirtualTreeview > I updated > > Are you planning to maintain a copy on CCR SVN uptodate? > No. > Or is it going to be removed? > The only reason to keep is to preserve the development history But is really confusing. I will try to move the history to other repository so i can delete. About virtualtreeview folder in Lazarus-ccr is not my work so i don't feel confortable in deleting it. For a complete history of LCL VTV dev, i posted in the forum a year ago: Some history: There was a VTV port by Joerg Thaler,Christian Ulrich hosted at Lazarus-ccr. It used the approach to comment code that were buggy or not implemented in LCL. This lead to a largely incomplete port. So i started a new VTV port long years ago at BountySource. I took another path: as soon as i hit a code that was buggy or not implemented in LCL and its widgetsets i reported in Lazarus bug tracker providing patches when doable. In parallel i created a support package implementing API that does not make sense in LCL (LCLExtensions). Sometime later i was asked by a Lazarus dev (Vincent) to move to Lazarus-ccr initially under the virtualtreeview-unstable repository, later renamed to virtualtreeview-new. The original port is still there. Changes in VTV delphi repository were backported to the Lazarus port and were in more or less in sync by the times of 4.8 release. At this time Mike Liesche stopped working in VTV and development stalled. When work was resumed in 5.x branch, initially i did not backport. Only later i separated 4.8 from trunk in virtualtreeview-new repository and started to sync Delphi VTV 5.x/trunk with virtualtreeview-new/trunk. Since than virtualtreeview-new/trunk has became unstable because of changes in interface or windows specific code introduced while doing the backport. Currently the virtualtreeview-new/trunk has most of the 5.x code ported but needs some work to get in a decent shape specially for non windows. With the move of VTV to github things will be easier since git has features that allows to maintain forks tracking and merging changes from the original in a structured way. Until now i was doing almost manually (with help of tools like araxis merge, smartsynchronize and meld) Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Sun Jun 5 00:29:59 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 5 Jun 2016 00:29:59 +0200 Subject: [Lazarus] Memory leak with Synchronize on external threads In-Reply-To: <000c01d1bccf$087df660$1979e320$@googlemail.com> References: <001d01d1bb39$3326b600$99742200$@googlemail.com> <574DF285.1060102@googlemail.com> <000c01d1bccf$087df660$1979e320$@googlemail.com> Message-ID: Am 02.06.2016 15:03 schrieb "Stefan Schalk" : > > > Hi Sven, > > many thanks for your quick response and solution! > > I tried the new FPC sources (Revision 33878) and ran in a segmentation fault. > In classes.inc line 345 the SizeOf gets the length from the pointer but I think > the length of the structure is needed: > > currently: FillChar(syncentry^, SizeOf(syncentry), 0); > > suggestion: FillChar(syncentry^, SizeOf(TThreadQueueEntry), 0); > > Because of that, the uninitialized structure member "Next" will lead to a > segmentation fault afterwards. > I tried the suggestion and everything works fine (no SIGSEGV, no memory leak). > Can you please review my suggestion? You're indeed right. Fixed that. Though this whole fix won't be part of 3.0.2 anymore as it got discovered (and fixed) too late. As a workaround try to avoid calling Synchronize from a new external thread each time. If it is the same thread then memory usage won't increase after the first call. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From juergen.hestermann at gmx.de Sun Jun 5 12:52:09 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Sun, 5 Jun 2016 12:52:09 +0200 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> Am 2016-06-02 um 17:52 schrieb Luiz Americo Pereira Camara: > The LCL port of VirtualTreeView component has a new home: https://github.com/blikblum/VirtualTreeView-Lazarus > It's now a direct fork of Delphi repository making easier to keep in sync > Two versions are released > - 4.8.7 > - 5.5.3 I am using a version of VTV from october 2013 which claims to be 4.8.7 too but is slightly different to the one I just downloaded from your link. Especialy one difference stroke me as it looks like a bug: In line 6740 of the current downloaded version there is this code: ---------------------- if not FCheckBox then HeaderGlyphSize := Point(FImages.Width, FImages.Height) else HeaderGlyphSize := Point(Treeview.CheckImages.Height, Treeview.CheckImages.Height) ---------------------- Why is "Height" used twice in the last line? This line is different in the older version of 4.8.7: ---------------------- HeaderGlyphSize := Point(Treeview.CheckImages.Width, Treeview.CheckImages.Height) ---------------------- which IMO is correct. Why the change? From luizamericop at gmail.com Sun Jun 5 14:56:48 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Sun, 5 Jun 2016 09:56:48 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> References: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> Message-ID: 2016-06-05 7:52 GMT-03:00 Jürgen Hestermann : > Am 2016-06-02 um 17:52 schrieb Luiz Americo Pereira Camara: > > The LCL port of VirtualTreeView component has a new home: > https://github.com/blikblum/VirtualTreeView-Lazarus > > It's now a direct fork of Delphi repository making easier to keep in sync > > Two versions are released > > - 4.8.7 > > - 5.5.3 > > I am using a version of VTV from october 2013 which claims to be 4.8.7 too > There are four LCL releases for 4.8.7. Probably you are using the second release > but is slightly different to the one I just downloaded from your link. > Especialy one difference stroke me as it looks like a bug: > In line 6740 of the current downloaded version there is this code: > > ---------------------- > if not FCheckBox then > HeaderGlyphSize := Point(FImages.Width, FImages.Height) > else > HeaderGlyphSize := Point(Treeview.CheckImages.Height, > Treeview.CheckImages.Height) > ---------------------- > > Why is "Height" used twice in the last line? > CheckImages changed from a ImageList to a Bitmap with all check images in a row. The Width of the bitmap has a different meaning from the imagelist one. In the Bitmap is the sum of all checkimages Width In the case the Width of each individual image matches Height, so the code. Feel free to report any bug Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From juergen.hestermann at gmx.de Sun Jun 5 15:50:57 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Sun, 5 Jun 2016 15:50:57 +0200 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> Message-ID: <6e1f26db-99df-5d1e-9b02-548ba6875929@gmx.de> Am 2016-06-05 um 14:56 schrieb Luiz Americo Pereira Camara: > 2016-06-05 7:52 GMT-03:00 Jürgen Hestermann : > ---------------------- > if not FCheckBox then > HeaderGlyphSize := Point(FImages.Width, FImages.Height) > else > HeaderGlyphSize := Point(Treeview.CheckImages.Height, Treeview.CheckImages.Height) > ---------------------- > Why is "Height" used twice in the last line? > CheckImages changed from a ImageList to a Bitmap with all check images in a row. The Width of the bitmap has a different meaning from the imagelist one. > In the Bitmap is the sum of all checkimages Width > In the case the Width of each individual image matches Height, so the code. > Feel free to report any bug I don't fully understand the changes regarding CheckImages but if it is not a bug but desired behaviour then why should I report a bug? From luizamericop at gmail.com Sun Jun 5 17:10:12 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Sun, 5 Jun 2016 12:10:12 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: <6e1f26db-99df-5d1e-9b02-548ba6875929@gmx.de> References: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> <6e1f26db-99df-5d1e-9b02-548ba6875929@gmx.de> Message-ID: 2016-06-05 10:50 GMT-03:00 Jürgen Hestermann : > Am 2016-06-05 um 14:56 schrieb Luiz Americo Pereira Camara: > > > Feel free to report any bug > > I don't fully understand the changes regarding CheckImages but > if it is not a bug but desired behaviour then why should I report a bug? > > I mean, any bug you find, graphical or behavior Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Santhoff at web.de Mon Jun 6 02:18:08 2016 From: M.Santhoff at web.de (Marc Santhoff) Date: Mon, 06 Jun 2016 02:18:08 +0200 Subject: [Lazarus] programming and testing ide design time package Message-ID: <1465172288.9680.5.camel@puma.das.netz> Hi, if writing an IDE extension, how would the setup for testing it look like? Assuming: - the package registers a menu entry - it does some design time manipulations according to the users/programmers wishes The code is written and compiled. Then it needs to be installed in the IDE and tested. How can I do it in a handy way? TIA, Marc -- Marc Santhoff From juha.manninen62 at gmail.com Mon Jun 6 19:18:08 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 6 Jun 2016 20:18:08 +0300 Subject: [Lazarus] programming and testing ide design time package In-Reply-To: <1465172288.9680.5.camel@puma.das.netz> References: <1465172288.9680.5.camel@puma.das.netz> Message-ID: On Monday, June 6, 2016, Marc Santhoff wrote: > > The code is written and compiled. Then it needs to be installed in the > IDE and tested. How can I do it in a handy way? > You can debug the IDE by opening lazarus.lpi project and pressing F9. Lazarus must be built with debug info before that. Another way to debug is by adding DebugLn() calls and checking their output in console or log file. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Santhoff at web.de Mon Jun 6 22:43:04 2016 From: M.Santhoff at web.de (Marc Santhoff) Date: Mon, 06 Jun 2016 22:43:04 +0200 Subject: [Lazarus] programming and testing ide design time package In-Reply-To: References: <1465172288.9680.5.camel@puma.das.netz> Message-ID: <1465245784.7244.3.camel@puma.das.netz> On Mo, 2016-06-06 at 20:18 +0300, Juha Manninen wrote: > On Monday, June 6, 2016, Marc Santhoff wrote: > > > > The code is written and compiled. Then it needs to be installed in the > > IDE and tested. How can I do it in a handy way? > > > > You can debug the IDE by opening lazarus.lpi project and pressing F9. > Lazarus must be built with debug info before that. > Another way to debug is by adding DebugLn() calls and checking their output > in console or log file. OK, so there is no other way but actually compiling the extension in. What I will try is to make the shim between IDE coupling an the rest as thin as possible, so anything else can be tested separately before. Thanks, Marc -- Marc Santhoff From nc-gaertnma at netcologne.de Mon Jun 6 22:48:11 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 6 Jun 2016 22:48:11 +0200 Subject: [Lazarus] programming and testing ide design time package In-Reply-To: <1465245784.7244.3.camel@puma.das.netz> References: <1465172288.9680.5.camel@puma.das.netz> <1465245784.7244.3.camel@puma.das.netz> Message-ID: <20160606224811.572d0f28@limapholos.matflo.wg> On Mon, 06 Jun 2016 22:43:04 +0200 Marc Santhoff wrote: > On Mo, 2016-06-06 at 20:18 +0300, Juha Manninen wrote: > > On Monday, June 6, 2016, Marc Santhoff wrote: > > > > > > The code is written and compiled. Then it needs to be installed in the > > > IDE and tested. How can I do it in a handy way? > > > > > > > You can debug the IDE by opening lazarus.lpi project and pressing F9. > > Lazarus must be built with debug info before that. > > Another way to debug is by adding DebugLn() calls and checking their output > > in console or log file. Hint: you can have multiple Lazarus instances, using the --pcp command line switch. > OK, so there is no other way but actually compiling the extension in. Well, you can create a project and compile your extension into that. Of course than you can only test a few parts. > What I will try is to make the shim between IDE coupling an the rest as > thin as possible, so anything else can be tested separately before. Good idea. Mattias From M.Santhoff at web.de Tue Jun 7 15:16:53 2016 From: M.Santhoff at web.de (Marc Santhoff) Date: Tue, 07 Jun 2016 15:16:53 +0200 Subject: [Lazarus] programming and testing ide design time package In-Reply-To: <20160606224811.572d0f28@limapholos.matflo.wg> References: <1465172288.9680.5.camel@puma.das.netz> <1465245784.7244.3.camel@puma.das.netz> <20160606224811.572d0f28@limapholos.matflo.wg> Message-ID: <1465305413.3471.2.camel@puma.das.netz> On Mo, 2016-06-06 at 22:48 +0200, Mattias Gaertner wrote: > On Mon, 06 Jun 2016 22:43:04 +0200 > Marc Santhoff wrote: > > > On Mo, 2016-06-06 at 20:18 +0300, Juha Manninen wrote: > > > On Monday, June 6, 2016, Marc Santhoff wrote: > > > > > > > > The code is written and compiled. Then it needs to be installed in the > > > > IDE and tested. How can I do it in a handy way? > > > > > > > > > > You can debug the IDE by opening lazarus.lpi project and pressing F9. > > > Lazarus must be built with debug info before that. > > > Another way to debug is by adding DebugLn() calls and checking their output > > > in console or log file. > > Hint: you can have multiple Lazarus instances, using the --pcp command > line switch. Ah, I didn' think about it, thanks. A bit confusing at first, solving the chicken-egg-problem by getting another chicken... ;) Getting hungry now, Marc -- Marc Santhoff From Martin at The-Wallers.net Wed Jun 8 18:08:54 2016 From: Martin at The-Wallers.net (Martin Waller) Date: Wed, 8 Jun 2016 17:08:54 +0100 Subject: [Lazarus] Raspberry Pi / Shared Libraries Message-ID: <008a01d1c1a0$0e880b60$2b982220$@The-Wallers.net> Hi, I've been trying to build and load dynamically a simple shared library using Lazarus and the FPC. At the moment I have a simple one function shared library that compiles and builds cleanly and I have a couple of lines to try and load the library. It consistently returns a handle of zero. The associated error from GetLoadErrorStr is "No such file or directory". Using objdump I can see that the library needs ld-linus-armhf.so.3 and that is in the /lib folder. If I replace the library name with a shared library in the same folder generated using the C compiler then it loads fine. The only different that I can see in that the Lazarus generated shared library has the soft-float ABI flag set and the C library has the hard-float ABI flag set! Does anyone have any clues as to why this can fail. Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From fluisgirardi at gmail.com Wed Jun 8 20:22:44 2016 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Wed, 8 Jun 2016 15:22:44 -0300 Subject: [Lazarus] Raspberry Pi / Shared Libraries In-Reply-To: <008a01d1c1a0$0e880b60$2b982220$@The-Wallers.net> References: <008a01d1c1a0$0e880b60$2b982220$@The-Wallers.net> Message-ID: See: http://bugs.freepascal.org/view.php?id=26454 2016-06-08 13:08 GMT-03:00 Martin Waller : > Hi, > > > > I’ve been trying to build and load dynamically a simple shared library > using Lazarus and the FPC. At the moment I have a simple one function > shared library that compiles and builds cleanly and I have a couple of > lines to try and load the library. > > > > It consistently returns a handle of zero. The associated error from > GetLoadErrorStr is “No such file or directory”. Using objdump I can see > that the library needs ld-linus-armhf.so.3 and that is in the /lib folder. > > > > If I replace the library name with a shared library in the same folder > generated using the C compiler then it loads fine. > > > > The only different that I can see in that the Lazarus generated shared > library has the soft-float ABI flag set and the C library has the > hard-float ABI flag set! > > > > Does anyone have any clues as to why this can fail. > > > > Martin > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fpc at ssn.at Mon Jun 13 16:33:22 2016 From: fpc at ssn.at (Lukas Gradl) Date: Mon, 13 Jun 2016 14:33:22 +0000 Subject: [Lazarus] Access violation at current svn Message-ID: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> Hi! I tried to update my Lazarus svn to the current revision (52501) on a debian jessie x86_64 machine. I compiled it by make clean;make all using fpc 3.1.1 from today. The comilation finishes successfully, but on starting lazarus I get a window "Read error" "Access violation Access violation". The console (where I started startlazarus from) says: [TJITForms.DoCreateJITComponent] Error Error: Access violation Stack trace: $0000000000547F10 $0000000000988F72 DOCREATEJITCOMPONENT, line 1041 of ../designer/jitforms.pp $00000000009883BA ADDNEWJITCOMPONENT, line 832 of ../designer/jitforms.pp $00000000009AC43D CREATECOMPONENT, line 1306 of customformeditor.pp $0000000000BF551F CREATENEWFORM, line 4477 of sourcefilemanager.pas $0000000000BEB3F6 NEWFILE, line 2139 of sourcefilemanager.pas $00000000004B83A3 DONEWFILE, line 5479 of main.pp $0000000000905468 DONEWEDITORFILE, line 707 of lazideintf.pas $0000000000952262 CREATESTARTFILES, line 1309 of projectdefs.pas $0000000000BF103B INITNEWPROJECT, line 3561 of sourcefilemanager.pas $00000000004BAA34 DONEWPROJECT, line 6129 of main.pp $00000000004A953A SETUPSTARTPROJECT, line 2317 of main.pp $00000000004A612F STARTIDE, line 1593 of main.pp $000000000041E9E7 main, line 133 of lazarus.pp TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil Any Idea what I'm doing wrong or is just the svn broken? regards Lukas From lazarus at kluug.net Mon Jun 13 16:42:40 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 13 Jun 2016 16:42:40 +0200 Subject: [Lazarus] Access violation at current svn In-Reply-To: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> References: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> Message-ID: On 13.06.2016 16:33, Lukas Gradl wrote: > Hi! > > I tried to update my Lazarus svn to the current revision (52501) on a > debian jessie x86_64 machine. > I compiled it by make clean;make all using fpc 3.1.1 from today. > > The comilation finishes successfully, but on starting lazarus I get a > window "Read error" "Access violation Access violation". It's a known issue. It's due to the recent FPC changes (PTypeInfo -> PPTypeInfo). Lazarus designer sources haven't been updated to handle these changes yet. I recommend you to compile Lazarus with FPC 3.0 fixes branch or with FPC trunk rev 33943 until it gets sorted out. You can stil compile your own applications with the most recent FPC trunk. Ondrej From pascaldragon at googlemail.com Mon Jun 13 21:13:13 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Mon, 13 Jun 2016 21:13:13 +0200 Subject: [Lazarus] Access violation at current svn In-Reply-To: References: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> Message-ID: <575F05C9.8060005@googlemail.com> On 13.06.2016 16:42, Ondrej Pokorny wrote: > On 13.06.2016 16:33, Lukas Gradl wrote: >> Hi! >> >> I tried to update my Lazarus svn to the current revision (52501) on a >> debian jessie x86_64 machine. >> I compiled it by make clean;make all using fpc 3.1.1 from today. >> >> The comilation finishes successfully, but on starting lazarus I get a >> window "Read error" "Access violation Access violation". > > It's a known issue. It's due to the recent FPC changes (PTypeInfo -> > PPTypeInfo). Lazarus designer sources haven't been updated to handle > these changes yet. > > I recommend you to compile Lazarus with FPC 3.0 fixes branch or with FPC > trunk rev 33943 until it gets sorted out. You can stil compile your own > applications with the most recent FPC trunk. The fix done in r52482 is not correct however. ClassInfo will continue to return a PTypeInfo for backwards compatibility, so you'll need to dynamically allocate a pointer variable that gets that type info and then gets stuffed into the ParentInfoRef field. Regards, Sven From vojtech.cihak at atlas.cz Tue Jun 14 18:28:47 2016 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 14 Jun 2016 18:28:47 +0200 Subject: [Lazarus] =?utf-8?q?Different_order_of_methods/events_of_PopupMen?= =?utf-8?q?u?= Message-ID: <20160614182847.2B96A313@atlas.cz> Hi,   is this known issue?   In Qt, when I open PopupMenu and select item, order is:   MenuItemClick; OnMenuClose;   In Wine it is opposite (and in Windows too). I can't test in Delphi7 because Popumenus don't have OnClose there.   Thanks.   From vojtech.cihak at atlas.cz Tue Jun 14 21:55:32 2016 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 14 Jun 2016 21:55:32 +0200 Subject: [Lazarus] =?utf-8?q?Different_order_of_methods/events_of_PopupMen?= =?utf-8?q?u?= In-Reply-To: 000000005d320001c54400e15025 References: 000000005d320001c54400e15025 Message-ID: <20160614215532.C3E43D80@atlas.cz> I reported it: http://bugs.freepascal.org/view.php?id=30278   The older (0.9.30) related issue: http://bugs.freepascal.org/view.php?id=15465   Thanks, V. ______________________________________________________________ > Od: Vojtěch Čihák > Komu: Lazarus mailing list > Datum: 14.06.2016 18:28 > Předmět: [Lazarus] Different order of methods/events of PopupMenu > Hi,   is this known issue?   In Qt, when I open PopupMenu and select item, order is:   MenuItemClick; OnMenuClose;   In Wine it is opposite (and in Windows too). I can't test in Delphi7 because Popumenus don't have OnClose there.   Thanks.   -- _______________________________________________ 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 jmlandmesser at gmx.de Wed Jun 15 05:35:56 2016 From: jmlandmesser at gmx.de (John Landmesser) Date: Wed, 15 Jun 2016 05:35:56 +0200 Subject: [Lazarus] test Message-ID: just to see if it works From nc-gaertnma at netcologne.de Wed Jun 15 11:44:26 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 15 Jun 2016 11:44:26 +0200 Subject: [Lazarus] Access violation at current svn In-Reply-To: <575F05C9.8060005@googlemail.com> References: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> <575F05C9.8060005@googlemail.com> Message-ID: <20160615114426.7b67e3fc@limapholos.matflo.wg> On Mon, 13 Jun 2016 21:13:13 +0200 Sven Barth wrote: >[...] > The fix done in r52482 is not correct however. ClassInfo will continue > to return a PTypeInfo for backwards compatibility, so you'll need to > dynamically allocate a pointer variable that gets that type info and > then gets stuffed into the ParentInfoRef field. Thanks for the hint. Done. Mattias From larrydalton71 at gmail.com Wed Jun 15 17:32:27 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Wed, 15 Jun 2016 10:32:27 -0500 Subject: [Lazarus] Sorting dbase tables with td for Message-ID: <7F6B8960-DB60-4718-81D5-EE6CD0F2F099@gmail.com> Is there an algorithm to sort dbase tables by fieldname with tdbf? Sent from my iPhone From frederic.crapez at wanadoo.fr Wed Jun 15 17:49:53 2016 From: frederic.crapez at wanadoo.fr (fred) Date: Wed, 15 Jun 2016 17:49:53 +0200 Subject: [Lazarus] Sorting dbase tables with td for In-Reply-To: <7F6B8960-DB60-4718-81D5-EE6CD0F2F099@gmail.com> References: <7F6B8960-DB60-4718-81D5-EE6CD0F2F099@gmail.com> Message-ID: <1466005793.24830.0.camel@wanadoo.fr> hy, you can add an index field on sorting it with ascending or descending. Le mercredi 15 juin 2016 à 10:32 -0500, Larry Dalton a écrit : > Is there an algorithm to sort dbase tables by fieldname with tdbf? > > Sent from my iPhone From larrydalton71 at gmail.com Wed Jun 15 23:42:04 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Wed, 15 Jun 2016 16:42:04 -0500 Subject: [Lazarus] Installing lazarus Message-ID: I am trying to install 1.60 On Linux. I have download the fpr-src,fpc, and lazarus 1.60 debt packages, and have installed them. Where do I find the executable ide? Sent from my iPhone From corpsman at web.de Thu Jun 16 16:23:58 2016 From: corpsman at web.de (Corpsman) Date: Thu, 16 Jun 2016 16:23:58 +0200 Subject: [Lazarus] Installing lazarus In-Reply-To: References: Message-ID: <5762B67E.6080203@web.de> On 06/15/2016 11:42 PM, Larry Dalton wrote: > I am trying to install 1.60 > On Linux. I have download the fpr-src,fpc, and lazarus 1.60 debt packages, and have installed them. Where do I find the executable ide? > > Sent from my iPhone > on my ubuntu just type ALT + F2 lazarus return -- Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei. -- Schütze deine Privatsphäre, nutze E-mail Verschlüsselung. Wie das geht steht z.B. hier : https://support.mozilla.org/en-US/kb/digitally-signing-and-encrypting-messages#w_installing-gpg-and-enigmail From nc-gaertnma at netcologne.de Thu Jun 16 16:30:12 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 16 Jun 2016 16:30:12 +0200 Subject: [Lazarus] Installing lazarus In-Reply-To: References: Message-ID: <20160616163012.55b809c3@limapholos.matflo.wg> On Wed, 15 Jun 2016 16:42:04 -0500 Larry Dalton wrote: > I am trying to install 1.60 > On Linux. I have download the fpr-src,fpc, and lazarus 1.60 debt packages, and have installed them. Where do I find the executable ide? Which Linux distro/desktop? Mattias From d.ioannidis at nephelae.eu Thu Jun 16 19:18:17 2016 From: d.ioannidis at nephelae.eu (Dimitrios Chr. Ioannidis) Date: Thu, 16 Jun 2016 20:18:17 +0300 Subject: [Lazarus] Lazarus svn authentication Message-ID: Hi, just tried unsuccessfully to update my local lazarus fixes 1.6 branch because now the svn.freepascal.org asks for basic authentication : " Unable to connect to a repository at URL 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' No more credentials or we tried too many times. Authentication failed " Is it me, or something changed ? regards, -- Dimitrios Chr. Ioannidis From michael at freepascal.org Thu Jun 16 22:07:14 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 16 Jun 2016 22:07:14 +0200 (CEST) Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: > Hi, > > just tried unsuccessfully to update my local lazarus fixes 1.6 branch > because now the svn.freepascal.org asks for basic authentication : > > " > Unable to connect to a repository at URL > 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' > No more credentials or we tried too many times. > Authentication failed > " > > Is it me, or something changed ? Nothing changed as far as I know. Michael. From tc at epidata.info Thu Jun 16 22:07:26 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Thu, 16 Jun 2016 22:07:26 +0200 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On 2016-06-16 19:18, Dimitrios Chr. Ioannidis wrote: > Hi, > > just tried unsuccessfully to update my local lazarus fixes 1.6 > branch because now the svn.freepascal.org asks for basic authentication : > > " > Unable to connect to a repository at URL > 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' > No more credentials or we tried too many times. > Authentication failed > " > > Is it me, or something changed ? +1 I get this too when updating trunk. -Torsten. From mailinglists at geldenhuys.co.uk Thu Jun 16 22:22:06 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 16 Jun 2016 21:22:06 +0100 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On 2016-06-16 21:07, Torsten Bonde Christiansen wrote: > I get this too when updating trunk. I just checked my FPC and Lazarus git mirrors, which both pull SVN updates from svn.freepascal.org. It works fine here (UK based). Regards, Graeme From tc at epidata.info Thu Jun 16 22:23:49 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Thu, 16 Jun 2016 22:23:49 +0200 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On 2016-06-16 22:22, Graeme Geldenhuys wrote: > On 2016-06-16 21:07, Torsten Bonde Christiansen wrote: >> I get this too when updating trunk. > I just checked my FPC and Lazarus git mirrors, which both pull SVN > updates from svn.freepascal.org. It works fine here (UK based). Correct - however there were issues about 2 hours ago. Seems to be working again. -Torsten. From jesusrmx at gmail.com Thu Jun 16 22:23:59 2016 From: jesusrmx at gmail.com (Jesus Reyes A.) Date: Thu, 16 Jun 2016 15:23:59 -0500 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On Thu, 16 Jun 2016 15:07:14 -0500, Michael Van Canneyt wrote: > > > On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: > >> Hi, >> >> just tried unsuccessfully to update my local lazarus fixes 1.6 branch >> because now the svn.freepascal.org asks for basic authentication : >> >> " >> Unable to connect to a repository at URL >> 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' >> No more credentials or we tried too many times. >> Authentication failed >> " >> >> Is it me, or something changed ? > > > Nothing changed as far as I know. > > Michael. A friend has reported something similar, I haven't had any problem updating svn using svn+ssh, but anonyous access have problem since this morning (he lives in Spain) and more he said the lists have not worked normally since the last changes. There is something happening, for example at least for the lazarus mailing list the archive show the last records only for may: http://lists.lazarus-ide.org/pipermail/lazarus/ Jesus Reyes A. From d.ioannidis at nephelae.eu Thu Jun 16 22:25:22 2016 From: d.ioannidis at nephelae.eu (Dimitrios Chr. Ioannidis) Date: Thu, 16 Jun 2016 23:25:22 +0300 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: Στις 2016-06-16 23:07, Michael Van Canneyt έγραψε: > On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: > >> Hi, >> >> just tried unsuccessfully to update my local lazarus fixes 1.6 >> branch because now the svn.freepascal.org asks for basic >> authentication : >> >> " >> Unable to connect to a repository at URL >> 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' >> No more credentials or we tried too many times. >> Authentication failed >> " >> >> Is it me, or something changed ? > > > Nothing changed as far as I know. Now it works perfectly. hmmm, .... who knows maybe a "glitch in the ...system" . ;) regrads, -- Dimitrios Chr. Ioannidis From michael at freepascal.org Thu Jun 16 22:39:44 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 16 Jun 2016 22:39:44 +0200 (CEST) Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: > Στις 2016-06-16 23:07, Michael Van Canneyt έγραψε: >> On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: >> >>> Hi, >>> >>> just tried unsuccessfully to update my local lazarus fixes 1.6 >>> branch because now the svn.freepascal.org asks for basic >>> authentication : >>> >>> " >>> Unable to connect to a repository at URL >>> 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' >>> No more credentials or we tried too many times. >>> Authentication failed >>> " >>> >>> Is it me, or something changed ? >> >> >> Nothing changed as far as I know. > > Now it works perfectly. > > hmmm, .... who knows maybe a "glitch in the ...system" . ;) Actually, no. After sending my mail, I had an idea. Someone indeed fiddled with the access file and broke it. I fixed it. Michael. From bartjunk64 at gmail.com Thu Jun 16 22:57:55 2016 From: bartjunk64 at gmail.com (Bart) Date: Thu, 16 Jun 2016 22:57:55 +0200 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On 6/16/16, Dimitrios Chr. Ioannidis wrote: > just tried unsuccessfully to update my local lazarus fixes 1.6 branch > because now the svn.freepascal.org asks for basic authentication : [snip] > Is it me, or something changed ? No problem here. A bit OffTopic: Does anybody know why svn up from my Win7 takes way more time than from my Linux (which runs in a VM hosted on said Win7)? Bart From vincent.snijders at gmail.com Fri Jun 17 06:25:22 2016 From: vincent.snijders at gmail.com (Vincent Snijders) Date: Fri, 17 Jun 2016 06:25:22 +0200 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: 2016-06-16 22:39 GMT+02:00 Michael Van Canneyt : > > > Actually, no. > > After sending my mail, I had an idea. Someone indeed fiddled with the > access file and broke it. I fixed it. > > I did that, sorry. When I looked after the reports here at 22:25, I saw that somebody else already changed and fixed it. Thanks. Vincent -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Sat Jun 18 14:20:28 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Sat, 18 Jun 2016 14:20:28 +0200 Subject: [Lazarus] translation from c-header Message-ID: <57653C8C.1020001@de-brouwerij.be> Hi, I'm trying to port pigpio to fpc (http://abyz.co.uk/rpi/pigpio/). h2pas has a problem with this : c : typedef void *(gpioThreadFunc_t) (void *); How would this be translated to Pascal ? I know it's a function without result (= procedure), but what about the paramater ? Later that function/procedure is used like this : function gpioStartThread(f:gpioThreadFunc_t; userdata:pointer):Ppthread_t;cdecl;external; I also have a doubt about this : c : typedef void (*gpioTimerFunc_t) (void); Pascal : gpioTimerFunc_t = procedure (_para1:pointer);cdecl; Is this OK ? I'm not fluent with c, even less with such typedef's. TIA, Koenraad From dec12 at avidsoft.com.hk Sat Jun 18 18:40:14 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Sun, 19 Jun 2016 00:40:14 +0800 Subject: [Lazarus] translation from c-header In-Reply-To: <57653C8C.1020001@de-brouwerij.be> References: <57653C8C.1020001@de-brouwerij.be> Message-ID: <5765796E.9050102@avidsoft.com.hk> Koenraad Lelong wrote: > Hi, > > I'm trying to port pigpio to fpc (http://abyz.co.uk/rpi/pigpio/). > h2pas has a problem with this : > c : typedef void *(gpioThreadFunc_t) (void *); I am only guess and could be very wrong. My guess is: Type TProcedure = procedure; gpioThreadFunc = procedure(TProcedure); Dennis From pascaldragon at googlemail.com Sun Jun 19 01:06:32 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 19 Jun 2016 01:06:32 +0200 Subject: [Lazarus] translation from c-header In-Reply-To: <57653C8C.1020001@de-brouwerij.be> References: <57653C8C.1020001@de-brouwerij.be> Message-ID: Am 18.06.2016 14:20 schrieb "Koenraad Lelong" : > > Hi, > > I'm trying to port pigpio to fpc (http://abyz.co.uk/rpi/pigpio/). > h2pas has a problem with this : > c : typedef void *(gpioThreadFunc_t) (void *); > How would this be translated to Pascal ? > I know it's a function without result (= procedure), but what about the paramater ? > Later that function/procedure is used like this : > function gpioStartThread(f:gpioThreadFunc_t; userdata:pointer):Ppthread_t;cdecl;external; > > > I also have a doubt about this : > > c : typedef void (*gpioTimerFunc_t) (void); > Pascal : gpioTimerFunc_t = procedure (_para1:pointer);cdecl; > > Is this OK ? > > I'm not fluent with c, even less with such typedef's. Yes, that should be correct. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Mon Jun 20 13:41:15 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 20 Jun 2016 14:41:15 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator Message-ID: Hello I have made an experimental unit that implements functions dealing with Unicode codepoints transparently for both UTF-8 and UTF-16 encodings as promised here: http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus#Helper_functions_for_CodePoints They use "String" type which maps to AnsiString with the Lazarus default UTF-8 system, and UnicodeString when {$ModeSwitch UnicodeStrings} is defined. There is also a string iterator which the compiler can use for its for-in loop. As a result, regardless of encoding, this code works: for ch in s do writeln('ch=',ch); Cool, ha? To test it, extract the package, open the project in Lazarus, compile and run. Change the encoding with "UseUTF16" define in Custom Options page. The unit LazCodePoint depends on LazUtils package, LazUTF8 and LazUTF16 units. Later it can be moved to LazUtils itself. It implements some UTF-16 functions which can be moved to LazUTF16 unless FPC project provides them (as it should). The test program is a cmd line program and has no other dependencies. Issues: 1. How to use it without the "UseUTF16" define? The iterator does not compile in Mode DelphiUnicode. 2. How to implement an iterator for Unicode glyps + decomposed accented characters? It is the most complex part of Unicode. Has anybody made such code? Juha -------------- next part -------------- A non-text attachment was scrubbed... Name: CodePointPub.tar.gz Type: application/x-gzip Size: 3280 bytes Desc: not available URL: From bartjunk64 at gmail.com Mon Jun 20 14:00:27 2016 From: bartjunk64 at gmail.com (Bart) Date: Mon, 20 Jun 2016 14:00:27 +0200 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: On 6/20/16, Juha Manninen wrote: > 2. How to implement an iterator for Unicode glyps + decomposed > accented characters? It is the most complex part of Unicode. Has > anybody made such code? Maybe Theo's UTF8Scanner implements this? Bart From bartjunk64 at gmail.com Mon Jun 20 14:14:17 2016 From: bartjunk64 at gmail.com (Bart) Date: Mon, 20 Jun 2016 14:14:17 +0200 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: i := CodePointLength(s); // Should return 26. writeln('Testing CodePointLength. Result = ', i); gives Using UnicodeString + UTF-16 Sizeof(Char) = 2 ... Testing CodePointLength. Result = 30 Mind you that on my system the Eyes, Wineglass and Heart are unreadible inside Lazarus IDE (they are presented as an outline of a square block). Win7 32 bit, fpc 3.0.0 Lazarus trunk. A tip: put the -dUseUtf16 in a seperate buildmode? Bart From juha.manninen62 at gmail.com Mon Jun 20 14:29:35 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 20 Jun 2016 15:29:35 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: On Mon, Jun 20, 2016 at 3:14 PM, Bart wrote: > i := CodePointLength(s); // Should return 26. Ok, the source is wrong. I had changed the string after the comment. It should be: i := CodePointLength(s); // Should return 30. > A tip: put the -dUseUtf16 in a seperate buildmode? Yes, a good idea. If I make a new version, I will include that. About Theo's UTF8 Tools and UTF8Scanner. I understand they work with CodePoints only. Juha From juha.manninen62 at gmail.com Mon Jun 20 14:39:33 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 20 Jun 2016 15:39:33 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: On Mon, Jun 20, 2016 at 3:14 PM, Bart wrote: > Mind you that on my system the Eyes, Wineglass and Heart are > unreadible inside Lazarus IDE (they are presented as an outline of a > square block). > > Win7 32 bit, fpc 3.0.0 Lazarus trunk. On my Linux Manjaro + KDE they show rather correctly. Anyway, the example code can deal with them even if a font does not support them. It makes no difference for the numbers shown. Juha From lazarus at mfriebe.de Mon Jun 20 14:42:53 2016 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 20 Jun 2016 13:42:53 +0100 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> On 20/06/2016 12:41, Juha Manninen wrote: > 2. How to implement an iterator for Unicode glyps + decomposed > accented characters? It is the most complex part of Unicode. Has > anybody made such code? > Glyph and (de-)composed are different things A glyph may be a ligature https://en.wikipedia.org/wiki/Typographic_ligature 2 or more chars, depending on the font you use. Even whole words. As for (de-)composed: SynEdit has some code to detect them (combining codepoints). Not sure if (still) complete (if new ones were added ??). But if you just want (de-)composed, and not a complete unicode library (with all the properties for each codepoint), then feel free to look at the code, and use/copy it (that is: check svn blame, if any one else committed to that particular code. If it is just I, who committed, then feel free to copy, even if license changes. From lazarus at kluug.net Mon Jun 20 18:08:24 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 20 Jun 2016 18:08:24 +0200 Subject: [Lazarus] Multithreaded app with PostgreSQL connection Message-ID: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> Hello! I have a multithreaded application where every thread needs to connect to the same PostgreSQL database. How to design the DB connectivity for a multithreaded application correctly? I see that TPQConnection has an FConnectionPool. So is it thread-safe? Create a TPQConnection in the main thread; create TSQLQuery+TSQLTransaction in a (different) thread and connect it to to the TPQConnection from main thread via the Database property? Or do I need a TPQConnection per thread? I somehow failed to find any information about sqldb and multithreading: http://www.freepascal.org/docs-html/fcl/sqldb/index.html http://wiki.freepascal.org/SQLdb_Programming_Reference Thanks :) Ondrej From michael at freepascal.org Mon Jun 20 19:38:50 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 20 Jun 2016 19:38:50 +0200 (CEST) Subject: [Lazarus] Multithreaded app with PostgreSQL connection In-Reply-To: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> References: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> Message-ID: On Mon, 20 Jun 2016, Ondrej Pokorny wrote: > Hello! > > I have a multithreaded application where every thread needs to connect > to the same PostgreSQL database. How to design the DB connectivity for a > multithreaded application correctly? Best is to have every thread use it's own connection. If you want only a single connection, then you should make sure all Database and Transaction properties (plus setting them to Nil) are protected by a critical section: there are non-threadsafe lists involved. > > I see that TPQConnection has an FConnectionPool. So is it thread-safe? Not if you don't follow the above steps. > > Create a TPQConnection in the main thread; create > TSQLQuery+TSQLTransaction in a (different) thread and connect it to to > the TPQConnection from main thread via the Database property? > Or do I need a TPQConnection per thread? Yes. > > I somehow failed to find any information about sqldb and multithreading: > http://www.freepascal.org/docs-html/fcl/sqldb/index.html > http://wiki.freepascal.org/SQLdb_Programming_Reference Because it is not thread safe. It is on my todo list. Michael. From markMLl.lazarus at telemetry.co.uk Mon Jun 20 20:26:03 2016 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 20 Jun 2016 18:26:03 +0000 Subject: [Lazarus] Multithreaded app with PostgreSQL connection In-Reply-To: References: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> Message-ID: Michael Van Canneyt wrote: > On Mon, 20 Jun 2016, Ondrej Pokorny wrote: >> Hello!>> I have a multithreaded application where every thread needs >> to connect > to the same PostgreSQL database. How to design the DB >> connectivity for a > multithreaded application correctly? > Best is to have every thread use it's own connection. > If you want only a single connection, then you should make sure all > Databaseand Transaction properties (plus setting them to Nil) are > protected by acritical section: there are non-threadsafe lists involved. >>> I see that TPQConnection has an FConnectionPool. So is it thread-safe? > Not if you don't follow the above steps. >>> Create a TPQConnection in the main thread; create > >>> TSQLQuery+TSQLTransaction in a (different) thread and connect it to >>> to > the TPQConnection from main thread via the Database property?> >>> Or do I need a TPQConnection per thread? > Yes. >>> I somehow failed to find any information about sqldb and >>> multithreading:> >>> http://www.freepascal.org/docs-html/fcl/sqldb/index.html> >>> http://wiki.freepascal.org/SQLdb_Programming_Reference > Because it is not thread safe. It is on my todo list. I was going to post a pointer to previous discussion at http://comments.gmane.org/gmane.comp.ide.lazarus.general/46205 but I think Michael's comment here overrides anything that's been said previously :-) Irrespective of whether the underlying components are thread-safe, I think it's advisable to protect them from reentry with a critical section. There's just too much to go wrong in libpq etc., and in particular there's a risk of mayhem if somebody migrates an app to a database less-tolerant. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From mailinglists at geldenhuys.co.uk Mon Jun 20 23:07:59 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 20 Jun 2016 22:07:59 +0100 Subject: [Lazarus] Multithreaded app with PostgreSQL connection In-Reply-To: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> References: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> Message-ID: <2b2f3ce1-ff33-e537-d8a0-f71ef5c8acfb@geldenhuys.co.uk> On 2016-06-20 17:08, Ondrej Pokorny wrote: > I have a multithreaded application where every thread needs to connect > to the same PostgreSQL database. How to design the DB connectivity for a > multithreaded application correctly? Having already written your application, it is probably too late to switch to tiOPF. tiOPF does most of the work for you, and it takes care of multi-threaded access to a single DB connection. It has support for multiple DB connections, a connection pool and thread pool. If nothing else, it might be worth you taking a look at what tiOPF have done to accomplish this. tiOPF is available on SourceForge.net. http://www.tiopf.com Regards, Graeme From maaartinus at gmail.com Tue Jun 21 04:05:04 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Tue, 21 Jun 2016 04:05:04 +0200 Subject: [Lazarus] Zooming a form Message-ID: I should zoom a form, so that all its controls (and their fonts) get bigger by X%. The recursion is trivial and it mostly works, but ... I'm doing it in a moment when not everything is visible (and can't see how to postpone it). Despite that, it works fine for all controls with Anchors = [akLeft, akTop]. For controls with other anchors, nothing works: Even a trivial change like increasing left or width by one makes the control lose its anchoring (and behave like left-top-anchored) and move to a strange position. The problem seems to lie in TControl.UpdateBaseBounds when the FBaseParentClientSize gets stored, which happens to be (0, 0) at this point. If I hack it to keep the previously stored value, it somehow works. The zero-client-size parent is a TPage, but I can't claim it guilty as I couldn't reproduce my problem in a small example. So I wonder: - Is it forbidden to change position and/or size of a component when it's not shown? - If not, how can I deal with right-aligned controls? Simply setting c.Left := c.Left * Factor doesn't seem to work (though it should as in this step all positions and all sizes simply get scaled up; anchoring is used when the parent resizes and not the component itself, right?). But actually any help is appreciated. I'm stuck with Lazarus 1.4.2, but the trunk code seems to do the same. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Tue Jun 21 13:45:19 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 21 Jun 2016 13:45:19 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: References: Message-ID: <20160621134519.03fe41ae@limapholos.matflo.wg> On Tue, 21 Jun 2016 04:05:04 +0200 Martin Grajcar wrote: >[...]Despite that, it works fine for all controls with Anchors > = [akLeft, akTop]. For controls with other anchors, nothing works[...] > The problem seems to lie in TControl.UpdateBaseBounds when > the FBaseParentClientSize gets stored, which happens to be (0, 0) at this > point. If I hack it to keep the previously stored value, it somehow works. BoundsRect (Left,Top,Width,Height) is the current position/size. When a form's width is changed the LCL has to adapt the right anchored controls - aka changing the Left so that the distance of the right side is restored. The right distance is computed from BaseBounds and BaseParentClientSize. BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. when setting Left, Top, Width, Height). When the LCL computes the autosized values it calls SetBoundsKeepBase, so it changes BoundsRect and keeps BaseBounds/BaseParentClientSize. > The zero-client-size parent is a TPage, but I can't claim it guilty as I > couldn't reproduce my problem in a small example. Do you mean it does work in a small example, but it does not in your complex application? > So I wonder: > > - Is it forbidden to change position and/or size of a component when > it's not shown? It is allowed and a pretty normal thing. > - If not, how can I deal with right-aligned controls? Simply setting > c.Left := c.Left * Factor doesn't seem to work (though it should as in this > step all positions and all sizes simply get scaled up; anchoring is used > when the parent resizes and not the component itself, right?). Maybe you forget to disable the autosize updates during the changes? Simple example: MainControl.DisableAlign; try MainControl.SetBounds(Width*f,Height*f); for aControl in List do aControl.SetBounds(aControl.Left*f,aControl.Top*f,aControl.Width*f,aControl.Height*f); finally MainControl.EnableAlign; end; Note: This algorithm has rounding errors, so multiple zooms will destroy your layout. Mattias From juha.manninen62 at gmail.com Tue Jun 21 14:49:14 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 21 Jun 2016 15:49:14 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> References: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> Message-ID: On Mon, Jun 20, 2016 at 3:42 PM, Martin Frb wrote: > Glyph and (de-)composed are different things > > A glyph may be a ligature https://en.wikipedia.org/wiki/Typographic_ligature > 2 or more chars, depending on the font you use. Even whole words. I don't know if glyphs require extra treatment. I guess I still don't understand all details. Anyway, I try to figure out all Combining Diacritical Marks now. > As for (de-)composed: SynEdit has some code to detect them (combining > codepoints). Not sure if (still) complete (if new ones were added ??). > But if you just want (de-)composed, and not a complete unicode library (with > all the properties for each codepoint), then feel free to look at the code, ... I found: function TSynEditStringList.LogicPosIsCombining(const AChar: PChar): Boolean; begin Result := ( ( (AChar[0] = #$CC) ) or // Combining Diacritical Marks (belongs to previos char) 0300-036F ( (AChar[0] = #$CD) and (AChar[1] in [#$80..#$AF]) ) or // Combining Diacritical Marks ( (AChar[0] = #$D8) and (AChar[1] in [#$90..#$9A]) ) or // Arabic 0610 (d890)..061A (d89a) ( (AChar[0] = #$D9) and (AChar[1] in [#$8b..#$9f, #$B0]) ) or // Arabic 064B (d98b)..065F (d99f) // 0670 (d9b0) ( (AChar[0] = #$DB) and (AChar[1] in [#$96..#$9C, #$9F..#$A4, #$A7..#$A8, #$AA..#$AD]) ) or // Arabic 06D6 (db96).. .. ..06EA (dbaa) ( (AChar[0] = #$E0) and (AChar[1] = #$A3) and (AChar[2] in [#$A4..#$BE]) ) or // Arabic 08E4 (e0a3a4) ..08FE (e0a3be) ( (AChar[0] = #$E1) and (AChar[1] = #$B7) ) or // Combining Diacritical Marks Supplement 1DC0-1DFF ( (AChar[0] = #$E2) and (AChar[1] = #$83) and (AChar[2] in [#$90..#$FF]) ) or // Combining Diacritical Marks for Symbols 20D0-20FF ( (AChar[0] = #$EF) and (AChar[1] = #$B8) and (AChar[2] in [#$A0..#$AF]) ) // Combining half Marks FE20-FE2F ); end; It works well. I already created an enumerator for UTF-8 using it. I will do an UTF-16 version soon. First I wanted to add all the possibly missing ranges of combining marks. It is difficult to find such a list anywhere! How come? The rule is quite simple after all: a codepoint should be combined with a previous codepoint. True or False. Simple. I did some detective work and studied C# lib sources of Mono project. https://github.com/mono/mono The string etc. units are extremely complicated. I didn't understand much and didn't find any list of combining marks. I found something from XmlChar.cs and XmlCharTests.cs which has a function IsCombiningChar. I copy it below. The problem is that its ranges are completely wrong! For example the first range ends at 0x0345. However 0x0346 is also a combining mark: http://www.fileformat.info/info/unicode/char/0346/index.htm and so is 0x0347 and 0x0348 etc. Uhhh... I guess I could dig out the ranges from here: http://www.fileformat.info/info/unicode/category/index.htm At least these are combining marks: [Mc] Mark, Spacing Combining [Me] Mark, Enclosing [Mn] Mark, Nonspacing Are there others? It will be lots of work because it only shows individual values, not ranges, and there are almost 2000 values! Any hints anybody? This feels like reinventing the wheel. There must be a valid updated list of the ranges somewhere. Juha --- --- From XmlCharTests.cs --- --- private static bool IsCombiningChar (int ch) { return (ch >= 0x0300 && ch <= 0x0345) || (ch >= 0x0360 && ch <= 0x0361) || (ch >= 0x0483 && ch <= 0x0486) || (ch >= 0x0591 && ch <= 0x05A1) || (ch >= 0x05A3 && ch <= 0x05B9) || (ch >= 0x05BB && ch <= 0x05BD) || (ch == 0x05BF) || (ch >= 0x05C1 && ch <= 0x05C2) || (ch == 0x05C4) || (ch >= 0x064B && ch <= 0x0652) || (ch == 0x0670) || (ch >= 0x06D6 && ch <= 0x06DC) || (ch >= 0x06DD && ch <= 0x06DF) || (ch >= 0x06E0 && ch <= 0x06E4) || (ch >= 0x06E7 && ch <= 0x06E8) || (ch >= 0x06EA && ch <= 0x06ED) || (ch >= 0x0901 && ch <= 0x0903) || (ch == 0x093C) || (ch >= 0x093E && ch <= 0x094C) || (ch == 0x094D) || (ch >= 0x0951 && ch <= 0x0954) || (ch >= 0x0962 && ch <= 0x0963) || (ch >= 0x0981 && ch <= 0x0983) || (ch == 0x09BC) || (ch == 0x09BE) || (ch == 0x09BF) || (ch >= 0x09C0 && ch <= 0x09C4) || (ch >= 0x09C7 && ch <= 0x09C8) || (ch >= 0x09CB && ch <= 0x09CD) || (ch == 0x09D7) || (ch >= 0x09E2 && ch <= 0x09E3) || (ch == 0x0A02) || (ch == 0x0A3C) || (ch == 0x0A3E) || (ch == 0x0A3F) || (ch >= 0x0A40 && ch <= 0x0A42) || (ch >= 0x0A47 && ch <= 0x0A48) || (ch >= 0x0A4B && ch <= 0x0A4D) || (ch >= 0x0A70 && ch <= 0x0A71) || (ch >= 0x0A81 && ch <= 0x0A83) || (ch == 0x0ABC) || (ch >= 0x0ABE && ch <= 0x0AC5) || (ch >= 0x0AC7 && ch <= 0x0AC9) || (ch >= 0x0ACB && ch <= 0x0ACD) || (ch >= 0x0B01 && ch <= 0x0B03) || (ch == 0x0B3C) || (ch >= 0x0B3E && ch <= 0x0B43) || (ch >= 0x0B47 && ch <= 0x0B48) || (ch >= 0x0B4B && ch <= 0x0B4D) || (ch >= 0x0B56 && ch <= 0x0B57) || (ch >= 0x0B82 && ch <= 0x0B83) || (ch >= 0x0BBE && ch <= 0x0BC2) || (ch >= 0x0BC6 && ch <= 0x0BC8) || (ch >= 0x0BCA && ch <= 0x0BCD) || (ch == 0x0BD7) || (ch >= 0x0C01 && ch <= 0x0C03) || (ch >= 0x0C3E && ch <= 0x0C44) || (ch >= 0x0C46 && ch <= 0x0C48) || (ch >= 0x0C4A && ch <= 0x0C4D) || (ch >= 0x0C55 && ch <= 0x0C56) || (ch >= 0x0C82 && ch <= 0x0C83) || (ch >= 0x0CBE && ch <= 0x0CC4) || (ch >= 0x0CC6 && ch <= 0x0CC8) || (ch >= 0x0CCA && ch <= 0x0CCD) || (ch >= 0x0CD5 && ch <= 0x0CD6) || (ch >= 0x0D02 && ch <= 0x0D03) || (ch >= 0x0D3E && ch <= 0x0D43) || (ch >= 0x0D46 && ch <= 0x0D48) || (ch >= 0x0D4A && ch <= 0x0D4D) || (ch == 0x0D57) || (ch == 0x0E31) || (ch >= 0x0E34 && ch <= 0x0E3A) || (ch >= 0x0E47 && ch <= 0x0E4E) || (ch == 0x0EB1) || (ch >= 0x0EB4 && ch <= 0x0EB9) || (ch >= 0x0EBB && ch <= 0x0EBC) || (ch >= 0x0EC8 && ch <= 0x0ECD) || (ch >= 0x0F18 && ch <= 0x0F19) || (ch == 0x0F35) || (ch == 0x0F37) || (ch == 0x0F39) || (ch == 0x0F3E) || (ch == 0x0F3F) || (ch >= 0x0F71 && ch <= 0x0F84) || (ch >= 0x0F86 && ch <= 0x0F8B) || (ch >= 0x0F90 && ch <= 0x0F95) || (ch == 0x0F97) || (ch >= 0x0F99 && ch <= 0x0FAD) || (ch >= 0x0FB1 && ch <= 0x0FB7) || (ch == 0x0FB9) || (ch >= 0x20D0 && ch <= 0x20DC) || (ch == 0x20E1) || (ch >= 0x302A && ch <= 0x302F) || (ch == 0x3099) || (ch == 0x309A); } From luca at wetron.es Tue Jun 21 15:15:09 2016 From: luca at wetron.es (Luca Olivetti) Date: Tue, 21 Jun 2016 15:15:09 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: <20160621134519.03fe41ae@limapholos.matflo.wg> References: <20160621134519.03fe41ae@limapholos.matflo.wg> Message-ID: <57693DDD.1050002@wetron.es> El 21/06/16 a les 13:45, Mattias Gaertner ha escrit: > > Simple example: > > MainControl.DisableAlign; > try > MainControl.SetBounds(Width*f,Height*f); > for aControl in List do > aControl.SetBounds(aControl.Left*f,aControl.Top*f,aControl.Width*f,aControl.Height*f); > finally > MainControl.EnableAlign; > end; > I just use ScaleBy, it recursively scales all components. I do in in the FormShow method, I don't remember the details but I think it didn't work well when the form was still hidden. Another problem is that it also moves the Top,Left of the form, but I just restore it after the ScaleBy Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From medina.rc at gmail.com Tue Jun 21 16:35:24 2016 From: medina.rc at gmail.com (Richard Medina) Date: Tue, 21 Jun 2016 10:35:24 -0400 Subject: [Lazarus] unsuscribe Message-ID: thank you -- Richard.MC -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Tue Jun 21 17:31:21 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 21 Jun 2016 18:31:21 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> References: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> Message-ID: Here is the new version of my unit dealing with codepoints and Unicode characters. It is now called LazUnicode. The test program now indeed iterates Unicode characters, meaning that combining diacritical marks are always joined to a previous codepoint. This is the desired behavior _always_. Those marks should never be split apart. Function UTF16IsCombining is a UTF-16 version of the Martin's function. It works well for my test cases although I still would like to have a comprehensive list of the ranges. This unit allows to maintain code between Delphi and Lazarus even if you must do some advanced Unicode stuff. It is quite cool, even if I say it myself! What more, it produces robust code for UTF-16. There is already enough broken UTF-16 code out there. Now that problem got solved, too. :) The project now has 2 build modes, one for each encoding. Switching them is even easier than earlier. Please test with different Unicode text. Juha -------------- next part -------------- A non-text attachment was scrubbed... Name: LazUnicodeTestPub.tar.gz Type: application/x-gzip Size: 4464 bytes Desc: not available URL: From trayres at gmail.com Tue Jun 21 17:54:52 2016 From: trayres at gmail.com (Travis Ayres) Date: Tue, 21 Jun 2016 08:54:52 -0700 Subject: [Lazarus] unsuscribe In-Reply-To: References: Message-ID: Hi Richard, To unsubscribe, please go to http://lists.lazarus-ide.org/listinfo/lazarus put your email in the box, and click "unsubscribe or edit options". On Tue, Jun 21, 2016 at 7:35 AM, Richard Medina wrote: > thank you > > -- > Richard.MC > > -- > _______________________________________________ > 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 info at voiceliveeditor.com Wed Jun 22 01:07:45 2016 From: info at voiceliveeditor.com (info at voiceliveeditor.com) Date: Wed, 22 Jun 2016 00:07:45 +0100 Subject: [Lazarus] Anyone have Win/OSX/*nix native midi routines Message-ID: <5C7AA7B3273047DA9EF8470609F453FA@ianPC> Hi All, I am wondering if anyone has any cross midi routines willing to share, that works on win,osx and nix. Thought would ask, before attempting my own. I would rather have native pascal routines that do not use third party dll,so files etc. THanks in advance -------------------------------------------------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify info at voiceliveeditor.com. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Voiceliveeditor.com accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided. -------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca at wetron.es Wed Jun 22 12:18:04 2016 From: luca at wetron.es (Luca Olivetti) Date: Wed, 22 Jun 2016 12:18:04 +0200 Subject: [Lazarus] Increasingly frustrated with DbGrids In-Reply-To: <56374167.1050304@wetron.es> References: <563736F8.2040409@wetron.es> <56374167.1050304@wetron.es> Message-ID: <576A65DC.808@wetron.es> El 02/11/15 a les 11:56, Luca Olivetti ha escrit: > El 02/11/15 a les 11:12, Luca Olivetti ha escrit: >> Hello, >> >> I constantly stumble with the behaviour of the TDBGrid. >> I understand that it's a complex component, but every time I find an >> issue an Luiz fixes it, two more pop up (or an older one resurfaces). >> The latest episode of the saga is the futility of using a custom editor >> (with OnSelectEditor), since the grids then sets the value of the field >> using this snippet of code >> >> if (FEditor<>nil) and FEditor.Visible then begin >> Msg.LclMsg.msg:=GM_GETVALUE; >> Msg.grid:=Self; >> Msg.Col:=FCol; >> Msg.Row:=FRow; >> Msg.Value:=GetCells(FCol, FRow); >> FEditor.Dispatch(Msg); >> SetEditText(Msg.Col, Msg.Row, Msg.Value); >> end; >> >> and this only works with the editors defined in Grids.pas, the only ones >> managing the GM_GETVALUE message. >> For other kinds of editors the result depends on how you move in the >> grid: it could either maintain the value the editor set or reset it to >> an empty string. >> >> I think I will file a bug once I can create a simple project, but in the >> meantime if somebody has an idea on how to solve it, it would be >> appreciated. > > > Bug created: > > http://bugs.freepascal.org/view.php?id=28944 As I said in the bug report I just discovered http://www.freepascal.org/~michael/articles/grids/grids.pdf (published in 2008!) describing how to correctly implement a custom editor (so the method from the wiki I originally used is wrong, I also added a note to the wiki). *However* the component described by Michaël only works with a StringGrid, not with a DBGrid: when you change cell the grids sends the GM_SETVALUE message *before* the GM_GETVALUE one, so the edited value is lost and a semi-random one is used instead. To make it work one has to override the Change method (as it is done in grids.pas): procedure TStringCellEditor.Change; begin {$IfDef DbgGrid} DebugLn('TStringCellEditor.Change INIT text=',Text);{$ENDIF} inherited Change; if (FGrid<>nil) and Visible then begin FGrid.EditorTextChanged(FCol, FRow, Text); end; {$IfDef DbgGrid} DebugLn('TStringCellEditor.Change END');{$ENDIF} end; *but* the EditorTextChanged method is protected, so an additional cracker class (ugly) has to be used, e.g. TMyGrid = class(TCustomGrid) procedure EditorTextChanged(const aCol, aRow: Integer; const aText: string); override; end; procedure TMyGrid.EditorTextChanged(const aCol, aRow: Integer; const aText: string); begin inherited EditorTextChanged(aCol, aRow, aText); end; procedure TMyEditor.Change; begin if (FGrid<>nil) and Visible then begin TMyGrid(FGrid).EditorTextChanged(FCol, FRow, Text); end; Maybe EditorTextChanged (and others methods to be used in custom editors) should be public? Comments? Is there something else that I'm missing? Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From michalis.kambi at gmail.com Wed Jun 22 18:50:23 2016 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Wed, 22 Jun 2016 18:50:23 +0200 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers Message-ID: Hi everyone, Over the last few days, I wrote a document describing many features of the modern Object Pascal language. It is available on: http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.pdf The document covers the easy language concepts, and then jumps quickly into more "advanced" stuff, like class references, generics, class helpers and so on. I hope that this is informative:) This is directed at programmers (who know a bit of some programming language, though not necessarily Pascal). Which is really an excuse to not explain in detail some basic stuff ("what is a variable", "what is a class"). I tried to explain more the "advanced" stuff, and illustrate everything with examples. The source code is in AsciiDoc and available on GitHub https://github.com/michaliskambi/modern-pascal-introduction . All comments are welcome:) P.S. I already posted about this on fpc-pascal mailing list, I'm posting also here --- I hope that this is useful:) Regards, Michalis From trustfm at gmail.com Wed Jun 22 19:45:52 2016 From: trustfm at gmail.com (Anastasios Karidis) Date: Wed, 22 Jun 2016 19:45:52 +0200 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: Message-ID: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> On 6/22/2016 18:50, Michalis Kamburelis wrote: > Hi everyone, > > Over the last few days, I wrote a document describing many features of > the modern Object Pascal language. It is available on: > > http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html > > http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.pdf > > The document covers the easy language concepts, and then jumps quickly > into more "advanced" stuff, like class references, generics, class > helpers and so on. I hope that this is informative:) > > This is directed at programmers (who know a bit of some programming > language, though not necessarily Pascal). Which is really an excuse to > not explain in detail some basic stuff ("what is a variable", "what is > a class"). I tried to explain more the "advanced" stuff, and > illustrate everything with examples. > > The source code is in AsciiDoc and available on GitHub > https://github.com/michaliskambi/modern-pascal-introduction . All > comments are welcome:) > > P.S. I already posted about this on fpc-pascal mailing list, I'm > posting also here --- I hope that this is useful:) > > Regards, > Michalis Great job thanks ! I have also an introduction on Object Pascal section on my site http://www.trustfm.net/ebooks/ObjectPascal.php but i had never time to finish it :S -- Anastasios Karidis aka TrustFm www.trustfm.net The gmail email From trayres at gmail.com Wed Jun 22 19:57:10 2016 From: trayres at gmail.com (Travis Ayres) Date: Wed, 22 Jun 2016 10:57:10 -0700 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: While we're talking about books on Object Pascal, if anyone is looking for Object Pascal book ideas I'd suggest a book of patterns in Object Pascal. It seems like there's a lot of info about the structure of the language, but limited examples of how it is used in practice. The Observer, MVVM, Adapter patterns, whatever - it would be great to find more examples of these. On Wed, Jun 22, 2016 at 10:45 AM, Anastasios Karidis wrote: > On 6/22/2016 18:50, Michalis Kamburelis wrote: > > Hi everyone, > > > > Over the last few days, I wrote a document describing many features of > > the modern Object Pascal language. It is available on: > > > > > http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html > > > > > http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.pdf > > > > The document covers the easy language concepts, and then jumps quickly > > into more "advanced" stuff, like class references, generics, class > > helpers and so on. I hope that this is informative:) > > > > This is directed at programmers (who know a bit of some programming > > language, though not necessarily Pascal). Which is really an excuse to > > not explain in detail some basic stuff ("what is a variable", "what is > > a class"). I tried to explain more the "advanced" stuff, and > > illustrate everything with examples. > > > > The source code is in AsciiDoc and available on GitHub > > https://github.com/michaliskambi/modern-pascal-introduction . All > > comments are welcome:) > > > > P.S. I already posted about this on fpc-pascal mailing list, I'm > > posting also here --- I hope that this is useful:) > > > > Regards, > > Michalis > > Great job thanks ! > > I have also an introduction on Object Pascal section on my site > > http://www.trustfm.net/ebooks/ObjectPascal.php > > but i had never time to finish it :S > > -- > Anastasios Karidis aka TrustFm > www.trustfm.net > The gmail email > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Wed Jun 22 23:21:32 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 22 Jun 2016 22:21:32 +0100 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: <41aa927c-598b-5993-d87b-88636663d99f@geldenhuys.co.uk> On 2016-06-22 18:57, Travis Ayres wrote: > The Observer, MVVM, > Adapter patterns, whatever - it would be great to find more examples of > these. You mean like these... a series of articles I wrote about design patterns implemented in Object Pascal. ;-) http://geldenhuys.co.uk/articles/ As for MVVM, I had a different spin on MVP (Model-View-Presenter) and MVC (Model-View-Controller). Both MVP especially implements everything from scratch. Instead I implemented MGM (Model-GUI-Mediator) which is very similar to MVP in concept, except it reuses available widget events found in all modern GUI toolkit widgets. There is an article on MGM too, but that was kept simple for the sake of the article. For a much improved version of MGM, take a look at the code available as part of the tiOPF project (on SourceForge). The tiOPF implementation of MGM supports VCL, LCL, fpGUI and FMX (Delphi's Firemonkey) toolkits. ps: Design Patterns are meant to be documented as an idea of how to solve a commonly found problem. It isn't meant to serve as a code template. So there can be many ways of implementing the same design pattern. eg: Most books and articles I've read implement the Visitor pattern in a very limited way. tiOPF implements it in a more generic way, and actually makes it even more flexible. The tiOPF project is what got me hooked on design patterns. That framework uses many different design patterns, and improved the quality of the framework tremendously. 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 trayres at gmail.com Thu Jun 23 01:25:25 2016 From: trayres at gmail.com (Travis Ayres) Date: Wed, 22 Jun 2016 16:25:25 -0700 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: <41aa927c-598b-5993-d87b-88636663d99f@geldenhuys.co.uk> References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> <41aa927c-598b-5993-d87b-88636663d99f@geldenhuys.co.uk> Message-ID: Hi Graeme, I don't understand the problem tiOPF is trying to solve well enough to fully grok it in context - I've never used a database, only flat files. GUI programming in an understandable way... clueless, it always devolves into miserable, miserable spaghetti code. That said, it's better spaghetti code than when I started with Lazarus, so maybe eventually it'll be acceptable. Hah! On Wed, Jun 22, 2016 at 2:21 PM, Graeme Geldenhuys < mailinglists at geldenhuys.co.uk> wrote: > On 2016-06-22 18:57, Travis Ayres wrote: > > The Observer, MVVM, > > Adapter patterns, whatever - it would be great to find more examples of > > these. > > You mean like these... a series of articles I wrote about design > patterns implemented in Object Pascal. ;-) > > http://geldenhuys.co.uk/articles/ > > As for MVVM, I had a different spin on MVP (Model-View-Presenter) and > MVC (Model-View-Controller). Both MVP especially implements everything > from scratch. Instead I implemented MGM (Model-GUI-Mediator) which is > very similar to MVP in concept, except it reuses available widget events > found in all modern GUI toolkit widgets. There is an article on MGM too, > but that was kept simple for the sake of the article. For a much > improved version of MGM, take a look at the code available as part of > the tiOPF project (on SourceForge). The tiOPF implementation of MGM > supports VCL, LCL, fpGUI and FMX (Delphi's Firemonkey) toolkits. > > ps: > Design Patterns are meant to be documented as an idea of how to > solve a commonly found problem. It isn't meant to serve as a > code template. So there can be many ways of implementing the > same design pattern. eg: Most books and articles I've read > implement the Visitor pattern in a very limited way. tiOPF > implements it in a more generic way, and actually makes it even > more flexible. > > The tiOPF project is what got me hooked on design patterns. That > framework uses many different design patterns, and improved the > quality of the framework tremendously. > > 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 > -- > _______________________________________________ > 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 michalis.kambi at gmail.com Thu Jun 23 01:30:04 2016 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Thu, 23 Jun 2016 01:30:04 +0200 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: > I have also an introduction on Object Pascal section on my site > > http://www.trustfm.net/ebooks/ObjectPascal.php > > but i had never time to finish it :S I like it! - but without the 1st part, "Introduction"... I would not advice using CodeTyphon, as I had very bad experience with the quality of their stuff. I would much rather advice users to just install Lazarus straight from http://www.lazarus-ide.org/ . Also, as a Linux user, the instructions to modify the "sudoers" (to never ask for password), and then run the CodeTyphon with "sudo" are kind of a show-stopper. Running with "sudo" is something you should never do with an IDE... And it's certainly absolutely not required for vanilla FPC or Lazarus. That said, the rest of the book starts really good! You describe using Lazarus for a "Hello world" GUI programs, which is a cool approach, to quickly show new users that they can do fancy GUI trivially easy with Pascal. And presented with screenshots and basic code samples that should get anyone started. Then you have a nice description of the language. So, might I make a suggestion: how about just making the "Hello World" part the 1st one, not the 2nd? And just start it with a simple paragraph """ Install Lazarus from http://www.lazarus-ide.org/ . Alternatively, you can install CodeTyphon (link to existing installation instructions here). """ That would make it simpler (faster start into actual coding), and also don't scare off Linux users with instructions about "sudo":) Regards, Michalis From michalis.kambi at gmail.com Thu Jun 23 01:37:18 2016 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Thu, 23 Jun 2016 01:37:18 +0200 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: > Also, as a Linux user, the instructions to modify the "sudoers" (to > never ask for password), and then run the CodeTyphon with "sudo" are > kind of a show-stopper. Running with "sudo" is something you should > never do with an IDE... And it's certainly absolutely not required for > vanilla FPC or Lazarus. Sorry, reading the instructions closer -- it seems you only need to run "sudo codetyphon" to update it, not for regular usage. Well, that's still rather bad (together with the description to modify sudoers) and should not be necessary (it would be nice to be able to install it for current user, without sudo, not system wide). Although it's not as scary as I made it out to be above:) Regards, Michalis From cyraid at gmail.com Thu Jun 23 02:40:10 2016 From: cyraid at gmail.com (Dennis) Date: Thu, 23 Jun 2016 00:40:10 +0000 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: Instead of doing an svn update in place, it should store the binaries in your home folder, and then run those instead (kinda like what Dropbox does). I agree.. should never have to sudo.. either make a repository for updates, or store the source and svn it from the user home folder if necessary (or both). - Dennis Fehr On Wed, Jun 22, 2016, 6:38 PM Michalis Kamburelis wrote: > > Also, as a Linux user, the instructions to modify the "sudoers" (to > > never ask for password), and then run the CodeTyphon with "sudo" are > > kind of a show-stopper. Running with "sudo" is something you should > > never do with an IDE... And it's certainly absolutely not required for > > vanilla FPC or Lazarus. > > Sorry, reading the instructions closer -- it seems you only need to > run "sudo codetyphon" to update it, not for regular usage. Well, > that's still rather bad (together with the description to modify > sudoers) and should not be necessary (it would be nice to be able to > install it for current user, without sudo, not system wide). Although > it's not as scary as I made it out to be above:) > > Regards, > Michalis > -- > _______________________________________________ > 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 maaartinus at gmail.com Thu Jun 23 09:35:15 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Thu, 23 Jun 2016 09:35:15 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: <20160621134519.03fe41ae@limapholos.matflo.wg> References: <20160621134519.03fe41ae@limapholos.matflo.wg> Message-ID: On Tue, Jun 21, 2016 at 1:45 PM, Mattias Gaertner wrote: > On Tue, 21 Jun 2016 04:05:04 +0200 > Martin Grajcar wrote: > > >[...]Despite that, it works fine for all controls with Anchors > > = [akLeft, akTop]. For controls with other anchors, nothing works[...] > > The problem seems to lie in TControl.UpdateBaseBounds when > > the FBaseParentClientSize gets stored, which happens to be (0, 0) at this > > point. If I hack it to keep the previously stored value, it somehow > works. > > BoundsRect (Left,Top,Width,Height) is the current position/size. > > When a form's width is changed the LCL has to adapt the right anchored > controls - aka changing the Left so that the distance of the right > side is restored. The right distance is computed from BaseBounds > and BaseParentClientSize. > Thank you a lot for all the explanations. That's what I'm doing now manually: bb := AControl.BaseBounds; bpcs := AControl.BaseParentClientSize; OldLeft := bb.Left; OldWidth := bb.Right - bb.Left; // right = distance of the right edge from the *right* parent's edge OldRight := bpcs.cx - OldLeft - OldWidth; NewRight := OldRight; // keep it NewWidth := OldWidth * Zoom; // scale it NewLeft := bpcs.cx - OldRight - OldWidth; I'm rather sure that the computation is right (the above code mayn't be, but the real one is). The problem is that not only BaseBounds gets stored, but also BaseParentClientSize, which gets taken from the actual parent, which has zero size at the moment. What I'm doing would be right if the BaseParentClientSize were preserved. I hacked lcl/include/control.inc and got what I wanted: procedure TControl.UpdateAnchorRules; begin - UpdateBaseBounds(true,true,false); + UpdateBaseBounds(true,false,true); end; This doesn't sound right... not at all. So I guess, Lazarus counts on me computing the bounds relatively to the zero-size parent??? Maybe replacing the second occurrence of bpcs.cx by 0 (more exactly: the actual Parent.ClientWidth) would do? This would imply negative Left, but what... BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. > when setting Left, Top, Width, Height). My debugger agrees with you. I don't ask why so complicated. ;) > When the LCL computes the > autosized values it calls SetBoundsKeepBase, so it changes > BoundsRect and keeps BaseBounds/BaseParentClientSize. Makes sense. > > > The zero-client-size parent is a TPage, but I can't claim it guilty as I > > couldn't reproduce my problem in a small example. > > Do you mean it does work in a small example, but it does not in your > complex application? > Exactly. I thought that there might be a bug in TNotebook/TPage leading to zero client area, but this isn't the case. > So I wonder: > > > > - Is it forbidden to change position and/or size of a component when > > it's not shown? > > It is allowed and a pretty normal thing. > > > - If not, how can I deal with right-aligned controls? Simply setting > > c.Left := c.Left * Factor doesn't seem to work (though it should as > in this > > step all positions and all sizes simply get scaled up; anchoring is > used > > when the parent resizes and not the component itself, right?). > > Maybe you forget to disable the autosize updates during the changes? > > Simple example: > > MainControl.DisableAlign; > try > MainControl.SetBounds(Width*f,Height*f); > for aControl in List do > > aControl.SetBounds(aControl.Left*f,aControl.Top*f,aControl.Width*f,aControl.Height*f); > finally > MainControl.EnableAlign; > end; > I sort of intentionally did not use it: I use no align and no autosize (just anchors), so I though I won't need it. Now, I included it, but I still need to hack TControl.UpdateAnchorRules as above. Note: This algorithm has rounding errors, so multiple zooms will > destroy your layout. > I know. Currently, I don't care about a pixel or two... my layout has orders of magnitude bigger problems. However, for the future, I'm curious if there's a simple way of storing additional information for a control without subclassing it. Let's say, I need to store the *original* font size of *every* control. And I don't want to run to any problems when the control gets freed. Regards, Martin. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Thu Jun 23 10:00:55 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 23 Jun 2016 10:00:55 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: References: <20160621134519.03fe41ae@limapholos.matflo.wg> Message-ID: <20160623100055.62a68576@limapholos.matflo.wg> On Thu, 23 Jun 2016 09:35:15 +0200 Martin Grajcar wrote: >[...]also BaseParentClientSize, which gets taken from the actual parent, > which has zero size at the moment. ...which is a show stopper for right anchoring. >[...] > BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. > > when setting Left, Top, Width, Height). > > My debugger agrees with you. I don't ask why so complicated. ;) One part Delphi compatibility, one part flexibility for custom controls. >[...] > > > The zero-client-size parent is a TPage, but I can't claim it guilty as I > > > couldn't reproduce my problem in a small example. > > > > Do you mean it does work in a small example, but it does not in your > > complex application? > > > > Exactly. I thought that there might be a bug in TNotebook/TPage leading to > zero client area, but this isn't the case. Let's see if I can follow you: Do you mean, when you set the bounds and anchors of the control the BaseParentClientSize is 0,0 and Parent.ClientRect has non 0 values? >[...] > I sort of intentionally did not use it: I use no align and no autosize > (just anchors), so I though I won't need it. Without Disable/EnableAlign the AutoSize algorithm kicks in after each property change. And because anchoring is context sensitive, it is better to make sure. Also it avoids some overhead, which can load a form much faster. >[...] > However, for the future, I'm curious if there's a simple way of storing > additional information for a control without subclassing it. Let's say, I > need to store the *original* font size of *every* control. And I don't want > to run to any problems when the control gets freed. There is no LCL-built-in user storage space. You need to use subclassing or some other objects to store your settings. Mattias From mailinglists at geldenhuys.co.uk Thu Jun 23 10:40:36 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Jun 2016 09:40:36 +0100 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> <41aa927c-598b-5993-d87b-88636663d99f@geldenhuys.co.uk> Message-ID: <7b49a77c-5e89-f012-a3e3-b41f67fcfec7@geldenhuys.co.uk> On 2016-06-23 00:25, Travis Ayres wrote: > > I don't understand the problem tiOPF is trying to solve well enough to > fully grok it in context - I've never used a database, only flat files. Well, you wanted quality examples of design patterns using Object Pascal. tiOPF gives you that, and so does my articles. tiOPF is an Object Persistence Framework (and more). Instead of working with Datasets, TFields, a database specific component, a ton of event handlers and all code dumped into the Form unit (gui layer) — which 99.9% of the time ends up being unmaintainable and not very reusable. tiOPF steers you into separating your storage, business rules and UI into separate layers. This makes for much more maintainable code, much easier to unit test and code reuse of the business rules. In many of my applications I’ve created GUI, Console and CGI applications from the same set of business rule classes — thanks to tiOPF. tiOPF also allows you to switch between DB connection component (SqlDB, Zeos, DOA, IBX etc) and even switch between database storage (Firebird, Oracle, MS SQL Server, MySQL, TAB, CSV, XML etc)… all without needing to make a code change in you application. Simply toggle a compiler define and recompile. The same goes for Client/Server and 3-tier applications. As I hinted at above, tiOPF can also do persistence to something other than a database. Like a flat file, and currently supplies CSV, TAB and XML persistence layers to accomplish that. The reason I said “and more” earlier, is because I often write non-database applications, and still use tiOPF. Simply because tiOPF (thanks to all the design patterns it implements) has so many useful features and utility functions. The whole framework is backed by 1700+ unit tests that run every 3 hours, 24/7 to make sure in stays in a stable state, and than any newly introduced errors are very quickly detected and fixed. Maybe the “Concepts Documentation” will help shed some light on what tiOPF tries to (and does) accomplish. Especially chapters 1–3. It’s a relatively quick read. http://tiopf.sourceforge.net/Doc/Concepts/index.shtml Either way, I hope you find the design pattern example code useful. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Thu Jun 23 10:53:55 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Jun 2016 09:53:55 +0100 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: <6c56ba44-716b-42f7-d9ef-2942a75e30b0@geldenhuys.co.uk> On 2016-06-23 00:30, Michalis Kamburelis wrote: > Also, as a Linux user, the instructions to modify the "sudoers" (to > never ask for password), and then run the CodeTyphon with "sudo" are > kind of a show-stopper. Definitely, and I felt it is an even bigger issue under FreeBSD, especially where CodeTyphon tries to install itself. It doesn’t adhere to the filesystem hierarchy at all, where user installed programs should go to /usr/local/ only. And then adding to the pain, I prefer installing something only I’ll be running in my $HOME directory or in my read/write allocated /data/devel/ path. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From lazarus2 at de-brouwerij.be Thu Jun 23 16:06:45 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Thu, 23 Jun 2016 16:06:45 +0200 Subject: [Lazarus] strcat problem Message-ID: <576BECF5.6030503@de-brouwerij.be> Hi, I used strcat to make a long PChar. On my OpenSuse-box this works fine. On the RaspberryPi, is gives a runtime error 216. Any suggestions what could be the problem ? This part of the code : cTekst:=#13'Now is the winter of our discontent'#13; cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); <-- here is the RT-error 216. I have several more lines Any work-around ? I actually need a long nul-teminated constant string of about 550 characters. I could write the whole string on one line, but I would like to prevent that. I prefer it like the C-code : "\n\ Now is the winter of our discontent\n\ Made glorious summer by this sun of York;\n\ And all the clouds that lour'd upon our house\n\ ... FWIW, I'm porting pigpio. The test-application x_pigpiod_if2 works mostly fine remotely (from my OpenSuse-box), but now I get this problem when testing the local version, i.e. on the pi itself. Thanks, Koenraad From dec12 at avidsoft.com.hk Thu Jun 23 16:37:55 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Thu, 23 Jun 2016 22:37:55 +0800 Subject: [Lazarus] Can tiOPF handle multi thread programming easily? Message-ID: <576BF443.6080203@avidsoft.com.hk> Just heard compliments on tiOPF and wonder how it handles multi thread programming. Any experiences? Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Jun 23 16:57:32 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Jun 2016 15:57:32 +0100 Subject: [Lazarus] Can tiOPF handle multi thread programming easily? In-Reply-To: <576BF443.6080203@avidsoft.com.hk> References: <576BF443.6080203@avidsoft.com.hk> Message-ID: <08eb7c6d-ef13-e08d-5d64-133dacca593b@geldenhuys.co.uk> On 2016-06-23 15:37, Dennis wrote: > Just heard compliments on tiOPF and wonder how it handles multi thread > programming. What exactly would you like to accomplish? tiOPF has some thread classes, thread list etc which it uses internally and can be used by your code too. Some thread usage by tiOPF: * The tiLog descendants run in a separate thread so logging doesn't slow down the actual application. * There is a thread based progress dialog that can monitor progress of multiple running threads and report the state of completion via a progressbar per thread * It allows multi-threaded DB Access. etc. tiOPF doesn't spoon-feed the developer, so for some tasks you still need to write the appropriate thread-safe code. But again, it boils down to what you actually want to accomplish with multi-threaded programming. 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 david.w.noon at googlemail.com Thu Jun 23 16:58:34 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Thu, 23 Jun 2016 15:58:34 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576BECF5.6030503@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> Message-ID: <576BF91A.3010507@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 23 Jun 2016 16:06:45 +0200, Koenraad Lelong (lazarus2 at de-brouwerij.be) wrote about "[Lazarus] strcat problem" (in <576BECF5.6030503 at de-brouwerij.be>): [snip] > cTekst:=#13'Now is the winter of our discontent'#13; You need a trailing #0 byte on the end. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldr+RoACgkQogYgcI4W/5QnwwCfTxrsHYVew6YAxDGoEv4IfzTm DTMAn3i4G+K8F9d9Vpznyo15G7kdIoc7 =FMiY -----END PGP SIGNATURE----- From maaartinus at gmail.com Thu Jun 23 18:02:09 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Thu, 23 Jun 2016 18:02:09 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: <20160623100055.62a68576@limapholos.matflo.wg> References: <20160621134519.03fe41ae@limapholos.matflo.wg> <20160623100055.62a68576@limapholos.matflo.wg> Message-ID: On Thu, Jun 23, 2016 at 10:00 AM, Mattias Gaertner < nc-gaertnma at netcologne.de> wrote: > On Thu, 23 Jun 2016 09:35:15 +0200 > Martin Grajcar wrote: > > >[...]also BaseParentClientSize, which gets taken from the actual parent, > > which has zero size at the moment. > > ...which is a show stopper for right anchoring. > Yet it works well with my hack saying "don't store parent size". > >[...] > > BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. > > > when setting Left, Top, Width, Height). > > > > My debugger agrees with you. I don't ask why so complicated. ;) > > One part Delphi compatibility, one part flexibility for custom controls. > > > >[...] > > > > The zero-client-size parent is a TPage, but I can't claim it guilty > as I > > > > couldn't reproduce my problem in a small example. > > > > > > Do you mean it does work in a small example, but it does not in your > > > complex application? > > > > > > > Exactly. I thought that there might be a bug in TNotebook/TPage leading > to > > zero client area, but this isn't the case. > > Let's see if I can follow you: > Do you mean, when you set the bounds and anchors of the control the > BaseParentClientSize is 0,0 and Parent.ClientRect has non 0 values? > No, exactly the opposite: BaseParentClientSize.cx = 850 Parent.Width = ParentClientRect.Right = ParentClientRect.Left = 0 So not storing the parent size seems to make sense. >[...] > > I sort of intentionally did not use it: I use no align and no autosize > > (just anchors), so I though I won't need it. > > Without Disable/EnableAlign the AutoSize algorithm kicks in after each > property change. And because anchoring is context sensitive, it is > better to make sure. Also it avoids some overhead, which can load a > form much faster. > OK, I keep using DisableAlign. >[...] > > However, for the future, I'm curious if there's a simple way of storing > > additional information for a control without subclassing it. Let's say, I > > need to store the *original* font size of *every* control. And I don't > want > > to run to any problems when the control gets freed. > > There is no LCL-built-in user storage space. You need to use > subclassing or some other objects to store your settings. OK, let's forget it for now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maaartinus at gmail.com Thu Jun 23 18:02:09 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Thu, 23 Jun 2016 18:02:09 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: <20160623100055.62a68576@limapholos.matflo.wg> References: <20160621134519.03fe41ae@limapholos.matflo.wg> <20160623100055.62a68576@limapholos.matflo.wg> Message-ID: On Thu, Jun 23, 2016 at 10:00 AM, Mattias Gaertner < nc-gaertnma at netcologne.de> wrote: > On Thu, 23 Jun 2016 09:35:15 +0200 > Martin Grajcar wrote: > > >[...]also BaseParentClientSize, which gets taken from the actual parent, > > which has zero size at the moment. > > ...which is a show stopper for right anchoring. > Yet it works well with my hack saying "don't store parent size". > >[...] > > BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. > > > when setting Left, Top, Width, Height). > > > > My debugger agrees with you. I don't ask why so complicated. ;) > > One part Delphi compatibility, one part flexibility for custom controls. > > > >[...] > > > > The zero-client-size parent is a TPage, but I can't claim it guilty > as I > > > > couldn't reproduce my problem in a small example. > > > > > > Do you mean it does work in a small example, but it does not in your > > > complex application? > > > > > > > Exactly. I thought that there might be a bug in TNotebook/TPage leading > to > > zero client area, but this isn't the case. > > Let's see if I can follow you: > Do you mean, when you set the bounds and anchors of the control the > BaseParentClientSize is 0,0 and Parent.ClientRect has non 0 values? > No, exactly the opposite: BaseParentClientSize.cx = 850 Parent.Width = ParentClientRect.Right = ParentClientRect.Left = 0 So not storing the parent size seems to make sense. >[...] > > I sort of intentionally did not use it: I use no align and no autosize > > (just anchors), so I though I won't need it. > > Without Disable/EnableAlign the AutoSize algorithm kicks in after each > property change. And because anchoring is context sensitive, it is > better to make sure. Also it avoids some overhead, which can load a > form much faster. > OK, I keep using DisableAlign. >[...] > > However, for the future, I'm curious if there's a simple way of storing > > additional information for a control without subclassing it. Let's say, I > > need to store the *original* font size of *every* control. And I don't > want > > to run to any problems when the control gets freed. > > There is no LCL-built-in user storage space. You need to use > subclassing or some other objects to store your settings. OK, let's forget it for now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Thu Jun 23 21:08:14 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Thu, 23 Jun 2016 21:08:14 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576BF91A.3010507@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> Message-ID: <576C339E.6020601@de-brouwerij.be> Op 23-06-16 om 16:58 schreef David W Noon: > [snip] >> cTekst:=#13'Now is the winter of our discontent'#13; > > You need a trailing #0 byte on the end. > The definition of cTekst : var cTekst : PChar; So the compiler knows cTekst is a 0-terminated string doesn't, it ? And StrCat needs two parameters : PChar and PChar. So I think the compiler knows the strings are zero-terminated. Besides, on my OpenSuse-box it works, or is that by chance ? Koenraad. From lazarus2 at de-brouwerij.be Thu Jun 23 21:27:19 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Thu, 23 Jun 2016 21:27:19 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576C339E.6020601@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> Message-ID: <576C3817.1020603@de-brouwerij.be> Op 23-06-16 om 21:08 schreef Koenraad Lelong: > Op 23-06-16 om 16:58 schreef David W Noon: >> [snip] >>> cTekst:=#13'Now is the winter of our discontent'#13; >> >> You need a trailing #0 byte on the end. >> > > The definition of cTekst : > var > cTekst : PChar; > > So the compiler knows cTekst is a 0-terminated string doesn't, it ? > And StrCat needs two parameters : PChar and PChar. So I think the > compiler knows the strings are zero-terminated. > Besides, on my OpenSuse-box it works, or is that by chance ? > > Koenraad. > Extra info : I checked with a hex-dumper (executables for opensuse & pi). All strings end with a #0. No byte-count in front of them. All start at a longword-boundary. Koenraad From maaartinus at gmail.com Thu Jun 23 21:38:49 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Thu, 23 Jun 2016 21:38:49 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576C3817.1020603@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> Message-ID: Have you checked if there's any room behind #13'Now is the winter of our discontent'#13, so that someone else's memory won't get overwritten? I'd bet, there's none. *Appends a copy of the source string to the destination string. The terminating null character in destination is overwritten by the first character of source, and a null-character is included at the end of the new string formed by the concatenation of both in destination.* You'd need something like SetLength(cTekst, enoughToHoldThemAll); and maybe also cTekst[oldLength] := #0; before the very first strcat. On Thu, Jun 23, 2016 at 9:27 PM, Koenraad Lelong wrote: > Op 23-06-16 om 21:08 schreef Koenraad Lelong: > >> Op 23-06-16 om 16:58 schreef David W Noon: >> >>> [snip] >>> >>>> cTekst:=#13'Now is the winter of our discontent'#13; >>>> >>> >>> You need a trailing #0 byte on the end. >>> >>> >> The definition of cTekst : >> var >> cTekst : PChar; >> >> So the compiler knows cTekst is a 0-terminated string doesn't, it ? >> And StrCat needs two parameters : PChar and PChar. So I think the >> compiler knows the strings are zero-terminated. >> Besides, on my OpenSuse-box it works, or is that by chance ? >> >> Koenraad. >> >> Extra info : > I checked with a hex-dumper (executables for opensuse & pi). All strings > end with a #0. No byte-count in front of them. All start at a > longword-boundary. > > Koenraad > > > -- > _______________________________________________ > 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 david.w.noon at googlemail.com Thu Jun 23 21:40:52 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Thu, 23 Jun 2016 20:40:52 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576C339E.6020601@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> Message-ID: <576C3B44.3020401@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 23 Jun 2016 21:08:14 +0200, Koenraad Lelong (lazarus2 at de-brouwerij.be) wrote about "Re: [Lazarus] strcat problem" (in <576C339E.6020601 at de-brouwerij.be>): > Op 23-06-16 om 16:58 schreef David W Noon: >> [snip] >>> cTekst:=#13'Now is the winter of our discontent'#13; >> >> You need a trailing #0 byte on the end. >> > > The definition of cTekst : var cTekst : PChar; > > So the compiler knows cTekst is a 0-terminated string doesn't, it > ? The cTekst variable is actually a pointer. It's the string literal that needs the trailing NUL byte. Moreover, assigning to a pointer typically modifies the address, rather than copying new text into the buffer. The idiomatic C function for this is strcpy(). > And StrCat needs two parameters : PChar and PChar. So I think the > compiler knows the strings are zero-terminated. I think both literals need a trailing NUL. The compiler probably knows nothing about StrCat() besides that it takes 2 pointers as parameters. It is the RTL that expects to receive NUL-terminated strings as arguments. > Besides, on my OpenSuse-box it works, or is that by chance ? It could be that the data segment is initialized to binary zeroes on the Intel/AMD processor and left as junk on the ARM processor. This could be an artefact of the binutils on the different hardware platforms, as the ARM binaries might be sparsely defined in the executable, whereas the Intel binaries can be padded with zeroes. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldsO0QACgkQogYgcI4W/5Q+WQCff6iFNMJKXnlHWVqpSPih6l7f xFwAn0f/girIusmXB36FTzCfTGSiAta+ =zuH4 -----END PGP SIGNATURE----- From joshyfun at gmail.com Fri Jun 24 02:33:27 2016 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Fri, 24 Jun 2016 02:33:27 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576C339E.6020601@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> Message-ID: <7515556f-d01f-24d8-c314-a7a327eab31e@gmail.com> El 23/06/2016 a las 21:08, Koenraad Lelong escribió: > Op 23-06-16 om 16:58 schreef David W Noon: >> [snip] >>> cTekst:=#13'Now is the winter of our discontent'#13; >> >> You need a trailing #0 byte on the end. >> > > The definition of cTekst : > var > cTekst : PChar; > > So the compiler knows cTekst is a 0-terminated string doesn't, it ? > And StrCat needs two parameters : PChar and PChar. So I think the > compiler knows the strings are zero-terminated. > Besides, on my OpenSuse-box it works, or is that by chance ? Hello, Did you allocated the memory for the pchar ? Did you allocated memory enough in target pchar to hold the large string after the strcat's ? This code sample is wrong: cTekst:=#13'text'#13; strcat(cTekst,'other string'); The first assigns pchar to a read only memory block at compile time, and at runtime next bytes (not allocated) are overwritten with "other string" which will SIGSEGV for sure. -- From pascaldragon at googlemail.com Fri Jun 24 07:59:17 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Fri, 24 Jun 2016 07:59:17 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576C3B44.3020401@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3B44.3020401@googlemail.com> Message-ID: Am 23.06.2016 21:41 schrieb "David W Noon" : > > Op 23-06-16 om 16:58 schreef David W Noon: > >> [snip] > >>> cTekst:=#13'Now is the winter of our discontent'#13; > >> > >> You need a trailing #0 byte on the end. > >> > > > > The definition of cTekst : var cTekst : PChar; > > > > So the compiler knows cTekst is a 0-terminated string doesn't, it > > ? > > The cTekst variable is actually a pointer. > > It's the string literal that needs the trailing NUL byte. The compiler guarantees that constant strings are NUL terminated. This is needed for easy conversion to PChar. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Fri Jun 24 09:43:19 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Fri, 24 Jun 2016 09:43:19 +0200 Subject: [Lazarus] strcat problem In-Reply-To: References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> Message-ID: <576CE497.2050408@de-brouwerij.be> Op 23-06-16 om 21:38 schreef Martin Grajcar: > Have you checked if there's any room behind #13'Now is the winter of our > discontent'#13, so that someone else's memory won't get overwritten? I'd > bet, there's none. > > /Appends a copy of the source string to the destination string. The > terminating null character in destination is overwritten by the first > character of source, and a null-character is included at the end of the > new string formed by the concatenation of both *in destination*./ > > You'd need something like > SetLength(cTekst, enoughToHoldThemAll); > and maybe also > cTekst[oldLength] := #0; > before the very first strcat. > Updated my code : cTekst:=StrAlloc(600); cTekst:=#13'Now is the winter of our discontent'#13; cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); ... cTekst is still a PChar. Same problem : on the pi the program crashes on the first StrCat with a 216 error. An extra error, now on my OpenSuse-box : I finally do StrDispose(cTekst); And then the application crashes with a 216 error. Leaving that StrDispose out it runs fine, but then there's a memory-leak. FWIW, I'm using FPC 2.6.5 (SVN version 49333M) on OpenSuse and 3.0.0 on the pi. Koenraad From yann.merignac at gmail.com Fri Jun 24 10:22:12 2016 From: yann.merignac at gmail.com (=?UTF-8?Q?Yann_M=C3=A9rignac?=) Date: Fri, 24 Jun 2016 10:22:12 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576CE497.2050408@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> Message-ID: 1 cTekst:=StrAlloc(600); 2 cTekst:=#13'Now is the winter of our discontent'#13; 3 cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); On line 2 you change the value of cTekst and lose the memory allocated by StrAlloc. What you want to do is to copy the string constant value in the allocated memory with StrCopy or StrMove. See http://www.freepascal.org/docs-html/rtl/strings/strcat.html Another solution: var S : String; cTekst : PChar; begin S := #13'Now is the winter of our discontent'#13; S := S + 'Made glorious summer by this sun of York;'#13; cTekst := @S[1]; end; 2016-06-24 9:43 GMT+02:00 Koenraad Lelong : > Op 23-06-16 om 21:38 schreef Martin Grajcar: > >> Have you checked if there's any room behind #13'Now is the winter of our >> discontent'#13, so that someone else's memory won't get overwritten? I'd >> bet, there's none. >> >> /Appends a copy of the source string to the destination string. The >> terminating null character in destination is overwritten by the first >> character of source, and a null-character is included at the end of the >> new string formed by the concatenation of both *in destination*./ >> >> You'd need something like >> SetLength(cTekst, enoughToHoldThemAll); >> and maybe also >> cTekst[oldLength] := #0; >> before the very first strcat. >> >> Updated my code : > > cTekst:=StrAlloc(600); > cTekst:=#13'Now is the winter of our discontent'#13; > cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); > ... > > cTekst is still a PChar. > > Same problem : on the pi the program crashes on the first StrCat with a > 216 error. > > An extra error, now on my OpenSuse-box : > I finally do > StrDispose(cTekst); > And then the application crashes with a 216 error. Leaving that StrDispose > out it runs fine, but then there's a memory-leak. > > FWIW, I'm using FPC 2.6.5 (SVN version 49333M) on OpenSuse and 3.0.0 on > the pi. > > > Koenraad > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Fri Jun 24 17:25:18 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Fri, 24 Jun 2016 17:25:18 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576CE497.2050408@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> Message-ID: Am 24.06.2016 09:44 schrieb "Koenraad Lelong" : > Updated my code : > > cTekst:=StrAlloc(600); > > cTekst:=#13'Now is the winter of our discontent'#13; > cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); You need to use StrCat for the assignment after the StrAlloc as well, otherwise you'd just get rid of the pointer to your allocated memory returning to your original situation. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Fri Jun 24 20:37:52 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Fri, 24 Jun 2016 20:37:52 +0200 Subject: [Lazarus] strcat problem In-Reply-To: References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> Message-ID: <576D7E00.7010206@de-brouwerij.be> Op 24-06-16 om 10:22 schreef Yann Mérignac: > var > S : String; > cTekst : PChar; > begin > S := #13'Now is the winter of our discontent'#13; > S := S + 'Made glorious summer by this sun of York;'#13; > cTekst := @S[1]; > end; Hi, This works, both on OpenSuse and Raspberry Pi. Thanks, although I still don't grasp how PChar should be used. Koenraad. From david.w.noon at googlemail.com Fri Jun 24 21:31:03 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Fri, 24 Jun 2016 20:31:03 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576D7E00.7010206@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> Message-ID: <576D8A77.7050301@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 24 Jun 2016 20:37:52 +0200, Koenraad Lelong (lazarus2 at de-brouwerij.be) wrote about "Re: [Lazarus] strcat problem" (in <576D7E00.7010206 at de-brouwerij.be>): [snip] > Thanks, although I still don't grasp how PChar should be used. The PChar type is a pointer to a NUL-terminated string. It uses C semantics and C-like syntax. program pchar_test; uses strings; var cTekst: PChar; begin cTekst := StrAlloc(200); { String buffer of 200 bytes. } { This is how we assign and concatenate strings in C. } StrCopy(cTekst, #13'Now is the winter of our discontent'#13); StrCat(cTekst, 'Made glorious summer by this sun of York'#13); StrCat(cTekst, 'And all the clouds that lour''d upon our '); StrCat(cTekst, 'house'#13); writeln(cTekst^); { De-reference the pointer. } StrDispose(cTekst); { Free the string buffer. } end. After reading this, you should now know why C sucks as a string processing language, and why C++ implemented the std::string class to replace all this function call buffoonery. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldtincACgkQogYgcI4W/5TjPwCfQdXlunrHTf4DSCse9JcM8DyG 6VUAn1KpAtlDH2J4BR7HPxATKVsNTVHy =+TJI -----END PGP SIGNATURE----- From lazarus2 at de-brouwerij.be Fri Jun 24 22:46:45 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Fri, 24 Jun 2016 22:46:45 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576D8A77.7050301@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> Message-ID: <576D9C35.4060107@de-brouwerij.be> Op 24-06-16 om 21:31 schreef David W Noon: > After reading this, you should now know why C sucks as a string > processing language, and why C++ implemented the std::string class to > replace all this function call buffoonery. > - -- > Regards, > > Dave [RLU #314465] I think we're spoiled (fpc users), but not too much. The original c-code was this : char *TEXT= "\n\ Now is the winter of our discontent\n\ Made glorious summer by this sun of York;\n\ And all the clouds that lour'd upon our house\n\ In the deep bosom of the ocean buried.\n\ Now are our brows bound with victorious wreaths;\n\ Our bruised arms hung up for monuments;\n\ Our stern alarums changed to merry meetings,\n\ Our dreadful marches to delightful measures.\n\ Grim-visaged war hath smooth'd his wrinkled front;\n\ And now, instead of mounting barded steeds\n\ To fright the souls of fearful adversaries,\n\ He capers nimbly in a lady's chamber\n\ To the lascivious pleasing of a lute.\n\ "; I had to "improvise" and somehow put together that string which is really a constant here, or put that whole string on one line. Or does fpc have a similar construct to break strings in different lines like this c-code does ? It's the first time I knowingly used a PChar and I want to learn more about it, because sooner or later I will need it again. FWIW, with this problem "solved" I got a working port of pigpio, with a test/demo-application. If anyone is interested, please ask. It's the stuff that _uses_ the pigpio-daemon. Koenraad. From david.w.noon at googlemail.com Sat Jun 25 00:59:16 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Fri, 24 Jun 2016 23:59:16 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576D9C35.4060107@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> Message-ID: <576DBB44.9030408@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 24 Jun 2016 22:46:45 +0200, Koenraad Lelong (lazarus2 at de-brouwerij.be) wrote about "Re: [Lazarus] strcat problem" (in <576D9C35.4060107 at de-brouwerij.be>): [snip] > I think we're spoiled (fpc users), but not too much. The original > c-code was this : char *TEXT= "\n\ Now is the winter of our > discontent\n\ Made glorious summer by this sun of York;\n\ And all > the clouds that lour'd upon our house\n\ In the deep bosom of the > ocean buried.\n\ Now are our brows bound with victorious > wreaths;\n\ Our bruised arms hung up for monuments;\n\ Our stern > alarums changed to merry meetings,\n\ Our dreadful marches to > delightful measures.\n\ Grim-visaged war hath smooth'd his wrinkled > front;\n\ And now, instead of mounting barded steeds\n\ To fright > the souls of fearful adversaries,\n\ He capers nimbly in a lady's > chamber\n\ To the lascivious pleasing of a lute.\n\ "; That is some ugly code, even for C. I would have written it differently. > I had to "improvise" and somehow put together that string which is > really a constant here, or put that whole string on one line. Or > does fpc have a similar construct to break strings in different > lines like this c-code does ? const TEXT : ansistring = #10'Now is the winter of our discontent'#10 'Made glorious summer by this sun of York;'#10 'And all the clouds that lour''d upon our house'#10 'In the deep bosom of the ocean buried.'#10 'Now are our brows bound with victorious wreaths;'#10 'Our bruised arms hung up for monuments;'#10 'Our stern alarums changed to merry meetings,'#10 'Our dreadful marches to delightful measures.'#10 'Grim-visaged war hath smooth''d his wrinkled front;'#10 'And now, instead of mounting barded steeds'#10 'To fright the souls of fearful adversaries,'#10 'He capers nimbly in a lady''s chamber'#10 'To the lascivious pleasing of a lute.'#10#0; Note that '\n' is actually #10, not #13. You can now use @TEXT as your PChar pointer value. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldtu0QACgkQogYgcI4W/5QgjACfb/WbAPNmHfs+X5CeP0nqjnzv ZNsAnibU3Kf+z6ih+r0DjDXCMTZOQnH6 =OQIa -----END PGP SIGNATURE----- From david.w.noon at googlemail.com Sat Jun 25 01:12:49 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Sat, 25 Jun 2016 00:12:49 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576DBB44.9030408@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> Message-ID: <576DBE71.3020204@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 24 Jun 2016 23:59:16 +0100, David W Noon (david.w.noon at googlemail.com) wrote about "Re: [Lazarus] strcat problem" (in <576DBB44.9030408 at googlemail.com>): > You can now use @TEXT as your PChar pointer value. Correction: I think that should be @TEXT[1] for the pointer. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldtvnEACgkQogYgcI4W/5SUZwCfS1pFnIwF+yDLiunuhNxCVCXj I7IAn1uGI0xW7ObLSPye1esB+3tUbcKr =t9fr -----END PGP SIGNATURE----- From pascaldragon at googlemail.com Sat Jun 25 10:01:25 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 25 Jun 2016 10:01:25 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576DBE71.3020204@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> <576DBE71.3020204@googlemail.com> Message-ID: Am 25.06.2016 01:12 schrieb "David W Noon" : > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Fri, 24 Jun 2016 23:59:16 +0100, David W Noon > (david.w.noon at googlemail.com) wrote about "Re: [Lazarus] strcat > problem" (in <576DBB44.9030408 at googlemail.com>): > > > You can now use @TEXT as your PChar pointer value. > > Correction: I think that should be @TEXT[1] for the pointer. Or use PChar(TEXT) and let the compiler deal with that problem ;) Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Sat Jun 25 13:38:14 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Sat, 25 Jun 2016 13:38:14 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576DBB44.9030408@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> Message-ID: <576E6D26.2030702@de-brouwerij.be> Op 25-06-16 om 00:59 schreef David W Noon: > > const > TEXT : ansistring = > #10'Now is the winter of our discontent'#10 > 'Made glorious summer by this sun of York;'#10 Fatal: Syntax error, ";" expected but "const string" found > 'And all the clouds that lour''d upon our house'#10 ... Does not compile. Or do I need some compiler-switch ? Koenraad From hdpc at talktalk.net Sat Jun 25 14:39:34 2016 From: hdpc at talktalk.net (Howard Page-Clark) Date: Sat, 25 Jun 2016 13:39:34 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576E6D26.2030702@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> <576E6D26.2030702@de-brouwerij.be> Message-ID: <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> On 25/06/16 12:38, Koenraad Lelong wrote: > Op 25-06-16 om 00:59 schreef David W Noon: >> >> const >> TEXT : ansistring = >> #10'Now is the winter of our discontent'#10 >> 'Made glorious summer by this sun of York;'#10 > Fatal: Syntax error, ";" expected but "const string" found >> 'And all the clouds that lour''d upon our house'#10 > ... > > Does not compile. Or do I need some compiler-switch ? No, you need concatenation operators inserted: const TEXT : ansistring = #10'Now is the winter of our discontent'#10 +'Made glorious summer by this sun of York;'#10 +'And all the clouds that lour''d upon our house'#10 +'In the deep bosom of the ocean buried.'#10 + etc... From wkitty42 at windstream.net Sat Jun 25 15:41:39 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sat, 25 Jun 2016 09:41:39 -0400 Subject: [Lazarus] strcat problem In-Reply-To: <576BECF5.6030503@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> Message-ID: <576E8A13.8050703@windstream.net> On 06/23/2016 10:06 AM, Koenraad Lelong wrote: > Hi, > > I used strcat to make a long PChar. > On my OpenSuse-box this works fine. On the RaspberryPi, is gives a runtime error > 216. > Any suggestions what could be the problem ? FWIW: i know you probably have your solution already as i missed this when you first posted it... i came up with two solutions that seem to work ok... i'm not sure which i prefer, though... edit: wow... now that i've read the thread(s), it is kinda funny how that saying about "only so many ways to do X" comes to play... FWIW: these two below? their compiled sizes are only about 100 bytes different... program pchartest1; uses strings; var cTekst : pchar; begin cTekst := strAlloc(600); strCat(cTekst, #10); strCat(cTekst, 'Now is the winter of our discontent'#10); strCat(cTekst, 'Made glorious summer by this sun of York;'#10); strCat(cTekst, 'And all the clouds that lour''d upon our house'#10); strCat(cTekst, 'In the deep bosom of the ocean buried.'#10); strCat(cTekst, 'Now are our brows bound with victorious wreaths;'#10); strCat(cTekst, 'Our bruised arms hung up for monuments;'#10); strCat(cTekst, 'Our stern alarums changed to merry meetings,'#10); strCat(cTekst, 'Our dreadful marches to delightful measures.'#10); strCat(cTekst, 'Grim-visaged war hath smooth''d his wrinkled front;'#10); strCat(cTekst, 'And now, instead of mounting barded steeds'#10); strCat(cTekst, 'To fright the souls of fearful adversaries,'#10); strCat(cTekst, 'He capers nimbly in a lady''s chamber'#10); strCat(cTekst, 'To the lascivious pleasing of a lute.'#10); writeln(cTekst); strDispose(cTekst); end. program pchartest2; const cTekst : ansistring = #10 +'Now is the winter of our discontent'#10 +'Made glorious summer by this sun of York;'#10 +'And all the clouds that lour''d upon our house'#10 +'In the deep bosom of the ocean buried.'#10 +'Now are our brows bound with victorious wreaths;'#10 +'Our bruised arms hung up for monuments;'#10 +'Our stern alarums changed to merry meetings,'#10 +'Our dreadful marches to delightful measures.'#10 +'Grim-visaged war hath smooth''d his wrinkled front;'#10 +'And now, instead of mounting barded steeds'#10 +'To fright the souls of fearful adversaries,'#10 +'He capers nimbly in a lady''s chamber'#10 +'To the lascivious pleasing of a lute.'#10#0; begin writeln(pchar(cTekst)); end. -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From david.w.noon at googlemail.com Sat Jun 25 17:55:07 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Sat, 25 Jun 2016 16:55:07 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> <576E6D26.2030702@de-brouwerij.be> <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> Message-ID: <576EA95B.2050907@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 25 Jun 2016 13:39:34 +0100, Howard Page-clark (hdpc at talktalk.net) wrote about "Re: [Lazarus] strcat problem" (in <51103c67-4a72-b44e-3fce-d577e1ce8f98 at talktalk.net>): [snip] > No, you need concatenation operators inserted: > > const TEXT : ansistring = #10'Now is the winter of our > discontent'#10 +'Made glorious summer by this sun of York;'#10 > +'And all the clouds that lour''d upon our house'#10 +'In the deep > bosom of the ocean buried.'#10 Yes, that's the ticket! I thought those #dd characters implicitly concatenated to any adjacent string, but it seems that spaces and/or line breaks can prevent that. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlduqVsACgkQogYgcI4W/5T1pQCeMasyRRriUkODdxVtCm2fm5Gq /5AAoNVcO3W6wHuRfcwpEVPVSxjTb+x7 =F0xp -----END PGP SIGNATURE----- From lazarus2 at de-brouwerij.be Sun Jun 26 11:22:22 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Sun, 26 Jun 2016 11:22:22 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> <576E6D26.2030702@de-brouwerij.be> <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> Message-ID: <576F9ECE.7090102@de-brouwerij.be> Op 25-06-16 om 14:39 schreef Howard Page-Clark: > On 25/06/16 12:38, Koenraad Lelong wrote: >> Op 25-06-16 om 00:59 schreef David W Noon: >>> >>> const >>> TEXT : ansistring = >>> #10'Now is the winter of our discontent'#10 >>> 'Made glorious summer by this sun of York;'#10 >> Fatal: Syntax error, ";" expected but "const string" found >>> 'And all the clouds that lour''d upon our house'#10 >> ... >> >> Does not compile. Or do I need some compiler-switch ? > > No, you need concatenation operators inserted: > > const > TEXT : ansistring = > #10'Now is the winter of our discontent'#10 > +'Made glorious summer by this sun of York;'#10 > +'And all the clouds that lour''d upon our house'#10 > +'In the deep bosom of the ocean buried.'#10 > + etc... > Soo simple, why didn't I think of that. I finally have this : cTekst : PChar = #10'Now is the winter of our discontent'#10 +'Made glorious summer by this sun of York;'#10 +'And all the clouds that lour''d upon our house'#10 +'In the deep bosom of the ocean buried.'#10 +'Now are our brows bound with victorious wreaths;'#10 +'Our bruised arms hung up for monuments;'#10 +'Our stern alarums changed to merry meetings,'#10 +'Our dreadful marches to delightful measures.'#10 +'Grim-visaged war hath smooth''d his wrinkled front;'#10 +'And now, instead of mounting barded steeds'#10 +'To fright the souls of fearful adversaries,'#10 +'He capers nimbly in a lady''s chamber'#10 +'To the lascivious pleasing of a lute.'#10; Works fine on OpenSuse and Raspberry Pi. Thanks all. Koenraad. From pak.lebah at yahoo.com Mon Jun 27 08:14:36 2016 From: pak.lebah at yahoo.com (Mr Bee) Date: Mon, 27 Jun 2016 06:14:36 +0000 (UTC) Subject: [Lazarus] FreePascal and Lazarus Foundation References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Hi all, This morning I was glad to found this website: http://foundation.freepascal.org It's about time to have a foundation for our beloved projects. I hope by having this foundation, Free Pascal and Lazarus projects would go forward, being managed better and more professional to produce the best programming language, compiler and IDE for the world. :) Of course, there are still many things need to be fixed and enhanced on both projects. This foundation would be the first step forward. For this foundation, I'd like to say congratulation and good luck. Regards, –Mr Bee -------------- next part -------------- An HTML attachment was scrubbed... URL: From pak.lebah at yahoo.com Mon Jun 27 08:14:36 2016 From: pak.lebah at yahoo.com (Mr Bee) Date: Mon, 27 Jun 2016 06:14:36 +0000 (UTC) Subject: [Lazarus] FreePascal and Lazarus Foundation References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Hi all, This morning I was glad to found this website: http://foundation.freepascal.org It's about time to have a foundation for our beloved projects. I hope by having this foundation, Free Pascal and Lazarus projects would go forward, being managed better and more professional to produce the best programming language, compiler and IDE for the world. :) Of course, there are still many things need to be fixed and enhanced on both projects. This foundation would be the first step forward. For this foundation, I'd like to say congratulation and good luck. Regards, –Mr Bee -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Mon Jun 27 09:10:58 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 27 Jun 2016 09:10:58 +0200 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: <5cfa21cb-0a9e-852f-e3c5-0f0bec98a22d@kluug.net> Nice! I suggest adding "CodeTools support for generics" as a new project. Ondrej From michael at freepascal.org Mon Jun 27 10:00:08 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Jun 2016 10:00:08 +0200 (CEST) Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Mon, 27 Jun 2016, Mr Bee wrote: > Hi all, This morning I was glad to found this > website: http://foundation.freepascal.org It's about time to have a > foundation for our beloved projects. I hope by having this foundation, > Free Pascal and Lazarus projects would go forward, being managed better > and more professional to produce the best programming language, compiler > and IDE for the world. :) Of course, there are still many things need to > be fixed and enhanced on both projects. This foundation would be the > first step forward. For this foundation, I'd like to say congratulation > and good luck. Regards, Thank you. How did you manage to find this site ? I didn't make a public announcement yet :-) I am glad to hear that you approve. The foundation has been in the works for months, but in the next coming days we'll go public. I was actually waiting for the chairman to create a bank account to which we can couple a paypal account and a button for donations. The idea of the foundation is as stated on the website: the foundation will not interfere with design decisions, it is there to help with funding: this can be for code improvements/additions, or even making of releases and builds. (which takes a lot of time and equipment) Lazarus/Free Pascal are volunteer driven projects, and that will remain so. This means that some things are left lying because no-one wants to tackle them. These things can then be taken on by paying someone to do them (if sufficient funds are available). If the foundation can help in other ways, then that can obviously be discussed too. Michael. From michael at freepascal.org Mon Jun 27 10:01:14 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Jun 2016 10:01:14 +0200 (CEST) Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <5cfa21cb-0a9e-852f-e3c5-0f0bec98a22d@kluug.net> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <5cfa21cb-0a9e-852f-e3c5-0f0bec98a22d@kluug.net> Message-ID: On Mon, 27 Jun 2016, Ondrej Pokorny wrote: > Nice! > > I suggest adding "CodeTools support for generics" as a new project. Aren't generics supported yet ? Maybe you can elaborate what you mean by this support ? Michael. From lazarus at kluug.net Mon Jun 27 10:05:46 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 27 Jun 2016 10:05:46 +0200 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <5cfa21cb-0a9e-852f-e3c5-0f0bec98a22d@kluug.net> Message-ID: <0f7a6b4c-8d74-74bb-00b7-5a96140a325c@kluug.net> On 27.06.2016 10:01, Michael Van Canneyt wrote: > > > On Mon, 27 Jun 2016, Ondrej Pokorny wrote: > >> Nice! >> >> I suggest adding "CodeTools support for generics" as a new project. > > Aren't generics supported yet ? No. > Maybe you can elaborate what you mean by this support ? I can. Search for "generics" in Lazarus mantis to get an idea about it: http://mantis.freepascal.org/view.php?id=30271 http://mantis.freepascal.org/view.php?id=30227 http://mantis.freepascal.org/view.php?id=30124 http://mantis.freepascal.org/view.php?id=23782 http://mantis.freepascal.org/view.php?id=27847 http://mantis.freepascal.org/view.php?id=29163 http://mantis.freepascal.org/view.php?id=29785 There may be more. Ondrej From mailinglists at geldenhuys.co.uk Mon Jun 27 10:27:02 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 27 Jun 2016 09:27:02 +0100 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: <9cdaefdd-69ae-1fad-0ad0-c724594adb79@geldenhuys.co.uk> On 2016-06-27 09:00, Michael Van Canneyt wrote: > > How did you manage to find this site ? I didn't make a public announcement yet :-) Don't you know, nothing can be kept secret on the Internet. ;-) > I am glad to hear that you approve. The foundation has been in the works for > months, but in the next coming days we'll go public. Well done for getting this off the ground. 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 marc.hanisch at googlemail.com Mon Jun 27 10:29:13 2016 From: marc.hanisch at googlemail.com (Marc Hanisch) Date: Mon, 27 Jun 2016 10:29:13 +0200 Subject: [Lazarus] [fpc-pascal] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hello, very nice to hear about the foundation. Are you open for personal members? I would be interested in promoting Lazarus and Free Pascal. When you get donations, how is the money split to the projects and who decides about which project is getting how much? Best regards, Marc 2016-06-27 10:00 GMT+02:00 Michael Van Canneyt : > > > On Mon, 27 Jun 2016, Mr Bee wrote: > > Hi all, This morning I was glad to found this >> website: http://foundation.freepascal.org It's about time to have a >> foundation for our beloved projects. I hope by having this foundation, >> Free Pascal and Lazarus projects would go forward, being managed better >> and more professional to produce the best programming language, compiler >> and IDE for the world. :) Of course, there are still many things need to >> be fixed and enhanced on both projects. This foundation would be the >> first step forward. For this foundation, I'd like to say congratulation >> and good luck. Regards, >> > > Thank you. > > How did you manage to find this site ? I didn't make a public announcement > yet :-) > > I am glad to hear that you approve. The foundation has been in the works > for > months, but in the next coming days we'll go public. I was actually > waiting for the chairman to create a bank account to > which we can couple a paypal account and a button for donations. > > The idea of the foundation is as stated on the website: the foundation > will not interfere with design decisions, it is there to help with funding: > this can be for code improvements/additions, or even making of releases and > builds. (which takes a lot of time and equipment) > > Lazarus/Free Pascal are volunteer driven projects, and that will remain so. > This means that some things are left lying because no-one wants to tackle > them. > These things can then be taken on by paying someone to do them (if > sufficient > funds are available). > > If the foundation can help in other ways, then that can obviously be > discussed too. > > Michael. > _______________________________________________ > fpc-pascal maillist - fpc-pascal at lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > -------------- next part -------------- An HTML attachment was scrubbed... URL: From trustfm at gmail.com Mon Jun 27 11:41:48 2016 From: trustfm at gmail.com (Anastasios Karidis) Date: Mon, 27 Jun 2016 12:41:48 +0300 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: <8ab04d1e-6e58-d413-b095-c8f61acb5b62@gmail.com> On 6/23/2016 02:30, Michalis Kamburelis wrote: >> I have also an introduction on Object Pascal section on my site >> >> http://www.trustfm.net/ebooks/ObjectPascal.php >> >> but i had never time to finish it :S > I like it! - but without the 1st part, "Introduction"... I would not > advice using CodeTyphon, as I had very bad experience with the quality > of their stuff. I would much rather advice users to just install > Lazarus straight from http://www.lazarus-ide.org/ . > > Also, as a Linux user, the instructions to modify the "sudoers" (to > never ask for password), and then run the CodeTyphon with "sudo" are > kind of a show-stopper. Running with "sudo" is something you should > never do with an IDE... And it's certainly absolutely not required for > vanilla FPC or Lazarus. > > That said, the rest of the book starts really good! You describe using > Lazarus for a "Hello world" GUI programs, which is a cool approach, to > quickly show new users that they can do fancy GUI trivially easy with > Pascal. And presented with screenshots and basic code samples that > should get anyone started. Then you have a nice description of the > language. > > So, might I make a suggestion: how about just making the "Hello World" > part the 1st one, not the 2nd? And just start it with a simple > paragraph > > """ > Install Lazarus from http://www.lazarus-ide.org/ . Alternatively, you > can install CodeTyphon (link to existing installation instructions > here). > """ > > That would make it simpler (faster start into actual coding), and also > don't scare off Linux users with instructions about "sudo":) > > Regards, > Michalis I will take in consideration your advices . My point of view was at the 1st chapter to include Lazarus approach (installation and configuration) too... -- Anastasios Karidis aka TrustFm www.trustfm.net The gmail email From trustfm at gmail.com Mon Jun 27 11:44:43 2016 From: trustfm at gmail.com (Anastasios Karidis) Date: Mon, 27 Jun 2016 12:44:43 +0300 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: On 6/23/2016 02:37, Michalis Kamburelis wrote: >> Also, as a Linux user, the instructions to modify the "sudoers" (to >> never ask for password), and then run the CodeTyphon with "sudo" are >> kind of a show-stopper. Running with "sudo" is something you should >> never do with an IDE... And it's certainly absolutely not required for >> vanilla FPC or Lazarus. > Sorry, reading the instructions closer -- it seems you only need to > run "sudo codetyphon" to update it, not for regular usage. Well, > that's still rather bad (together with the description to modify > sudoers) and should not be necessary (it would be nice to be able to > install it for current user, without sudo, not system wide). Although > it's not as scary as I made it out to be above:) > > Regards, > Michalis Thank you, i am based at the official documentation of Sternas. But as i said i wantedto add Lazarus too. My approach ob the online tutorials is to define the sections and then fill them i hope to make some time to conclude this stuff. Locally i have evolving examples for OO not separate ones. Have a nice day ! -- Anastasios Karidis aka TrustFm www.trustfm.net The gmail email From alexsander.rosa at gmail.com Mon Jun 27 14:04:32 2016 From: alexsander.rosa at gmail.com (Alexsander Rosa) Date: Mon, 27 Jun 2016 09:04:32 -0300 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: 2016-06-27 5:00 GMT-03:00 Michael Van Canneyt : > > How did you manage to find this site ? I didn't make a public announcement > yet :-) > > It's not exactly a secret: http://www.blaisepascal.eu/ > NEWS > NEW FOUNDATION > ESTABLISHED > Free Pascal and Lazarus foundation > The Free Pascal and Lazarus foundation is > a non-profit organisation dedicated to the promotion and sponsoring of the > open source > The foundation collects funds to sponsor development of additional > features. > Which projects are being sponsored. > The users can submit projects which they would > like to see developed. > ------------------------------ > THE NEW ISSUE WILL BE SOON AVAILABLE: > a cover preview > -- Atenciosamente, Alexsander da Rosa -------------- next part -------------- An HTML attachment was scrubbed... URL: From victor.campillo at gmail.com Mon Jun 27 16:17:22 2016 From: victor.campillo at gmail.com (Victor Campillo) Date: Mon, 27 Jun 2016 16:17:22 +0200 Subject: [Lazarus] [fpc-pascal] FreePascal and Lazarus Foundation In-Reply-To: <2b3e7e73-7ff4-bde1-4a01-45c4ee5261c0@michael-ring.org> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <5771051E.4040404@gmail.com> <2b3e7e73-7ff4-bde1-4a01-45c4ee5261c0@michael-ring.org> Message-ID: <57713572.9060109@gmail.com> On 27/06/16 15:47, Michael Ring wrote: > > Most likely that Embarcadero has shut down their development Branch in > Spain, about 80 people involved. > > Michael > When I read the news this morning I was astonished, I didn't know that Embarcadero had such a big team in Spain (I am Spanish). In the group of G+ there is a comment of Allen Bauer that explains which parts of Delphi were developed in this office. > Allen Bauer +47 > The Spain office had taken on most of the IDE, Delphi RTL, GetIT, > Installer, some DB, Bluetooth components, IoT, QA, and other > miscellaneous tasks. They were by-far the largest single group working > on RAD Studio. They were all a wonderful, dedicated, excited group of > folks. They were eager to learn and truly enjoyed their jobs. I am > deeply saddened by this development. > > Not unexpected given what I know about the new owners', ahem, decided > lack of understanding how a dev-tool should be developed and > managed... In fact, how software in general should be developed. > > Gosh... I wonder why I left... Best Regards. -- Victor Campillo -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Mon Jun 27 20:12:44 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Jun 2016 20:12:44 +0200 (CEST) Subject: [Lazarus] [fpc-pascal] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Mon, 27 Jun 2016, Marc Hanisch wrote: > Hello, > > very nice to hear about the foundation. Are you open for personal members? That is the idea, but we still need to adapt the bylaws to allow this. > I would be interested in promoting Lazarus and Free Pascal. > When you get donations, how is the money split to the projects and who > decides about which project is getting how much? I had 2 tracks in mind: - Donations for a specific project/purpose (similar to the bounty system). - General donations. The foundation members would vote for the project(s) to fund in the latter system. We'd always need an estimate of how much work is involved for each project. Michael. From michael at freepascal.org Mon Jun 27 20:17:36 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Jun 2016 20:17:36 +0200 (CEST) Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Mon, 27 Jun 2016, Alexsander Rosa wrote: > 2016-06-27 5:00 GMT-03:00 Michael Van Canneyt : > >> >> How did you manage to find this site ? I didn't make a public announcement >> yet :-) >> >> > It's not exactly a secret: > http://www.blaisepascal.eu/ Ahah... Well, seems like Detlef is doing things in reverse order here :) Well, no matter. We were bound to go public in the next days anyway. Michael. From mitov at mitov.com Mon Jun 27 21:19:23 2016 From: mitov at mitov.com (Boian Mitov) Date: Mon, 27 Jun 2016 12:19:23 -0700 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: <240E02EDEEAD42E79FF51D8DBD966EF8@mpc1> I also had to post about the site, due to this surprising post yesterday: https://plus.google.com/115782878581272923715/posts/V3KpGyZXgLJ Long story short... I posted a reply in the main thread about the firing of the 80 developers: https://plus.google.com/105481197125997414290/posts/FnLvMteQ4dU as there was interest there. I did not intend to make big announcement, but then this guy obviously saw my post, and decided to announce his own "Foundation", so I had to respond with our announcement: https://plus.google.com/+BoianMitov/posts/46r34KmgrdQ So now it is known... With best regards, Boian Mitov ------------------------------------------------------- Mitov Software www.mitov.com ------------------------------------------------------- -----Original Message----- From: Michael Van Canneyt Sent: Monday, June 27, 2016 11:17 AM To: Lazarus mailing list Subject: Re: [Lazarus] FreePascal and Lazarus Foundation On Mon, 27 Jun 2016, Alexsander Rosa wrote: Ahah... Well, seems like Detlef is doing things in reverse order here :) Well, no matter. We were bound to go public in the next days anyway. Michael. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus From marcov at stack.nl Mon Jun 27 22:26:26 2016 From: marcov at stack.nl (Marco van de Voort) Date: Mon, 27 Jun 2016 22:26:26 +0200 Subject: [Lazarus] Lazarus App too slow ! In-Reply-To: <563BB05A.3090107@yahoo.com.br> References: <563BB05A.3090107@yahoo.com.br> Message-ID: <20160627202626.GA23004@stack.nl> On Thu, Nov 05, 2015 at 05:39:06PM -0200, Gugui wrote: > i have 2 CentOS servers ! > > one is CentOS release 6.6 (Final) and the app is very fast ! > another one is CentOS release 6.5 (Final) and the same app is too slow ! > > both is in the same network and > the slowness happend only with Lazarus app in this server > > any tips where to start looking for a solution? If the application is network related, I would look for differences in DNS setup between both boxes. From marcov at stack.nl Mon Jun 27 22:56:21 2016 From: marcov at stack.nl (Marco van de Voort) Date: Mon, 27 Jun 2016 22:56:21 +0200 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <240E02EDEEAD42E79FF51D8DBD966EF8@mpc1> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <240E02EDEEAD42E79FF51D8DBD966EF8@mpc1> Message-ID: <20160627205620.GA28081@stack.nl> On Mon, Jun 27, 2016 at 12:19:23PM -0700, Boian Mitov wrote: > I also had to post about the site, due to this surprising post yesterday: > https://plus.google.com/115782878581272923715/posts/V3KpGyZXgLJ > > Long story short... I posted a reply in the main thread about the firing of > the 80 developers: > https://plus.google.com/105481197125997414290/posts/FnLvMteQ4dU > > as there was interest there. I did not intend to make big announcement, but > then this guy obviously saw my post, and decided to announce his own > "Foundation", so I had to respond with our announcement: > https://plus.google.com/+BoianMitov/posts/46r34KmgrdQ > > So now it is known... That post tied the foundation to recent Delphi events. IMHo not a good thing to do. We are not the Delphi whipping boy. From hnb.code at gmail.com Mon Jun 27 22:59:12 2016 From: hnb.code at gmail.com (Maciej Izak) Date: Mon, 27 Jun 2016 22:59:12 +0200 Subject: [Lazarus] NewPascal "foundation" and black PR Message-ID: I have to correct something: 2016-06-27 21:19 GMT+02:00 Boian Mitov : > but then this guy obviously saw my post, and decided to announce his own > "Foundation", so I had to respond with our announcement: this guy is Maciej Izak, and Boian have wrong timing. What post? It is crazy! It was planned for a long time (January 2014): http://freesparta.com/roadmap NewPascal idea exist to provide simple start for mORMot users (in near future probably for Castle Game Engine too) and for early access for my compiler work on ARC objects and SmartPointers: http://synopse.info/forum/viewtopic.php?pid=20603#p20603 Donate button is provide to help me with keeping infrastructure (domain, VPS, small server), I am not rich programmer. Maybe no evryone has knowledge but to opposing to "Mitov Software" all of my work is open source! All is created in my free time after work. I may work too secretly but I am working on new MDI for Lazarus, Native LCL controls for Android, Debugger for Android, mORMot extensions and mentioned compiler stuff. Seems like PM is hard for business owner. -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From mitov at mitov.com Mon Jun 27 23:03:59 2016 From: mitov at mitov.com (Boian Mitov) Date: Mon, 27 Jun 2016 14:03:59 -0700 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <20160627205620.GA28081@stack.nl> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <240E02EDEEAD42E79FF51D8DBD966EF8@mpc1> <20160627205620.GA28081@stack.nl> Message-ID: <3DE60FC45DE941CBA87D55C6D5340108@mpc1> No, we are not a Delphi whipping boy, we are offering alternative, when the community is in distress. Offering some calm alternative is the right thing to do at a time of panic. Don't you ;-) ? With best regards, Boian Mitov ------------------------------------------------------- Mitov Software www.mitov.com ------------------------------------------------------- -----Original Message----- From: Marco van de Voort Sent: Monday, June 27, 2016 1:56 PM To: Lazarus mailing list Subject: Re: [Lazarus] FreePascal and Lazarus Foundation On Mon, Jun 27, 2016 at 12:19:23PM -0700, Boian Mitov wrote: That post tied the foundation to recent Delphi events. IMHo not a good thing to do. We are not the Delphi whipping boy. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus From mitov at mitov.com Mon Jun 27 23:12:16 2016 From: mitov at mitov.com (Boian Mitov) Date: Mon, 27 Jun 2016 14:12:16 -0700 Subject: [Lazarus] NewPascal "foundation" and black PR In-Reply-To: References: Message-ID: Hi Maciej, Thank you for the clarification. It is great that you are doing that work, and there is nothing wrong with you getting donations. What I felt was not right, was to post the site as a Lazarus foundation, most likely after you saw my posts. The Lazarus Foundation has nothing to do with Mitov Software, or any of my work. It also is setup in such a way, that I can’t get any money from it in any way. All the money are raised to pay the Lazarus/FPC developer, and that does not include me in any way. I am donating my time and effort to rise the funding for FPC/Lazarus, and who knows if we the donors decide some other projects maybe even yours. And BTW: I also do open source projects whenever I can, and I am also not rich programmer either, but unlike in your case the money I raise will not go to me in any way, and unlike you, I actually donate my work time (the libraries I sell are my only income), to this cause. I have not been able to do any other work for the last couple of days, because of my involvement in this, and it will be only the beginning, so while I am doing this, my own survival will be in big limbo. This is a great risk for me, but I am taking it, as this is needed, and nobody else has done it for so many years :-( With best regards, Boian Mitov ------------------------------------------------------- Mitov Software www.mitov.com ------------------------------------------------------- From: Maciej Izak Sent: Monday, June 27, 2016 1:59 PM To: Lazarus mailing list Subject: [Lazarus] NewPascal "foundation" and black PR I have to correct something: 2016-06-27 21:19 GMT+02:00 Boian Mitov : but then this guy obviously saw my post, and decided to announce his own "Foundation", so I had to respond with our announcement: this guy is Maciej Izak, and Boian have wrong timing. What post? It is crazy! It was planned for a long time (January 2014): http://freesparta.com/roadmap NewPascal idea exist to provide simple start for mORMot users (in near future probably for Castle Game Engine too) and for early access for my compiler work on ARC objects and SmartPointers: http://synopse.info/forum/viewtopic.php?pid=20603#p20603 Donate button is provide to help me with keeping infrastructure (domain, VPS, small server), I am not rich programmer. Maybe no evryone has knowledge but to opposing to "Mitov Software" all of my work is open source! All is created in my free time after work. I may work too secretly but I am working on new MDI for Lazarus, Native LCL controls for Android, Debugger for Android, mORMot extensions and mentioned compiler stuff. Seems like PM is hard for business owner. -- Best regards, Maciej Izak -------------------------------------------------------------------------------- -- _______________________________________________ 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 parkingspace26 at yahoo.com Wed Jun 1 01:11:39 2016 From: parkingspace26 at yahoo.com (Bob B.) Date: Tue, 31 May 2016 23:11:39 +0000 (UTC) Subject: [Lazarus] OpenRefine with Lazarus/FreePascal/fpSpreedsheet References: <1569350912.2592096.1464736299971.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1569350912.2592096.1464736299971.JavaMail.yahoo@mail.yahoo.com> How best to use with open source data wrangler OpenRefine (formerly Google Refine)? https://OpenRefine.orghttps://en.wikipedia.org/wiki/OpenRefine ThanksBob B. -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.rame at griensu.com Wed Jun 1 20:03:32 2016 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Wed, 1 Jun 2016 15:03:32 -0300 Subject: [Lazarus] Test Message-ID: <574F2374.2050806@griensu.com> Just testing. -- Leonardo M. Ramé Medical IT - Griensu S.A. Av. Colón 636 - Piso 8 Of. A X5000EPT -- Córdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54 9 (011) 40871877 From schalk.stefan at googlemail.com Thu Jun 2 15:02:34 2016 From: schalk.stefan at googlemail.com (Stefan Schalk) Date: Thu, 2 Jun 2016 15:02:34 +0200 Subject: [Lazarus] Memory leak with Synchronize on external threads In-Reply-To: <574DF285.1060102@googlemail.com> References: <001d01d1bb39$3326b600$99742200$@googlemail.com> <574DF285.1060102@googlemail.com> Message-ID: <000c01d1bccf$087df660$1979e320$@googlemail.com> Hi Sven, many thanks for your quick response and solution! I tried the new FPC sources (Revision 33878) and ran in a segmentation fault. In classes.inc line 345 the SizeOf gets the length from the pointer but I think the length of the structure is needed: currently: FillChar(syncentry^, SizeOf(syncentry), 0); suggestion: FillChar(syncentry^, SizeOf(TThreadQueueEntry), 0); Because of that, the uninitialized structure member "Next" will lead to a segmentation fault afterwards. I tried the suggestion and everything works fine (no SIGSEGV, no memory leak). Can you please review my suggestion? Best regards, Stefan -----Ursprüngliche Nachricht----- Von: Lazarus [mailto:lazarus-bounces at lists.lazarus-ide.org] Im Auftrag von Sven Barth Gesendet: Dienstag, 31. Mai 2016 22:22 An: lazarus at lists.lazarus-ide.org Betreff: Re: [Lazarus] Memory leak with Synchronize on external threads I've committed a fix in FPC revision 33863 and if all goes well it should be merged to 3.0.1 as well, thus becoming part of 3.0.2. A check with Delphi has shown that the WakeMainThread event gets Nil as Sender argument with an external thread, so I can avoid the use of CurrentThread which triggered the memory usage. Please note that this is however not a leak as CurrentThread will create a TExternalThread instance for a thread that hasn't been created by TThread (and for which no instance exists yet) and this instance must (sadly) be kept around until the program terminates. Regards, Sven -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 2982 bytes Desc: not available URL: From luizamericop at gmail.com Thu Jun 2 17:52:00 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Thu, 2 Jun 2016 12:52:00 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release Message-ID: The LCL port of VirtualTreeView component has a new home: https://github.com/blikblum/VirtualTreeView-Lazarus It's now a direct fork of Delphi repository making easier to keep in sync Two versions are released - 4.8.7 - 5.5.3 Major changes: - Uses native resources instead of Lazarus resources: smaller binary - Fix reported bugs: remaining bugs also affects original code or is a side effect of bugs in other parts of LCL Remarks: - The users of 4.x must be warned that 5.x has breaking changes. Search for VTMajorVersion directives at the 5.x version of the demos to some of the incompatibilities - Tested in windows with fpc 2.6.4, fpc 3.0 and fpc trunk - Under linux the test was fairly basic. Only gtk2 with fpc 2.6.4, compiled and run advanced demo Downloads at https://github.com/blikblum/VirtualTreeView-Lazarus/releases Bugs should be reported in github although i will still monitor mantis Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Jun 2 18:10:52 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 2 Jun 2016 17:10:52 +0100 Subject: [Lazarus] Refactoring functionality is broken Message-ID: Hi, I'm using Lazarus 1.7 r52282 FPC 2.6.4 x86_64-linux-gtk2. None of the refactoring functionality seems to be working in my copy of Lazarus. Not sure if this was a known issue and already fixed, but I thought I would mention it here, in case this issue went unnoticed. I tried "Make resourcestring" and "Extract procedure". Both got halfway with the refactoring - by that I mean the string constant got replaced with the resource string name, but the actual resource string variable never got defined. In the case of the Extract Procedure, a similar thing happened. The selected code got replaced with the new procedure name, but the actual procedure never got defined. In both cases I received an error (see attached screenshot), and then the editor highlighting went totally out of whack. I had to close down Lazarus, restore my code from the code repository and then start Lazarus again. Needless to say, I didn't attempt any further refactoring. I think the only refactoring that does work on my system is "Rename Identifier" - but that is probably because it is the simplest refactoring of the available options - equivalent to a Search & Replace. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot at 2016-06-02 15:49:06.png Type: image/png Size: 9278 bytes Desc: not available URL: From dezlov at gmail.com Thu Jun 2 18:53:31 2016 From: dezlov at gmail.com (Denis Kozlov) Date: Thu, 2 Jun 2016 17:53:31 +0100 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: On 2 June 2016 at 16:52, Luiz Americo Pereira Camara wrote: > The LCL port of VirtualTreeView component has a new home: > https://github.com/blikblum/VirtualTreeView-Lazarus > That's great! How does it compare to a copy in Lazarus CCR? https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/virtualtreeview-new/ Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Thu Jun 2 19:19:38 2016 From: lazarus at mfriebe.de (Martin Frb) Date: Thu, 2 Jun 2016 18:19:38 +0100 Subject: [Lazarus] Refactoring functionality is broken In-Reply-To: References: Message-ID: On 02/06/2016 17:10, Graeme Geldenhuys wrote: > Hi, > > I'm using Lazarus 1.7 r52282 FPC 2.6.4 x86_64-linux-gtk2. None of the .... > In both cases I received an error (see attached screenshot), and then > the editor highlighting went totally out of whack. I had to close down > Lazarus, restore my code from the code repository and then start Lazarus > again. Needless to say, I didn't attempt any further refactoring. > Have you got any code to reproduce this? You might be able to work around by switching off ifdef lowlight ing. (set all involved colors to none) From mailinglists at geldenhuys.co.uk Thu Jun 2 19:22:29 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 2 Jun 2016 18:22:29 +0100 Subject: [Lazarus] Refactoring functionality is broken In-Reply-To: References: Message-ID: On 2016-06-02 18:19, Martin Frb wrote: > Have you got any code to reproduce this? Unfortunately I am not allowed to share/publish any of the code I'm currently working on. But I will test the behaviour on open source code and let you know. > You might be able to work around by switching off ifdef lowlight ing. Will do, and report back tomorrow. 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 luizamericop at gmail.com Thu Jun 2 23:55:52 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Thu, 2 Jun 2016 18:55:52 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: 2016-06-02 13:53 GMT-03:00 Denis Kozlov : > On 2 June 2016 at 16:52, Luiz Americo Pereira Camara < > luizamericop at gmail.com> wrote: > >> The LCL port of VirtualTreeView component has a new home: >> https://github.com/blikblum/VirtualTreeView-Lazarus >> > > That's great! > > How does it compare to a copy in Lazarus CCR? > > https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/virtualtreeview-new/ > Github is newer All new development will go there Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From tc at epidata.info Fri Jun 3 08:49:35 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Fri, 3 Jun 2016 08:49:35 +0200 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: On 2016-06-02 17:52, Luiz Americo Pereira Camara wrote: > The LCL port of VirtualTreeView component has a new home: > https://github.com/blikblum/VirtualTreeView-Lazarus > > It's now a direct fork of Delphi repository making easier to keep in sync > > Two versions are released > - 4.8.7 > - 5.5.3 > > Major changes: > - Uses native resources instead of Lazarus resources: smaller binary > - Fix reported bugs: remaining bugs also affects original code or is a > side effect of bugs in other parts of LCL > > Remarks: > - The users of 4.x must be warned that 5.x has breaking changes. > Search for VTMajorVersion directives at the 5.x version of the demos > to some of the incompatibilities > - Tested in windows with fpc 2.6.4, fpc 3.0 and fpc trunk > - Under linux the test was fairly basic. Only gtk2 with fpc 2.6.4, > compiled and run advanced demo I get a compile-time error when compiling the lazarus package: Free Pascal Compiler version 3.0.0 [2015/11/26] for x86_64 Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Linux for x86-64 (3104) Compiling lclextensions_package.pas < ... snip ... > /home/torsten/FreePascal/VirtualTreeView-Lazarus/Source/VirtualTrees.pas(3083,25) Fatal: (2003) Syntax error, ":" expected but "<" found Fatal: (1018) Compilation aborted Error: /home/torsten/FreePascal/fpc/bin/ppcx64 returned an error exitcode Kind regards, Torsten. From tc at epidata.info Fri Jun 3 09:25:10 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Fri, 3 Jun 2016 09:25:10 +0200 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: <67fc4c0b-e69d-fb31-f8e8-3f258c1ab2d6@epidata.info> On 2016-06-03 08:49, Torsten Bonde Christiansen wrote: > On 2016-06-02 17:52, Luiz Americo Pereira Camara wrote: >> The LCL port of VirtualTreeView component has a new home: >> https://github.com/blikblum/VirtualTreeView-Lazarus >> >> It's now a direct fork of Delphi repository making easier to keep in >> sync >> >> Two versions are released >> - 4.8.7 >> - 5.5.3 >> >> Major changes: >> - Uses native resources instead of Lazarus resources: smaller binary >> - Fix reported bugs: remaining bugs also affects original code or is >> a side effect of bugs in other parts of LCL >> >> Remarks: >> - The users of 4.x must be warned that 5.x has breaking changes. >> Search for VTMajorVersion directives at the 5.x version of the demos >> to some of the incompatibilities >> - Tested in windows with fpc 2.6.4, fpc 3.0 and fpc trunk >> - Under linux the test was fairly basic. Only gtk2 with fpc 2.6.4, >> compiled and run advanced demo > I get a compile-time error when compiling the lazarus package: > > > Free Pascal Compiler version 3.0.0 [2015/11/26] for x86_64 > Copyright (c) 1993-2015 by Florian Klaempfl and others > (1002) Target OS: Linux for x86-64 > (3104) Compiling lclextensions_package.pas > > < ... snip ... > > > /home/torsten/FreePascal/VirtualTreeView-Lazarus/Source/VirtualTrees.pas(3083,25) > Fatal: (2003) Syntax error, ":" expected but "<" found > Fatal: (1018) Compilation aborted > Error: /home/torsten/FreePascal/fpc/bin/ppcx64 returned an error exitcode Sorry - this was from the master repository, not from the releases. The releases are working fine on linux x86_64, fpc 3.0 -Torsten. From tc at epidata.info Fri Jun 3 10:03:12 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Fri, 3 Jun 2016 10:03:12 +0200 Subject: [Lazarus] Incorrect highlighting for {$IF}..{$ENDIF} Message-ID: <94baadc0-2865-3563-ba5d-2db089eaa58f@epidata.info> Hi. I notices that the highligter in synedit is incorrect in a special case of IFDEF'ed code, please see attached picture: This snippet of code does compile in fpc 3.0, and if run through debugger both the statements "a:=2" are executed as expected. However, as the picture shows, the highlighting is incorrect when using a constant as parameter to the {$IF} condition. Should a create a bug report for it? Kind regards, Torsten. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mkdkfmknlcncgapc.png Type: image/png Size: 19642 bytes Desc: not available URL: From dezlov at gmail.com Fri Jun 3 10:55:47 2016 From: dezlov at gmail.com (Denis Kozlov) Date: Fri, 3 Jun 2016 09:55:47 +0100 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: On 2 June 2016 at 22:55, Luiz Americo Pereira Camara wrote: > On 2 June 2016 at 16:52, Luiz Americo Pereira Camara < >> luizamericop at gmail.com> wrote: >> >>> The LCL port of VirtualTreeView component has a new home: >>> https://github.com/blikblum/VirtualTreeView-Lazarus >>> >> >> All new development will go there > Can you update the wiki when you get a chance? It's google's first result for "virtualtreeview lazarus", but it doesn't even mention the new home. http://wiki.freepascal.org/VirtualTreeview Are you planning to maintain a copy on CCR SVN uptodate? Or is it going to be removed? Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Fri Jun 3 11:18:33 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 3 Jun 2016 10:18:33 +0100 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: <11d3dca8-c37b-2881-4a33-c260b8aa8701@geldenhuys.co.uk> On 2016-06-03 09:55, Denis Kozlov wrote: > Are you planning to maintain a copy on CCR SVN uptodate? Or is it going to > be removed? If the github one is more up to date, I would recommend removing the code in Lazarus CCR to prevent confusion. There are enough duplicate [component] efforts already, and more confusion is probably not wanted. Regards, Graeme From luizamericop at gmail.com Fri Jun 3 13:19:47 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Fri, 3 Jun 2016 08:19:47 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: 2016-06-03 5:55 GMT-03:00 Denis Kozlov : > On 2 June 2016 at 22:55, Luiz Americo Pereira Camara < > luizamericop at gmail.com> wrote: > >> On 2 June 2016 at 16:52, Luiz Americo Pereira Camara < >>> luizamericop at gmail.com> wrote: >>> >>>> The LCL port of VirtualTreeView component has a new home: >>>> https://github.com/blikblum/VirtualTreeView-Lazarus >>>> >>> >>> All new development will go there >> > > Can you update the wiki when you get a chance? It's google's first result > for "virtualtreeview lazarus", but it doesn't even mention the new home. > > http://wiki.freepascal.org/VirtualTreeview > I updated > > Are you planning to maintain a copy on CCR SVN uptodate? > No. > Or is it going to be removed? > The only reason to keep is to preserve the development history But is really confusing. I will try to move the history to other repository so i can delete. About virtualtreeview folder in Lazarus-ccr is not my work so i don't feel confortable in deleting it. For a complete history of LCL VTV dev, i posted in the forum a year ago: Some history: There was a VTV port by Joerg Thaler,Christian Ulrich hosted at Lazarus-ccr. It used the approach to comment code that were buggy or not implemented in LCL. This lead to a largely incomplete port. So i started a new VTV port long years ago at BountySource. I took another path: as soon as i hit a code that was buggy or not implemented in LCL and its widgetsets i reported in Lazarus bug tracker providing patches when doable. In parallel i created a support package implementing API that does not make sense in LCL (LCLExtensions). Sometime later i was asked by a Lazarus dev (Vincent) to move to Lazarus-ccr initially under the virtualtreeview-unstable repository, later renamed to virtualtreeview-new. The original port is still there. Changes in VTV delphi repository were backported to the Lazarus port and were in more or less in sync by the times of 4.8 release. At this time Mike Liesche stopped working in VTV and development stalled. When work was resumed in 5.x branch, initially i did not backport. Only later i separated 4.8 from trunk in virtualtreeview-new repository and started to sync Delphi VTV 5.x/trunk with virtualtreeview-new/trunk. Since than virtualtreeview-new/trunk has became unstable because of changes in interface or windows specific code introduced while doing the backport. Currently the virtualtreeview-new/trunk has most of the 5.x code ported but needs some work to get in a decent shape specially for non windows. With the move of VTV to github things will be easier since git has features that allows to maintain forks tracking and merging changes from the original in a structured way. Until now i was doing almost manually (with help of tools like araxis merge, smartsynchronize and meld) Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Sun Jun 5 00:29:59 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 5 Jun 2016 00:29:59 +0200 Subject: [Lazarus] Memory leak with Synchronize on external threads In-Reply-To: <000c01d1bccf$087df660$1979e320$@googlemail.com> References: <001d01d1bb39$3326b600$99742200$@googlemail.com> <574DF285.1060102@googlemail.com> <000c01d1bccf$087df660$1979e320$@googlemail.com> Message-ID: Am 02.06.2016 15:03 schrieb "Stefan Schalk" : > > > Hi Sven, > > many thanks for your quick response and solution! > > I tried the new FPC sources (Revision 33878) and ran in a segmentation fault. > In classes.inc line 345 the SizeOf gets the length from the pointer but I think > the length of the structure is needed: > > currently: FillChar(syncentry^, SizeOf(syncentry), 0); > > suggestion: FillChar(syncentry^, SizeOf(TThreadQueueEntry), 0); > > Because of that, the uninitialized structure member "Next" will lead to a > segmentation fault afterwards. > I tried the suggestion and everything works fine (no SIGSEGV, no memory leak). > Can you please review my suggestion? You're indeed right. Fixed that. Though this whole fix won't be part of 3.0.2 anymore as it got discovered (and fixed) too late. As a workaround try to avoid calling Synchronize from a new external thread each time. If it is the same thread then memory usage won't increase after the first call. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From juergen.hestermann at gmx.de Sun Jun 5 12:52:09 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Sun, 5 Jun 2016 12:52:09 +0200 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: Message-ID: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> Am 2016-06-02 um 17:52 schrieb Luiz Americo Pereira Camara: > The LCL port of VirtualTreeView component has a new home: https://github.com/blikblum/VirtualTreeView-Lazarus > It's now a direct fork of Delphi repository making easier to keep in sync > Two versions are released > - 4.8.7 > - 5.5.3 I am using a version of VTV from october 2013 which claims to be 4.8.7 too but is slightly different to the one I just downloaded from your link. Especialy one difference stroke me as it looks like a bug: In line 6740 of the current downloaded version there is this code: ---------------------- if not FCheckBox then HeaderGlyphSize := Point(FImages.Width, FImages.Height) else HeaderGlyphSize := Point(Treeview.CheckImages.Height, Treeview.CheckImages.Height) ---------------------- Why is "Height" used twice in the last line? This line is different in the older version of 4.8.7: ---------------------- HeaderGlyphSize := Point(Treeview.CheckImages.Width, Treeview.CheckImages.Height) ---------------------- which IMO is correct. Why the change? From luizamericop at gmail.com Sun Jun 5 14:56:48 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Sun, 5 Jun 2016 09:56:48 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> References: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> Message-ID: 2016-06-05 7:52 GMT-03:00 Jürgen Hestermann : > Am 2016-06-02 um 17:52 schrieb Luiz Americo Pereira Camara: > > The LCL port of VirtualTreeView component has a new home: > https://github.com/blikblum/VirtualTreeView-Lazarus > > It's now a direct fork of Delphi repository making easier to keep in sync > > Two versions are released > > - 4.8.7 > > - 5.5.3 > > I am using a version of VTV from october 2013 which claims to be 4.8.7 too > There are four LCL releases for 4.8.7. Probably you are using the second release > but is slightly different to the one I just downloaded from your link. > Especialy one difference stroke me as it looks like a bug: > In line 6740 of the current downloaded version there is this code: > > ---------------------- > if not FCheckBox then > HeaderGlyphSize := Point(FImages.Width, FImages.Height) > else > HeaderGlyphSize := Point(Treeview.CheckImages.Height, > Treeview.CheckImages.Height) > ---------------------- > > Why is "Height" used twice in the last line? > CheckImages changed from a ImageList to a Bitmap with all check images in a row. The Width of the bitmap has a different meaning from the imagelist one. In the Bitmap is the sum of all checkimages Width In the case the Width of each individual image matches Height, so the code. Feel free to report any bug Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From juergen.hestermann at gmx.de Sun Jun 5 15:50:57 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Sun, 5 Jun 2016 15:50:57 +0200 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: References: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> Message-ID: <6e1f26db-99df-5d1e-9b02-548ba6875929@gmx.de> Am 2016-06-05 um 14:56 schrieb Luiz Americo Pereira Camara: > 2016-06-05 7:52 GMT-03:00 Jürgen Hestermann : > ---------------------- > if not FCheckBox then > HeaderGlyphSize := Point(FImages.Width, FImages.Height) > else > HeaderGlyphSize := Point(Treeview.CheckImages.Height, Treeview.CheckImages.Height) > ---------------------- > Why is "Height" used twice in the last line? > CheckImages changed from a ImageList to a Bitmap with all check images in a row. The Width of the bitmap has a different meaning from the imagelist one. > In the Bitmap is the sum of all checkimages Width > In the case the Width of each individual image matches Height, so the code. > Feel free to report any bug I don't fully understand the changes regarding CheckImages but if it is not a bug but desired behaviour then why should I report a bug? From luizamericop at gmail.com Sun Jun 5 17:10:12 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Sun, 5 Jun 2016 12:10:12 -0300 Subject: [Lazarus] VirtualTreeView: new home, new release In-Reply-To: <6e1f26db-99df-5d1e-9b02-548ba6875929@gmx.de> References: <2737e0bc-18a1-b1c8-cb68-b13a47daaf42@gmx.de> <6e1f26db-99df-5d1e-9b02-548ba6875929@gmx.de> Message-ID: 2016-06-05 10:50 GMT-03:00 Jürgen Hestermann : > Am 2016-06-05 um 14:56 schrieb Luiz Americo Pereira Camara: > > > Feel free to report any bug > > I don't fully understand the changes regarding CheckImages but > if it is not a bug but desired behaviour then why should I report a bug? > > I mean, any bug you find, graphical or behavior Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Santhoff at web.de Mon Jun 6 02:18:08 2016 From: M.Santhoff at web.de (Marc Santhoff) Date: Mon, 06 Jun 2016 02:18:08 +0200 Subject: [Lazarus] programming and testing ide design time package Message-ID: <1465172288.9680.5.camel@puma.das.netz> Hi, if writing an IDE extension, how would the setup for testing it look like? Assuming: - the package registers a menu entry - it does some design time manipulations according to the users/programmers wishes The code is written and compiled. Then it needs to be installed in the IDE and tested. How can I do it in a handy way? TIA, Marc -- Marc Santhoff From juha.manninen62 at gmail.com Mon Jun 6 19:18:08 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 6 Jun 2016 20:18:08 +0300 Subject: [Lazarus] programming and testing ide design time package In-Reply-To: <1465172288.9680.5.camel@puma.das.netz> References: <1465172288.9680.5.camel@puma.das.netz> Message-ID: On Monday, June 6, 2016, Marc Santhoff wrote: > > The code is written and compiled. Then it needs to be installed in the > IDE and tested. How can I do it in a handy way? > You can debug the IDE by opening lazarus.lpi project and pressing F9. Lazarus must be built with debug info before that. Another way to debug is by adding DebugLn() calls and checking their output in console or log file. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Santhoff at web.de Mon Jun 6 22:43:04 2016 From: M.Santhoff at web.de (Marc Santhoff) Date: Mon, 06 Jun 2016 22:43:04 +0200 Subject: [Lazarus] programming and testing ide design time package In-Reply-To: References: <1465172288.9680.5.camel@puma.das.netz> Message-ID: <1465245784.7244.3.camel@puma.das.netz> On Mo, 2016-06-06 at 20:18 +0300, Juha Manninen wrote: > On Monday, June 6, 2016, Marc Santhoff wrote: > > > > The code is written and compiled. Then it needs to be installed in the > > IDE and tested. How can I do it in a handy way? > > > > You can debug the IDE by opening lazarus.lpi project and pressing F9. > Lazarus must be built with debug info before that. > Another way to debug is by adding DebugLn() calls and checking their output > in console or log file. OK, so there is no other way but actually compiling the extension in. What I will try is to make the shim between IDE coupling an the rest as thin as possible, so anything else can be tested separately before. Thanks, Marc -- Marc Santhoff From nc-gaertnma at netcologne.de Mon Jun 6 22:48:11 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 6 Jun 2016 22:48:11 +0200 Subject: [Lazarus] programming and testing ide design time package In-Reply-To: <1465245784.7244.3.camel@puma.das.netz> References: <1465172288.9680.5.camel@puma.das.netz> <1465245784.7244.3.camel@puma.das.netz> Message-ID: <20160606224811.572d0f28@limapholos.matflo.wg> On Mon, 06 Jun 2016 22:43:04 +0200 Marc Santhoff wrote: > On Mo, 2016-06-06 at 20:18 +0300, Juha Manninen wrote: > > On Monday, June 6, 2016, Marc Santhoff wrote: > > > > > > The code is written and compiled. Then it needs to be installed in the > > > IDE and tested. How can I do it in a handy way? > > > > > > > You can debug the IDE by opening lazarus.lpi project and pressing F9. > > Lazarus must be built with debug info before that. > > Another way to debug is by adding DebugLn() calls and checking their output > > in console or log file. Hint: you can have multiple Lazarus instances, using the --pcp command line switch. > OK, so there is no other way but actually compiling the extension in. Well, you can create a project and compile your extension into that. Of course than you can only test a few parts. > What I will try is to make the shim between IDE coupling an the rest as > thin as possible, so anything else can be tested separately before. Good idea. Mattias From M.Santhoff at web.de Tue Jun 7 15:16:53 2016 From: M.Santhoff at web.de (Marc Santhoff) Date: Tue, 07 Jun 2016 15:16:53 +0200 Subject: [Lazarus] programming and testing ide design time package In-Reply-To: <20160606224811.572d0f28@limapholos.matflo.wg> References: <1465172288.9680.5.camel@puma.das.netz> <1465245784.7244.3.camel@puma.das.netz> <20160606224811.572d0f28@limapholos.matflo.wg> Message-ID: <1465305413.3471.2.camel@puma.das.netz> On Mo, 2016-06-06 at 22:48 +0200, Mattias Gaertner wrote: > On Mon, 06 Jun 2016 22:43:04 +0200 > Marc Santhoff wrote: > > > On Mo, 2016-06-06 at 20:18 +0300, Juha Manninen wrote: > > > On Monday, June 6, 2016, Marc Santhoff wrote: > > > > > > > > The code is written and compiled. Then it needs to be installed in the > > > > IDE and tested. How can I do it in a handy way? > > > > > > > > > > You can debug the IDE by opening lazarus.lpi project and pressing F9. > > > Lazarus must be built with debug info before that. > > > Another way to debug is by adding DebugLn() calls and checking their output > > > in console or log file. > > Hint: you can have multiple Lazarus instances, using the --pcp command > line switch. Ah, I didn' think about it, thanks. A bit confusing at first, solving the chicken-egg-problem by getting another chicken... ;) Getting hungry now, Marc -- Marc Santhoff From Martin at The-Wallers.net Wed Jun 8 18:08:54 2016 From: Martin at The-Wallers.net (Martin Waller) Date: Wed, 8 Jun 2016 17:08:54 +0100 Subject: [Lazarus] Raspberry Pi / Shared Libraries Message-ID: <008a01d1c1a0$0e880b60$2b982220$@The-Wallers.net> Hi, I've been trying to build and load dynamically a simple shared library using Lazarus and the FPC. At the moment I have a simple one function shared library that compiles and builds cleanly and I have a couple of lines to try and load the library. It consistently returns a handle of zero. The associated error from GetLoadErrorStr is "No such file or directory". Using objdump I can see that the library needs ld-linus-armhf.so.3 and that is in the /lib folder. If I replace the library name with a shared library in the same folder generated using the C compiler then it loads fine. The only different that I can see in that the Lazarus generated shared library has the soft-float ABI flag set and the C library has the hard-float ABI flag set! Does anyone have any clues as to why this can fail. Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From fluisgirardi at gmail.com Wed Jun 8 20:22:44 2016 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Wed, 8 Jun 2016 15:22:44 -0300 Subject: [Lazarus] Raspberry Pi / Shared Libraries In-Reply-To: <008a01d1c1a0$0e880b60$2b982220$@The-Wallers.net> References: <008a01d1c1a0$0e880b60$2b982220$@The-Wallers.net> Message-ID: See: http://bugs.freepascal.org/view.php?id=26454 2016-06-08 13:08 GMT-03:00 Martin Waller : > Hi, > > > > I’ve been trying to build and load dynamically a simple shared library > using Lazarus and the FPC. At the moment I have a simple one function > shared library that compiles and builds cleanly and I have a couple of > lines to try and load the library. > > > > It consistently returns a handle of zero. The associated error from > GetLoadErrorStr is “No such file or directory”. Using objdump I can see > that the library needs ld-linus-armhf.so.3 and that is in the /lib folder. > > > > If I replace the library name with a shared library in the same folder > generated using the C compiler then it loads fine. > > > > The only different that I can see in that the Lazarus generated shared > library has the soft-float ABI flag set and the C library has the > hard-float ABI flag set! > > > > Does anyone have any clues as to why this can fail. > > > > Martin > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fpc at ssn.at Mon Jun 13 16:33:22 2016 From: fpc at ssn.at (Lukas Gradl) Date: Mon, 13 Jun 2016 14:33:22 +0000 Subject: [Lazarus] Access violation at current svn Message-ID: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> Hi! I tried to update my Lazarus svn to the current revision (52501) on a debian jessie x86_64 machine. I compiled it by make clean;make all using fpc 3.1.1 from today. The comilation finishes successfully, but on starting lazarus I get a window "Read error" "Access violation Access violation". The console (where I started startlazarus from) says: [TJITForms.DoCreateJITComponent] Error Error: Access violation Stack trace: $0000000000547F10 $0000000000988F72 DOCREATEJITCOMPONENT, line 1041 of ../designer/jitforms.pp $00000000009883BA ADDNEWJITCOMPONENT, line 832 of ../designer/jitforms.pp $00000000009AC43D CREATECOMPONENT, line 1306 of customformeditor.pp $0000000000BF551F CREATENEWFORM, line 4477 of sourcefilemanager.pas $0000000000BEB3F6 NEWFILE, line 2139 of sourcefilemanager.pas $00000000004B83A3 DONEWFILE, line 5479 of main.pp $0000000000905468 DONEWEDITORFILE, line 707 of lazideintf.pas $0000000000952262 CREATESTARTFILES, line 1309 of projectdefs.pas $0000000000BF103B INITNEWPROJECT, line 3561 of sourcefilemanager.pas $00000000004BAA34 DONEWPROJECT, line 6129 of main.pp $00000000004A953A SETUPSTARTPROJECT, line 2317 of main.pp $00000000004A612F STARTIDE, line 1593 of main.pp $000000000041E9E7 main, line 133 of lazarus.pp TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil Any Idea what I'm doing wrong or is just the svn broken? regards Lukas From lazarus at kluug.net Mon Jun 13 16:42:40 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 13 Jun 2016 16:42:40 +0200 Subject: [Lazarus] Access violation at current svn In-Reply-To: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> References: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> Message-ID: On 13.06.2016 16:33, Lukas Gradl wrote: > Hi! > > I tried to update my Lazarus svn to the current revision (52501) on a > debian jessie x86_64 machine. > I compiled it by make clean;make all using fpc 3.1.1 from today. > > The comilation finishes successfully, but on starting lazarus I get a > window "Read error" "Access violation Access violation". It's a known issue. It's due to the recent FPC changes (PTypeInfo -> PPTypeInfo). Lazarus designer sources haven't been updated to handle these changes yet. I recommend you to compile Lazarus with FPC 3.0 fixes branch or with FPC trunk rev 33943 until it gets sorted out. You can stil compile your own applications with the most recent FPC trunk. Ondrej From pascaldragon at googlemail.com Mon Jun 13 21:13:13 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Mon, 13 Jun 2016 21:13:13 +0200 Subject: [Lazarus] Access violation at current svn In-Reply-To: References: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> Message-ID: <575F05C9.8060005@googlemail.com> On 13.06.2016 16:42, Ondrej Pokorny wrote: > On 13.06.2016 16:33, Lukas Gradl wrote: >> Hi! >> >> I tried to update my Lazarus svn to the current revision (52501) on a >> debian jessie x86_64 machine. >> I compiled it by make clean;make all using fpc 3.1.1 from today. >> >> The comilation finishes successfully, but on starting lazarus I get a >> window "Read error" "Access violation Access violation". > > It's a known issue. It's due to the recent FPC changes (PTypeInfo -> > PPTypeInfo). Lazarus designer sources haven't been updated to handle > these changes yet. > > I recommend you to compile Lazarus with FPC 3.0 fixes branch or with FPC > trunk rev 33943 until it gets sorted out. You can stil compile your own > applications with the most recent FPC trunk. The fix done in r52482 is not correct however. ClassInfo will continue to return a PTypeInfo for backwards compatibility, so you'll need to dynamically allocate a pointer variable that gets that type info and then gets stuffed into the ParentInfoRef field. Regards, Sven From vojtech.cihak at atlas.cz Tue Jun 14 18:28:47 2016 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 14 Jun 2016 18:28:47 +0200 Subject: [Lazarus] =?utf-8?q?Different_order_of_methods/events_of_PopupMen?= =?utf-8?q?u?= Message-ID: <20160614182847.2B96A313@atlas.cz> Hi,   is this known issue?   In Qt, when I open PopupMenu and select item, order is:   MenuItemClick; OnMenuClose;   In Wine it is opposite (and in Windows too). I can't test in Delphi7 because Popumenus don't have OnClose there.   Thanks.   From vojtech.cihak at atlas.cz Tue Jun 14 21:55:32 2016 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 14 Jun 2016 21:55:32 +0200 Subject: [Lazarus] =?utf-8?q?Different_order_of_methods/events_of_PopupMen?= =?utf-8?q?u?= In-Reply-To: 000000005d320001c54400e15025 References: 000000005d320001c54400e15025 Message-ID: <20160614215532.C3E43D80@atlas.cz> I reported it: http://bugs.freepascal.org/view.php?id=30278   The older (0.9.30) related issue: http://bugs.freepascal.org/view.php?id=15465   Thanks, V. ______________________________________________________________ > Od: Vojtěch Čihák > Komu: Lazarus mailing list > Datum: 14.06.2016 18:28 > Předmět: [Lazarus] Different order of methods/events of PopupMenu > Hi,   is this known issue?   In Qt, when I open PopupMenu and select item, order is:   MenuItemClick; OnMenuClose;   In Wine it is opposite (and in Windows too). I can't test in Delphi7 because Popumenus don't have OnClose there.   Thanks.   -- _______________________________________________ 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 jmlandmesser at gmx.de Wed Jun 15 05:35:56 2016 From: jmlandmesser at gmx.de (John Landmesser) Date: Wed, 15 Jun 2016 05:35:56 +0200 Subject: [Lazarus] test Message-ID: just to see if it works From nc-gaertnma at netcologne.de Wed Jun 15 11:44:26 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 15 Jun 2016 11:44:26 +0200 Subject: [Lazarus] Access violation at current svn In-Reply-To: <575F05C9.8060005@googlemail.com> References: <20160613143322.Horde.OakN_26hIWNUModpE-VeJ6q@horde.ssn.at> <575F05C9.8060005@googlemail.com> Message-ID: <20160615114426.7b67e3fc@limapholos.matflo.wg> On Mon, 13 Jun 2016 21:13:13 +0200 Sven Barth wrote: >[...] > The fix done in r52482 is not correct however. ClassInfo will continue > to return a PTypeInfo for backwards compatibility, so you'll need to > dynamically allocate a pointer variable that gets that type info and > then gets stuffed into the ParentInfoRef field. Thanks for the hint. Done. Mattias From larrydalton71 at gmail.com Wed Jun 15 17:32:27 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Wed, 15 Jun 2016 10:32:27 -0500 Subject: [Lazarus] Sorting dbase tables with td for Message-ID: <7F6B8960-DB60-4718-81D5-EE6CD0F2F099@gmail.com> Is there an algorithm to sort dbase tables by fieldname with tdbf? Sent from my iPhone From frederic.crapez at wanadoo.fr Wed Jun 15 17:49:53 2016 From: frederic.crapez at wanadoo.fr (fred) Date: Wed, 15 Jun 2016 17:49:53 +0200 Subject: [Lazarus] Sorting dbase tables with td for In-Reply-To: <7F6B8960-DB60-4718-81D5-EE6CD0F2F099@gmail.com> References: <7F6B8960-DB60-4718-81D5-EE6CD0F2F099@gmail.com> Message-ID: <1466005793.24830.0.camel@wanadoo.fr> hy, you can add an index field on sorting it with ascending or descending. Le mercredi 15 juin 2016 à 10:32 -0500, Larry Dalton a écrit : > Is there an algorithm to sort dbase tables by fieldname with tdbf? > > Sent from my iPhone From larrydalton71 at gmail.com Wed Jun 15 23:42:04 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Wed, 15 Jun 2016 16:42:04 -0500 Subject: [Lazarus] Installing lazarus Message-ID: I am trying to install 1.60 On Linux. I have download the fpr-src,fpc, and lazarus 1.60 debt packages, and have installed them. Where do I find the executable ide? Sent from my iPhone From corpsman at web.de Thu Jun 16 16:23:58 2016 From: corpsman at web.de (Corpsman) Date: Thu, 16 Jun 2016 16:23:58 +0200 Subject: [Lazarus] Installing lazarus In-Reply-To: References: Message-ID: <5762B67E.6080203@web.de> On 06/15/2016 11:42 PM, Larry Dalton wrote: > I am trying to install 1.60 > On Linux. I have download the fpr-src,fpc, and lazarus 1.60 debt packages, and have installed them. Where do I find the executable ide? > > Sent from my iPhone > on my ubuntu just type ALT + F2 lazarus return -- Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei. -- Schütze deine Privatsphäre, nutze E-mail Verschlüsselung. Wie das geht steht z.B. hier : https://support.mozilla.org/en-US/kb/digitally-signing-and-encrypting-messages#w_installing-gpg-and-enigmail From nc-gaertnma at netcologne.de Thu Jun 16 16:30:12 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 16 Jun 2016 16:30:12 +0200 Subject: [Lazarus] Installing lazarus In-Reply-To: References: Message-ID: <20160616163012.55b809c3@limapholos.matflo.wg> On Wed, 15 Jun 2016 16:42:04 -0500 Larry Dalton wrote: > I am trying to install 1.60 > On Linux. I have download the fpr-src,fpc, and lazarus 1.60 debt packages, and have installed them. Where do I find the executable ide? Which Linux distro/desktop? Mattias From d.ioannidis at nephelae.eu Thu Jun 16 19:18:17 2016 From: d.ioannidis at nephelae.eu (Dimitrios Chr. Ioannidis) Date: Thu, 16 Jun 2016 20:18:17 +0300 Subject: [Lazarus] Lazarus svn authentication Message-ID: Hi, just tried unsuccessfully to update my local lazarus fixes 1.6 branch because now the svn.freepascal.org asks for basic authentication : " Unable to connect to a repository at URL 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' No more credentials or we tried too many times. Authentication failed " Is it me, or something changed ? regards, -- Dimitrios Chr. Ioannidis From michael at freepascal.org Thu Jun 16 22:07:14 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 16 Jun 2016 22:07:14 +0200 (CEST) Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: > Hi, > > just tried unsuccessfully to update my local lazarus fixes 1.6 branch > because now the svn.freepascal.org asks for basic authentication : > > " > Unable to connect to a repository at URL > 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' > No more credentials or we tried too many times. > Authentication failed > " > > Is it me, or something changed ? Nothing changed as far as I know. Michael. From tc at epidata.info Thu Jun 16 22:07:26 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Thu, 16 Jun 2016 22:07:26 +0200 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On 2016-06-16 19:18, Dimitrios Chr. Ioannidis wrote: > Hi, > > just tried unsuccessfully to update my local lazarus fixes 1.6 > branch because now the svn.freepascal.org asks for basic authentication : > > " > Unable to connect to a repository at URL > 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' > No more credentials or we tried too many times. > Authentication failed > " > > Is it me, or something changed ? +1 I get this too when updating trunk. -Torsten. From mailinglists at geldenhuys.co.uk Thu Jun 16 22:22:06 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 16 Jun 2016 21:22:06 +0100 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On 2016-06-16 21:07, Torsten Bonde Christiansen wrote: > I get this too when updating trunk. I just checked my FPC and Lazarus git mirrors, which both pull SVN updates from svn.freepascal.org. It works fine here (UK based). Regards, Graeme From tc at epidata.info Thu Jun 16 22:23:49 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Thu, 16 Jun 2016 22:23:49 +0200 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On 2016-06-16 22:22, Graeme Geldenhuys wrote: > On 2016-06-16 21:07, Torsten Bonde Christiansen wrote: >> I get this too when updating trunk. > I just checked my FPC and Lazarus git mirrors, which both pull SVN > updates from svn.freepascal.org. It works fine here (UK based). Correct - however there were issues about 2 hours ago. Seems to be working again. -Torsten. From jesusrmx at gmail.com Thu Jun 16 22:23:59 2016 From: jesusrmx at gmail.com (Jesus Reyes A.) Date: Thu, 16 Jun 2016 15:23:59 -0500 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On Thu, 16 Jun 2016 15:07:14 -0500, Michael Van Canneyt wrote: > > > On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: > >> Hi, >> >> just tried unsuccessfully to update my local lazarus fixes 1.6 branch >> because now the svn.freepascal.org asks for basic authentication : >> >> " >> Unable to connect to a repository at URL >> 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' >> No more credentials or we tried too many times. >> Authentication failed >> " >> >> Is it me, or something changed ? > > > Nothing changed as far as I know. > > Michael. A friend has reported something similar, I haven't had any problem updating svn using svn+ssh, but anonyous access have problem since this morning (he lives in Spain) and more he said the lists have not worked normally since the last changes. There is something happening, for example at least for the lazarus mailing list the archive show the last records only for may: http://lists.lazarus-ide.org/pipermail/lazarus/ Jesus Reyes A. From d.ioannidis at nephelae.eu Thu Jun 16 22:25:22 2016 From: d.ioannidis at nephelae.eu (Dimitrios Chr. Ioannidis) Date: Thu, 16 Jun 2016 23:25:22 +0300 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: Στις 2016-06-16 23:07, Michael Van Canneyt έγραψε: > On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: > >> Hi, >> >> just tried unsuccessfully to update my local lazarus fixes 1.6 >> branch because now the svn.freepascal.org asks for basic >> authentication : >> >> " >> Unable to connect to a repository at URL >> 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' >> No more credentials or we tried too many times. >> Authentication failed >> " >> >> Is it me, or something changed ? > > > Nothing changed as far as I know. Now it works perfectly. hmmm, .... who knows maybe a "glitch in the ...system" . ;) regrads, -- Dimitrios Chr. Ioannidis From michael at freepascal.org Thu Jun 16 22:39:44 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 16 Jun 2016 22:39:44 +0200 (CEST) Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: > Στις 2016-06-16 23:07, Michael Van Canneyt έγραψε: >> On Thu, 16 Jun 2016, Dimitrios Chr. Ioannidis wrote: >> >>> Hi, >>> >>> just tried unsuccessfully to update my local lazarus fixes 1.6 >>> branch because now the svn.freepascal.org asks for basic >>> authentication : >>> >>> " >>> Unable to connect to a repository at URL >>> 'http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6' >>> No more credentials or we tried too many times. >>> Authentication failed >>> " >>> >>> Is it me, or something changed ? >> >> >> Nothing changed as far as I know. > > Now it works perfectly. > > hmmm, .... who knows maybe a "glitch in the ...system" . ;) Actually, no. After sending my mail, I had an idea. Someone indeed fiddled with the access file and broke it. I fixed it. Michael. From bartjunk64 at gmail.com Thu Jun 16 22:57:55 2016 From: bartjunk64 at gmail.com (Bart) Date: Thu, 16 Jun 2016 22:57:55 +0200 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: On 6/16/16, Dimitrios Chr. Ioannidis wrote: > just tried unsuccessfully to update my local lazarus fixes 1.6 branch > because now the svn.freepascal.org asks for basic authentication : [snip] > Is it me, or something changed ? No problem here. A bit OffTopic: Does anybody know why svn up from my Win7 takes way more time than from my Linux (which runs in a VM hosted on said Win7)? Bart From vincent.snijders at gmail.com Fri Jun 17 06:25:22 2016 From: vincent.snijders at gmail.com (Vincent Snijders) Date: Fri, 17 Jun 2016 06:25:22 +0200 Subject: [Lazarus] Lazarus svn authentication In-Reply-To: References: Message-ID: 2016-06-16 22:39 GMT+02:00 Michael Van Canneyt : > > > Actually, no. > > After sending my mail, I had an idea. Someone indeed fiddled with the > access file and broke it. I fixed it. > > I did that, sorry. When I looked after the reports here at 22:25, I saw that somebody else already changed and fixed it. Thanks. Vincent -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Sat Jun 18 14:20:28 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Sat, 18 Jun 2016 14:20:28 +0200 Subject: [Lazarus] translation from c-header Message-ID: <57653C8C.1020001@de-brouwerij.be> Hi, I'm trying to port pigpio to fpc (http://abyz.co.uk/rpi/pigpio/). h2pas has a problem with this : c : typedef void *(gpioThreadFunc_t) (void *); How would this be translated to Pascal ? I know it's a function without result (= procedure), but what about the paramater ? Later that function/procedure is used like this : function gpioStartThread(f:gpioThreadFunc_t; userdata:pointer):Ppthread_t;cdecl;external; I also have a doubt about this : c : typedef void (*gpioTimerFunc_t) (void); Pascal : gpioTimerFunc_t = procedure (_para1:pointer);cdecl; Is this OK ? I'm not fluent with c, even less with such typedef's. TIA, Koenraad From dec12 at avidsoft.com.hk Sat Jun 18 18:40:14 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Sun, 19 Jun 2016 00:40:14 +0800 Subject: [Lazarus] translation from c-header In-Reply-To: <57653C8C.1020001@de-brouwerij.be> References: <57653C8C.1020001@de-brouwerij.be> Message-ID: <5765796E.9050102@avidsoft.com.hk> Koenraad Lelong wrote: > Hi, > > I'm trying to port pigpio to fpc (http://abyz.co.uk/rpi/pigpio/). > h2pas has a problem with this : > c : typedef void *(gpioThreadFunc_t) (void *); I am only guess and could be very wrong. My guess is: Type TProcedure = procedure; gpioThreadFunc = procedure(TProcedure); Dennis From pascaldragon at googlemail.com Sun Jun 19 01:06:32 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 19 Jun 2016 01:06:32 +0200 Subject: [Lazarus] translation from c-header In-Reply-To: <57653C8C.1020001@de-brouwerij.be> References: <57653C8C.1020001@de-brouwerij.be> Message-ID: Am 18.06.2016 14:20 schrieb "Koenraad Lelong" : > > Hi, > > I'm trying to port pigpio to fpc (http://abyz.co.uk/rpi/pigpio/). > h2pas has a problem with this : > c : typedef void *(gpioThreadFunc_t) (void *); > How would this be translated to Pascal ? > I know it's a function without result (= procedure), but what about the paramater ? > Later that function/procedure is used like this : > function gpioStartThread(f:gpioThreadFunc_t; userdata:pointer):Ppthread_t;cdecl;external; > > > I also have a doubt about this : > > c : typedef void (*gpioTimerFunc_t) (void); > Pascal : gpioTimerFunc_t = procedure (_para1:pointer);cdecl; > > Is this OK ? > > I'm not fluent with c, even less with such typedef's. Yes, that should be correct. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Mon Jun 20 13:41:15 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 20 Jun 2016 14:41:15 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator Message-ID: Hello I have made an experimental unit that implements functions dealing with Unicode codepoints transparently for both UTF-8 and UTF-16 encodings as promised here: http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus#Helper_functions_for_CodePoints They use "String" type which maps to AnsiString with the Lazarus default UTF-8 system, and UnicodeString when {$ModeSwitch UnicodeStrings} is defined. There is also a string iterator which the compiler can use for its for-in loop. As a result, regardless of encoding, this code works: for ch in s do writeln('ch=',ch); Cool, ha? To test it, extract the package, open the project in Lazarus, compile and run. Change the encoding with "UseUTF16" define in Custom Options page. The unit LazCodePoint depends on LazUtils package, LazUTF8 and LazUTF16 units. Later it can be moved to LazUtils itself. It implements some UTF-16 functions which can be moved to LazUTF16 unless FPC project provides them (as it should). The test program is a cmd line program and has no other dependencies. Issues: 1. How to use it without the "UseUTF16" define? The iterator does not compile in Mode DelphiUnicode. 2. How to implement an iterator for Unicode glyps + decomposed accented characters? It is the most complex part of Unicode. Has anybody made such code? Juha -------------- next part -------------- A non-text attachment was scrubbed... Name: CodePointPub.tar.gz Type: application/x-gzip Size: 3280 bytes Desc: not available URL: From bartjunk64 at gmail.com Mon Jun 20 14:00:27 2016 From: bartjunk64 at gmail.com (Bart) Date: Mon, 20 Jun 2016 14:00:27 +0200 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: On 6/20/16, Juha Manninen wrote: > 2. How to implement an iterator for Unicode glyps + decomposed > accented characters? It is the most complex part of Unicode. Has > anybody made such code? Maybe Theo's UTF8Scanner implements this? Bart From bartjunk64 at gmail.com Mon Jun 20 14:14:17 2016 From: bartjunk64 at gmail.com (Bart) Date: Mon, 20 Jun 2016 14:14:17 +0200 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: i := CodePointLength(s); // Should return 26. writeln('Testing CodePointLength. Result = ', i); gives Using UnicodeString + UTF-16 Sizeof(Char) = 2 ... Testing CodePointLength. Result = 30 Mind you that on my system the Eyes, Wineglass and Heart are unreadible inside Lazarus IDE (they are presented as an outline of a square block). Win7 32 bit, fpc 3.0.0 Lazarus trunk. A tip: put the -dUseUtf16 in a seperate buildmode? Bart From juha.manninen62 at gmail.com Mon Jun 20 14:29:35 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 20 Jun 2016 15:29:35 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: On Mon, Jun 20, 2016 at 3:14 PM, Bart wrote: > i := CodePointLength(s); // Should return 26. Ok, the source is wrong. I had changed the string after the comment. It should be: i := CodePointLength(s); // Should return 30. > A tip: put the -dUseUtf16 in a seperate buildmode? Yes, a good idea. If I make a new version, I will include that. About Theo's UTF8 Tools and UTF8Scanner. I understand they work with CodePoints only. Juha From juha.manninen62 at gmail.com Mon Jun 20 14:39:33 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 20 Jun 2016 15:39:33 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: On Mon, Jun 20, 2016 at 3:14 PM, Bart wrote: > Mind you that on my system the Eyes, Wineglass and Heart are > unreadible inside Lazarus IDE (they are presented as an outline of a > square block). > > Win7 32 bit, fpc 3.0.0 Lazarus trunk. On my Linux Manjaro + KDE they show rather correctly. Anyway, the example code can deal with them even if a font does not support them. It makes no difference for the numbers shown. Juha From lazarus at mfriebe.de Mon Jun 20 14:42:53 2016 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 20 Jun 2016 13:42:53 +0100 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: References: Message-ID: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> On 20/06/2016 12:41, Juha Manninen wrote: > 2. How to implement an iterator for Unicode glyps + decomposed > accented characters? It is the most complex part of Unicode. Has > anybody made such code? > Glyph and (de-)composed are different things A glyph may be a ligature https://en.wikipedia.org/wiki/Typographic_ligature 2 or more chars, depending on the font you use. Even whole words. As for (de-)composed: SynEdit has some code to detect them (combining codepoints). Not sure if (still) complete (if new ones were added ??). But if you just want (de-)composed, and not a complete unicode library (with all the properties for each codepoint), then feel free to look at the code, and use/copy it (that is: check svn blame, if any one else committed to that particular code. If it is just I, who committed, then feel free to copy, even if license changes. From lazarus at kluug.net Mon Jun 20 18:08:24 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 20 Jun 2016 18:08:24 +0200 Subject: [Lazarus] Multithreaded app with PostgreSQL connection Message-ID: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> Hello! I have a multithreaded application where every thread needs to connect to the same PostgreSQL database. How to design the DB connectivity for a multithreaded application correctly? I see that TPQConnection has an FConnectionPool. So is it thread-safe? Create a TPQConnection in the main thread; create TSQLQuery+TSQLTransaction in a (different) thread and connect it to to the TPQConnection from main thread via the Database property? Or do I need a TPQConnection per thread? I somehow failed to find any information about sqldb and multithreading: http://www.freepascal.org/docs-html/fcl/sqldb/index.html http://wiki.freepascal.org/SQLdb_Programming_Reference Thanks :) Ondrej From michael at freepascal.org Mon Jun 20 19:38:50 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 20 Jun 2016 19:38:50 +0200 (CEST) Subject: [Lazarus] Multithreaded app with PostgreSQL connection In-Reply-To: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> References: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> Message-ID: On Mon, 20 Jun 2016, Ondrej Pokorny wrote: > Hello! > > I have a multithreaded application where every thread needs to connect > to the same PostgreSQL database. How to design the DB connectivity for a > multithreaded application correctly? Best is to have every thread use it's own connection. If you want only a single connection, then you should make sure all Database and Transaction properties (plus setting them to Nil) are protected by a critical section: there are non-threadsafe lists involved. > > I see that TPQConnection has an FConnectionPool. So is it thread-safe? Not if you don't follow the above steps. > > Create a TPQConnection in the main thread; create > TSQLQuery+TSQLTransaction in a (different) thread and connect it to to > the TPQConnection from main thread via the Database property? > Or do I need a TPQConnection per thread? Yes. > > I somehow failed to find any information about sqldb and multithreading: > http://www.freepascal.org/docs-html/fcl/sqldb/index.html > http://wiki.freepascal.org/SQLdb_Programming_Reference Because it is not thread safe. It is on my todo list. Michael. From markMLl.lazarus at telemetry.co.uk Mon Jun 20 20:26:03 2016 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 20 Jun 2016 18:26:03 +0000 Subject: [Lazarus] Multithreaded app with PostgreSQL connection In-Reply-To: References: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> Message-ID: Michael Van Canneyt wrote: > On Mon, 20 Jun 2016, Ondrej Pokorny wrote: >> Hello!>> I have a multithreaded application where every thread needs >> to connect > to the same PostgreSQL database. How to design the DB >> connectivity for a > multithreaded application correctly? > Best is to have every thread use it's own connection. > If you want only a single connection, then you should make sure all > Databaseand Transaction properties (plus setting them to Nil) are > protected by acritical section: there are non-threadsafe lists involved. >>> I see that TPQConnection has an FConnectionPool. So is it thread-safe? > Not if you don't follow the above steps. >>> Create a TPQConnection in the main thread; create > >>> TSQLQuery+TSQLTransaction in a (different) thread and connect it to >>> to > the TPQConnection from main thread via the Database property?> >>> Or do I need a TPQConnection per thread? > Yes. >>> I somehow failed to find any information about sqldb and >>> multithreading:> >>> http://www.freepascal.org/docs-html/fcl/sqldb/index.html> >>> http://wiki.freepascal.org/SQLdb_Programming_Reference > Because it is not thread safe. It is on my todo list. I was going to post a pointer to previous discussion at http://comments.gmane.org/gmane.comp.ide.lazarus.general/46205 but I think Michael's comment here overrides anything that's been said previously :-) Irrespective of whether the underlying components are thread-safe, I think it's advisable to protect them from reentry with a critical section. There's just too much to go wrong in libpq etc., and in particular there's a risk of mayhem if somebody migrates an app to a database less-tolerant. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From mailinglists at geldenhuys.co.uk Mon Jun 20 23:07:59 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 20 Jun 2016 22:07:59 +0100 Subject: [Lazarus] Multithreaded app with PostgreSQL connection In-Reply-To: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> References: <44cfaa00-155c-d694-012d-e6e363a42bab@kluug.net> Message-ID: <2b2f3ce1-ff33-e537-d8a0-f71ef5c8acfb@geldenhuys.co.uk> On 2016-06-20 17:08, Ondrej Pokorny wrote: > I have a multithreaded application where every thread needs to connect > to the same PostgreSQL database. How to design the DB connectivity for a > multithreaded application correctly? Having already written your application, it is probably too late to switch to tiOPF. tiOPF does most of the work for you, and it takes care of multi-threaded access to a single DB connection. It has support for multiple DB connections, a connection pool and thread pool. If nothing else, it might be worth you taking a look at what tiOPF have done to accomplish this. tiOPF is available on SourceForge.net. http://www.tiopf.com Regards, Graeme From maaartinus at gmail.com Tue Jun 21 04:05:04 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Tue, 21 Jun 2016 04:05:04 +0200 Subject: [Lazarus] Zooming a form Message-ID: I should zoom a form, so that all its controls (and their fonts) get bigger by X%. The recursion is trivial and it mostly works, but ... I'm doing it in a moment when not everything is visible (and can't see how to postpone it). Despite that, it works fine for all controls with Anchors = [akLeft, akTop]. For controls with other anchors, nothing works: Even a trivial change like increasing left or width by one makes the control lose its anchoring (and behave like left-top-anchored) and move to a strange position. The problem seems to lie in TControl.UpdateBaseBounds when the FBaseParentClientSize gets stored, which happens to be (0, 0) at this point. If I hack it to keep the previously stored value, it somehow works. The zero-client-size parent is a TPage, but I can't claim it guilty as I couldn't reproduce my problem in a small example. So I wonder: - Is it forbidden to change position and/or size of a component when it's not shown? - If not, how can I deal with right-aligned controls? Simply setting c.Left := c.Left * Factor doesn't seem to work (though it should as in this step all positions and all sizes simply get scaled up; anchoring is used when the parent resizes and not the component itself, right?). But actually any help is appreciated. I'm stuck with Lazarus 1.4.2, but the trunk code seems to do the same. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Tue Jun 21 13:45:19 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 21 Jun 2016 13:45:19 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: References: Message-ID: <20160621134519.03fe41ae@limapholos.matflo.wg> On Tue, 21 Jun 2016 04:05:04 +0200 Martin Grajcar wrote: >[...]Despite that, it works fine for all controls with Anchors > = [akLeft, akTop]. For controls with other anchors, nothing works[...] > The problem seems to lie in TControl.UpdateBaseBounds when > the FBaseParentClientSize gets stored, which happens to be (0, 0) at this > point. If I hack it to keep the previously stored value, it somehow works. BoundsRect (Left,Top,Width,Height) is the current position/size. When a form's width is changed the LCL has to adapt the right anchored controls - aka changing the Left so that the distance of the right side is restored. The right distance is computed from BaseBounds and BaseParentClientSize. BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. when setting Left, Top, Width, Height). When the LCL computes the autosized values it calls SetBoundsKeepBase, so it changes BoundsRect and keeps BaseBounds/BaseParentClientSize. > The zero-client-size parent is a TPage, but I can't claim it guilty as I > couldn't reproduce my problem in a small example. Do you mean it does work in a small example, but it does not in your complex application? > So I wonder: > > - Is it forbidden to change position and/or size of a component when > it's not shown? It is allowed and a pretty normal thing. > - If not, how can I deal with right-aligned controls? Simply setting > c.Left := c.Left * Factor doesn't seem to work (though it should as in this > step all positions and all sizes simply get scaled up; anchoring is used > when the parent resizes and not the component itself, right?). Maybe you forget to disable the autosize updates during the changes? Simple example: MainControl.DisableAlign; try MainControl.SetBounds(Width*f,Height*f); for aControl in List do aControl.SetBounds(aControl.Left*f,aControl.Top*f,aControl.Width*f,aControl.Height*f); finally MainControl.EnableAlign; end; Note: This algorithm has rounding errors, so multiple zooms will destroy your layout. Mattias From juha.manninen62 at gmail.com Tue Jun 21 14:49:14 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 21 Jun 2016 15:49:14 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> References: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> Message-ID: On Mon, Jun 20, 2016 at 3:42 PM, Martin Frb wrote: > Glyph and (de-)composed are different things > > A glyph may be a ligature https://en.wikipedia.org/wiki/Typographic_ligature > 2 or more chars, depending on the font you use. Even whole words. I don't know if glyphs require extra treatment. I guess I still don't understand all details. Anyway, I try to figure out all Combining Diacritical Marks now. > As for (de-)composed: SynEdit has some code to detect them (combining > codepoints). Not sure if (still) complete (if new ones were added ??). > But if you just want (de-)composed, and not a complete unicode library (with > all the properties for each codepoint), then feel free to look at the code, ... I found: function TSynEditStringList.LogicPosIsCombining(const AChar: PChar): Boolean; begin Result := ( ( (AChar[0] = #$CC) ) or // Combining Diacritical Marks (belongs to previos char) 0300-036F ( (AChar[0] = #$CD) and (AChar[1] in [#$80..#$AF]) ) or // Combining Diacritical Marks ( (AChar[0] = #$D8) and (AChar[1] in [#$90..#$9A]) ) or // Arabic 0610 (d890)..061A (d89a) ( (AChar[0] = #$D9) and (AChar[1] in [#$8b..#$9f, #$B0]) ) or // Arabic 064B (d98b)..065F (d99f) // 0670 (d9b0) ( (AChar[0] = #$DB) and (AChar[1] in [#$96..#$9C, #$9F..#$A4, #$A7..#$A8, #$AA..#$AD]) ) or // Arabic 06D6 (db96).. .. ..06EA (dbaa) ( (AChar[0] = #$E0) and (AChar[1] = #$A3) and (AChar[2] in [#$A4..#$BE]) ) or // Arabic 08E4 (e0a3a4) ..08FE (e0a3be) ( (AChar[0] = #$E1) and (AChar[1] = #$B7) ) or // Combining Diacritical Marks Supplement 1DC0-1DFF ( (AChar[0] = #$E2) and (AChar[1] = #$83) and (AChar[2] in [#$90..#$FF]) ) or // Combining Diacritical Marks for Symbols 20D0-20FF ( (AChar[0] = #$EF) and (AChar[1] = #$B8) and (AChar[2] in [#$A0..#$AF]) ) // Combining half Marks FE20-FE2F ); end; It works well. I already created an enumerator for UTF-8 using it. I will do an UTF-16 version soon. First I wanted to add all the possibly missing ranges of combining marks. It is difficult to find such a list anywhere! How come? The rule is quite simple after all: a codepoint should be combined with a previous codepoint. True or False. Simple. I did some detective work and studied C# lib sources of Mono project. https://github.com/mono/mono The string etc. units are extremely complicated. I didn't understand much and didn't find any list of combining marks. I found something from XmlChar.cs and XmlCharTests.cs which has a function IsCombiningChar. I copy it below. The problem is that its ranges are completely wrong! For example the first range ends at 0x0345. However 0x0346 is also a combining mark: http://www.fileformat.info/info/unicode/char/0346/index.htm and so is 0x0347 and 0x0348 etc. Uhhh... I guess I could dig out the ranges from here: http://www.fileformat.info/info/unicode/category/index.htm At least these are combining marks: [Mc] Mark, Spacing Combining [Me] Mark, Enclosing [Mn] Mark, Nonspacing Are there others? It will be lots of work because it only shows individual values, not ranges, and there are almost 2000 values! Any hints anybody? This feels like reinventing the wheel. There must be a valid updated list of the ranges somewhere. Juha --- --- From XmlCharTests.cs --- --- private static bool IsCombiningChar (int ch) { return (ch >= 0x0300 && ch <= 0x0345) || (ch >= 0x0360 && ch <= 0x0361) || (ch >= 0x0483 && ch <= 0x0486) || (ch >= 0x0591 && ch <= 0x05A1) || (ch >= 0x05A3 && ch <= 0x05B9) || (ch >= 0x05BB && ch <= 0x05BD) || (ch == 0x05BF) || (ch >= 0x05C1 && ch <= 0x05C2) || (ch == 0x05C4) || (ch >= 0x064B && ch <= 0x0652) || (ch == 0x0670) || (ch >= 0x06D6 && ch <= 0x06DC) || (ch >= 0x06DD && ch <= 0x06DF) || (ch >= 0x06E0 && ch <= 0x06E4) || (ch >= 0x06E7 && ch <= 0x06E8) || (ch >= 0x06EA && ch <= 0x06ED) || (ch >= 0x0901 && ch <= 0x0903) || (ch == 0x093C) || (ch >= 0x093E && ch <= 0x094C) || (ch == 0x094D) || (ch >= 0x0951 && ch <= 0x0954) || (ch >= 0x0962 && ch <= 0x0963) || (ch >= 0x0981 && ch <= 0x0983) || (ch == 0x09BC) || (ch == 0x09BE) || (ch == 0x09BF) || (ch >= 0x09C0 && ch <= 0x09C4) || (ch >= 0x09C7 && ch <= 0x09C8) || (ch >= 0x09CB && ch <= 0x09CD) || (ch == 0x09D7) || (ch >= 0x09E2 && ch <= 0x09E3) || (ch == 0x0A02) || (ch == 0x0A3C) || (ch == 0x0A3E) || (ch == 0x0A3F) || (ch >= 0x0A40 && ch <= 0x0A42) || (ch >= 0x0A47 && ch <= 0x0A48) || (ch >= 0x0A4B && ch <= 0x0A4D) || (ch >= 0x0A70 && ch <= 0x0A71) || (ch >= 0x0A81 && ch <= 0x0A83) || (ch == 0x0ABC) || (ch >= 0x0ABE && ch <= 0x0AC5) || (ch >= 0x0AC7 && ch <= 0x0AC9) || (ch >= 0x0ACB && ch <= 0x0ACD) || (ch >= 0x0B01 && ch <= 0x0B03) || (ch == 0x0B3C) || (ch >= 0x0B3E && ch <= 0x0B43) || (ch >= 0x0B47 && ch <= 0x0B48) || (ch >= 0x0B4B && ch <= 0x0B4D) || (ch >= 0x0B56 && ch <= 0x0B57) || (ch >= 0x0B82 && ch <= 0x0B83) || (ch >= 0x0BBE && ch <= 0x0BC2) || (ch >= 0x0BC6 && ch <= 0x0BC8) || (ch >= 0x0BCA && ch <= 0x0BCD) || (ch == 0x0BD7) || (ch >= 0x0C01 && ch <= 0x0C03) || (ch >= 0x0C3E && ch <= 0x0C44) || (ch >= 0x0C46 && ch <= 0x0C48) || (ch >= 0x0C4A && ch <= 0x0C4D) || (ch >= 0x0C55 && ch <= 0x0C56) || (ch >= 0x0C82 && ch <= 0x0C83) || (ch >= 0x0CBE && ch <= 0x0CC4) || (ch >= 0x0CC6 && ch <= 0x0CC8) || (ch >= 0x0CCA && ch <= 0x0CCD) || (ch >= 0x0CD5 && ch <= 0x0CD6) || (ch >= 0x0D02 && ch <= 0x0D03) || (ch >= 0x0D3E && ch <= 0x0D43) || (ch >= 0x0D46 && ch <= 0x0D48) || (ch >= 0x0D4A && ch <= 0x0D4D) || (ch == 0x0D57) || (ch == 0x0E31) || (ch >= 0x0E34 && ch <= 0x0E3A) || (ch >= 0x0E47 && ch <= 0x0E4E) || (ch == 0x0EB1) || (ch >= 0x0EB4 && ch <= 0x0EB9) || (ch >= 0x0EBB && ch <= 0x0EBC) || (ch >= 0x0EC8 && ch <= 0x0ECD) || (ch >= 0x0F18 && ch <= 0x0F19) || (ch == 0x0F35) || (ch == 0x0F37) || (ch == 0x0F39) || (ch == 0x0F3E) || (ch == 0x0F3F) || (ch >= 0x0F71 && ch <= 0x0F84) || (ch >= 0x0F86 && ch <= 0x0F8B) || (ch >= 0x0F90 && ch <= 0x0F95) || (ch == 0x0F97) || (ch >= 0x0F99 && ch <= 0x0FAD) || (ch >= 0x0FB1 && ch <= 0x0FB7) || (ch == 0x0FB9) || (ch >= 0x20D0 && ch <= 0x20DC) || (ch == 0x20E1) || (ch >= 0x302A && ch <= 0x302F) || (ch == 0x3099) || (ch == 0x309A); } From luca at wetron.es Tue Jun 21 15:15:09 2016 From: luca at wetron.es (Luca Olivetti) Date: Tue, 21 Jun 2016 15:15:09 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: <20160621134519.03fe41ae@limapholos.matflo.wg> References: <20160621134519.03fe41ae@limapholos.matflo.wg> Message-ID: <57693DDD.1050002@wetron.es> El 21/06/16 a les 13:45, Mattias Gaertner ha escrit: > > Simple example: > > MainControl.DisableAlign; > try > MainControl.SetBounds(Width*f,Height*f); > for aControl in List do > aControl.SetBounds(aControl.Left*f,aControl.Top*f,aControl.Width*f,aControl.Height*f); > finally > MainControl.EnableAlign; > end; > I just use ScaleBy, it recursively scales all components. I do in in the FormShow method, I don't remember the details but I think it didn't work well when the form was still hidden. Another problem is that it also moves the Top,Left of the form, but I just restore it after the ScaleBy Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From medina.rc at gmail.com Tue Jun 21 16:35:24 2016 From: medina.rc at gmail.com (Richard Medina) Date: Tue, 21 Jun 2016 10:35:24 -0400 Subject: [Lazarus] unsuscribe Message-ID: thank you -- Richard.MC -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Tue Jun 21 17:31:21 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 21 Jun 2016 18:31:21 +0300 Subject: [Lazarus] Encoding agnostic functions for codepoints + an iterator In-Reply-To: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> References: <3b82ec61-2ffd-cd4b-dec4-da170c6c4434@mfriebe.de> Message-ID: Here is the new version of my unit dealing with codepoints and Unicode characters. It is now called LazUnicode. The test program now indeed iterates Unicode characters, meaning that combining diacritical marks are always joined to a previous codepoint. This is the desired behavior _always_. Those marks should never be split apart. Function UTF16IsCombining is a UTF-16 version of the Martin's function. It works well for my test cases although I still would like to have a comprehensive list of the ranges. This unit allows to maintain code between Delphi and Lazarus even if you must do some advanced Unicode stuff. It is quite cool, even if I say it myself! What more, it produces robust code for UTF-16. There is already enough broken UTF-16 code out there. Now that problem got solved, too. :) The project now has 2 build modes, one for each encoding. Switching them is even easier than earlier. Please test with different Unicode text. Juha -------------- next part -------------- A non-text attachment was scrubbed... Name: LazUnicodeTestPub.tar.gz Type: application/x-gzip Size: 4464 bytes Desc: not available URL: From trayres at gmail.com Tue Jun 21 17:54:52 2016 From: trayres at gmail.com (Travis Ayres) Date: Tue, 21 Jun 2016 08:54:52 -0700 Subject: [Lazarus] unsuscribe In-Reply-To: References: Message-ID: Hi Richard, To unsubscribe, please go to http://lists.lazarus-ide.org/listinfo/lazarus put your email in the box, and click "unsubscribe or edit options". On Tue, Jun 21, 2016 at 7:35 AM, Richard Medina wrote: > thank you > > -- > Richard.MC > > -- > _______________________________________________ > 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 info at voiceliveeditor.com Wed Jun 22 01:07:45 2016 From: info at voiceliveeditor.com (info at voiceliveeditor.com) Date: Wed, 22 Jun 2016 00:07:45 +0100 Subject: [Lazarus] Anyone have Win/OSX/*nix native midi routines Message-ID: <5C7AA7B3273047DA9EF8470609F453FA@ianPC> Hi All, I am wondering if anyone has any cross midi routines willing to share, that works on win,osx and nix. Thought would ask, before attempting my own. I would rather have native pascal routines that do not use third party dll,so files etc. THanks in advance -------------------------------------------------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify info at voiceliveeditor.com. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Voiceliveeditor.com accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided. -------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca at wetron.es Wed Jun 22 12:18:04 2016 From: luca at wetron.es (Luca Olivetti) Date: Wed, 22 Jun 2016 12:18:04 +0200 Subject: [Lazarus] Increasingly frustrated with DbGrids In-Reply-To: <56374167.1050304@wetron.es> References: <563736F8.2040409@wetron.es> <56374167.1050304@wetron.es> Message-ID: <576A65DC.808@wetron.es> El 02/11/15 a les 11:56, Luca Olivetti ha escrit: > El 02/11/15 a les 11:12, Luca Olivetti ha escrit: >> Hello, >> >> I constantly stumble with the behaviour of the TDBGrid. >> I understand that it's a complex component, but every time I find an >> issue an Luiz fixes it, two more pop up (or an older one resurfaces). >> The latest episode of the saga is the futility of using a custom editor >> (with OnSelectEditor), since the grids then sets the value of the field >> using this snippet of code >> >> if (FEditor<>nil) and FEditor.Visible then begin >> Msg.LclMsg.msg:=GM_GETVALUE; >> Msg.grid:=Self; >> Msg.Col:=FCol; >> Msg.Row:=FRow; >> Msg.Value:=GetCells(FCol, FRow); >> FEditor.Dispatch(Msg); >> SetEditText(Msg.Col, Msg.Row, Msg.Value); >> end; >> >> and this only works with the editors defined in Grids.pas, the only ones >> managing the GM_GETVALUE message. >> For other kinds of editors the result depends on how you move in the >> grid: it could either maintain the value the editor set or reset it to >> an empty string. >> >> I think I will file a bug once I can create a simple project, but in the >> meantime if somebody has an idea on how to solve it, it would be >> appreciated. > > > Bug created: > > http://bugs.freepascal.org/view.php?id=28944 As I said in the bug report I just discovered http://www.freepascal.org/~michael/articles/grids/grids.pdf (published in 2008!) describing how to correctly implement a custom editor (so the method from the wiki I originally used is wrong, I also added a note to the wiki). *However* the component described by Michaël only works with a StringGrid, not with a DBGrid: when you change cell the grids sends the GM_SETVALUE message *before* the GM_GETVALUE one, so the edited value is lost and a semi-random one is used instead. To make it work one has to override the Change method (as it is done in grids.pas): procedure TStringCellEditor.Change; begin {$IfDef DbgGrid} DebugLn('TStringCellEditor.Change INIT text=',Text);{$ENDIF} inherited Change; if (FGrid<>nil) and Visible then begin FGrid.EditorTextChanged(FCol, FRow, Text); end; {$IfDef DbgGrid} DebugLn('TStringCellEditor.Change END');{$ENDIF} end; *but* the EditorTextChanged method is protected, so an additional cracker class (ugly) has to be used, e.g. TMyGrid = class(TCustomGrid) procedure EditorTextChanged(const aCol, aRow: Integer; const aText: string); override; end; procedure TMyGrid.EditorTextChanged(const aCol, aRow: Integer; const aText: string); begin inherited EditorTextChanged(aCol, aRow, aText); end; procedure TMyEditor.Change; begin if (FGrid<>nil) and Visible then begin TMyGrid(FGrid).EditorTextChanged(FCol, FRow, Text); end; Maybe EditorTextChanged (and others methods to be used in custom editors) should be public? Comments? Is there something else that I'm missing? Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From michalis.kambi at gmail.com Wed Jun 22 18:50:23 2016 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Wed, 22 Jun 2016 18:50:23 +0200 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers Message-ID: Hi everyone, Over the last few days, I wrote a document describing many features of the modern Object Pascal language. It is available on: http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.pdf The document covers the easy language concepts, and then jumps quickly into more "advanced" stuff, like class references, generics, class helpers and so on. I hope that this is informative:) This is directed at programmers (who know a bit of some programming language, though not necessarily Pascal). Which is really an excuse to not explain in detail some basic stuff ("what is a variable", "what is a class"). I tried to explain more the "advanced" stuff, and illustrate everything with examples. The source code is in AsciiDoc and available on GitHub https://github.com/michaliskambi/modern-pascal-introduction . All comments are welcome:) P.S. I already posted about this on fpc-pascal mailing list, I'm posting also here --- I hope that this is useful:) Regards, Michalis From trustfm at gmail.com Wed Jun 22 19:45:52 2016 From: trustfm at gmail.com (Anastasios Karidis) Date: Wed, 22 Jun 2016 19:45:52 +0200 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: Message-ID: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> On 6/22/2016 18:50, Michalis Kamburelis wrote: > Hi everyone, > > Over the last few days, I wrote a document describing many features of > the modern Object Pascal language. It is available on: > > http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html > > http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.pdf > > The document covers the easy language concepts, and then jumps quickly > into more "advanced" stuff, like class references, generics, class > helpers and so on. I hope that this is informative:) > > This is directed at programmers (who know a bit of some programming > language, though not necessarily Pascal). Which is really an excuse to > not explain in detail some basic stuff ("what is a variable", "what is > a class"). I tried to explain more the "advanced" stuff, and > illustrate everything with examples. > > The source code is in AsciiDoc and available on GitHub > https://github.com/michaliskambi/modern-pascal-introduction . All > comments are welcome:) > > P.S. I already posted about this on fpc-pascal mailing list, I'm > posting also here --- I hope that this is useful:) > > Regards, > Michalis Great job thanks ! I have also an introduction on Object Pascal section on my site http://www.trustfm.net/ebooks/ObjectPascal.php but i had never time to finish it :S -- Anastasios Karidis aka TrustFm www.trustfm.net The gmail email From trayres at gmail.com Wed Jun 22 19:57:10 2016 From: trayres at gmail.com (Travis Ayres) Date: Wed, 22 Jun 2016 10:57:10 -0700 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: While we're talking about books on Object Pascal, if anyone is looking for Object Pascal book ideas I'd suggest a book of patterns in Object Pascal. It seems like there's a lot of info about the structure of the language, but limited examples of how it is used in practice. The Observer, MVVM, Adapter patterns, whatever - it would be great to find more examples of these. On Wed, Jun 22, 2016 at 10:45 AM, Anastasios Karidis wrote: > On 6/22/2016 18:50, Michalis Kamburelis wrote: > > Hi everyone, > > > > Over the last few days, I wrote a document describing many features of > > the modern Object Pascal language. It is available on: > > > > > http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html > > > > > http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.pdf > > > > The document covers the easy language concepts, and then jumps quickly > > into more "advanced" stuff, like class references, generics, class > > helpers and so on. I hope that this is informative:) > > > > This is directed at programmers (who know a bit of some programming > > language, though not necessarily Pascal). Which is really an excuse to > > not explain in detail some basic stuff ("what is a variable", "what is > > a class"). I tried to explain more the "advanced" stuff, and > > illustrate everything with examples. > > > > The source code is in AsciiDoc and available on GitHub > > https://github.com/michaliskambi/modern-pascal-introduction . All > > comments are welcome:) > > > > P.S. I already posted about this on fpc-pascal mailing list, I'm > > posting also here --- I hope that this is useful:) > > > > Regards, > > Michalis > > Great job thanks ! > > I have also an introduction on Object Pascal section on my site > > http://www.trustfm.net/ebooks/ObjectPascal.php > > but i had never time to finish it :S > > -- > Anastasios Karidis aka TrustFm > www.trustfm.net > The gmail email > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Wed Jun 22 23:21:32 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 22 Jun 2016 22:21:32 +0100 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: <41aa927c-598b-5993-d87b-88636663d99f@geldenhuys.co.uk> On 2016-06-22 18:57, Travis Ayres wrote: > The Observer, MVVM, > Adapter patterns, whatever - it would be great to find more examples of > these. You mean like these... a series of articles I wrote about design patterns implemented in Object Pascal. ;-) http://geldenhuys.co.uk/articles/ As for MVVM, I had a different spin on MVP (Model-View-Presenter) and MVC (Model-View-Controller). Both MVP especially implements everything from scratch. Instead I implemented MGM (Model-GUI-Mediator) which is very similar to MVP in concept, except it reuses available widget events found in all modern GUI toolkit widgets. There is an article on MGM too, but that was kept simple for the sake of the article. For a much improved version of MGM, take a look at the code available as part of the tiOPF project (on SourceForge). The tiOPF implementation of MGM supports VCL, LCL, fpGUI and FMX (Delphi's Firemonkey) toolkits. ps: Design Patterns are meant to be documented as an idea of how to solve a commonly found problem. It isn't meant to serve as a code template. So there can be many ways of implementing the same design pattern. eg: Most books and articles I've read implement the Visitor pattern in a very limited way. tiOPF implements it in a more generic way, and actually makes it even more flexible. The tiOPF project is what got me hooked on design patterns. That framework uses many different design patterns, and improved the quality of the framework tremendously. 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 trayres at gmail.com Thu Jun 23 01:25:25 2016 From: trayres at gmail.com (Travis Ayres) Date: Wed, 22 Jun 2016 16:25:25 -0700 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: <41aa927c-598b-5993-d87b-88636663d99f@geldenhuys.co.uk> References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> <41aa927c-598b-5993-d87b-88636663d99f@geldenhuys.co.uk> Message-ID: Hi Graeme, I don't understand the problem tiOPF is trying to solve well enough to fully grok it in context - I've never used a database, only flat files. GUI programming in an understandable way... clueless, it always devolves into miserable, miserable spaghetti code. That said, it's better spaghetti code than when I started with Lazarus, so maybe eventually it'll be acceptable. Hah! On Wed, Jun 22, 2016 at 2:21 PM, Graeme Geldenhuys < mailinglists at geldenhuys.co.uk> wrote: > On 2016-06-22 18:57, Travis Ayres wrote: > > The Observer, MVVM, > > Adapter patterns, whatever - it would be great to find more examples of > > these. > > You mean like these... a series of articles I wrote about design > patterns implemented in Object Pascal. ;-) > > http://geldenhuys.co.uk/articles/ > > As for MVVM, I had a different spin on MVP (Model-View-Presenter) and > MVC (Model-View-Controller). Both MVP especially implements everything > from scratch. Instead I implemented MGM (Model-GUI-Mediator) which is > very similar to MVP in concept, except it reuses available widget events > found in all modern GUI toolkit widgets. There is an article on MGM too, > but that was kept simple for the sake of the article. For a much > improved version of MGM, take a look at the code available as part of > the tiOPF project (on SourceForge). The tiOPF implementation of MGM > supports VCL, LCL, fpGUI and FMX (Delphi's Firemonkey) toolkits. > > ps: > Design Patterns are meant to be documented as an idea of how to > solve a commonly found problem. It isn't meant to serve as a > code template. So there can be many ways of implementing the > same design pattern. eg: Most books and articles I've read > implement the Visitor pattern in a very limited way. tiOPF > implements it in a more generic way, and actually makes it even > more flexible. > > The tiOPF project is what got me hooked on design patterns. That > framework uses many different design patterns, and improved the > quality of the framework tremendously. > > 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 > -- > _______________________________________________ > 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 michalis.kambi at gmail.com Thu Jun 23 01:30:04 2016 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Thu, 23 Jun 2016 01:30:04 +0200 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: > I have also an introduction on Object Pascal section on my site > > http://www.trustfm.net/ebooks/ObjectPascal.php > > but i had never time to finish it :S I like it! - but without the 1st part, "Introduction"... I would not advice using CodeTyphon, as I had very bad experience with the quality of their stuff. I would much rather advice users to just install Lazarus straight from http://www.lazarus-ide.org/ . Also, as a Linux user, the instructions to modify the "sudoers" (to never ask for password), and then run the CodeTyphon with "sudo" are kind of a show-stopper. Running with "sudo" is something you should never do with an IDE... And it's certainly absolutely not required for vanilla FPC or Lazarus. That said, the rest of the book starts really good! You describe using Lazarus for a "Hello world" GUI programs, which is a cool approach, to quickly show new users that they can do fancy GUI trivially easy with Pascal. And presented with screenshots and basic code samples that should get anyone started. Then you have a nice description of the language. So, might I make a suggestion: how about just making the "Hello World" part the 1st one, not the 2nd? And just start it with a simple paragraph """ Install Lazarus from http://www.lazarus-ide.org/ . Alternatively, you can install CodeTyphon (link to existing installation instructions here). """ That would make it simpler (faster start into actual coding), and also don't scare off Linux users with instructions about "sudo":) Regards, Michalis From michalis.kambi at gmail.com Thu Jun 23 01:37:18 2016 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Thu, 23 Jun 2016 01:37:18 +0200 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: > Also, as a Linux user, the instructions to modify the "sudoers" (to > never ask for password), and then run the CodeTyphon with "sudo" are > kind of a show-stopper. Running with "sudo" is something you should > never do with an IDE... And it's certainly absolutely not required for > vanilla FPC or Lazarus. Sorry, reading the instructions closer -- it seems you only need to run "sudo codetyphon" to update it, not for regular usage. Well, that's still rather bad (together with the description to modify sudoers) and should not be necessary (it would be nice to be able to install it for current user, without sudo, not system wide). Although it's not as scary as I made it out to be above:) Regards, Michalis From cyraid at gmail.com Thu Jun 23 02:40:10 2016 From: cyraid at gmail.com (Dennis) Date: Thu, 23 Jun 2016 00:40:10 +0000 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: Instead of doing an svn update in place, it should store the binaries in your home folder, and then run those instead (kinda like what Dropbox does). I agree.. should never have to sudo.. either make a repository for updates, or store the source and svn it from the user home folder if necessary (or both). - Dennis Fehr On Wed, Jun 22, 2016, 6:38 PM Michalis Kamburelis wrote: > > Also, as a Linux user, the instructions to modify the "sudoers" (to > > never ask for password), and then run the CodeTyphon with "sudo" are > > kind of a show-stopper. Running with "sudo" is something you should > > never do with an IDE... And it's certainly absolutely not required for > > vanilla FPC or Lazarus. > > Sorry, reading the instructions closer -- it seems you only need to > run "sudo codetyphon" to update it, not for regular usage. Well, > that's still rather bad (together with the description to modify > sudoers) and should not be necessary (it would be nice to be able to > install it for current user, without sudo, not system wide). Although > it's not as scary as I made it out to be above:) > > Regards, > Michalis > -- > _______________________________________________ > 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 maaartinus at gmail.com Thu Jun 23 09:35:15 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Thu, 23 Jun 2016 09:35:15 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: <20160621134519.03fe41ae@limapholos.matflo.wg> References: <20160621134519.03fe41ae@limapholos.matflo.wg> Message-ID: On Tue, Jun 21, 2016 at 1:45 PM, Mattias Gaertner wrote: > On Tue, 21 Jun 2016 04:05:04 +0200 > Martin Grajcar wrote: > > >[...]Despite that, it works fine for all controls with Anchors > > = [akLeft, akTop]. For controls with other anchors, nothing works[...] > > The problem seems to lie in TControl.UpdateBaseBounds when > > the FBaseParentClientSize gets stored, which happens to be (0, 0) at this > > point. If I hack it to keep the previously stored value, it somehow > works. > > BoundsRect (Left,Top,Width,Height) is the current position/size. > > When a form's width is changed the LCL has to adapt the right anchored > controls - aka changing the Left so that the distance of the right > side is restored. The right distance is computed from BaseBounds > and BaseParentClientSize. > Thank you a lot for all the explanations. That's what I'm doing now manually: bb := AControl.BaseBounds; bpcs := AControl.BaseParentClientSize; OldLeft := bb.Left; OldWidth := bb.Right - bb.Left; // right = distance of the right edge from the *right* parent's edge OldRight := bpcs.cx - OldLeft - OldWidth; NewRight := OldRight; // keep it NewWidth := OldWidth * Zoom; // scale it NewLeft := bpcs.cx - OldRight - OldWidth; I'm rather sure that the computation is right (the above code mayn't be, but the real one is). The problem is that not only BaseBounds gets stored, but also BaseParentClientSize, which gets taken from the actual parent, which has zero size at the moment. What I'm doing would be right if the BaseParentClientSize were preserved. I hacked lcl/include/control.inc and got what I wanted: procedure TControl.UpdateAnchorRules; begin - UpdateBaseBounds(true,true,false); + UpdateBaseBounds(true,false,true); end; This doesn't sound right... not at all. So I guess, Lazarus counts on me computing the bounds relatively to the zero-size parent??? Maybe replacing the second occurrence of bpcs.cx by 0 (more exactly: the actual Parent.ClientWidth) would do? This would imply negative Left, but what... BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. > when setting Left, Top, Width, Height). My debugger agrees with you. I don't ask why so complicated. ;) > When the LCL computes the > autosized values it calls SetBoundsKeepBase, so it changes > BoundsRect and keeps BaseBounds/BaseParentClientSize. Makes sense. > > > The zero-client-size parent is a TPage, but I can't claim it guilty as I > > couldn't reproduce my problem in a small example. > > Do you mean it does work in a small example, but it does not in your > complex application? > Exactly. I thought that there might be a bug in TNotebook/TPage leading to zero client area, but this isn't the case. > So I wonder: > > > > - Is it forbidden to change position and/or size of a component when > > it's not shown? > > It is allowed and a pretty normal thing. > > > - If not, how can I deal with right-aligned controls? Simply setting > > c.Left := c.Left * Factor doesn't seem to work (though it should as > in this > > step all positions and all sizes simply get scaled up; anchoring is > used > > when the parent resizes and not the component itself, right?). > > Maybe you forget to disable the autosize updates during the changes? > > Simple example: > > MainControl.DisableAlign; > try > MainControl.SetBounds(Width*f,Height*f); > for aControl in List do > > aControl.SetBounds(aControl.Left*f,aControl.Top*f,aControl.Width*f,aControl.Height*f); > finally > MainControl.EnableAlign; > end; > I sort of intentionally did not use it: I use no align and no autosize (just anchors), so I though I won't need it. Now, I included it, but I still need to hack TControl.UpdateAnchorRules as above. Note: This algorithm has rounding errors, so multiple zooms will > destroy your layout. > I know. Currently, I don't care about a pixel or two... my layout has orders of magnitude bigger problems. However, for the future, I'm curious if there's a simple way of storing additional information for a control without subclassing it. Let's say, I need to store the *original* font size of *every* control. And I don't want to run to any problems when the control gets freed. Regards, Martin. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Thu Jun 23 10:00:55 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 23 Jun 2016 10:00:55 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: References: <20160621134519.03fe41ae@limapholos.matflo.wg> Message-ID: <20160623100055.62a68576@limapholos.matflo.wg> On Thu, 23 Jun 2016 09:35:15 +0200 Martin Grajcar wrote: >[...]also BaseParentClientSize, which gets taken from the actual parent, > which has zero size at the moment. ...which is a show stopper for right anchoring. >[...] > BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. > > when setting Left, Top, Width, Height). > > My debugger agrees with you. I don't ask why so complicated. ;) One part Delphi compatibility, one part flexibility for custom controls. >[...] > > > The zero-client-size parent is a TPage, but I can't claim it guilty as I > > > couldn't reproduce my problem in a small example. > > > > Do you mean it does work in a small example, but it does not in your > > complex application? > > > > Exactly. I thought that there might be a bug in TNotebook/TPage leading to > zero client area, but this isn't the case. Let's see if I can follow you: Do you mean, when you set the bounds and anchors of the control the BaseParentClientSize is 0,0 and Parent.ClientRect has non 0 values? >[...] > I sort of intentionally did not use it: I use no align and no autosize > (just anchors), so I though I won't need it. Without Disable/EnableAlign the AutoSize algorithm kicks in after each property change. And because anchoring is context sensitive, it is better to make sure. Also it avoids some overhead, which can load a form much faster. >[...] > However, for the future, I'm curious if there's a simple way of storing > additional information for a control without subclassing it. Let's say, I > need to store the *original* font size of *every* control. And I don't want > to run to any problems when the control gets freed. There is no LCL-built-in user storage space. You need to use subclassing or some other objects to store your settings. Mattias From mailinglists at geldenhuys.co.uk Thu Jun 23 10:40:36 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Jun 2016 09:40:36 +0100 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> <41aa927c-598b-5993-d87b-88636663d99f@geldenhuys.co.uk> Message-ID: <7b49a77c-5e89-f012-a3e3-b41f67fcfec7@geldenhuys.co.uk> On 2016-06-23 00:25, Travis Ayres wrote: > > I don't understand the problem tiOPF is trying to solve well enough to > fully grok it in context - I've never used a database, only flat files. Well, you wanted quality examples of design patterns using Object Pascal. tiOPF gives you that, and so does my articles. tiOPF is an Object Persistence Framework (and more). Instead of working with Datasets, TFields, a database specific component, a ton of event handlers and all code dumped into the Form unit (gui layer) — which 99.9% of the time ends up being unmaintainable and not very reusable. tiOPF steers you into separating your storage, business rules and UI into separate layers. This makes for much more maintainable code, much easier to unit test and code reuse of the business rules. In many of my applications I’ve created GUI, Console and CGI applications from the same set of business rule classes — thanks to tiOPF. tiOPF also allows you to switch between DB connection component (SqlDB, Zeos, DOA, IBX etc) and even switch between database storage (Firebird, Oracle, MS SQL Server, MySQL, TAB, CSV, XML etc)… all without needing to make a code change in you application. Simply toggle a compiler define and recompile. The same goes for Client/Server and 3-tier applications. As I hinted at above, tiOPF can also do persistence to something other than a database. Like a flat file, and currently supplies CSV, TAB and XML persistence layers to accomplish that. The reason I said “and more” earlier, is because I often write non-database applications, and still use tiOPF. Simply because tiOPF (thanks to all the design patterns it implements) has so many useful features and utility functions. The whole framework is backed by 1700+ unit tests that run every 3 hours, 24/7 to make sure in stays in a stable state, and than any newly introduced errors are very quickly detected and fixed. Maybe the “Concepts Documentation” will help shed some light on what tiOPF tries to (and does) accomplish. Especially chapters 1–3. It’s a relatively quick read. http://tiopf.sourceforge.net/Doc/Concepts/index.shtml Either way, I hope you find the design pattern example code useful. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Thu Jun 23 10:53:55 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Jun 2016 09:53:55 +0100 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: <6c56ba44-716b-42f7-d9ef-2942a75e30b0@geldenhuys.co.uk> On 2016-06-23 00:30, Michalis Kamburelis wrote: > Also, as a Linux user, the instructions to modify the "sudoers" (to > never ask for password), and then run the CodeTyphon with "sudo" are > kind of a show-stopper. Definitely, and I felt it is an even bigger issue under FreeBSD, especially where CodeTyphon tries to install itself. It doesn’t adhere to the filesystem hierarchy at all, where user installed programs should go to /usr/local/ only. And then adding to the pain, I prefer installing something only I’ll be running in my $HOME directory or in my read/write allocated /data/devel/ path. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From lazarus2 at de-brouwerij.be Thu Jun 23 16:06:45 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Thu, 23 Jun 2016 16:06:45 +0200 Subject: [Lazarus] strcat problem Message-ID: <576BECF5.6030503@de-brouwerij.be> Hi, I used strcat to make a long PChar. On my OpenSuse-box this works fine. On the RaspberryPi, is gives a runtime error 216. Any suggestions what could be the problem ? This part of the code : cTekst:=#13'Now is the winter of our discontent'#13; cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); <-- here is the RT-error 216. I have several more lines Any work-around ? I actually need a long nul-teminated constant string of about 550 characters. I could write the whole string on one line, but I would like to prevent that. I prefer it like the C-code : "\n\ Now is the winter of our discontent\n\ Made glorious summer by this sun of York;\n\ And all the clouds that lour'd upon our house\n\ ... FWIW, I'm porting pigpio. The test-application x_pigpiod_if2 works mostly fine remotely (from my OpenSuse-box), but now I get this problem when testing the local version, i.e. on the pi itself. Thanks, Koenraad From dec12 at avidsoft.com.hk Thu Jun 23 16:37:55 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Thu, 23 Jun 2016 22:37:55 +0800 Subject: [Lazarus] Can tiOPF handle multi thread programming easily? Message-ID: <576BF443.6080203@avidsoft.com.hk> Just heard compliments on tiOPF and wonder how it handles multi thread programming. Any experiences? Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Jun 23 16:57:32 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 23 Jun 2016 15:57:32 +0100 Subject: [Lazarus] Can tiOPF handle multi thread programming easily? In-Reply-To: <576BF443.6080203@avidsoft.com.hk> References: <576BF443.6080203@avidsoft.com.hk> Message-ID: <08eb7c6d-ef13-e08d-5d64-133dacca593b@geldenhuys.co.uk> On 2016-06-23 15:37, Dennis wrote: > Just heard compliments on tiOPF and wonder how it handles multi thread > programming. What exactly would you like to accomplish? tiOPF has some thread classes, thread list etc which it uses internally and can be used by your code too. Some thread usage by tiOPF: * The tiLog descendants run in a separate thread so logging doesn't slow down the actual application. * There is a thread based progress dialog that can monitor progress of multiple running threads and report the state of completion via a progressbar per thread * It allows multi-threaded DB Access. etc. tiOPF doesn't spoon-feed the developer, so for some tasks you still need to write the appropriate thread-safe code. But again, it boils down to what you actually want to accomplish with multi-threaded programming. 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 david.w.noon at googlemail.com Thu Jun 23 16:58:34 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Thu, 23 Jun 2016 15:58:34 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576BECF5.6030503@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> Message-ID: <576BF91A.3010507@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 23 Jun 2016 16:06:45 +0200, Koenraad Lelong (lazarus2 at de-brouwerij.be) wrote about "[Lazarus] strcat problem" (in <576BECF5.6030503 at de-brouwerij.be>): [snip] > cTekst:=#13'Now is the winter of our discontent'#13; You need a trailing #0 byte on the end. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldr+RoACgkQogYgcI4W/5QnwwCfTxrsHYVew6YAxDGoEv4IfzTm DTMAn3i4G+K8F9d9Vpznyo15G7kdIoc7 =FMiY -----END PGP SIGNATURE----- From maaartinus at gmail.com Thu Jun 23 18:02:09 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Thu, 23 Jun 2016 18:02:09 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: <20160623100055.62a68576@limapholos.matflo.wg> References: <20160621134519.03fe41ae@limapholos.matflo.wg> <20160623100055.62a68576@limapholos.matflo.wg> Message-ID: On Thu, Jun 23, 2016 at 10:00 AM, Mattias Gaertner < nc-gaertnma at netcologne.de> wrote: > On Thu, 23 Jun 2016 09:35:15 +0200 > Martin Grajcar wrote: > > >[...]also BaseParentClientSize, which gets taken from the actual parent, > > which has zero size at the moment. > > ...which is a show stopper for right anchoring. > Yet it works well with my hack saying "don't store parent size". > >[...] > > BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. > > > when setting Left, Top, Width, Height). > > > > My debugger agrees with you. I don't ask why so complicated. ;) > > One part Delphi compatibility, one part flexibility for custom controls. > > > >[...] > > > > The zero-client-size parent is a TPage, but I can't claim it guilty > as I > > > > couldn't reproduce my problem in a small example. > > > > > > Do you mean it does work in a small example, but it does not in your > > > complex application? > > > > > > > Exactly. I thought that there might be a bug in TNotebook/TPage leading > to > > zero client area, but this isn't the case. > > Let's see if I can follow you: > Do you mean, when you set the bounds and anchors of the control the > BaseParentClientSize is 0,0 and Parent.ClientRect has non 0 values? > No, exactly the opposite: BaseParentClientSize.cx = 850 Parent.Width = ParentClientRect.Right = ParentClientRect.Left = 0 So not storing the parent size seems to make sense. >[...] > > I sort of intentionally did not use it: I use no align and no autosize > > (just anchors), so I though I won't need it. > > Without Disable/EnableAlign the AutoSize algorithm kicks in after each > property change. And because anchoring is context sensitive, it is > better to make sure. Also it avoids some overhead, which can load a > form much faster. > OK, I keep using DisableAlign. >[...] > > However, for the future, I'm curious if there's a simple way of storing > > additional information for a control without subclassing it. Let's say, I > > need to store the *original* font size of *every* control. And I don't > want > > to run to any problems when the control gets freed. > > There is no LCL-built-in user storage space. You need to use > subclassing or some other objects to store your settings. OK, let's forget it for now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maaartinus at gmail.com Thu Jun 23 18:02:09 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Thu, 23 Jun 2016 18:02:09 +0200 Subject: [Lazarus] Zooming a form In-Reply-To: <20160623100055.62a68576@limapholos.matflo.wg> References: <20160621134519.03fe41ae@limapholos.matflo.wg> <20160623100055.62a68576@limapholos.matflo.wg> Message-ID: On Thu, Jun 23, 2016 at 10:00 AM, Mattias Gaertner < nc-gaertnma at netcologne.de> wrote: > On Thu, 23 Jun 2016 09:35:15 +0200 > Martin Grajcar wrote: > > >[...]also BaseParentClientSize, which gets taken from the actual parent, > > which has zero size at the moment. > > ...which is a show stopper for right anchoring. > Yet it works well with my hack saying "don't store parent size". > >[...] > > BaseBounds/BaseParentClientSize is set when you call SetBounds (e.g. > > > when setting Left, Top, Width, Height). > > > > My debugger agrees with you. I don't ask why so complicated. ;) > > One part Delphi compatibility, one part flexibility for custom controls. > > > >[...] > > > > The zero-client-size parent is a TPage, but I can't claim it guilty > as I > > > > couldn't reproduce my problem in a small example. > > > > > > Do you mean it does work in a small example, but it does not in your > > > complex application? > > > > > > > Exactly. I thought that there might be a bug in TNotebook/TPage leading > to > > zero client area, but this isn't the case. > > Let's see if I can follow you: > Do you mean, when you set the bounds and anchors of the control the > BaseParentClientSize is 0,0 and Parent.ClientRect has non 0 values? > No, exactly the opposite: BaseParentClientSize.cx = 850 Parent.Width = ParentClientRect.Right = ParentClientRect.Left = 0 So not storing the parent size seems to make sense. >[...] > > I sort of intentionally did not use it: I use no align and no autosize > > (just anchors), so I though I won't need it. > > Without Disable/EnableAlign the AutoSize algorithm kicks in after each > property change. And because anchoring is context sensitive, it is > better to make sure. Also it avoids some overhead, which can load a > form much faster. > OK, I keep using DisableAlign. >[...] > > However, for the future, I'm curious if there's a simple way of storing > > additional information for a control without subclassing it. Let's say, I > > need to store the *original* font size of *every* control. And I don't > want > > to run to any problems when the control gets freed. > > There is no LCL-built-in user storage space. You need to use > subclassing or some other objects to store your settings. OK, let's forget it for now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Thu Jun 23 21:08:14 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Thu, 23 Jun 2016 21:08:14 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576BF91A.3010507@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> Message-ID: <576C339E.6020601@de-brouwerij.be> Op 23-06-16 om 16:58 schreef David W Noon: > [snip] >> cTekst:=#13'Now is the winter of our discontent'#13; > > You need a trailing #0 byte on the end. > The definition of cTekst : var cTekst : PChar; So the compiler knows cTekst is a 0-terminated string doesn't, it ? And StrCat needs two parameters : PChar and PChar. So I think the compiler knows the strings are zero-terminated. Besides, on my OpenSuse-box it works, or is that by chance ? Koenraad. From lazarus2 at de-brouwerij.be Thu Jun 23 21:27:19 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Thu, 23 Jun 2016 21:27:19 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576C339E.6020601@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> Message-ID: <576C3817.1020603@de-brouwerij.be> Op 23-06-16 om 21:08 schreef Koenraad Lelong: > Op 23-06-16 om 16:58 schreef David W Noon: >> [snip] >>> cTekst:=#13'Now is the winter of our discontent'#13; >> >> You need a trailing #0 byte on the end. >> > > The definition of cTekst : > var > cTekst : PChar; > > So the compiler knows cTekst is a 0-terminated string doesn't, it ? > And StrCat needs two parameters : PChar and PChar. So I think the > compiler knows the strings are zero-terminated. > Besides, on my OpenSuse-box it works, or is that by chance ? > > Koenraad. > Extra info : I checked with a hex-dumper (executables for opensuse & pi). All strings end with a #0. No byte-count in front of them. All start at a longword-boundary. Koenraad From maaartinus at gmail.com Thu Jun 23 21:38:49 2016 From: maaartinus at gmail.com (Martin Grajcar) Date: Thu, 23 Jun 2016 21:38:49 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576C3817.1020603@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> Message-ID: Have you checked if there's any room behind #13'Now is the winter of our discontent'#13, so that someone else's memory won't get overwritten? I'd bet, there's none. *Appends a copy of the source string to the destination string. The terminating null character in destination is overwritten by the first character of source, and a null-character is included at the end of the new string formed by the concatenation of both in destination.* You'd need something like SetLength(cTekst, enoughToHoldThemAll); and maybe also cTekst[oldLength] := #0; before the very first strcat. On Thu, Jun 23, 2016 at 9:27 PM, Koenraad Lelong wrote: > Op 23-06-16 om 21:08 schreef Koenraad Lelong: > >> Op 23-06-16 om 16:58 schreef David W Noon: >> >>> [snip] >>> >>>> cTekst:=#13'Now is the winter of our discontent'#13; >>>> >>> >>> You need a trailing #0 byte on the end. >>> >>> >> The definition of cTekst : >> var >> cTekst : PChar; >> >> So the compiler knows cTekst is a 0-terminated string doesn't, it ? >> And StrCat needs two parameters : PChar and PChar. So I think the >> compiler knows the strings are zero-terminated. >> Besides, on my OpenSuse-box it works, or is that by chance ? >> >> Koenraad. >> >> Extra info : > I checked with a hex-dumper (executables for opensuse & pi). All strings > end with a #0. No byte-count in front of them. All start at a > longword-boundary. > > Koenraad > > > -- > _______________________________________________ > 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 david.w.noon at googlemail.com Thu Jun 23 21:40:52 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Thu, 23 Jun 2016 20:40:52 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576C339E.6020601@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> Message-ID: <576C3B44.3020401@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 23 Jun 2016 21:08:14 +0200, Koenraad Lelong (lazarus2 at de-brouwerij.be) wrote about "Re: [Lazarus] strcat problem" (in <576C339E.6020601 at de-brouwerij.be>): > Op 23-06-16 om 16:58 schreef David W Noon: >> [snip] >>> cTekst:=#13'Now is the winter of our discontent'#13; >> >> You need a trailing #0 byte on the end. >> > > The definition of cTekst : var cTekst : PChar; > > So the compiler knows cTekst is a 0-terminated string doesn't, it > ? The cTekst variable is actually a pointer. It's the string literal that needs the trailing NUL byte. Moreover, assigning to a pointer typically modifies the address, rather than copying new text into the buffer. The idiomatic C function for this is strcpy(). > And StrCat needs two parameters : PChar and PChar. So I think the > compiler knows the strings are zero-terminated. I think both literals need a trailing NUL. The compiler probably knows nothing about StrCat() besides that it takes 2 pointers as parameters. It is the RTL that expects to receive NUL-terminated strings as arguments. > Besides, on my OpenSuse-box it works, or is that by chance ? It could be that the data segment is initialized to binary zeroes on the Intel/AMD processor and left as junk on the ARM processor. This could be an artefact of the binutils on the different hardware platforms, as the ARM binaries might be sparsely defined in the executable, whereas the Intel binaries can be padded with zeroes. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldsO0QACgkQogYgcI4W/5Q+WQCff6iFNMJKXnlHWVqpSPih6l7f xFwAn0f/girIusmXB36FTzCfTGSiAta+ =zuH4 -----END PGP SIGNATURE----- From joshyfun at gmail.com Fri Jun 24 02:33:27 2016 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Fri, 24 Jun 2016 02:33:27 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576C339E.6020601@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> Message-ID: <7515556f-d01f-24d8-c314-a7a327eab31e@gmail.com> El 23/06/2016 a las 21:08, Koenraad Lelong escribió: > Op 23-06-16 om 16:58 schreef David W Noon: >> [snip] >>> cTekst:=#13'Now is the winter of our discontent'#13; >> >> You need a trailing #0 byte on the end. >> > > The definition of cTekst : > var > cTekst : PChar; > > So the compiler knows cTekst is a 0-terminated string doesn't, it ? > And StrCat needs two parameters : PChar and PChar. So I think the > compiler knows the strings are zero-terminated. > Besides, on my OpenSuse-box it works, or is that by chance ? Hello, Did you allocated the memory for the pchar ? Did you allocated memory enough in target pchar to hold the large string after the strcat's ? This code sample is wrong: cTekst:=#13'text'#13; strcat(cTekst,'other string'); The first assigns pchar to a read only memory block at compile time, and at runtime next bytes (not allocated) are overwritten with "other string" which will SIGSEGV for sure. -- From pascaldragon at googlemail.com Fri Jun 24 07:59:17 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Fri, 24 Jun 2016 07:59:17 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576C3B44.3020401@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3B44.3020401@googlemail.com> Message-ID: Am 23.06.2016 21:41 schrieb "David W Noon" : > > Op 23-06-16 om 16:58 schreef David W Noon: > >> [snip] > >>> cTekst:=#13'Now is the winter of our discontent'#13; > >> > >> You need a trailing #0 byte on the end. > >> > > > > The definition of cTekst : var cTekst : PChar; > > > > So the compiler knows cTekst is a 0-terminated string doesn't, it > > ? > > The cTekst variable is actually a pointer. > > It's the string literal that needs the trailing NUL byte. The compiler guarantees that constant strings are NUL terminated. This is needed for easy conversion to PChar. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Fri Jun 24 09:43:19 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Fri, 24 Jun 2016 09:43:19 +0200 Subject: [Lazarus] strcat problem In-Reply-To: References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> Message-ID: <576CE497.2050408@de-brouwerij.be> Op 23-06-16 om 21:38 schreef Martin Grajcar: > Have you checked if there's any room behind #13'Now is the winter of our > discontent'#13, so that someone else's memory won't get overwritten? I'd > bet, there's none. > > /Appends a copy of the source string to the destination string. The > terminating null character in destination is overwritten by the first > character of source, and a null-character is included at the end of the > new string formed by the concatenation of both *in destination*./ > > You'd need something like > SetLength(cTekst, enoughToHoldThemAll); > and maybe also > cTekst[oldLength] := #0; > before the very first strcat. > Updated my code : cTekst:=StrAlloc(600); cTekst:=#13'Now is the winter of our discontent'#13; cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); ... cTekst is still a PChar. Same problem : on the pi the program crashes on the first StrCat with a 216 error. An extra error, now on my OpenSuse-box : I finally do StrDispose(cTekst); And then the application crashes with a 216 error. Leaving that StrDispose out it runs fine, but then there's a memory-leak. FWIW, I'm using FPC 2.6.5 (SVN version 49333M) on OpenSuse and 3.0.0 on the pi. Koenraad From yann.merignac at gmail.com Fri Jun 24 10:22:12 2016 From: yann.merignac at gmail.com (=?UTF-8?Q?Yann_M=C3=A9rignac?=) Date: Fri, 24 Jun 2016 10:22:12 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576CE497.2050408@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> Message-ID: 1 cTekst:=StrAlloc(600); 2 cTekst:=#13'Now is the winter of our discontent'#13; 3 cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); On line 2 you change the value of cTekst and lose the memory allocated by StrAlloc. What you want to do is to copy the string constant value in the allocated memory with StrCopy or StrMove. See http://www.freepascal.org/docs-html/rtl/strings/strcat.html Another solution: var S : String; cTekst : PChar; begin S := #13'Now is the winter of our discontent'#13; S := S + 'Made glorious summer by this sun of York;'#13; cTekst := @S[1]; end; 2016-06-24 9:43 GMT+02:00 Koenraad Lelong : > Op 23-06-16 om 21:38 schreef Martin Grajcar: > >> Have you checked if there's any room behind #13'Now is the winter of our >> discontent'#13, so that someone else's memory won't get overwritten? I'd >> bet, there's none. >> >> /Appends a copy of the source string to the destination string. The >> terminating null character in destination is overwritten by the first >> character of source, and a null-character is included at the end of the >> new string formed by the concatenation of both *in destination*./ >> >> You'd need something like >> SetLength(cTekst, enoughToHoldThemAll); >> and maybe also >> cTekst[oldLength] := #0; >> before the very first strcat. >> >> Updated my code : > > cTekst:=StrAlloc(600); > cTekst:=#13'Now is the winter of our discontent'#13; > cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); > ... > > cTekst is still a PChar. > > Same problem : on the pi the program crashes on the first StrCat with a > 216 error. > > An extra error, now on my OpenSuse-box : > I finally do > StrDispose(cTekst); > And then the application crashes with a 216 error. Leaving that StrDispose > out it runs fine, but then there's a memory-leak. > > FWIW, I'm using FPC 2.6.5 (SVN version 49333M) on OpenSuse and 3.0.0 on > the pi. > > > Koenraad > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Fri Jun 24 17:25:18 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Fri, 24 Jun 2016 17:25:18 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576CE497.2050408@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> Message-ID: Am 24.06.2016 09:44 schrieb "Koenraad Lelong" : > Updated my code : > > cTekst:=StrAlloc(600); > > cTekst:=#13'Now is the winter of our discontent'#13; > cTekst:=StrCat(cTekst,'Made glorious summer by this sun of York;'#13); You need to use StrCat for the assignment after the StrAlloc as well, otherwise you'd just get rid of the pointer to your allocated memory returning to your original situation. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Fri Jun 24 20:37:52 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Fri, 24 Jun 2016 20:37:52 +0200 Subject: [Lazarus] strcat problem In-Reply-To: References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> Message-ID: <576D7E00.7010206@de-brouwerij.be> Op 24-06-16 om 10:22 schreef Yann Mérignac: > var > S : String; > cTekst : PChar; > begin > S := #13'Now is the winter of our discontent'#13; > S := S + 'Made glorious summer by this sun of York;'#13; > cTekst := @S[1]; > end; Hi, This works, both on OpenSuse and Raspberry Pi. Thanks, although I still don't grasp how PChar should be used. Koenraad. From david.w.noon at googlemail.com Fri Jun 24 21:31:03 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Fri, 24 Jun 2016 20:31:03 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576D7E00.7010206@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> Message-ID: <576D8A77.7050301@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 24 Jun 2016 20:37:52 +0200, Koenraad Lelong (lazarus2 at de-brouwerij.be) wrote about "Re: [Lazarus] strcat problem" (in <576D7E00.7010206 at de-brouwerij.be>): [snip] > Thanks, although I still don't grasp how PChar should be used. The PChar type is a pointer to a NUL-terminated string. It uses C semantics and C-like syntax. program pchar_test; uses strings; var cTekst: PChar; begin cTekst := StrAlloc(200); { String buffer of 200 bytes. } { This is how we assign and concatenate strings in C. } StrCopy(cTekst, #13'Now is the winter of our discontent'#13); StrCat(cTekst, 'Made glorious summer by this sun of York'#13); StrCat(cTekst, 'And all the clouds that lour''d upon our '); StrCat(cTekst, 'house'#13); writeln(cTekst^); { De-reference the pointer. } StrDispose(cTekst); { Free the string buffer. } end. After reading this, you should now know why C sucks as a string processing language, and why C++ implemented the std::string class to replace all this function call buffoonery. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldtincACgkQogYgcI4W/5TjPwCfQdXlunrHTf4DSCse9JcM8DyG 6VUAn1KpAtlDH2J4BR7HPxATKVsNTVHy =+TJI -----END PGP SIGNATURE----- From lazarus2 at de-brouwerij.be Fri Jun 24 22:46:45 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Fri, 24 Jun 2016 22:46:45 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576D8A77.7050301@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> Message-ID: <576D9C35.4060107@de-brouwerij.be> Op 24-06-16 om 21:31 schreef David W Noon: > After reading this, you should now know why C sucks as a string > processing language, and why C++ implemented the std::string class to > replace all this function call buffoonery. > - -- > Regards, > > Dave [RLU #314465] I think we're spoiled (fpc users), but not too much. The original c-code was this : char *TEXT= "\n\ Now is the winter of our discontent\n\ Made glorious summer by this sun of York;\n\ And all the clouds that lour'd upon our house\n\ In the deep bosom of the ocean buried.\n\ Now are our brows bound with victorious wreaths;\n\ Our bruised arms hung up for monuments;\n\ Our stern alarums changed to merry meetings,\n\ Our dreadful marches to delightful measures.\n\ Grim-visaged war hath smooth'd his wrinkled front;\n\ And now, instead of mounting barded steeds\n\ To fright the souls of fearful adversaries,\n\ He capers nimbly in a lady's chamber\n\ To the lascivious pleasing of a lute.\n\ "; I had to "improvise" and somehow put together that string which is really a constant here, or put that whole string on one line. Or does fpc have a similar construct to break strings in different lines like this c-code does ? It's the first time I knowingly used a PChar and I want to learn more about it, because sooner or later I will need it again. FWIW, with this problem "solved" I got a working port of pigpio, with a test/demo-application. If anyone is interested, please ask. It's the stuff that _uses_ the pigpio-daemon. Koenraad. From david.w.noon at googlemail.com Sat Jun 25 00:59:16 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Fri, 24 Jun 2016 23:59:16 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576D9C35.4060107@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> Message-ID: <576DBB44.9030408@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 24 Jun 2016 22:46:45 +0200, Koenraad Lelong (lazarus2 at de-brouwerij.be) wrote about "Re: [Lazarus] strcat problem" (in <576D9C35.4060107 at de-brouwerij.be>): [snip] > I think we're spoiled (fpc users), but not too much. The original > c-code was this : char *TEXT= "\n\ Now is the winter of our > discontent\n\ Made glorious summer by this sun of York;\n\ And all > the clouds that lour'd upon our house\n\ In the deep bosom of the > ocean buried.\n\ Now are our brows bound with victorious > wreaths;\n\ Our bruised arms hung up for monuments;\n\ Our stern > alarums changed to merry meetings,\n\ Our dreadful marches to > delightful measures.\n\ Grim-visaged war hath smooth'd his wrinkled > front;\n\ And now, instead of mounting barded steeds\n\ To fright > the souls of fearful adversaries,\n\ He capers nimbly in a lady's > chamber\n\ To the lascivious pleasing of a lute.\n\ "; That is some ugly code, even for C. I would have written it differently. > I had to "improvise" and somehow put together that string which is > really a constant here, or put that whole string on one line. Or > does fpc have a similar construct to break strings in different > lines like this c-code does ? const TEXT : ansistring = #10'Now is the winter of our discontent'#10 'Made glorious summer by this sun of York;'#10 'And all the clouds that lour''d upon our house'#10 'In the deep bosom of the ocean buried.'#10 'Now are our brows bound with victorious wreaths;'#10 'Our bruised arms hung up for monuments;'#10 'Our stern alarums changed to merry meetings,'#10 'Our dreadful marches to delightful measures.'#10 'Grim-visaged war hath smooth''d his wrinkled front;'#10 'And now, instead of mounting barded steeds'#10 'To fright the souls of fearful adversaries,'#10 'He capers nimbly in a lady''s chamber'#10 'To the lascivious pleasing of a lute.'#10#0; Note that '\n' is actually #10, not #13. You can now use @TEXT as your PChar pointer value. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldtu0QACgkQogYgcI4W/5QgjACfb/WbAPNmHfs+X5CeP0nqjnzv ZNsAnibU3Kf+z6ih+r0DjDXCMTZOQnH6 =OQIa -----END PGP SIGNATURE----- From david.w.noon at googlemail.com Sat Jun 25 01:12:49 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Sat, 25 Jun 2016 00:12:49 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576DBB44.9030408@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> Message-ID: <576DBE71.3020204@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 24 Jun 2016 23:59:16 +0100, David W Noon (david.w.noon at googlemail.com) wrote about "Re: [Lazarus] strcat problem" (in <576DBB44.9030408 at googlemail.com>): > You can now use @TEXT as your PChar pointer value. Correction: I think that should be @TEXT[1] for the pointer. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldtvnEACgkQogYgcI4W/5SUZwCfS1pFnIwF+yDLiunuhNxCVCXj I7IAn1uGI0xW7ObLSPye1esB+3tUbcKr =t9fr -----END PGP SIGNATURE----- From pascaldragon at googlemail.com Sat Jun 25 10:01:25 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 25 Jun 2016 10:01:25 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576DBE71.3020204@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> <576DBE71.3020204@googlemail.com> Message-ID: Am 25.06.2016 01:12 schrieb "David W Noon" : > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Fri, 24 Jun 2016 23:59:16 +0100, David W Noon > (david.w.noon at googlemail.com) wrote about "Re: [Lazarus] strcat > problem" (in <576DBB44.9030408 at googlemail.com>): > > > You can now use @TEXT as your PChar pointer value. > > Correction: I think that should be @TEXT[1] for the pointer. Or use PChar(TEXT) and let the compiler deal with that problem ;) Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus2 at de-brouwerij.be Sat Jun 25 13:38:14 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Sat, 25 Jun 2016 13:38:14 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <576DBB44.9030408@googlemail.com> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> Message-ID: <576E6D26.2030702@de-brouwerij.be> Op 25-06-16 om 00:59 schreef David W Noon: > > const > TEXT : ansistring = > #10'Now is the winter of our discontent'#10 > 'Made glorious summer by this sun of York;'#10 Fatal: Syntax error, ";" expected but "const string" found > 'And all the clouds that lour''d upon our house'#10 ... Does not compile. Or do I need some compiler-switch ? Koenraad From hdpc at talktalk.net Sat Jun 25 14:39:34 2016 From: hdpc at talktalk.net (Howard Page-Clark) Date: Sat, 25 Jun 2016 13:39:34 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <576E6D26.2030702@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> <576E6D26.2030702@de-brouwerij.be> Message-ID: <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> On 25/06/16 12:38, Koenraad Lelong wrote: > Op 25-06-16 om 00:59 schreef David W Noon: >> >> const >> TEXT : ansistring = >> #10'Now is the winter of our discontent'#10 >> 'Made glorious summer by this sun of York;'#10 > Fatal: Syntax error, ";" expected but "const string" found >> 'And all the clouds that lour''d upon our house'#10 > ... > > Does not compile. Or do I need some compiler-switch ? No, you need concatenation operators inserted: const TEXT : ansistring = #10'Now is the winter of our discontent'#10 +'Made glorious summer by this sun of York;'#10 +'And all the clouds that lour''d upon our house'#10 +'In the deep bosom of the ocean buried.'#10 + etc... From wkitty42 at windstream.net Sat Jun 25 15:41:39 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sat, 25 Jun 2016 09:41:39 -0400 Subject: [Lazarus] strcat problem In-Reply-To: <576BECF5.6030503@de-brouwerij.be> References: <576BECF5.6030503@de-brouwerij.be> Message-ID: <576E8A13.8050703@windstream.net> On 06/23/2016 10:06 AM, Koenraad Lelong wrote: > Hi, > > I used strcat to make a long PChar. > On my OpenSuse-box this works fine. On the RaspberryPi, is gives a runtime error > 216. > Any suggestions what could be the problem ? FWIW: i know you probably have your solution already as i missed this when you first posted it... i came up with two solutions that seem to work ok... i'm not sure which i prefer, though... edit: wow... now that i've read the thread(s), it is kinda funny how that saying about "only so many ways to do X" comes to play... FWIW: these two below? their compiled sizes are only about 100 bytes different... program pchartest1; uses strings; var cTekst : pchar; begin cTekst := strAlloc(600); strCat(cTekst, #10); strCat(cTekst, 'Now is the winter of our discontent'#10); strCat(cTekst, 'Made glorious summer by this sun of York;'#10); strCat(cTekst, 'And all the clouds that lour''d upon our house'#10); strCat(cTekst, 'In the deep bosom of the ocean buried.'#10); strCat(cTekst, 'Now are our brows bound with victorious wreaths;'#10); strCat(cTekst, 'Our bruised arms hung up for monuments;'#10); strCat(cTekst, 'Our stern alarums changed to merry meetings,'#10); strCat(cTekst, 'Our dreadful marches to delightful measures.'#10); strCat(cTekst, 'Grim-visaged war hath smooth''d his wrinkled front;'#10); strCat(cTekst, 'And now, instead of mounting barded steeds'#10); strCat(cTekst, 'To fright the souls of fearful adversaries,'#10); strCat(cTekst, 'He capers nimbly in a lady''s chamber'#10); strCat(cTekst, 'To the lascivious pleasing of a lute.'#10); writeln(cTekst); strDispose(cTekst); end. program pchartest2; const cTekst : ansistring = #10 +'Now is the winter of our discontent'#10 +'Made glorious summer by this sun of York;'#10 +'And all the clouds that lour''d upon our house'#10 +'In the deep bosom of the ocean buried.'#10 +'Now are our brows bound with victorious wreaths;'#10 +'Our bruised arms hung up for monuments;'#10 +'Our stern alarums changed to merry meetings,'#10 +'Our dreadful marches to delightful measures.'#10 +'Grim-visaged war hath smooth''d his wrinkled front;'#10 +'And now, instead of mounting barded steeds'#10 +'To fright the souls of fearful adversaries,'#10 +'He capers nimbly in a lady''s chamber'#10 +'To the lascivious pleasing of a lute.'#10#0; begin writeln(pchar(cTekst)); end. -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From david.w.noon at googlemail.com Sat Jun 25 17:55:07 2016 From: david.w.noon at googlemail.com (David W Noon) Date: Sat, 25 Jun 2016 16:55:07 +0100 Subject: [Lazarus] strcat problem In-Reply-To: <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> <576E6D26.2030702@de-brouwerij.be> <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> Message-ID: <576EA95B.2050907@googlemail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 25 Jun 2016 13:39:34 +0100, Howard Page-clark (hdpc at talktalk.net) wrote about "Re: [Lazarus] strcat problem" (in <51103c67-4a72-b44e-3fce-d577e1ce8f98 at talktalk.net>): [snip] > No, you need concatenation operators inserted: > > const TEXT : ansistring = #10'Now is the winter of our > discontent'#10 +'Made glorious summer by this sun of York;'#10 > +'And all the clouds that lour''d upon our house'#10 +'In the deep > bosom of the ocean buried.'#10 Yes, that's the ticket! I thought those #dd characters implicitly concatenated to any adjacent string, but it seems that spaces and/or line breaks can prevent that. - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* david.w.noon at googlemail.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlduqVsACgkQogYgcI4W/5T1pQCeMasyRRriUkODdxVtCm2fm5Gq /5AAoNVcO3W6wHuRfcwpEVPVSxjTb+x7 =F0xp -----END PGP SIGNATURE----- From lazarus2 at de-brouwerij.be Sun Jun 26 11:22:22 2016 From: lazarus2 at de-brouwerij.be (Koenraad Lelong) Date: Sun, 26 Jun 2016 11:22:22 +0200 Subject: [Lazarus] strcat problem In-Reply-To: <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> References: <576BECF5.6030503@de-brouwerij.be> <576BF91A.3010507@googlemail.com> <576C339E.6020601@de-brouwerij.be> <576C3817.1020603@de-brouwerij.be> <576CE497.2050408@de-brouwerij.be> <576D7E00.7010206@de-brouwerij.be> <576D8A77.7050301@googlemail.com> <576D9C35.4060107@de-brouwerij.be> <576DBB44.9030408@googlemail.com> <576E6D26.2030702@de-brouwerij.be> <51103c67-4a72-b44e-3fce-d577e1ce8f98@talktalk.net> Message-ID: <576F9ECE.7090102@de-brouwerij.be> Op 25-06-16 om 14:39 schreef Howard Page-Clark: > On 25/06/16 12:38, Koenraad Lelong wrote: >> Op 25-06-16 om 00:59 schreef David W Noon: >>> >>> const >>> TEXT : ansistring = >>> #10'Now is the winter of our discontent'#10 >>> 'Made glorious summer by this sun of York;'#10 >> Fatal: Syntax error, ";" expected but "const string" found >>> 'And all the clouds that lour''d upon our house'#10 >> ... >> >> Does not compile. Or do I need some compiler-switch ? > > No, you need concatenation operators inserted: > > const > TEXT : ansistring = > #10'Now is the winter of our discontent'#10 > +'Made glorious summer by this sun of York;'#10 > +'And all the clouds that lour''d upon our house'#10 > +'In the deep bosom of the ocean buried.'#10 > + etc... > Soo simple, why didn't I think of that. I finally have this : cTekst : PChar = #10'Now is the winter of our discontent'#10 +'Made glorious summer by this sun of York;'#10 +'And all the clouds that lour''d upon our house'#10 +'In the deep bosom of the ocean buried.'#10 +'Now are our brows bound with victorious wreaths;'#10 +'Our bruised arms hung up for monuments;'#10 +'Our stern alarums changed to merry meetings,'#10 +'Our dreadful marches to delightful measures.'#10 +'Grim-visaged war hath smooth''d his wrinkled front;'#10 +'And now, instead of mounting barded steeds'#10 +'To fright the souls of fearful adversaries,'#10 +'He capers nimbly in a lady''s chamber'#10 +'To the lascivious pleasing of a lute.'#10; Works fine on OpenSuse and Raspberry Pi. Thanks all. Koenraad. From pak.lebah at yahoo.com Mon Jun 27 08:14:36 2016 From: pak.lebah at yahoo.com (Mr Bee) Date: Mon, 27 Jun 2016 06:14:36 +0000 (UTC) Subject: [Lazarus] FreePascal and Lazarus Foundation References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Hi all, This morning I was glad to found this website: http://foundation.freepascal.org It's about time to have a foundation for our beloved projects. I hope by having this foundation, Free Pascal and Lazarus projects would go forward, being managed better and more professional to produce the best programming language, compiler and IDE for the world. :) Of course, there are still many things need to be fixed and enhanced on both projects. This foundation would be the first step forward. For this foundation, I'd like to say congratulation and good luck. Regards, –Mr Bee -------------- next part -------------- An HTML attachment was scrubbed... URL: From pak.lebah at yahoo.com Mon Jun 27 08:14:36 2016 From: pak.lebah at yahoo.com (Mr Bee) Date: Mon, 27 Jun 2016 06:14:36 +0000 (UTC) Subject: [Lazarus] FreePascal and Lazarus Foundation References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Hi all, This morning I was glad to found this website: http://foundation.freepascal.org It's about time to have a foundation for our beloved projects. I hope by having this foundation, Free Pascal and Lazarus projects would go forward, being managed better and more professional to produce the best programming language, compiler and IDE for the world. :) Of course, there are still many things need to be fixed and enhanced on both projects. This foundation would be the first step forward. For this foundation, I'd like to say congratulation and good luck. Regards, –Mr Bee -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Mon Jun 27 09:10:58 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 27 Jun 2016 09:10:58 +0200 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: <5cfa21cb-0a9e-852f-e3c5-0f0bec98a22d@kluug.net> Nice! I suggest adding "CodeTools support for generics" as a new project. Ondrej From michael at freepascal.org Mon Jun 27 10:00:08 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Jun 2016 10:00:08 +0200 (CEST) Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Mon, 27 Jun 2016, Mr Bee wrote: > Hi all, This morning I was glad to found this > website: http://foundation.freepascal.org It's about time to have a > foundation for our beloved projects. I hope by having this foundation, > Free Pascal and Lazarus projects would go forward, being managed better > and more professional to produce the best programming language, compiler > and IDE for the world. :) Of course, there are still many things need to > be fixed and enhanced on both projects. This foundation would be the > first step forward. For this foundation, I'd like to say congratulation > and good luck. Regards, Thank you. How did you manage to find this site ? I didn't make a public announcement yet :-) I am glad to hear that you approve. The foundation has been in the works for months, but in the next coming days we'll go public. I was actually waiting for the chairman to create a bank account to which we can couple a paypal account and a button for donations. The idea of the foundation is as stated on the website: the foundation will not interfere with design decisions, it is there to help with funding: this can be for code improvements/additions, or even making of releases and builds. (which takes a lot of time and equipment) Lazarus/Free Pascal are volunteer driven projects, and that will remain so. This means that some things are left lying because no-one wants to tackle them. These things can then be taken on by paying someone to do them (if sufficient funds are available). If the foundation can help in other ways, then that can obviously be discussed too. Michael. From michael at freepascal.org Mon Jun 27 10:01:14 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Jun 2016 10:01:14 +0200 (CEST) Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <5cfa21cb-0a9e-852f-e3c5-0f0bec98a22d@kluug.net> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <5cfa21cb-0a9e-852f-e3c5-0f0bec98a22d@kluug.net> Message-ID: On Mon, 27 Jun 2016, Ondrej Pokorny wrote: > Nice! > > I suggest adding "CodeTools support for generics" as a new project. Aren't generics supported yet ? Maybe you can elaborate what you mean by this support ? Michael. From lazarus at kluug.net Mon Jun 27 10:05:46 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 27 Jun 2016 10:05:46 +0200 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <5cfa21cb-0a9e-852f-e3c5-0f0bec98a22d@kluug.net> Message-ID: <0f7a6b4c-8d74-74bb-00b7-5a96140a325c@kluug.net> On 27.06.2016 10:01, Michael Van Canneyt wrote: > > > On Mon, 27 Jun 2016, Ondrej Pokorny wrote: > >> Nice! >> >> I suggest adding "CodeTools support for generics" as a new project. > > Aren't generics supported yet ? No. > Maybe you can elaborate what you mean by this support ? I can. Search for "generics" in Lazarus mantis to get an idea about it: http://mantis.freepascal.org/view.php?id=30271 http://mantis.freepascal.org/view.php?id=30227 http://mantis.freepascal.org/view.php?id=30124 http://mantis.freepascal.org/view.php?id=23782 http://mantis.freepascal.org/view.php?id=27847 http://mantis.freepascal.org/view.php?id=29163 http://mantis.freepascal.org/view.php?id=29785 There may be more. Ondrej From mailinglists at geldenhuys.co.uk Mon Jun 27 10:27:02 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 27 Jun 2016 09:27:02 +0100 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: <9cdaefdd-69ae-1fad-0ad0-c724594adb79@geldenhuys.co.uk> On 2016-06-27 09:00, Michael Van Canneyt wrote: > > How did you manage to find this site ? I didn't make a public announcement yet :-) Don't you know, nothing can be kept secret on the Internet. ;-) > I am glad to hear that you approve. The foundation has been in the works for > months, but in the next coming days we'll go public. Well done for getting this off the ground. 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 marc.hanisch at googlemail.com Mon Jun 27 10:29:13 2016 From: marc.hanisch at googlemail.com (Marc Hanisch) Date: Mon, 27 Jun 2016 10:29:13 +0200 Subject: [Lazarus] [fpc-pascal] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hello, very nice to hear about the foundation. Are you open for personal members? I would be interested in promoting Lazarus and Free Pascal. When you get donations, how is the money split to the projects and who decides about which project is getting how much? Best regards, Marc 2016-06-27 10:00 GMT+02:00 Michael Van Canneyt : > > > On Mon, 27 Jun 2016, Mr Bee wrote: > > Hi all, This morning I was glad to found this >> website: http://foundation.freepascal.org It's about time to have a >> foundation for our beloved projects. I hope by having this foundation, >> Free Pascal and Lazarus projects would go forward, being managed better >> and more professional to produce the best programming language, compiler >> and IDE for the world. :) Of course, there are still many things need to >> be fixed and enhanced on both projects. This foundation would be the >> first step forward. For this foundation, I'd like to say congratulation >> and good luck. Regards, >> > > Thank you. > > How did you manage to find this site ? I didn't make a public announcement > yet :-) > > I am glad to hear that you approve. The foundation has been in the works > for > months, but in the next coming days we'll go public. I was actually > waiting for the chairman to create a bank account to > which we can couple a paypal account and a button for donations. > > The idea of the foundation is as stated on the website: the foundation > will not interfere with design decisions, it is there to help with funding: > this can be for code improvements/additions, or even making of releases and > builds. (which takes a lot of time and equipment) > > Lazarus/Free Pascal are volunteer driven projects, and that will remain so. > This means that some things are left lying because no-one wants to tackle > them. > These things can then be taken on by paying someone to do them (if > sufficient > funds are available). > > If the foundation can help in other ways, then that can obviously be > discussed too. > > Michael. > _______________________________________________ > fpc-pascal maillist - fpc-pascal at lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > -------------- next part -------------- An HTML attachment was scrubbed... URL: From trustfm at gmail.com Mon Jun 27 11:41:48 2016 From: trustfm at gmail.com (Anastasios Karidis) Date: Mon, 27 Jun 2016 12:41:48 +0300 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: <8ab04d1e-6e58-d413-b095-c8f61acb5b62@gmail.com> On 6/23/2016 02:30, Michalis Kamburelis wrote: >> I have also an introduction on Object Pascal section on my site >> >> http://www.trustfm.net/ebooks/ObjectPascal.php >> >> but i had never time to finish it :S > I like it! - but without the 1st part, "Introduction"... I would not > advice using CodeTyphon, as I had very bad experience with the quality > of their stuff. I would much rather advice users to just install > Lazarus straight from http://www.lazarus-ide.org/ . > > Also, as a Linux user, the instructions to modify the "sudoers" (to > never ask for password), and then run the CodeTyphon with "sudo" are > kind of a show-stopper. Running with "sudo" is something you should > never do with an IDE... And it's certainly absolutely not required for > vanilla FPC or Lazarus. > > That said, the rest of the book starts really good! You describe using > Lazarus for a "Hello world" GUI programs, which is a cool approach, to > quickly show new users that they can do fancy GUI trivially easy with > Pascal. And presented with screenshots and basic code samples that > should get anyone started. Then you have a nice description of the > language. > > So, might I make a suggestion: how about just making the "Hello World" > part the 1st one, not the 2nd? And just start it with a simple > paragraph > > """ > Install Lazarus from http://www.lazarus-ide.org/ . Alternatively, you > can install CodeTyphon (link to existing installation instructions > here). > """ > > That would make it simpler (faster start into actual coding), and also > don't scare off Linux users with instructions about "sudo":) > > Regards, > Michalis I will take in consideration your advices . My point of view was at the 1st chapter to include Lazarus approach (installation and configuration) too... -- Anastasios Karidis aka TrustFm www.trustfm.net The gmail email From trustfm at gmail.com Mon Jun 27 11:44:43 2016 From: trustfm at gmail.com (Anastasios Karidis) Date: Mon, 27 Jun 2016 12:44:43 +0300 Subject: [Lazarus] Quick Modern Object Pascal Introduction, for Programmers In-Reply-To: References: <4fefe976-0d99-32dc-d0b4-751552e97fe4@gmail.com> Message-ID: On 6/23/2016 02:37, Michalis Kamburelis wrote: >> Also, as a Linux user, the instructions to modify the "sudoers" (to >> never ask for password), and then run the CodeTyphon with "sudo" are >> kind of a show-stopper. Running with "sudo" is something you should >> never do with an IDE... And it's certainly absolutely not required for >> vanilla FPC or Lazarus. > Sorry, reading the instructions closer -- it seems you only need to > run "sudo codetyphon" to update it, not for regular usage. Well, > that's still rather bad (together with the description to modify > sudoers) and should not be necessary (it would be nice to be able to > install it for current user, without sudo, not system wide). Although > it's not as scary as I made it out to be above:) > > Regards, > Michalis Thank you, i am based at the official documentation of Sternas. But as i said i wantedto add Lazarus too. My approach ob the online tutorials is to define the sections and then fill them i hope to make some time to conclude this stuff. Locally i have evolving examples for OO not separate ones. Have a nice day ! -- Anastasios Karidis aka TrustFm www.trustfm.net The gmail email From alexsander.rosa at gmail.com Mon Jun 27 14:04:32 2016 From: alexsander.rosa at gmail.com (Alexsander Rosa) Date: Mon, 27 Jun 2016 09:04:32 -0300 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: 2016-06-27 5:00 GMT-03:00 Michael Van Canneyt : > > How did you manage to find this site ? I didn't make a public announcement > yet :-) > > It's not exactly a secret: http://www.blaisepascal.eu/ > NEWS > NEW FOUNDATION > ESTABLISHED > Free Pascal and Lazarus foundation > The Free Pascal and Lazarus foundation is > a non-profit organisation dedicated to the promotion and sponsoring of the > open source > The foundation collects funds to sponsor development of additional > features. > Which projects are being sponsored. > The users can submit projects which they would > like to see developed. > ------------------------------ > THE NEW ISSUE WILL BE SOON AVAILABLE: > a cover preview > -- Atenciosamente, Alexsander da Rosa -------------- next part -------------- An HTML attachment was scrubbed... URL: From victor.campillo at gmail.com Mon Jun 27 16:17:22 2016 From: victor.campillo at gmail.com (Victor Campillo) Date: Mon, 27 Jun 2016 16:17:22 +0200 Subject: [Lazarus] [fpc-pascal] FreePascal and Lazarus Foundation In-Reply-To: <2b3e7e73-7ff4-bde1-4a01-45c4ee5261c0@michael-ring.org> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <5771051E.4040404@gmail.com> <2b3e7e73-7ff4-bde1-4a01-45c4ee5261c0@michael-ring.org> Message-ID: <57713572.9060109@gmail.com> On 27/06/16 15:47, Michael Ring wrote: > > Most likely that Embarcadero has shut down their development Branch in > Spain, about 80 people involved. > > Michael > When I read the news this morning I was astonished, I didn't know that Embarcadero had such a big team in Spain (I am Spanish). In the group of G+ there is a comment of Allen Bauer that explains which parts of Delphi were developed in this office. > Allen Bauer +47 > The Spain office had taken on most of the IDE, Delphi RTL, GetIT, > Installer, some DB, Bluetooth components, IoT, QA, and other > miscellaneous tasks. They were by-far the largest single group working > on RAD Studio. They were all a wonderful, dedicated, excited group of > folks. They were eager to learn and truly enjoyed their jobs. I am > deeply saddened by this development. > > Not unexpected given what I know about the new owners', ahem, decided > lack of understanding how a dev-tool should be developed and > managed... In fact, how software in general should be developed. > > Gosh... I wonder why I left... Best Regards. -- Victor Campillo -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Mon Jun 27 20:12:44 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Jun 2016 20:12:44 +0200 (CEST) Subject: [Lazarus] [fpc-pascal] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Mon, 27 Jun 2016, Marc Hanisch wrote: > Hello, > > very nice to hear about the foundation. Are you open for personal members? That is the idea, but we still need to adapt the bylaws to allow this. > I would be interested in promoting Lazarus and Free Pascal. > When you get donations, how is the money split to the projects and who > decides about which project is getting how much? I had 2 tracks in mind: - Donations for a specific project/purpose (similar to the bounty system). - General donations. The foundation members would vote for the project(s) to fund in the latter system. We'd always need an estimate of how much work is involved for each project. Michael. From michael at freepascal.org Mon Jun 27 20:17:36 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 27 Jun 2016 20:17:36 +0200 (CEST) Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Mon, 27 Jun 2016, Alexsander Rosa wrote: > 2016-06-27 5:00 GMT-03:00 Michael Van Canneyt : > >> >> How did you manage to find this site ? I didn't make a public announcement >> yet :-) >> >> > It's not exactly a secret: > http://www.blaisepascal.eu/ Ahah... Well, seems like Detlef is doing things in reverse order here :) Well, no matter. We were bound to go public in the next days anyway. Michael. From mitov at mitov.com Mon Jun 27 21:19:23 2016 From: mitov at mitov.com (Boian Mitov) Date: Mon, 27 Jun 2016 12:19:23 -0700 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> Message-ID: <240E02EDEEAD42E79FF51D8DBD966EF8@mpc1> I also had to post about the site, due to this surprising post yesterday: https://plus.google.com/115782878581272923715/posts/V3KpGyZXgLJ Long story short... I posted a reply in the main thread about the firing of the 80 developers: https://plus.google.com/105481197125997414290/posts/FnLvMteQ4dU as there was interest there. I did not intend to make big announcement, but then this guy obviously saw my post, and decided to announce his own "Foundation", so I had to respond with our announcement: https://plus.google.com/+BoianMitov/posts/46r34KmgrdQ So now it is known... With best regards, Boian Mitov ------------------------------------------------------- Mitov Software www.mitov.com ------------------------------------------------------- -----Original Message----- From: Michael Van Canneyt Sent: Monday, June 27, 2016 11:17 AM To: Lazarus mailing list Subject: Re: [Lazarus] FreePascal and Lazarus Foundation On Mon, 27 Jun 2016, Alexsander Rosa wrote: Ahah... Well, seems like Detlef is doing things in reverse order here :) Well, no matter. We were bound to go public in the next days anyway. Michael. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus From marcov at stack.nl Mon Jun 27 22:26:26 2016 From: marcov at stack.nl (Marco van de Voort) Date: Mon, 27 Jun 2016 22:26:26 +0200 Subject: [Lazarus] Lazarus App too slow ! In-Reply-To: <563BB05A.3090107@yahoo.com.br> References: <563BB05A.3090107@yahoo.com.br> Message-ID: <20160627202626.GA23004@stack.nl> On Thu, Nov 05, 2015 at 05:39:06PM -0200, Gugui wrote: > i have 2 CentOS servers ! > > one is CentOS release 6.6 (Final) and the app is very fast ! > another one is CentOS release 6.5 (Final) and the same app is too slow ! > > both is in the same network and > the slowness happend only with Lazarus app in this server > > any tips where to start looking for a solution? If the application is network related, I would look for differences in DNS setup between both boxes. From marcov at stack.nl Mon Jun 27 22:56:21 2016 From: marcov at stack.nl (Marco van de Voort) Date: Mon, 27 Jun 2016 22:56:21 +0200 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <240E02EDEEAD42E79FF51D8DBD966EF8@mpc1> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <240E02EDEEAD42E79FF51D8DBD966EF8@mpc1> Message-ID: <20160627205620.GA28081@stack.nl> On Mon, Jun 27, 2016 at 12:19:23PM -0700, Boian Mitov wrote: > I also had to post about the site, due to this surprising post yesterday: > https://plus.google.com/115782878581272923715/posts/V3KpGyZXgLJ > > Long story short... I posted a reply in the main thread about the firing of > the 80 developers: > https://plus.google.com/105481197125997414290/posts/FnLvMteQ4dU > > as there was interest there. I did not intend to make big announcement, but > then this guy obviously saw my post, and decided to announce his own > "Foundation", so I had to respond with our announcement: > https://plus.google.com/+BoianMitov/posts/46r34KmgrdQ > > So now it is known... That post tied the foundation to recent Delphi events. IMHo not a good thing to do. We are not the Delphi whipping boy. From hnb.code at gmail.com Mon Jun 27 22:59:12 2016 From: hnb.code at gmail.com (Maciej Izak) Date: Mon, 27 Jun 2016 22:59:12 +0200 Subject: [Lazarus] NewPascal "foundation" and black PR Message-ID: I have to correct something: 2016-06-27 21:19 GMT+02:00 Boian Mitov : > but then this guy obviously saw my post, and decided to announce his own > "Foundation", so I had to respond with our announcement: this guy is Maciej Izak, and Boian have wrong timing. What post? It is crazy! It was planned for a long time (January 2014): http://freesparta.com/roadmap NewPascal idea exist to provide simple start for mORMot users (in near future probably for Castle Game Engine too) and for early access for my compiler work on ARC objects and SmartPointers: http://synopse.info/forum/viewtopic.php?pid=20603#p20603 Donate button is provide to help me with keeping infrastructure (domain, VPS, small server), I am not rich programmer. Maybe no evryone has knowledge but to opposing to "Mitov Software" all of my work is open source! All is created in my free time after work. I may work too secretly but I am working on new MDI for Lazarus, Native LCL controls for Android, Debugger for Android, mORMot extensions and mentioned compiler stuff. Seems like PM is hard for business owner. -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From mitov at mitov.com Mon Jun 27 23:03:59 2016 From: mitov at mitov.com (Boian Mitov) Date: Mon, 27 Jun 2016 14:03:59 -0700 Subject: [Lazarus] FreePascal and Lazarus Foundation In-Reply-To: <20160627205620.GA28081@stack.nl> References: <474825676.1991658.1467008076043.JavaMail.yahoo.ref@mail.yahoo.com> <474825676.1991658.1467008076043.JavaMail.yahoo@mail.yahoo.com> <240E02EDEEAD42E79FF51D8DBD966EF8@mpc1> <20160627205620.GA28081@stack.nl> Message-ID: <3DE60FC45DE941CBA87D55C6D5340108@mpc1> No, we are not a Delphi whipping boy, we are offering alternative, when the community is in distress. Offering some calm alternative is the right thing to do at a time of panic. Don't you ;-) ? With best regards, Boian Mitov ------------------------------------------------------- Mitov Software www.mitov.com ------------------------------------------------------- -----Original Message----- From: Marco van de Voort Sent: Monday, June 27, 2016 1:56 PM To: Lazarus mailing list Subject: Re: [Lazarus] FreePascal and Lazarus Foundation On Mon, Jun 27, 2016 at 12:19:23PM -0700, Boian Mitov wrote: That post tied the foundation to recent Delphi events. IMHo not a good thing to do. We are not the Delphi whipping boy. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus From mitov at mitov.com Mon Jun 27 23:12:16 2016 From: mitov at mitov.com (Boian Mitov) Date: Mon, 27 Jun 2016 14:12:16 -0700 Subject: [Lazarus] NewPascal "foundation" and black PR In-Reply-To: References: Message-ID: Hi Maciej, Thank you for the clarification. It is great that you are doing that work, and there is nothing wrong with you getting donations. What I felt was not right, was to post the site as a Lazarus foundation, most likely after you saw my posts. The Lazarus Foundation has nothing to do with Mitov Software, or any of my work. It also is setup in such a way, that I can’t get any money from it in any way. All the money are raised to pay the Lazarus/FPC developer, and that does not include me in any way. I am donating my time and effort to rise the funding for FPC/Lazarus, and who knows if we the donors decide some other projects maybe even yours. And BTW: I also do open source projects whenever I can, and I am also not rich programmer either, but unlike in your case the money I raise will not go to me in any way, and unlike you, I actually donate my work time (the libraries I sell are my only income), to this cause. I have not been able to do any other work for the last couple of days, because of my involvement in this, and it will be only the beginning, so while I am doing this, my own survival will be in big limbo. This is a great risk for me, but I am taking it, as this is needed, and nobody else has done it for so many years :-( With best regards, Boian Mitov ------------------------------------------------------- Mitov Software www.mitov.com ------------------------------------------------------- From: Maciej Izak Sent: Monday, June 27, 2016 1:59 PM To: Lazarus mailing list Subject: [Lazarus] NewPascal "foundation" and black PR I have to correct something: 2016-06-27 21:19 GMT+02:00 Boian Mitov : but then this guy obviously saw my post, and decided to announce his own "Foundation", so I had to respond with our announcement: this guy is Maciej Izak, and Boian have wrong timing. What post? It is crazy! It was planned for a long time (January 2014): http://freesparta.com/roadmap NewPascal idea exist to provide simple start for mORMot users (in near future probably for Castle Game Engine too) and for early access for my compiler work on ARC objects and SmartPointers: http://synopse.info/forum/viewtopic.php?pid=20603#p20603 Donate button is provide to help me with keeping infrastructure (domain, VPS, small server), I am not rich programmer. Maybe no evryone has knowledge but to opposing to "Mitov Software" all of my work is open source! All is created in my free time after work. I may work too secretly but I am working on new MDI for Lazarus, Native LCL controls for Android, Debugger for Android, mORMot extensions and mentioned compiler stuff. Seems like PM is hard for business owner. -- Best regards, Maciej Izak -------------------------------------------------------------------------------- -- _______________________________________________ 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 md at delfire.net Wed Jun 29 18:06:10 2016 From: md at delfire.net (Marcos Douglas) Date: Wed, 29 Jun 2016 13:06:10 -0300 Subject: [Lazarus] Digital Certificate, CAPICOM Message-ID: Hi, Do you use Digital Certificate? If yes, which library/component? I'm using ACBr project http://svn.code.sf.net/p/acbr/code/trunk2/ It has CAPICOM supports (only Windows). Works good, but I need to add one more information, but I don't know how: [...] 29/06/2016 10:52:48 [...] SigningTime is the information. CAPICOM ActiveX does, but I don't know how do this using the component. Can you help me? Regards, Marcos Douglas From melon at ronix.biz Thu Jun 30 02:08:32 2016 From: melon at ronix.biz (=?ks_c_5601-1987?B?w9a/tcHY?=) Date: Thu, 30 Jun 2016 09:08:32 +0900 Subject: [Lazarus] virtual keyboard problem Message-ID: <000701d1d263$8a1da950$9e58fbf0$@ronix.biz> Hi, I want to make UTF-8 virtual keyboard, but I don't know how to use controls. intfutf8keypress. please know how to use controls.intfutf8keypress. Or how to Use UTF-8 in keyinputintf.keyinput.press. i use Arm-linux OS, and lazarus latest version. _______________________________________________ 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 nc-gaertnma at netcologne.de Thu Jun 30 08:42:41 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 30 Jun 2016 08:42:41 +0200 Subject: [Lazarus] virtual keyboard problem In-Reply-To: <000701d1d263$8a1da950$9e58fbf0$@ronix.biz> References: <000701d1d263$8a1da950$9e58fbf0$@ronix.biz> Message-ID: <20160630084241.4198af10@limapholos.matflo.wg> On Thu, 30 Jun 2016 09:08:32 +0900 ______ wrote: > Hi, > > I want to make UTF-8 virtual keyboard, but I don't know how to use controls. > intfutf8keypress. The method intfutf8keypress is called by the LCL interface. Do you want to fix a bug in the LCL? > please know how to use controls.intfutf8keypress. > > Or how to Use UTF-8 in keyinputintf.keyinput.press. > > i use Arm-linux OS, and lazarus latest version. Mattias From marcov at stack.nl Thu Jun 30 11:20:32 2016 From: marcov at stack.nl (Marco van de Voort) Date: Thu, 30 Jun 2016 11:20:32 +0200 Subject: [Lazarus] codetools and fpc trunk Message-ID: <20160630092032.GA87565@stack.nl> Seems that codetools breaks on the compilerproc:identifier construct (e.g. compproc.inc:64) This makes IDE navigation with trunk extremely unconfortable because it bombs out on that line with "end expected but identifier found" Maybe a workaround can be added to ignore this construct? From mailinglists at geldenhuys.co.uk Thu Jun 30 11:20:52 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 30 Jun 2016 10:20:52 +0100 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? Message-ID: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> Hi, Up to Lazarus v1.6 you could toggle a checkbox to say if the program is a Windows GUI application or not. In v1.7 that settings is removed, or moved somewhere I can't find it. Any hints on where it is now, or if removed completel, how that setting should be handled now with v1.7? Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From lazarus at kluug.net Thu Jun 30 11:24:47 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 30 Jun 2016 11:24:47 +0200 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> Message-ID: On 30.06.2016 11:20, Graeme Geldenhuys wrote: > Hi, > > Up to Lazarus v1.6 you could toggle a checkbox to say if the program is > a Windows GUI application or not. In v1.7 that settings is removed, or > moved somewhere I can't find it. Any hints on where it is now, or if > removed completel, how that setting should be handled now with v1.7? > > Regards, > Graeme > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pfkclgclpmblfkld.png Type: image/png Size: 22912 bytes Desc: not available URL: From bartjunk64 at gmail.com Thu Jun 30 11:30:28 2016 From: bartjunk64 at gmail.com (Bart) Date: Thu, 30 Jun 2016 11:30:28 +0200 Subject: [Lazarus] codetools and fpc trunk In-Reply-To: <20160630092032.GA87565@stack.nl> References: <20160630092032.GA87565@stack.nl> Message-ID: On 6/30/16, Marco van de Voort wrote: > > Seems that codetools breaks on the compilerproc:identifier construct (e.g. > compproc.inc:64) This makes IDE navigation with trunk extremely > unconfortable because it bombs out on that line with "end expected but > identifier found" Wasn't that fixed in r52565, r52566 and r52567? Bart From lazarus at kluug.net Thu Jun 30 11:34:03 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 30 Jun 2016 11:34:03 +0200 Subject: [Lazarus] codetools and fpc trunk In-Reply-To: References: <20160630092032.GA87565@stack.nl> Message-ID: <7f9f3668-fa3e-6146-b29d-9c428ebc5d94@kluug.net> On 30.06.2016 11:30, Bart wrote: > On 6/30/16, Marco van de Voort wrote: >> Seems that codetools breaks on the compilerproc:identifier construct (e.g. >> compproc.inc:64) This makes IDE navigation with trunk extremely >> unconfortable because it bombs out on that line with "end expected but >> identifier found" > Wasn't that fixed in r52565, r52566 and r52567? No, these are different features. But AFAIK Mattias fixed it in r52444 http://mantis.freepascal.org/view.php?id=30237 Ondrej From mailinglists at geldenhuys.co.uk Thu Jun 30 11:54:17 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 30 Jun 2016 10:54:17 +0100 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> Message-ID: <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> > On 2016-06-30 10:24, Ondrej Pokorny wrote: Thanks for the screenshot, but that setting is not there in my Lazarus. See attached screenshot. I'm using Lazarus 1.7 r52169 FPC 2.6.4 x86_64-freebsd-gtk 2. I'll get another svn update and retest. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot_laz_v1.7.png Type: image/png Size: 19851 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Thu Jun 30 12:02:56 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 30 Jun 2016 12:02:56 +0200 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> Message-ID: <20160630120256.4a053fd0@limapholos.matflo.wg> On Thu, 30 Jun 2016 10:54:17 +0100 Graeme Geldenhuys wrote: > > On 2016-06-30 10:24, Ondrej Pokorny wrote: > > Thanks for the screenshot, but that setting is not there in my Lazarus. > See attached screenshot. > > I'm using Lazarus 1.7 r52169 FPC 2.6.4 x86_64-freebsd-gtk 2. I'll get > another svn update and retest. It's only shown for the Windows targets. Mattias From nc-gaertnma at netcologne.de Thu Jun 30 12:03:55 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 30 Jun 2016 12:03:55 +0200 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: <20160630120256.4a053fd0@limapholos.matflo.wg> References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> <20160630120256.4a053fd0@limapholos.matflo.wg> Message-ID: <20160630120355.3f0f9e07@limapholos.matflo.wg> On Thu, 30 Jun 2016 12:02:56 +0200 Mattias Gaertner wrote: > On Thu, 30 Jun 2016 10:54:17 +0100 > Graeme Geldenhuys wrote: > > > > On 2016-06-30 10:24, Ondrej Pokorny wrote: > > > > Thanks for the screenshot, but that setting is not there in my Lazarus. > > See attached screenshot. > > > > I'm using Lazarus 1.7 r52169 FPC 2.6.4 x86_64-freebsd-gtk 2. I'll get > > another svn update and retest. > > It's only shown for the Windows targets. ... which is stupid. It should be shown always. Mattias From lazarus at kluug.net Thu Jun 30 12:03:45 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 30 Jun 2016 12:03:45 +0200 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> Message-ID: On 30.06.2016 11:54, Graeme Geldenhuys wrote: >> On 2016-06-30 10:24, Ondrej Pokorny wrote: > Thanks for the screenshot, but that setting is not there in my Lazarus. > See attached screenshot. > > I'm using Lazarus 1.7 r52169 FPC 2.6.4 x86_64-freebsd-gtk 2. I'll get > another svn update and retest. Maybe the setting is hidden on non-Windows platforms? I don't know if anybody changed it. Ondrej From mailinglists at geldenhuys.co.uk Thu Jun 30 12:13:59 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 30 Jun 2016 11:13:59 +0100 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: <20160630120355.3f0f9e07@limapholos.matflo.wg> References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> <20160630120256.4a053fd0@limapholos.matflo.wg> <20160630120355.3f0f9e07@limapholos.matflo.wg> Message-ID: <0705a001-f76a-95ef-ad43-3ec3e9c2464e@geldenhuys.co.uk> On 2016-06-30 11:03, Mattias Gaertner wrote: >> > It's only shown for the Windows targets. Ah. > ... which is stupid. It should be shown always. Was about to say the exact same thing. It is bad design to show/hide components [ref: About Face 3 - The Essentials of Interaction Design] - rather disable or ignore options when appropriate. As it is now I can't develop under Linux or FreeBSD and apply compiler settings that will be appropriate when I one day compile under Windows. Granted the -WG setting, even when checked under FreeBSD/Linux, should be ignored, and only applied when compiling under Windows. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From nc-gaertnma at netcologne.de Thu Jun 30 14:55:10 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 30 Jun 2016 14:55:10 +0200 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: <0705a001-f76a-95ef-ad43-3ec3e9c2464e@geldenhuys.co.uk> References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> <20160630120256.4a053fd0@limapholos.matflo.wg> <20160630120355.3f0f9e07@limapholos.matflo.wg> <0705a001-f76a-95ef-ad43-3ec3e9c2464e@geldenhuys.co.uk> Message-ID: <20160630145510.5d8b05d5@limapholos.matflo.wg> On Thu, 30 Jun 2016 11:13:59 +0100 Graeme Geldenhuys wrote: > On 2016-06-30 11:03, Mattias Gaertner wrote: >[...] > > ... which is stupid. It should be shown always. I changed it. > Was about to say the exact same thing. It is bad design to show/hide > components [ref: About Face 3 - The Essentials of Interaction Design] - > rather disable or ignore options when appropriate. > > As it is now I can't develop under Linux or FreeBSD and apply compiler > settings that will be appropriate when I one day compile under Windows. Yes. > Granted the -WG setting, even when checked under FreeBSD/Linux, should > be ignored, and only applied when compiling under Windows. That was always so. Mattias From mschnell at lumino.de Thu Jun 30 15:23:50 2016 From: mschnell at lumino.de (Michael Schnell) Date: Thu, 30 Jun 2016 15:23:50 +0200 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> Message-ID: <57751D66.4070603@lumino.de> On 06/30/2016 12:03 PM, Ondrej Pokorny wrote: > > Maybe the setting is hidden on non-Windows platforms? I don't know if > anybody changed it. Supposedly when compiling _for_ non-Windows platforms. -Michael From marcov at stack.nl Thu Jun 30 15:41:36 2016 From: marcov at stack.nl (Marco van de Voort) Date: Thu, 30 Jun 2016 15:41:36 +0200 Subject: [Lazarus] codetools and fpc trunk In-Reply-To: <7f9f3668-fa3e-6146-b29d-9c428ebc5d94@kluug.net> References: <20160630092032.GA87565@stack.nl> <7f9f3668-fa3e-6146-b29d-9c428ebc5d94@kluug.net> Message-ID: <20160630134136.GA31765@stack.nl> On Thu, Jun 30, 2016 at 11:34:03AM +0200, Ondrej Pokorny wrote: > >> unconfortable because it bombs out on that line with "end expected but > >> identifier found" > > Wasn't that fixed in r52565, r52566 and r52567? > > No, these are different features. But AFAIK Mattias fixed it in r52444 > > http://mantis.freepascal.org/view.php?id=30237 Yes. While I checked my repo was newer, I seem to have rebuilt FPC, but not lazarus. Possibly got confused because I changed machine (work<->home). Will check things at my ends further first. From lazarus at kluug.net Thu Jun 30 15:47:56 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 30 Jun 2016 15:47:56 +0200 Subject: [Lazarus] codetools and fpc trunk In-Reply-To: <20160630134136.GA31765@stack.nl> References: <20160630092032.GA87565@stack.nl> <7f9f3668-fa3e-6146-b29d-9c428ebc5d94@kluug.net> <20160630134136.GA31765@stack.nl> Message-ID: <7e5e1757-db53-cb47-9d02-72435d258ffd@kluug.net> On 30.06.2016 15:41, Marco van de Voort wrote: > Will check things at my ends further first. Please check this one as well: http://mantis.freepascal.org/view.php?id=29046 It seems that I fixed it before you created the issue as well. Ondrej From marcov at stack.nl Thu Jun 30 16:11:05 2016 From: marcov at stack.nl (Marco van de Voort) Date: Thu, 30 Jun 2016 16:11:05 +0200 Subject: [Lazarus] codetools and fpc trunk In-Reply-To: <7e5e1757-db53-cb47-9d02-72435d258ffd@kluug.net> References: <20160630092032.GA87565@stack.nl> <7f9f3668-fa3e-6146-b29d-9c428ebc5d94@kluug.net> <20160630134136.GA31765@stack.nl> <7e5e1757-db53-cb47-9d02-72435d258ffd@kluug.net> Message-ID: <20160630141105.GA32075@stack.nl> On Thu, Jun 30, 2016 at 03:47:56PM +0200, Ondrej Pokorny wrote: > On 30.06.2016 15:41, Marco van de Voort wrote: > > Will check things at my ends further first. > > Please check this one as well: > http://mantis.freepascal.org/view.php?id=29046 > It seems that I fixed it before you created the issue as well. I quickly tested here, and the behaviour is still the same. alt-up on generic.collections complains about missing generics.collections (I don't have the freesparta repo here atm), while ctrl-enter opens the mac unit. From mailinglists at geldenhuys.co.uk Thu Jun 30 16:15:04 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 30 Jun 2016 15:15:04 +0100 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: <20160630145510.5d8b05d5@limapholos.matflo.wg> References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> <20160630120256.4a053fd0@limapholos.matflo.wg> <20160630120355.3f0f9e07@limapholos.matflo.wg> <0705a001-f76a-95ef-ad43-3ec3e9c2464e@geldenhuys.co.uk> <20160630145510.5d8b05d5@limapholos.matflo.wg> Message-ID: <9099e2e7-86d7-d231-db5a-b91b599187a6@geldenhuys.co.uk> On 2016-06-30 13:55, Mattias Gaertner wrote: >>> > > ... which is stupid. It should be shown always. > I changed it. > Many thanks. G. From lazarus at kluug.net Thu Jun 30 16:16:46 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 30 Jun 2016 16:16:46 +0200 Subject: [Lazarus] codetools and fpc trunk In-Reply-To: <20160630141105.GA32075@stack.nl> References: <20160630092032.GA87565@stack.nl> <7f9f3668-fa3e-6146-b29d-9c428ebc5d94@kluug.net> <20160630134136.GA31765@stack.nl> <7e5e1757-db53-cb47-9d02-72435d258ffd@kluug.net> <20160630141105.GA32075@stack.nl> Message-ID: <0804b5b8-7094-ea85-8f95-4999f1467921@kluug.net> On 30.06.2016 16:11, Marco van de Voort wrote: > On Thu, Jun 30, 2016 at 03:47:56PM +0200, Ondrej Pokorny wrote: >> On 30.06.2016 15:41, Marco van de Voort wrote: >>> Will check things at my ends further first. >> Please check this one as well: >> http://mantis.freepascal.org/view.php?id=29046 >> It seems that I fixed it before you created the issue as well. > I quickly tested here, and the behaviour is still the same. > > alt-up on generic.collections complains about missing generics.collections > (I don't have the freesparta repo here atm), while ctrl-enter opens the mac > unit. Thanks for the info, I'll take a look. (I will respond in mantis.) Ondrej From mailinglists at geldenhuys.co.uk Thu Jun 30 16:37:37 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 30 Jun 2016 15:37:37 +0100 Subject: [Lazarus] Has Project Groups support been fixed? Message-ID: <5a90ced2-13a2-2b78-da4d-3cef261e407d@geldenhuys.co.uk> Hi, Before I attempt to update my Lazarus on a work related VM, has the recent Project Groups (unexpected crashes somewhere in the IDE) been fixed? The primary reason for wanting to update Lazarus is to use Project Groups, but if the issues are not solved yet, I'll delay that update on that VM to keep it stable. 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 wkitty42 at windstream.net Thu Jun 30 17:52:40 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Thu, 30 Jun 2016 11:52:40 -0400 Subject: [Lazarus] Lazarus v1.7 - where has the -WG compiler parameter setting gone? In-Reply-To: <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> References: <0f6303f9-9172-2f34-6d91-9e2eebabe854@geldenhuys.co.uk> <2e4ac756-4d3f-b5d9-94f2-e14edb5fd694@geldenhuys.co.uk> Message-ID: <57754048.2070206@windstream.net> On 06/30/2016 05:54 AM, Graeme Geldenhuys wrote: >> On 2016-06-30 10:24, Ondrej Pokorny wrote: > > Thanks for the screenshot, but that setting is not there in my Lazarus. > See attached screenshot. > > I'm using Lazarus 1.7 r52169 FPC 2.6.4 x86_64-freebsd-gtk 2. I'll get > another svn update and retest. you have to drop the TARGET OS box and select one of the winwhatever targets... then that option you are seeking shows up... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From sysrpl at gmail.com Thu Jun 30 22:15:55 2016 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 30 Jun 2016 16:15:55 -0400 Subject: [Lazarus] Point of Sale Message-ID: Just a curious question... Does anyone know if there has been an open source desktop "Point of Sale" project Is or was it any good? I'm considering writing one and am curious if there would ever be a demand, especially one of the cross platform rmdbs agnostic variety. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Jun 30 22:31:27 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 30 Jun 2016 21:31:27 +0100 Subject: [Lazarus] Point of Sale In-Reply-To: References: Message-ID: On 2016-06-30 21:15, Anthony Walter wrote: > Does anyone know if there has been an open source desktop "Point of Sale" > project Is or was it any good? Somewhere on the FPC wiki there is a page listing lots of projects created with FPC & Lazarus. I think I saw a POS system there, but can't remember if it was open source. I also remember seeing one based on tiOPF, which would give you the database server agnostic feature you want. Searching the tiOPF support newsgroup might reveal where the code is located - sorry I can't remember that off the top of my head. 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 aradeonas at operamail.com Thu Jun 30 22:54:14 2016 From: aradeonas at operamail.com (Aradeonas) Date: Thu, 30 Jun 2016 13:54:14 -0700 Subject: [Lazarus] Point of Sale In-Reply-To: References: Message-ID: <1467320054.2261233.653562753.4DA741B6@webmail.messagingengine.com> Happy to see you after a while Anthony. I like to see you CPU graph for Windows and you screen recording app. Regards, Ara -- http://www.fastmail.com - Send your email first class -------------- next part -------------- An HTML attachment was scrubbed... URL: