From aaa5500 at ya.ru Wed Oct 2 11:02:28 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Wed, 2 Oct 2019 12:02:28 +0300 Subject: [Lazarus] JsonTools issues in GH Message-ID: https://github.com/sysrpl/JsonTools/issues -many issues are there, seems all not even reviewed. JsonTools author had posted the comparision of json libs here. -- Regards, Alexey From sysrpl at gmail.com Wed Oct 2 14:53:43 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 2 Oct 2019 08:53:43 -0400 Subject: [Lazarus] JsonTools issues in GH In-Reply-To: References: Message-ID: Thank you for posting that. I hadn't reviewed these issues at all until right now. It looks like all the issues posted aren't actually issues, save for the dual license request. All issues posted all already covered in the comments embedded in the original source. I will update them forthwith. Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Thu Oct 3 06:15:31 2019 From: aaa5500 at ya.ru (Alexey Tor.) Date: Thu, 3 Oct 2019 07:15:31 +0300 Subject: [Lazarus] Cannot cross-compile from Linux x64 to Solaris-SPARC ? Message-ID: <2503dfa4-787f-dbe0-2c04-6297917fbb66@ya.ru> Linux x64. Free Pascal Compiler version 3.2.0-beta-r41315 [2019/02/16] for x86_64 Installed cross-compiler to Solaris-SPARC, using fpcupdeluxe 1.6.2y. I got such errors on compiling my project. what it means? maybe I must update FPC to trunk? Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gar: creating /home/user/cuda/synedit/atsynedit/lib/sparc-solaris/libpatsynedit_edits.a Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gar: creating /home/user/cuda/synedit/atsynedit/lib/sparc-solaris/libpatsynedit_register.a Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gar: creating /home/user/cuda/cuda/app/lib/sparc-solaris/libpform_choose_theme.a .. Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gar: creating /home/user/cuda/cuda/app/lib/sparc-solaris/libpformmain.a Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gar: creating /home/user/cuda/cuda/app/lib/sparc-solaris/libpcudatext.a .. Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lm Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lc Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lmd5 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -laio Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lrt Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lpthread Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -ldl Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lgdk-x11-2.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lX11 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lgdk_pixbuf-2.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lgtk-x11-2.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lgobject-2.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lglib-2.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lgthread-2.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lgmodule-2.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lpango-1.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lcairo Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -latk-1.0 Error: /home/user/fpcupdeluxe/cross/bin/sparc-solaris/sparc-solaris-gld: cannot find -lc cudatext.lpr(31,32) Error: Error while linking -- Regards, Alexey From juha.manninen62 at gmail.com Sun Oct 6 10:45:33 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 6 Oct 2019 11:45:33 +0300 Subject: [Lazarus] LCL Controls.pp needs 'inline' In-Reply-To: <33a2164b-aa3e-0a05-4cc8-a8ad7689aa5a@ya.ru> References: <33a2164b-aa3e-0a05-4cc8-a8ad7689aa5a@ya.ru> Message-ID: I inlined the non-deprecated one liners in r62000. BTW, ChangeBiDiModeAlignment is not a one liner. You must be careful with "inline". The effect may become negative if the function has more code. Juha From florian at freepascal.org Sun Oct 6 11:25:32 2019 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 6 Oct 2019 11:25:32 +0200 Subject: [Lazarus] LCL Controls.pp needs 'inline' In-Reply-To: References: <33a2164b-aa3e-0a05-4cc8-a8ad7689aa5a@ya.ru> Message-ID: Am 06.10.19 um 10:45 schrieb Juha Manninen via lazarus: > I inlined the non-deprecated one liners in r62000. > BTW, ChangeBiDiModeAlignment is not a one liner. You must be careful > with "inline". The effect may become negative if the function has more > code. For the record: FPC has also -Ooautoinline. IMO it is much better to use (and tune) this one instead of adding manually "inline". From aaa5500 at ya.ru Sun Oct 6 12:14:51 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sun, 6 Oct 2019 13:14:51 +0300 Subject: [Lazarus] LCL Grids: not scalable line width Message-ID: IMO I have found place where width of canvas line is not scaled to current DPI. procedure TCustomGrid.ChangeCursor(ACursor: TCursor; ... Canvas.Pen.Width:=3; ... Canvas.Pen.Width:=1; -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Sun Oct 6 13:14:32 2019 From: werner.pamler at freenet.de (Werner Pamler) Date: Sun, 6 Oct 2019 13:14:32 +0200 Subject: [Lazarus] LCL Grids: not scalable line width In-Reply-To: References: Message-ID: Am 06.10.2019 um 12:14 schrieb AlexeyT via lazarus: > > IMO I have found place where width of canvas line is not scaled to > current DPI. > > procedure TCustomGrid.ChangeCursor(ACursor: TCursor; > > ... > Canvas.Pen.Width:=3; > > ... > Canvas.Pen.Width:=1; > AFAIK, pen widths so far are not scaled at all. If they were, pen.Width=1 should be scaled, too, and this can have a detrimental effect on line styles and drawing speed, at least on Windows. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Thu Oct 10 10:25:05 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 10 Oct 2019 04:25:05 -0400 Subject: [Lazarus] OSX Catalina removes 32-bit and Carbon. Options? Message-ID: So it would seem that OSX Catalina entirely removes support for 32-bit applications and the entire Carbon toolkit. That means that Lazarus on Catalina will only work with 64-bit applications and the Cocoa toolkit. Where does this leave Lazarus? Does the Lazarus IDE compile and operate as exepcted using the Cocoa widgetset? Are there some big gotcha's with the Cocoa version of Lazarus in it's current state? Last I heard context menus didn't work. Is there anything else? -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony at unihedron.com Sat Oct 12 20:05:00 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Sat, 12 Oct 2019 14:05:00 -0400 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina Message-ID: <20191012140500.429b11d2@pino.pino.basement> My Mac was upgraded to the "Catalina" OS version and now I cannot find any Lazarus downloads that work. Any advice on getting Lazarus to work on a Mac now? I did get the latest XCODE to install by deleting the existing XCODE app. Thanks, Anthony From genericptr at gmail.com Sat Oct 12 20:08:46 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Sat, 12 Oct 2019 14:08:46 -0400 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: <20191012140500.429b11d2@pino.pino.basement> References: <20191012140500.429b11d2@pino.pino.basement> Message-ID: <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> The Carbon widget set along with all 32-bit code are not available in 10.15, which means you need to build Lazarus with the Cocoa widgets. I had to build my version from sources because I was told the Cocoa widgets are “alpha”, but that really needs to be upgraded to stable and released to the public already. Are there any plans to do this? > On Oct 12, 2019, at 2:05 PM, Anthony Tekatch via lazarus wrote: > > My Mac was upgraded to the "Catalina" OS version and now I cannot find > any Lazarus downloads that work. Any advice on getting Lazarus to work on > a Mac now? > > I did get the latest XCODE to install by deleting the existing XCODE app. > > Thanks, > Anthony Regards, Ryan Joseph From nc-gaertnma at netcologne.de Sat Oct 12 20:17:29 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 12 Oct 2019 20:17:29 +0200 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> References: <20191012140500.429b11d2@pino.pino.basement> <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> Message-ID: <20191012201729.4077b0b7@limapholos.matflo.wg> On Sat, 12 Oct 2019 14:08:46 -0400 Ryan Joseph via lazarus wrote: > The Carbon widget set along with all 32-bit code are not available in > 10.15, which means you need to build Lazarus with the Cocoa widgets. > I had to build my version from sources because I was told the Cocoa > widgets are “alpha”, but that really needs to be upgraded to stable > and released to the public already. > > Are there any plans to do this? Yes Mattias From mailinglists at geldenhuys.co.uk Sat Oct 12 21:04:27 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 12 Oct 2019 20:04:27 +0100 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: <20191012140500.429b11d2@pino.pino.basement> References: <20191012140500.429b11d2@pino.pino.basement> Message-ID: <5cfb698e-6bf4-9ec1-6fa4-0a70a037c377@geldenhuys.co.uk> On 12/10/2019 7:05 pm, Anthony Tekatch via lazarus wrote: > Any advice on getting Lazarus to work on > a Mac now? Probably not helpful now, but don't ever just upgrade your OS to a new major version without doing some research first. Catalina breaks a lot of things! Plus the one major thing is that Apple completely removed 32-bit support - probably the issue you are now experiencing. 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 anthony at unihedron.com Sun Oct 13 00:00:14 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Sat, 12 Oct 2019 18:00:14 -0400 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina [SOLVED] In-Reply-To: <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> References: <20191012140500.429b11d2@pino.pino.basement> <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> Message-ID: <20191012180014.0b573705@pino.pino.basement> On Sat, 12 Oct 2019 14:08:46 -0400, Ryan Joseph via lazarus wrote: > I had to build my version from sources ... Thank you. I got it to work. I modified the Wiki: https://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X#Step_1._Download_Xcode. To indicate that old Xcode must be trashed before installing new Xcode 11.1 on MacOSX Catalina 10.15 Then I followed the instructions at the above link in the section: Install Lazarus as follows: cd ~ mkdir -p bin/lazarus cd bin/lazarus svn checkout https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0 laz_fixes // wait some time .... cd laz_fixes make LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide // wait some time ..... open startlazarus.app --args "--pcp=~/.laz_fixes" From anthony at unihedron.com Sun Oct 13 01:42:37 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Sat, 12 Oct 2019 19:42:37 -0400 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: <20191012180014.0b573705@pino.pino.basement> References: <20191012140500.429b11d2@pino.pino.basement> <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> <20191012180014.0b573705@pino.pino.basement> Message-ID: <20191012194237.5458fc0b@pino.pino.basement> On Sat, 12 Oct 2019 18:00:14 -0400, Anthony Tekatch via lazarus wrote: > Thank you. I got it to work. That was a bit premature. Lazarus cannot be rebuilt after installing packages. packages install save and rebuild report: error: undefined symbols for architecture i386 From mailinglists at geldenhuys.co.uk Sun Oct 13 08:53:05 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 13 Oct 2019 07:53:05 +0100 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: <20191012194237.5458fc0b@pino.pino.basement> References: <20191012140500.429b11d2@pino.pino.basement> <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> <20191012180014.0b573705@pino.pino.basement> <20191012194237.5458fc0b@pino.pino.basement> Message-ID: <383743c6-d1e3-1281-e6e8-8f074ec9a0a7@geldenhuys.co.uk> On 13/10/2019 12:42 am, Anthony Tekatch via lazarus wrote: > report: error: undefined symbols for architecture i386 As Catalina doesn't have 32-bit support, I would imagine you need to compile 64-bit FPC first, then build Lazarus with the 64-bit fpc compiler. I would also imagine you can't use the official FPC 3.0.4 Install which includes only a cross-compiler for 64-bit (but the ppc* executable is 32-bit). So you need a true 64-bit FPC, not a cross-compiler. Take all this information with a pitch of salt though. ;-) I can't even get my MacBook to run because of outdate XCode, Apple wanting to force me to install Catalina to get a working XCode, and because my AppleID has been locked (G*D knows why!). 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 sysrpl at gmail.com Sun Oct 13 09:11:07 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 13 Oct 2019 03:11:07 -0400 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: <383743c6-d1e3-1281-e6e8-8f074ec9a0a7@geldenhuys.co.uk> References: <20191012140500.429b11d2@pino.pino.basement> <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> <20191012180014.0b573705@pino.pino.basement> <20191012194237.5458fc0b@pino.pino.basement> <383743c6-d1e3-1281-e6e8-8f074ec9a0a7@geldenhuys.co.uk> Message-ID: I'm not on Catalina yet, but I tried building a cross compiler for Cocoa with 64bit OSX earlier today and failed. It seems that Lazarus on OSX can't see a 64bit compiler if you use cross install. What I thought would work was: make all make install INSTALL_PREFIX=`pwd` crossinstall OS_TARGET=darwin CPU_TARGET=x86_64 INSTALL_PREFIX=`pwd` Then I copied ./lib/version/ppc and ./lib/version/ppcross to ./bin/ and created a valid ./bin/fpc.cfg Then I built Lazarus. I tried building with widgetset as Cocoa and CPU are x86_64 but I could not get the make to work. Then I tried building Lazarus normally, and changing a new project to use 64bit and Lazarus would have none of it, arguing that the current compiler does not support x86_64. Eventually I gave up on building it myself and used fpcudeluxe instead to install a Cocoa 64bit compiler and Lazarus. If anyone has any tips on how to manually create a FPC and Lazarus that support compilation to both 32 and 64bit, or even just a 64bit Cocoa only version, I'd appreciate any help. I could probably figure it out, but it would save me a lot of time in re-compiling. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca at wetron.es Sun Oct 13 10:10:27 2019 From: luca at wetron.es (Luca Olivetti) Date: Sun, 13 Oct 2019 10:10:27 +0200 Subject: [Lazarus] autocomplete a lookup field in Dbgrid? Message-ID: <85b0c2f1-e5f5-dfc3-604f-f723022a52a8@wetron.es> I have a a dataset with a lookup field. I edit it with a dbgrid. The grid correctly uses a picklist for that field, but I couldn't find an easy way to autocomplete it (i.e. allow the user to type the first few characters of the value to select an entry). The problem seems to be that the picklist field uses a TPickListCellEditor which derives from a TCustomComboBox that doesn't implement such functionality (it does but only to set the text in case it's a csDropDownList, it doesn't set the selected item). I see that a TDBLookupCombobox supposedly implements autocomplete (I saw some forum post when they say it's problematic, don't know if it has been solved now), but I cannot use it since I'm setting two fields, not one. Any idea? TIA -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From l at c-m-w.me.uk Sun Oct 13 11:39:27 2019 From: l at c-m-w.me.uk (C Western) Date: Sun, 13 Oct 2019 10:39:27 +0100 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: References: <20191012140500.429b11d2@pino.pino.basement> <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> <20191012180014.0b573705@pino.pino.basement> <20191012194237.5458fc0b@pino.pino.basement> <383743c6-d1e3-1281-e6e8-8f074ec9a0a7@geldenhuys.co.uk> Message-ID: <1e8215d7-43f2-e06f-1b21-283615eada48@c-m-w.me.uk> Some experiences having just tried moving my main application to Cocoa without upgrading to Catalina. The results look very promising, and my application looks usable, though I didn't try running 64 bit Lazarus. i can make the following observations: 1. For 32 bit compilation you need to avoid upgrading to the latest xcode; 10.3 looks like the last one that has the required 32 bit components. Older versions of xcode can be downloaded from the Apple developer site, and at least some co-existence is possible. (I ended up with 10.3 installed in my home directory.) 2. I typically compile with all range checks on, and this triggered some range checks in the widegt set - see https://bugs.freepascal.org/view.php?id=36171 3. Fixed point fonts can have non-integer spacings; I was using CarbonWidgetSet.SetTextFractional(Canvas, False) but this does not seem to be available under Cocoa so I had to specify the spacing in ExtTextOut. 4. Polyline, at least for large numbers of points. seems to be 10 times slower than under Carbon, which is itself slower than other OS's 5. For compiling trunk FPC I use: FPC=~/fpc/bootstrap/ppc386 make distclean DEBUG=1 install PREFIX=~/usr CPU_SOURCE=i386 OPT=-Fl/Users/me/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib to compile a 32 bit compiler to ~/usr starting from a 32 bit compiler and FPC=~/fpc/bootstrap/ppcx64 make distclean DEBUG=1 install PREFIX=~/usr64 CPU_SOURCE=x86_64 OPT=-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib to compile a 64 bit compiler to ~/usr64 starting from a 64 bit compiler. I add symbolic links in the two directories: for f in usr usr64 ; do   cd ~/$f/bin   if [ ! -L ppc386 ] ; then ln -s ~/usr/lib/fpc/$VER/ppc386 ; fi   if [ ! -L ppcx64 ] ; then ln -s ~/usr64/lib/fpc/$VER/ppcx64 ; fi done and with this setup lazarus can pick up the two compilers. Colin From lazarus at mfriebe.de Sun Oct 13 14:46:02 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 13 Oct 2019 14:46:02 +0200 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 Message-ID: The Lazarus team is glad to announce:      The upcoming release of Lazarus 2.0.6 which has been scheduled for the      last week of October 2019 This release will be built with FPC 3.0.4. The previous release Lazarus 2.0.4 was built with FPC 3.0.4 as well. Here is the list of fixes for Lazarus 2.0.4 (since 2.0.0): http://wiki.freepascal.org/Lazarus_2.0_fixes_branch We would invite everyone to provide their feedback to help us improve this upcoming release. Please let as know in particular: - Any bug-fixes already made to trunk, that you believe should still be merged to the fixes branch (fixes that are not listed on the above wiki page) - Any regressions that happened in fixes branch since the release of 2.0 - Other urgent matters, you believe we should know before the release. Please attempt to provide your feedback by: 23rd October 2019 More info on our release process can be found at (work in progress): http://wiki.lazarus.freepascal.org/Lazarus_release_engineering Information about the previous release: http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.0.4 The intended minimum requirements for the release will be: Windows:   2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. FreeBSD/Linux:   gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. macOS:   10.5 to 10.12; Carbon (32bit), Cocoa (64bit, beta), qt and qt5   (32 or 64bit). -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca at wetron.es Sun Oct 13 15:10:36 2019 From: luca at wetron.es (Luca Olivetti) Date: Sun, 13 Oct 2019 15:10:36 +0200 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 In-Reply-To: References: Message-ID: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> El 13/10/19 a les 14:46, Martin Frb via lazarus ha escrit: > This release will be built with FPC 3.0.4. > The previous release Lazarus 2.0.4 was built with FPC 3.0.4 as well. > > Here is the list of fixes for Lazarus 2.0.4 (since 2.0.0): > http://wiki.freepascal.org/Lazarus_2.0_fixes_branch > > We would invite everyone to provide their feedback to help us improve > this upcoming release. Please let as know in particular: > - Any bug-fixes already made to trunk, that you believe should still be > merged to the fixes branch (fixes that are not listed on the above wiki page) In my copy of lazarus 2.0.4 I have the fix for bug https://bugs.freepascal.org/view.php?id=35716 and the patch for the still opened https://bugs.freepascal.org/view.php?id=35715 Also, I don't know if this will be in 2.0.6 (I need it since the bugs in fpc 3.0.4 affect my projects, so I have to use fixes_3_2): --- components/virtualtreeview/VirtualTrees.pas (revision 62005) +++ components/virtualtreeview/VirtualTrees.pas (working copy) @@ -8014,12 +8014,12 @@ if OldPosition < Position then begin // column will be moved up so move down other entries - Move(FPositionToIndex[OldPosition + 1], FPositionToIndex[OldPosition], (Position - OldPosition) * SizeOf(Cardinal)); + System.Move(FPositionToIndex[OldPosition + 1], FPositionToIndex[OldPosition], (Position - OldPosition) * SizeOf(Cardinal)); end else begin // column will be moved down so move up other entries - Move(FPositionToIndex[Position], FPositionToIndex[Position + 1], (OldPosition - Position) * SizeOf(Cardinal)); + System.Move(FPositionToIndex[Position], FPositionToIndex[Position + 1] , (OldPosition - Position) * SizeOf(Cardinal)); end; FPositionToIndex[Position] := Column.Index; end; @@ -8264,7 +8264,7 @@ begin // Index found. Move all higher entries one step down and remove the last entry. if I < Upper then - Move(FPositionToIndex[I + 1], FPositionToIndex[I], (Upper - I) * SizeOf(TColumnIndex)); + System.Move(FPositionToIndex[I + 1], FPositionToIndex[I] , (Upper - I) * SizeOf(TColumnIndex)); end; // Decrease all indices, which are greater than the index to be deleted. if FPositionToIndex[I] > OldIndex then Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From lazarus at mfriebe.de Sun Oct 13 17:59:27 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 13 Oct 2019 17:59:27 +0200 Subject: [Lazarus] Testers wanted: FpDebug on Linux and Windows Message-ID: <7ff15270-8657-9bc5-6527-bfdd69243769@mfriebe.de> It is time to get some feedback on how FpDebug behaves in the wild. If you want to test it, you need: - Lazarus 2.1  revision 62049 (dated 13 Oct 2019) or higher/later - Fpc any version that above Lazarus works with.   If you use FPC trunk, you should aim for revision 43183 or higher.      earlier trunk will cause bad results inspecting bitpacked arrays      3.0.4 is fine      3.2 may depend on what gets merged when, and FpDebug may need amendments if certain fpc fixes are merged. As for what to expect:  https://wiki.lazarus.freepascal.org/FpDebug When reporting back: - Your Lazarus and FPC version/revision. - Your OS (with version and 32 or 64 bit) - Your IDE is 32 or 64 bit - Your FPC is 32 or 64 bit - Your target app is 32 or 64 bit (and indicate if it was cross compiled, by an FPC with different bitness) - In case something failed, log output of (or preferably, a reproducible testcase)   lazarus.exe   --debug-log=file --log-enable=DBG_STATE,DBG_DATA_MONITORS,DBG_ERRORS,DBG_VERBOSE,DBG_WARNINGS,DBG_BREAKPOINTS,DBG_FPDEBUG_VERBOSE,FPDBG_BREAKPOINT_ERRORS,FPDBG_BREAKPOINTS Thank you From lazarus at mfriebe.de Sun Oct 13 17:59:32 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 13 Oct 2019 17:59:32 +0200 Subject: [Lazarus] Feedback about GDB on Windows Message-ID: To all who - use Lazarus on Windows (any version of Lazarus 2.0 or 2.1) - use or have tried GDB 8.2 (for 64bit users also GDB 7.7 or 8.1) from https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/ https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Alternative%20GDB/ What is your experience with GDB 8.2 (7.7/8.1)? Compared to the default GDB (32bit: 7.7.1 / 64bit: 7.3.50) Any improvements you noticed? Any degradations you noticed? - Your Lazarus and FPC version/revision. - Your OS (with version and 32 or 64 bit) - Your IDE is 32 or 64 bit - Your FPC is 32 or 64 bit - Your target app is 32 or 64 bit (and indicate if it was cross compiled, by an FPC with different bitness) Thank you From lazarus at mfriebe.de Sun Oct 13 18:01:30 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 13 Oct 2019 18:01:30 +0200 Subject: [Lazarus] Feedback about GDB on Windows In-Reply-To: References: Message-ID: <919cee39-ae54-a997-92eb-3e5802145611@mfriebe.de> Forgot to mention: Which Dwarf version do you use? 32bit users, please ensure you switch to Dwarf. Testing with Stabs (fpc -g or -gs  / the default for 32 bit) is pointless. On 13/10/2019 17:59, Martin Frb via lazarus wrote: > > - Your Lazarus and FPC version/revision. > - Your OS (with version and 32 or 64 bit) > - Your IDE is 32 or 64 bit > - Your FPC is 32 or 64 bit > - Your target app is 32 or 64 bit (and indicate if it was cross > compiled, by an FPC with different bitness) > > Thank you > From lazarus at mfriebe.de Sun Oct 13 18:05:20 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 13 Oct 2019 18:05:20 +0200 Subject: [Lazarus] Testers wanted: FpDebug on Linux and Windows In-Reply-To: <7ff15270-8657-9bc5-6527-bfdd69243769@mfriebe.de> References: <7ff15270-8657-9bc5-6527-bfdd69243769@mfriebe.de> Message-ID: On 13/10/2019 17:59, Martin Frb via lazarus wrote: > It is time to get some feedback on how FpDebug behaves in the wild. Forgot: It is recommended to test this with DWARF-3 However DWARF-2 is also supported. Please mention which one you tested. From sysrpl at gmail.com Sun Oct 13 21:55:45 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 13 Oct 2019 15:55:45 -0400 Subject: [Lazarus] Default color of form in RGB? Message-ID: Does anyone know of a reliable way get the default color of a form (as in clDefault) in RGB? I am writing some code to prepare bitmaps and I want their background to match the default color of a form. Unfortunately I don't see a way to convert clDefault to an RGB value. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmlandmesser at gmx.de Sun Oct 13 22:01:29 2019 From: jmlandmesser at gmx.de (John Landmesser) Date: Sun, 13 Oct 2019 22:01:29 +0200 Subject: [Lazarus] Default color of form in RGB? In-Reply-To: References: Message-ID: <6f49ad36-a817-8fc2-773e-38b49534d6c8@gmx.de> Am 13.10.19 um 21:55 schrieb Anthony Walter via lazarus: > Does anyone know of a reliable way get the default color of a form (as > in clDefault) in RGB? I am writing some code to prepare bitmaps and I > want their background to match the default color of a form. > Unfortunately I don't see a way to convert clDefault to an RGB value. > Just an idea: https://www.maketecheasier.com/color-picker-tools-for-linux/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Sun Oct 13 22:24:46 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 13 Oct 2019 16:24:46 -0400 Subject: [Lazarus] Default color of form in RGB? In-Reply-To: <6f49ad36-a817-8fc2-773e-38b49534d6c8@gmx.de> References: <6f49ad36-a817-8fc2-773e-38b49534d6c8@gmx.de> Message-ID: Okay, you made me laugh, but I hope you were joking. Just to be clear I don't mean to ask how to get the color of something on my screen, I meant how to calculate at runtime the default color of a form in RGB on all platforms without having to take a screenshot of the form. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Sun Oct 13 23:29:24 2019 From: bartjunk64 at gmail.com (Bart) Date: Sun, 13 Oct 2019 23:29:24 +0200 Subject: [Lazarus] Default color of form in RGB? In-Reply-To: References: Message-ID: On Sun, Oct 13, 2019 at 9:56 PM Anthony Walter via lazarus wrote: > Does anyone know of a reliable way get the default color of a form (as in clDefault) in RGB? I am writing some code to prepare bitmaps and I want their background to match the default color of a form. Unfortunately I don't see a way to convert clDefault to an RGB value. Asked a similar question once before. Here's Zeljko's answer to that: No, clDefault is incorrect at any time. To obtain color we have: function GetColorResolvingParent: TColor; function GetRGBColorResolvingParent: TColor; -- Bart From sysrpl at gmail.com Sun Oct 13 23:53:42 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 13 Oct 2019 17:53:42 -0400 Subject: [Lazarus] Default color of form in RGB? In-Reply-To: References: Message-ID: Bart, that was exactly what I was looking for. Thank you so much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony at unihedron.com Mon Oct 14 16:10:45 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Mon, 14 Oct 2019 10:10:45 -0400 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: References: <20191012140500.429b11d2@pino.pino.basement> <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> <20191012180014.0b573705@pino.pino.basement> <20191012194237.5458fc0b@pino.pino.basement> <383743c6-d1e3-1281-e6e8-8f074ec9a0a7@geldenhuys.co.uk> Message-ID: <20191013065434.0e99fc37@pino.pino.basement> On Sun, 13 Oct 2019 03:11:07 -0400, Anthony Walter via lazarus wrote: > Eventually I gave up on building it myself and used fpcudeluxe instead > to install a Cocoa 64bit compiler and Lazarus. Interesting, how did you get fpcupdeluxe to run on a Mac? I tried downloading: fpcupdeluxe-x86_64-darwin-cocoa.zip from here: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases Drag the downloaded file into the Applications folder Clicking on that produced the error: The application "fpcupdeluxe-x86_64-darwin-cocoa" can't be opened From anthony at unihedron.com Mon Oct 14 16:10:50 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Mon, 14 Oct 2019 10:10:50 -0400 Subject: [Lazarus] Install Lazarus on Mac OSX Catalina In-Reply-To: <383743c6-d1e3-1281-e6e8-8f074ec9a0a7@geldenhuys.co.uk> References: <20191012140500.429b11d2@pino.pino.basement> <5C941022-5B43-445B-9DF4-27C5C4385737@gmail.com> <20191012180014.0b573705@pino.pino.basement> <20191012194237.5458fc0b@pino.pino.basement> <383743c6-d1e3-1281-e6e8-8f074ec9a0a7@geldenhuys.co.uk> Message-ID: <20191013065432.3ebe2862@pino.pino.basement> On Sun, 13 Oct 2019 07:53:05 +0100, Graeme Geldenhuys via lazarus wrote: > As Catalina doesn't have 32-bit support, I would imagine you need to > compile 64-bit FPC first, then build Lazarus with the 64-bit fpc > compiler. I think fpc on my system is already at 64-bit: fpc -iTP x86_64 fpc -iV 3.0.4 fpc -iTO darwin From sysrpl at gmail.com Tue Oct 15 01:10:14 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 14 Oct 2019 19:10:14 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer Message-ID: Testers need. I created a new installer for OSX that includes a 64-bit only Cocoa version of FPC and Lazarus. I don't have Catalina installed, so I am looking for testers and any variety of OSX. The installer is a shells script that will walk you through Xcode, Homebrew or Macports, as well as setting up the debugger. You will also be prompted for a install folder that defaults to $HOME/Development/FreePascal, but you can change the install path during installation. This setup will use configuration files inside of their own folder and will not interfere with you existing versions of Lazarus as long as you donot choose the same folder as your already existing fpc and lazarus locations. To uninstall simply delete the folder you choose for install. Download setup.sh from: https://www.getlazarus.org/download/?platform=macintosh Then ... chmod +x setup.sh ./setup.sh After installation is complete you will get convenience lazarus.app file in you install folder which can be moved anywhere including to your Applications folder. Please note, this setup program installs a 64 bit fpc and lazarus with Cocoa only. It does not install a 32 bit fpc and does not use the Carbon widgetset. -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony at unihedron.com Tue Oct 15 02:07:11 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Mon, 14 Oct 2019 20:07:11 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: Message-ID: <20191014200711.38e9f4f7@pino.pino.basement> On Mon, 14 Oct 2019 19:10:14 -0400, Anthony Walter via lazarus wrote: > Testers need. > ... > https://www.getlazarus.org/download/?platform=macintosh Thank you for making this. The script itself installed all parts without problems. I am having some difficulty with the gdb code signing: From your code signing link: https://www.getlazarus.org/setup/macintosh/ Step 6 only shows local certificates on my system. A prior step should be: - Select "Keychains: System" from the left side window Then the following line has two problems on my system: codesign -s gdb-cert /opt/local/bin/ggdb my location ios /usr/local/bin my file is gdb (not ggdb) The following line: sudo launchctl load /System/Library/LaunchDaemons/com.apple.taskgated.plist produced this error: /System/Library/LaunchDaemons/com.apple.taskgated.plist: service already loaded Then when I tried to run the example project1 in newly installed Lazarus. I got this error: The GDB command: "-exec-run" returned the error: ",msg="Unable to find Mach task port for process-id 36454: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated(8))"" From lazarus at mfriebe.de Tue Oct 15 02:09:29 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 15 Oct 2019 02:09:29 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <20191014200711.38e9f4f7@pino.pino.basement> References: <20191014200711.38e9f4f7@pino.pino.basement> Message-ID: <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> On 15/10/2019 02:07, Anthony Tekatch via lazarus wrote: > I am having some difficulty with the gdb code signing: You are aware that the IDE now supports LLDB too? https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html From sysrpl at gmail.com Tue Oct 15 02:35:42 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 14 Oct 2019 20:35:42 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> Message-ID: Martin, Yes I read the message requesting lldb testing the other day. I haven't taken the time to test it yet, but as I understand it's a great project that will hopefully allow for better debugging (such as inspecting and changing properties at runtime) but is still missing some important functionality. About code signing the gnu debugger, yes this page hopefully will help you get started, but I understand it can be a bit finicky. https://www.getlazarus.org/setup/macintosh/ Most of those steps apply, but the steps to stop the gatekeeper service and restart it may vary a bit depending on your OSX version. Additionally, there may be a more related problem for OSX Catalina users, as it now is forcing non CLI applications from sources other than the official app store to be notarized before being allowed to run. The same gatekeeper service is responsible for this on Catalina. Apparently it can take hours to generate a certificate for you program.app files, and you need to manually insert xml data into the plist data. I've read that Apple has suspended this requirement until sometime in 2020, giving developers more time to adjust, but to me it seems rather draconian. Here is a useful tip though, according to the first comment on a recent HN article you can bypass notarization checks when running your visual apps by right clicking them and selecting open the first time: https://news.ycombinator.com/item?id=21179970 If that doesn't work I've heard holding alt when left clicking your program.app will also bypass notarization checks. And finally, Ryan Joseph put together this useful information and github page related to fpc Catalina development: https://www.mail-archive.com/fpc-pascal at lists.freepascal.org/msg51807.html The short of all this information is: We need more testing. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Tue Oct 15 02:43:21 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 15 Oct 2019 02:43:21 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> Message-ID: <01e6104e-acb2-6c89-1663-c1e8df35912b@mfriebe.de> On 15/10/2019 02:35, Anthony Walter wrote: > Martin, > > Yes I read the message requesting lldb testing the other day. I > haven't taken the time to test it yet, but as I understand it's a > great project that will hopefully allow for better debugging (such as > inspecting and changing properties at runtime) but is still missing > some important functionality. > Well, yes one day.. But for today, it means you no longer need to codesign gdb. lldb comes with apples tools. (afaik). And lldb is already codesigned. The IDE combines it with fpdebug in order improves the display of watches (more pascal-ish). From sysrpl at gmail.com Tue Oct 15 02:48:46 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 14 Oct 2019 20:48:46 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> Message-ID: Also, about code signing gdb, my setup script will install it for you using either Homebrew or Macports, you get to choose. You may want to try these alternate steps and skip the debugger install steps (the script already installed it), and proceed with the code signing steps: https://gist.github.com/hlissner/898b7dfc0a3b63824a70e15cd0180154 https://www.ics.uci.edu/~pattis/common/handouts/macmingweclipse/allexperimental/mac-gdb-install.html If you used Homebrew, then this bit of code will test if the dnu debugger is properly code signed: SIGNED="$(codesign -dv /usr/local/bin/gdb 2>&1)" echo $SIGNED And on Macports use this code: SIGNED="$(codesign -dv /opt/local/bin/ggdb 2>&1)" echo $SIGNED Unsigned gnu debuggers will include this text in $SIGNED: "object is not signed" -------------- next part -------------- An HTML attachment was scrubbed... URL: From genericptr at gmail.com Tue Oct 15 03:04:44 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Mon, 14 Oct 2019 21:04:44 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: Message-ID: <8EAC5BAD-4C70-4FB8-BA87-09FFC250D888@gmail.com> > On Oct 14, 2019, at 7:10 PM, Anthony Walter via lazarus wrote: > > Testers need. > > I created a new installer for OSX that includes a 64-bit only Cocoa version of FPC and Lazarus. I don't have Catalina installed, so I am looking for testers and any variety of OSX. It worked for me (Catalina). You did a brilliant job. Just curious, why use GDB instead of LLDB? I’ve been using LLDB debugger in VSCode which works really well except for displaying strings is a mess because it shows them as arrays of chars. Anyways, it didn’t take long to crash though. :) I’m not a Lazarus user but the few times I have used it there were lots of crashes. Application Specific Information: *** Terminating app due to uncaught exception 'NSGenericException', reason: '-[NSAlert runModal] may not be invoked inside of transaction begin/commit pair, or inside of transaction commit (usually this means it was invoked inside of a view's -drawRect: method.)' abort() called terminating with uncaught exception of type NSException Application Specific Backtrace 1: 0 CoreFoundation 0x00007fff2d50ad63 __exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff633f9bd4 objc_exception_throw + 48 2 CoreFoundation 0x00007fff2d50abb9 +[NSException raise:format:] + 189 3 AppKit 0x00007fff2af0a98c _NSRunModal + 152 4 AppKit 0x00007fff2a9d2aa8 -[NSAlert runModal] + 225 5 lazarus 0x00000001062d549a COCOAINT_$$_COCOAPROMPTUSER$crcF62BAB40 + 1130 6 lazarus 0x00000001062d5640 COCOAINT$_$TCOCOAWIDGETSET_$__$$_PROMPTUSER$crc484A2DB2 + 80 7 lazarus 0x000000010625c3ed LCLINTF_$$_PROMPTUSER$crc484A2DB2 + 93 8 lazarus 0x000000010625cd09 LCLINTF_$$_PROMPTUSER$crcB76EAC20 + 185 9 lazarus 0x0000000106125ff0 FORMS$_$TAPPLICATION_$__$$_SHOWEXCEPTION$EXCEPTION + 704 10 lazarus 0x00000001065201a8 LCLEXCEPTIONSTACKTRACE$_$TEVENTCONTAINER_$__$$_HANDLEAPPLICATIONEXCEPTION$TOBJECT$EXCEPTION + 440 11 lazarus 0x0000000106124fca FORMS$_$TAPPLICATION_$__$$_HANDLEEXCEPTION$TOBJECT + 426 12 lazarus 0x00000001061256cd FORMS$_$TAPPLICATION_$__$$_RUNLOOP + 157 13 lazarus 0x00000001062ca7e8 -[TCocoaApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 14 AppKit 0x00007fff2a674fd4 -[NSApplication run] + 658 15 lazarus 0x00000001062cac13 COCOAINT$_$TCOCOAWIDGETSET_$__$$_APPRUN$TAPPLICATIONMAINLOOP + 83 16 lazarus 0x000000010612561f FORMS$_$TAPPLICATION_$__$$_RUN + 95 17 lazarus 0x00000001060b405d PASCALMAIN + 701 18 lazarus 0x00000001060d7cdc FPC_SysEntry + 12 19 libdyld.dylib 0x00007fff64758405 start + 1 Regards, Ryan Joseph From sysrpl at gmail.com Tue Oct 15 03:15:59 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 14 Oct 2019 21:15:59 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <8EAC5BAD-4C70-4FB8-BA87-09FFC250D888@gmail.com> References: <8EAC5BAD-4C70-4FB8-BA87-09FFC250D888@gmail.com> Message-ID: Ryan, To answer your question, I just haven't taken the time to try out lldb yet. I guess it can be switched to lldb in the Lazarus interface. About that crash, it probably comes from somewhere in the Cocoa widgetset, which is currently still in development. It's far along enough to enable the Lazarus IDE to run, but still has problems. Unfortunately Catalina and all OSX versions going forward are 64 bit only, and Carbon is 32 bit only, so we're all going to have to help improve the Cocoa widgetset. The means were going to need to fix errors like you posted. Hopefully we can get some patches submitted to Mantis tagged with Cocoa. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Oct 15 04:23:21 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 14 Oct 2019 22:23:21 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <8EAC5BAD-4C70-4FB8-BA87-09FFC250D888@gmail.com> Message-ID: Here is a short video where I demonstrate how to switch between the gdb and lldb inside Lazarus. I also demonstrate how to move docked windows. There is no audio, but anyone should be able to follow along. Interestingly the Cocoa widgetset throws an exception when a docked window is undocked or docked again. Would someone be kind enough to submit this issue to Mantis on my behalf? https://cache.getlazarus.org/videos/lazarus-lldb.mp4 Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Tue Oct 15 12:14:18 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 15 Oct 2019 12:14:18 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <8EAC5BAD-4C70-4FB8-BA87-09FFC250D888@gmail.com> Message-ID: <9f1e5cfa-b153-7f5a-9a5c-7071f707fef3@mfriebe.de> On 15/10/2019 04:23, Anthony Walter via lazarus wrote: > Here is a short video where I demonstrate how to switch between the > gdb and lldb inside Lazarus. > https://cache.getlazarus.org/videos/lazarus-lldb.mp4 > You can add a 2nd configuration via the toolbar. Then use the toolbar to toggle. That way you  (once the conf is added) you only need to select in the toolbars dropdown, instead of having to change 2 fields. (The toolbar is Lazarus 2.1 only) https://wiki.lazarus.freepascal.org/IDE_Window:_DebuggerClassOptionsFrame From lazarus at mfriebe.de Tue Oct 15 12:36:50 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 15 Oct 2019 12:36:50 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <9f1e5cfa-b153-7f5a-9a5c-7071f707fef3@mfriebe.de> References: <8EAC5BAD-4C70-4FB8-BA87-09FFC250D888@gmail.com> <9f1e5cfa-b153-7f5a-9a5c-7071f707fef3@mfriebe.de> Message-ID: On 15/10/2019 12:14, Martin Frb via lazarus wrote: > On 15/10/2019 04:23, Anthony Walter via lazarus wrote: >> Here is a short video where I demonstrate how to switch between the >> gdb and lldb inside Lazarus. >> https://cache.getlazarus.org/videos/lazarus-lldb.mp4 >> > You can add a 2nd configuration via the toolbar. Then use the toolbar > to toggle. That way you  (once the conf is added) you only need to > select in the toolbars dropdown, instead of having to change 2 fields. > (The toolbar is Lazarus 2.1 only) > > https://wiki.lazarus.freepascal.org/IDE_Window:_DebuggerClassOptionsFrame Also, you should NOT use the "lldb debugger (ALPHA)" There is a "LLDB debugger (with fpdebug) (beta)" which I recommend. It features watches in Pascal format. If it does not show, then install the package LazDebuggerFPlldb. Mind the FP before lldb. If you build "bigide" I would have expected it to be there by default. From anthony at unihedron.com Tue Oct 15 15:13:29 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Tue, 15 Oct 2019 09:13:29 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> Message-ID: <20191015091329.6eee6f90@pino.pino.basement> I'll test the debugger options later. I tried installing online package manager and got these errors after trying to rebuild: Compile package laz.virtualtreeview_package 5.5.3.1: Exit code 1, Errors: 1 laz.virtualtrees.pas(68,3) Fatal: Cannot find laz.FakeActiveX used by laz.VirtualTrees of package laz.virtualtreeview_package. From genericptr at gmail.com Tue Oct 15 15:53:20 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Tue, 15 Oct 2019 09:53:20 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <20191015091329.6eee6f90@pino.pino.basement> References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> <20191015091329.6eee6f90@pino.pino.basement> Message-ID: Just tried to actually compile a new project and got: Error: ld: framework not found Cocoa along with various lines like Error: :77532:10: warning: section "__datacoal_nt" is deprecated Do we need to set some additional options? Regards, Ryan Joseph From sysrpl at gmail.com Tue Oct 15 17:49:57 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 15 Oct 2019 11:49:57 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> <20191015091329.6eee6f90@pino.pino.basement> Message-ID: Note to all, the install source I posted comes from a random clone of svn trunk fpc and trunk lazarus put together from whatever was in the svn repository on Saturday. As such it might contain any number of potential bugs. That said, the reason trunk sources should be used is that the Cocoa widgetset is still in a beta state. Personally I've implemented some OSX core classes in a manner that is much more elegant manner that what's currently used in the Cocoa widgetset and if time permits I may propose some of my changes that could push Cocoa forward in a positive direction. I feel that many of the problems everyone might be experiencing is tied to the specific implementation state we currently have. This is not meant as a dig on the Cocoa LCL widgetset developers, obviously its difficult and tedious work trying to create a 100% compatible and bug free implementation and you work is very much appreciated so please keep it up! I know well get it working. On a side note, if anyone reading this message has done some work on committing widgetset code to Lazarus, either with the Gtk3 or Cocoa libraries, and would like to coordinate some of my improvements we can take this discussion to private emails or perhaps freenode irc and we can hash out merging my work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Oct 15 18:02:07 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 15 Oct 2019 12:02:07 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> <20191015091329.6eee6f90@pino.pino.basement> Message-ID: On Tue, Oct 15, 2019 at 11:50 AM Anthony Walter via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Personally I've implemented some OSX core classes in a manner that is much > more elegant manner that what's currently used in the Cocoa widgetset and > if time permits I may propose some of my changes that could push Cocoa > forward in a positive direction. > a preview or sneak peek available? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Oct 15 18:45:27 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 15 Oct 2019 12:45:27 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> <20191015091329.6eee6f90@pino.pino.basement> Message-ID: Dimitry, What I've done is created a reference counted class hierarchy to match part of the Cocoa framework. It's only partially done, but it allows Pascal code to be written to simplify interaction with native OSX frameworks and APIs like AppKit in the following ways: Using NSWindow class as an example: https://developer.apple.com/documentation/appkit/nswindow * TNSWindow mirrors NSWindow and uses an automatic reference counting scheme to automatically release objects when they are are no longer needed. * All methods and properties of NSWindow are provided by TNSWindow and there is no need to pass native objects as handles to functions. It's implicit in Self and the underlying handle is manged by TNSWindow -> TNSResponder -> TNSObject -> and ultimately TFrameworkObject. * It uses an object oriented hierarchy the same as the Apple frameworks, only translated to Pascal objects. That is you can pass a derived class to methods of other object methods which may expect any less specific class. * Other classes such as CGContext (TCGContext -> TFrameworkObject) are provided as well as other Apple frameworks classes, all translated to Pascal classes with all the same benefits as outlined above. My implementation isn't complete, which is to say I haven't wrapped every single Apple framework class in the manner described above. For the extremely limited amount of translations I did complete, I saw a big benefit in my own personal projects on OSX. Most notably the way of organizing code I outlined above allowed me to much more easily understand how to use Apple's frameworks, reduce errors with type safety and automatic object lifetime management, as well as aid in the discovery when combining Apple framework object to accomplish programming tasks. I expect if this were integrated into the Cocoa widgetset it would make development a bit easier. Certainly there is a lot of work involved in defining every Apple framework object in this way, but it provides a certain level of organization and usability that I at least feel makes a big difference when working with native Apple APIs. -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Oct 15 18:50:44 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 15 Oct 2019 12:50:44 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> <20191015091329.6eee6f90@pino.pino.basement> Message-ID: I see. Thanks for the insight On Tuesday, October 15, 2019, Anthony Walter via lazarus < lazarus at lists.lazarus-ide.org> wrote: > What I've done is created a reference counted class hierarchy to match > part of the Cocoa framework. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Oct 15 19:06:51 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 15 Oct 2019 13:06:51 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> <20191015091329.6eee6f90@pino.pino.basement> Message-ID: I have to search my backup drives for some of this code, but I believe I also added a few extra classes to simplify some of the weirdness of Apple's classes. For example I greatly simplified the steps needed to work with CGContext and CGBitmapContextCreate such that it was completely transparent. A TCGBitmap class was defined (not in the framework, but wrapping CGBitmapContextCreate), and it would be compatible with TCGContext, but adding methods for loading, saving, blitting ect. Also some types have been simplified, NSString becomes regular pascal string, NSRect/CGRect becomes TRectF, and so on. Obviously defining all these types is definitely a lot of work, but to reiterate it does aid in type safety, object management, and discovery (how to combine the use the Framework objects with each other). One approach to tackling all this work, if anyone decides it's beneficial, might be to add it in gradually for what is needed, which is how I am using it right now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Oct 15 19:13:58 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 15 Oct 2019 13:13:58 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> <20191015091329.6eee6f90@pino.pino.basement> Message-ID: On Tue, Oct 15, 2019 at 1:07 PM Anthony Walter via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I have to search my backup drives for some of this code, but I believe I > also added a few extra classes to simplify some of the weirdness of Apple's > classes. > No need (to do it right now). I was wondering about the approach in general. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Wed Oct 16 12:31:14 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 16 Oct 2019 13:31:14 +0300 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 In-Reply-To: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> References: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> Message-ID: On Sun, Oct 13, 2019 at 4:10 PM Luca Olivetti via lazarus wrote: > In my copy of lazarus 2.0.4 I have the fix for bug > https://bugs.freepascal.org/view.php?id=35716 I added it to the list to be merged for 2.0.6. > and the patch for the still opened > https://bugs.freepascal.org/view.php?id=35715 Unfortunately Jesus has not applied the patch or otherwise solved the issue. You write "I'm not sure it's the best solution", I guess it is a difficult case. > Also, I don't know if this will be in 2.0.6 (I need it since the bugs in > fpc 3.0.4 affect my projects, so I have to use fixes_3_2): Your diff for VirtualTreeView replaces Move with System.Move. Why? Is there another Move in FPC 3.2 sources that would be called otherwise? Is your diff already applied somewhere or is it a patch uploaded into some bug report? Regards, Juha From luca at wetron.es Wed Oct 16 12:50:22 2019 From: luca at wetron.es (Luca Olivetti) Date: Wed, 16 Oct 2019 12:50:22 +0200 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 In-Reply-To: References: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> Message-ID: El 16/10/19 a les 12:31, Juha Manninen via lazarus ha escrit: > On Sun, Oct 13, 2019 at 4:10 PM Luca Olivetti via lazarus > wrote: >> In my copy of lazarus 2.0.4 I have the fix for bug >> https://bugs.freepascal.org/view.php?id=35716 > > I added it to the list to be merged for 2.0.6. > >> and the patch for the still opened >> https://bugs.freepascal.org/view.php?id=35715 > > Unfortunately Jesus has not applied the patch or otherwise solved the > issue. You write "I'm not sure it's the best solution", I guess it is > a difficult case. "I'm not sure it's the best solution" because the grid is a complex beast and maybe Jesus has a better one. > >> Also, I don't know if this will be in 2.0.6 (I need it since the bugs in >> fpc 3.0.4 affect my projects, so I have to use fixes_3_2): > > Your diff for VirtualTreeView replaces Move with System.Move. Why? Is > there another Move in FPC 3.2 sources that would be called otherwise? 3.2 added a new method Move to TCollection, hence the need to qualify the call > Is your diff already applied somewhere or is it a patch uploaded into > some bug report? In lazarus trunk it's already changed https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/virtualtreeview/laz.virtualtrees.pas?root=lazarus&r1=60642&r2=60784 however lazarus trunk also changed the name of the component and the corresponding units https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/virtualtreeview/laz.virtualtrees.pas?root=lazarus&r1=60024&r2=60132 Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From werner.pamler at freenet.de Wed Oct 16 15:39:01 2019 From: werner.pamler at freenet.de (Werner Pamler) Date: Wed, 16 Oct 2019 15:39:01 +0200 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 In-Reply-To: References: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> Message-ID: <6bb09579-82aa-f02b-38b7-1a30115dc6b8@freenet.de> Am 16.10.2019 um 12:31 schrieb Juha Manninen via lazarus: > > Your diff for VirtualTreeView replaces Move with System.Move. Why? Is > there another Move in FPC 3.2 sources that would be called otherwise? > Is your diff already applied somewhere or is it a patch uploaded into > some bug report? I don't know what you are referring to, here. In r61814 I had added the "System" namespace here in VTV because fpc 3.2+ has a Move method in TCollection which conflicts with the old code. From juha.manninen62 at gmail.com Wed Oct 16 16:52:04 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 16 Oct 2019 17:52:04 +0300 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 In-Reply-To: <6bb09579-82aa-f02b-38b7-1a30115dc6b8@freenet.de> References: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> <6bb09579-82aa-f02b-38b7-1a30115dc6b8@freenet.de> Message-ID: On Wed, Oct 16, 2019 at 4:41 PM Werner Pamler via lazarus wrote: > I don't know what you are referring to, here. In r61814 I had added the > "System" namespace here in VTV because fpc 3.2+ has a Move method in > TCollection which conflicts with the old code. r61814 in fixes branch seems to a merge from Michael's r60784 in trunk. Your big rename commit r60132 in trunk would be useful, too, but I guess difficult to merge. Juha From luca at wetron.es Wed Oct 16 17:10:55 2019 From: luca at wetron.es (Luca Olivetti) Date: Wed, 16 Oct 2019 17:10:55 +0200 Subject: [Lazarus] DBNavigator: why is the refresh button enabled only if the dataset is modifiable? Message-ID: <2fd3abcf-9aab-680d-c2f1-2948c5153fc8@wetron.es> In lcl/include/dbcustomnavigator.inc, method TDBCustomNavigator.EditingChanged CanModify:=Enabled and FDataLink.Active and FDataLink.DataSet.CanModify; ... Buttons[nbRefresh].Enabled:=CanModify; Why? I mean, I have a read only query (specifically a TZReadOnlyQuery) since I only want to show the data, but another application can change it, hence a refresh could be needed. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From werner.pamler at freenet.de Wed Oct 16 18:15:06 2019 From: werner.pamler at freenet.de (Werner Pamler) Date: Wed, 16 Oct 2019 18:15:06 +0200 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 In-Reply-To: References: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> <6bb09579-82aa-f02b-38b7-1a30115dc6b8@freenet.de> Message-ID: <1bb3293f-42b4-3e04-f98e-d70c859815d0@freenet.de> Am 16.10.2019 um 16:52 schrieb Juha Manninen via lazarus: > On Wed, Oct 16, 2019 at 4:41 PM Werner Pamler via lazarus > wrote: >> I don't know what you are referring to, here. In r61814 I had added the >> "System" namespace here in VTV because fpc 3.2+ has a Move method in >> TCollection which conflicts with the old code. > r61814 in fixes branch seems to a merge from Michael's r60784 in trunk. > Your big rename commit r60132 in trunk would be useful, too, but I > guess difficult to merge. Hmmh - I never thought about this, I always thought this is a "new feature" and should stay in trunk. ATM, I cannot focus on merging VTV to fixes. It isn't a show-stopper, isn't it? From ganmax at narod.ru Wed Oct 16 19:34:54 2019 From: ganmax at narod.ru (Maxim Ganetsky) Date: Wed, 16 Oct 2019 20:34:54 +0300 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 In-Reply-To: <1bb3293f-42b4-3e04-f98e-d70c859815d0@freenet.de> References: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> <6bb09579-82aa-f02b-38b7-1a30115dc6b8@freenet.de> <1bb3293f-42b4-3e04-f98e-d70c859815d0@freenet.de> Message-ID: <1e0084c4-6b56-a44b-2616-3289d742499a@narod.ru> 16.10.2019 19:15, Werner Pamler via lazarus пишет: > Am 16.10.2019 um 16:52 schrieb Juha Manninen via lazarus: >> On Wed, Oct 16, 2019 at 4:41 PM Werner Pamler via lazarus >> wrote: >>> I don't know what you are referring to, here. In r61814 I had added the >>> "System" namespace here in VTV because fpc 3.2+ has a Move method in >>> TCollection which conflicts with the old code. >> r61814 in fixes branch seems to a merge from Michael's r60784 in trunk. >> Your big rename commit r60132 in trunk would be useful, too, but I >> guess difficult to merge. > > > Hmmh - I never thought about this, I always thought this is a "new > feature" and should stay in trunk. ATM, I cannot focus on merging VTV to > fixes. It isn't a show-stopper, isn't it? This should NOT be merged, because it introduced dotted unit names into the wild and required major changes to translation system. -- Best regards, Maxim Ganetsky mailto:ganmax at narod.ru From juha.manninen62 at gmail.com Wed Oct 16 19:39:42 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 16 Oct 2019 20:39:42 +0300 Subject: [Lazarus] [Lazarusdev] RFC --- We are planning the next release: Lazarus 2.0.6 In-Reply-To: <1bb3293f-42b4-3e04-f98e-d70c859815d0@freenet.de> References: <00e6927d-0ac6-031d-9b2e-e10e639165cf@wetron.es> <6bb09579-82aa-f02b-38b7-1a30115dc6b8@freenet.de> <1bb3293f-42b4-3e04-f98e-d70c859815d0@freenet.de> Message-ID: On Wed, Oct 16, 2019 at 7:18 PM Werner Pamler via lazarus wrote: > Hmmh - I never thought about this, I always thought this is a "new > feature" and should stay in trunk. ATM, I cannot focus on merging VTV to > fixes. It isn't a show-stopper, isn't it? Not a show-stopper. If I remember right, it may prevent installing many versions of VTV simultaneously but there are ways around it. The System.Move change was not a show-stopper either because Lazarus 2.0.6 will be released with FPC 3.0.4, but it is convenient anyway for people who want to use a different compiler. Juha From juha.manninen62 at gmail.com Wed Oct 16 19:49:44 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 16 Oct 2019 20:49:44 +0300 Subject: [Lazarus] DBNavigator: why is the refresh button enabled only if the dataset is modifiable? In-Reply-To: <2fd3abcf-9aab-680d-c2f1-2948c5153fc8@wetron.es> References: <2fd3abcf-9aab-680d-c2f1-2948c5153fc8@wetron.es> Message-ID: On Wed, Oct 16, 2019 at 6:11 PM Luca Olivetti via lazarus wrote: > In lcl/include/dbcustomnavigator.inc, method > TDBCustomNavigator.EditingChanged > > CanModify:=Enabled and FDataLink.Active and FDataLink.DataSet.CanModify; > ... > Buttons[nbRefresh].Enabled:=CanModify; I don't know DBNavigator well. It has 2 sets of buttons, the "Buttons" and then "FocusableButtons". What are those? The same TDBCustomNavigator.EditingChanged method also has: FocusableButtons[nbRefresh].Enabled:=Enabled and FDataLink.Active and not FDataLink.Editing; Maybe the same conditions would apply to Buttons[nbRefresh] as well. Juha From luca at wetron.es Wed Oct 16 21:24:02 2019 From: luca at wetron.es (Luca Olivetti) Date: Wed, 16 Oct 2019 21:24:02 +0200 Subject: [Lazarus] DBNavigator: why is the refresh button enabled only if the dataset is modifiable? In-Reply-To: References: <2fd3abcf-9aab-680d-c2f1-2948c5153fc8@wetron.es> Message-ID: El 16/10/19 a les 19:49, Juha Manninen via lazarus ha escrit: > On Wed, Oct 16, 2019 at 6:11 PM Luca Olivetti via lazarus > wrote: >> In lcl/include/dbcustomnavigator.inc, method >> TDBCustomNavigator.EditingChanged >> >> CanModify:=Enabled and FDataLink.Active and FDataLink.DataSet.CanModify; >> ... >> Buttons[nbRefresh].Enabled:=CanModify; > > I don't know DBNavigator well. It has 2 sets of buttons, the "Buttons" > and then "FocusableButtons". What are those? > The same TDBCustomNavigator.EditingChanged method also has: > FocusableButtons[nbRefresh].Enabled:=Enabled and FDataLink.Active > and not FDataLink.Editing; > Maybe the same conditions would apply to Buttons[nbRefresh] as well. I don't know either, I just find it strange that the refresh button is disabled when it's most needed. And even stranger that I didn't notice until today ;-) Or maybe I did and forgot about it :-D Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From l at c-m-w.me.uk Wed Oct 16 22:33:18 2019 From: l at c-m-w.me.uk (C Western) Date: Wed, 16 Oct 2019 21:33:18 +0100 Subject: [Lazarus] Showing selection on drawing under Cocoa Message-ID: <275deae4-7d71-5b51-15a7-3556f654b42d@c-m-w.me.uk> Is there an easy way of indicating a selection on a plot in Cocoa? I have a plot that is relatively time consuming to plot (particularly under Cocoa), and I want to be able to indicate the area selected with a mouse. On other widget sets I can xor a rectangle and do this quickly in the mouse event handler, but this is not possible under Cocoa because you can only plot during a paint event, so I have to invalidate the selected area and redraw the entire plot just to show a selection. Am I missing something? How does the Cocoa toolkit expect this to be done? Colin From skalogryz.lists at gmail.com Thu Oct 17 04:44:26 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Wed, 16 Oct 2019 22:44:26 -0400 Subject: [Lazarus] Showing selection on drawing under Cocoa In-Reply-To: <275deae4-7d71-5b51-15a7-3556f654b42d@c-m-w.me.uk> References: <275deae4-7d71-5b51-15a7-3556f654b42d@c-m-w.me.uk> Message-ID: On Wed, Oct 16, 2019 at 4:33 PM C Western via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Am I missing something? How does the Cocoa toolkit expect this to be done? > I'm see 3 ways of doing that. 1) you just invalidate the needed rectangle lines (or the entire selected area) and do xor drawing on paint event. 2) you might want to try to play with "focusRing" settings of NSView. That requires Cocoa level access to the view. Not cross platform, obviously. 3) instead of drawing into the view itself, you might want to create a semi-transparent window or a control, to be at the top of the hierarchy. and draw a focus as an overlay. Obviously you want this window or control to ignore any keyboard or mouse events (not to interfere with underlying controls). The solution can be cross platform. Approach #1 seems to be the easiest at this point. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From l at c-m-w.me.uk Thu Oct 17 09:09:30 2019 From: l at c-m-w.me.uk (C Western) Date: Thu, 17 Oct 2019 08:09:30 +0100 Subject: [Lazarus] Showing selection on drawing under Cocoa In-Reply-To: References: <275deae4-7d71-5b51-15a7-3556f654b42d@c-m-w.me.uk> Message-ID: On 17/10/2019 03:44, Dmitry Boyarintsev via lazarus wrote: > On Wed, Oct 16, 2019 at 4:33 PM C Western via lazarus > > > wrote: > > Am I missing something? How does the Cocoa toolkit expect this to > be done? > > I'm see 3 ways of doing that. > 1) you just invalidate the needed rectangle lines (or the entire > selected area) and do xor drawing  on paint event. I hadn't thought of that possibility at all - thank you! (It obviously requires some work on the paint handler, but this is likely to be the most straightforward.) Colin From dan2329s at gmail.com Fri Oct 18 20:59:57 2019 From: dan2329s at gmail.com (Dan Star) Date: Fri, 18 Oct 2019 13:59:57 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer Message-ID: An HTML attachment was scrubbed... URL: From dan2329s at gmail.com Fri Oct 18 21:16:31 2019 From: dan2329s at gmail.com (Dan Star) Date: Fri, 18 Oct 2019 14:16:31 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer Message-ID: <42af8c03-d5b6-8aad-41e6-913b84a07d9c@gmail.com> An HTML attachment was scrubbed... URL: From genericptr at gmail.com Fri Oct 18 22:12:23 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Fri, 18 Oct 2019 16:12:23 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <42af8c03-d5b6-8aad-41e6-913b84a07d9c@gmail.com> References: <42af8c03-d5b6-8aad-41e6-913b84a07d9c@gmail.com> Message-ID: <70F8C4AC-03CC-4AB9-B5F9-6B4DEC0B9EAE@gmail.com> > On Oct 18, 2019, at 3:16 PM, Dan Star via lazarus wrote: > > On Mojave 10.14.6 I received Framework Not Found with a Linking Error. Is this due to difference between where Majave and Catalina locate Cocoa? I never could figure it out so I gave up. Maybe there were conflicts with config files from other Lazarus installations. Regards, Ryan Joseph From sysrpl at gmail.com Sat Oct 19 04:01:57 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 18 Oct 2019 22:01:57 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <70F8C4AC-03CC-4AB9-B5F9-6B4DEC0B9EAE@gmail.com> References: <42af8c03-d5b6-8aad-41e6-913b84a07d9c@gmail.com> <70F8C4AC-03CC-4AB9-B5F9-6B4DEC0B9EAE@gmail.com> Message-ID: Ryan, Regarding config files, the lazarus.app file is configured to get and set all configuration data from the install/lazarurs/config folder. There should be no conflicts with other existing installations. Regarding lazarus 2.2, yes there is a typo in the installer. The lazarus version is 2.1. -------------- next part -------------- An HTML attachment was scrubbed... URL: From l at c-m-w.me.uk Sat Oct 19 13:04:10 2019 From: l at c-m-w.me.uk (C Western) Date: Sat, 19 Oct 2019 12:04:10 +0100 Subject: [Lazarus] Showing selection on drawing under Cocoa In-Reply-To: References: <275deae4-7d71-5b51-15a7-3556f654b42d@c-m-w.me.uk> Message-ID: <301b333c-a48d-5cb0-ba0f-4de60c071a92@c-m-w.me.uk> On 17/10/2019 08:09, C Western via lazarus wrote: > On 17/10/2019 03:44, Dmitry Boyarintsev via lazarus wrote: >> On Wed, Oct 16, 2019 at 4:33 PM C Western via lazarus >> > > wrote: >> >>     Am I missing something? How does the Cocoa toolkit expect this to >>     be done? >> >> I'm see 3 ways of doing that. >> 1) you just invalidate the needed rectangle lines (or the entire >> selected area) and do xor drawing  on paint event. > > I hadn't thought of that possibility at all - thank you! (It obviously > requires some work on the paint handler, but this is likely to be the > most straightforward.) > > Sadly this doesn't work on Cocoa; it works fine under windows, but for Cocoa (and all the other widgetsets I tried) calling invalidate erases the contents of the rectangle, and I couldn't find any way to turn off this behavior. Unless this is possible, I will have to try a transparent window. Colin From tobiasgiesen at gmail.com Mon Oct 21 01:07:15 2019 From: tobiasgiesen at gmail.com (tobiasgiesen at gmail.com) Date: Mon, 21 Oct 2019 01:07:15 +0200 Subject: [Lazarus] Announcing TGPuttyLib, a dynamic link library for SFTP clients Message-ID: <20191021010714.A3D0.B7062D51@tgtools.de> Hello, I would like to announce my new PuTTY fork, which gives Lazarus (or FreePascal, and also Delphi) developers a new SFTP Client class. For some reason, the PuTTY code seems to be able to achieve the fastest SFTP transfer rates, and now finally we can have them too (over 100MB/sec). It's free and open source. You can get more info and download it, along with demos, from my web site syncovery.com/tgputtylib Feedback, requests and contributions are welcome. Cheers, Tobias From luca at wetron.es Mon Oct 21 12:18:27 2019 From: luca at wetron.es (Luca Olivetti) Date: Mon, 21 Oct 2019 12:18:27 +0200 Subject: [Lazarus] Feedback about GDB on Windows In-Reply-To: <919cee39-ae54-a997-92eb-3e5802145611@mfriebe.de> References: <919cee39-ae54-a997-92eb-3e5802145611@mfriebe.de> Message-ID: <1b538434-842e-f5a7-940e-ef173a4800a0@wetron.es> El 13/10/19 a les 18:01, Martin Frb via lazarus ha escrit: > Testing with Stabs (fpc -g or -gs  / the default for 32 bit) is pointless. It's the only format that shows the content of a record, e.g. var f:textfile stabs (-g) -> f = record TEXt { HANDLE = 450900519, MODE = 55217 , ...... dwarf with sets (-gw -godwarfsets) -> f = record TEXT {} dwarf2 (-gw2) -> f = record TEXT {} dwarf3 (-gw3) -> no symbol F in current context This is with the default gdb, with 8.2 it only changes the output of gw3 () Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From tc at epidata.info Tue Oct 22 19:53:22 2019 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Tue, 22 Oct 2019 19:53:22 +0200 Subject: [Lazarus] Convert LFM to pure code Message-ID: <4b9c9052-3b31-a432-bf53-35843989bebd@epidata.info> Hi all. Is there a simple tool, plugins, or similar that allows me to easily convert a .lfm file into pure pascal code? I know the lfm format is somewhat similar to pascal, but if such a thing already exist I would make my life a little easier :) /Torsten From nc-gaertnma at netcologne.de Tue Oct 22 21:21:48 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 22 Oct 2019 21:21:48 +0200 Subject: [Lazarus] Convert LFM to pure code In-Reply-To: <4b9c9052-3b31-a432-bf53-35843989bebd@epidata.info> References: <4b9c9052-3b31-a432-bf53-35843989bebd@epidata.info> Message-ID: <20191022212148.158e5d91@limapholos.matflo.wg> On Tue, 22 Oct 2019 19:53:22 +0200 Torsten Bonde Christiansen via lazarus wrote: > Hi all. > > Is there a simple tool, plugins, or similar that allows me to easily > convert a .lfm file into pure pascal code? > > I know the lfm format is somewhat similar to pascal, but if such a > thing already exist I would make my life a little easier :) If the form is loaded in the IDE, there is an addon to store it as Pascal code. See example lazarus/examples/pascalstream/CopyAsPasPkg/copyformaspascaldemopkg.lpk Mattias From tc at epidata.info Tue Oct 22 21:22:36 2019 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Tue, 22 Oct 2019 21:22:36 +0200 Subject: [Lazarus] Convert LFM to pure code In-Reply-To: <20191022212148.158e5d91@limapholos.matflo.wg> References: <4b9c9052-3b31-a432-bf53-35843989bebd@epidata.info> <20191022212148.158e5d91@limapholos.matflo.wg> Message-ID: Great, thanks! -Torsten On 22/10/2019 21.21, Mattias Gaertner via lazarus wrote: > On Tue, 22 Oct 2019 19:53:22 +0200 > Torsten Bonde Christiansen via lazarus > wrote: > >> Hi all. >> >> Is there a simple tool, plugins, or similar that allows me to easily >> convert a .lfm file into pure pascal code? >> >> I know the lfm format is somewhat similar to pascal, but if such a >> thing already exist I would make my life a little easier :) > If the form is loaded in the IDE, there is an addon to store it > as Pascal code. > See example > lazarus/examples/pascalstream/CopyAsPasPkg/copyformaspascaldemopkg.lpk > > Mattias From dan2329s at gmail.com Wed Oct 23 15:37:56 2019 From: dan2329s at gmail.com (Dan Star) Date: Wed, 23 Oct 2019 08:37:56 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer Message-ID: <24fa3906-4b96-21a9-fecf-8819b01a74c5@gmail.com> Had to install MacPorts manually on my Catalina Mac.  Used LLVM Lazarus 2.1 installed and runs OK.   Note that GDB Debugger I cannot get to work with Cocoa. Dan From lazarus at mfriebe.de Wed Oct 23 16:33:48 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 23 Oct 2019 16:33:48 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <24fa3906-4b96-21a9-fecf-8819b01a74c5@gmail.com> References: <24fa3906-4b96-21a9-fecf-8819b01a74c5@gmail.com> Message-ID: <0209bc63-04f4-37c5-9ab3-75e9ce5e5a9e@mfriebe.de> On 23/10/19 15:37, Dan Star via lazarus wrote: > Had to install MacPorts manually on my Catalina Mac.  Used LLVM > Lazarus 2.1 installed and runs OK.   Note that GDB Debugger I cannot > get to work with Cocoa. > > Dan You do not need the gdb debugger. just switch to "lldb (with fpdebug)" search the forum announcement board From dan2329s at gmail.com Wed Oct 23 18:25:13 2019 From: dan2329s at gmail.com (Dan Star) Date: Wed, 23 Oct 2019 11:25:13 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer Message-ID: >On 23/10/19 15:37, Dan Star via lazarus wrote: >/> Had to install MacPorts manually on my Catalina Mac.  Used LLVM />/> Lazarus 2.1 installed and runs OK.   Note that GDB Debugger I cannot />/> get to work with Cocoa. />>//>/> Dan /> >You do not need the gdb debugger. just switch to "lldb (with fpdebug)" > I do not know where to down the fpdebug package so it shows in the Debugger Window for picking. It is not listed there (script didn't install it). Please advise. Thanks. From lazarus at mfriebe.de Wed Oct 23 19:16:18 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 23 Oct 2019 19:16:18 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: Message-ID: <7c3e281e-7088-ba13-90d5-9c2845f400fb@mfriebe.de> On 23/10/19 18:25, Dan Star via lazarus wrote: >> On 23/10/19 15:37, Dan Star via lazarus wrote: >> /> Had to install MacPorts manually on my Catalina Mac.  Used LLVM >> />/> Lazarus 2.1 installed and runs OK.   Note that GDB Debugger I >> cannot />/> get to work with Cocoa. />>//>/> Dan /> >> You do not need the gdb debugger. just switch to "lldb (with fpdebug)" >> > > I do not know where to down the fpdebug package so it shows in the > Debugger Window for picking.   It is not listed there (script didn't > install it).  Please advise.  Thanks. > It is included in Lazarus, but may need to be added as package. Menu Package > Install Packages There should be LazDebuggerFPLldb  (ensure FP in the name). Then rebuild If you cant find it, the package is in components/lazdebuggers/lazdebuggerfplldb Then go to Tools > Options under debugger > debugger backend you can change the settings. Instead of gdb, choose usr/bin/lldb (or whatever path lldb has) lldb comes with the apple tools https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html From dan2329s at gmail.com Thu Oct 24 22:36:54 2019 From: dan2329s at gmail.com (Dan Star) Date: Thu, 24 Oct 2019 15:36:54 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer Message-ID: <6743bfcd-3043-1284-d52e-1d0356634438@gmail.com> On my other Catalina Mac I cannot install LLDB FPDebug.  I get the following error when I rebuild the IDE with fpdebug and laz...fplldb packages: Build IDE: Exit code 2, Errors: 3 Error: ld: framework not found Cocoa make[2]: *** [lazarus] Error 1 make[1]: *** [idepkg] Error 2 Error: make: *** [idepkg] Error 2 An error occurred while linking Error: Error while linking Xcode 11.1 is installed so I assume the Cocoa Framework (only needed for programming or for Macos too?) is installed too.   Please advise. From lazarus at mfriebe.de Fri Oct 25 03:24:40 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 25 Oct 2019 03:24:40 +0200 Subject: [Lazarus] debug "textfile" [[was: Re: Feedback about GDB on Windows]] In-Reply-To: <1b538434-842e-f5a7-940e-ef173a4800a0@wetron.es> References: <919cee39-ae54-a997-92eb-3e5802145611@mfriebe.de> <1b538434-842e-f5a7-940e-ef173a4800a0@wetron.es> Message-ID: On 21/10/2019 12:18, Luca Olivetti via lazarus wrote: >> Testing with Stabs (fpc -g or -gs  / the default for 32 bit) is >> pointless. > It's the only format that shows the content of a record, e.g. > > var f:textfile > > stabs (-g) -> f = record TEXt { HANDLE = 450900519, MODE = 55217 , ...... > dwarf with sets (-gw -godwarfsets) -> f = record TEXT {} > dwarf2 (-gw2) -> f = record TEXT {} > Interesting. I have a feeling that is intention (by the compiler). But you may want to discuss this on the fpc list. From luca at wetron.es Fri Oct 25 08:42:01 2019 From: luca at wetron.es (Luca Olivetti) Date: Fri, 25 Oct 2019 08:42:01 +0200 Subject: [Lazarus] debug "textfile" [[was: Re: Feedback about GDB on Windows]] In-Reply-To: References: <919cee39-ae54-a997-92eb-3e5802145611@mfriebe.de> <1b538434-842e-f5a7-940e-ef173a4800a0@wetron.es> Message-ID: <8b10333a-9bc1-2c56-b0f9-1a6e6a326225@wetron.es> El 25/10/19 a les 3:24, Martin Frb via lazarus ha escrit: > On 21/10/2019 12:18, Luca Olivetti via lazarus wrote: >>> Testing with Stabs (fpc -g or -gs  / the default for 32 bit) is >>> pointless. >> It's the only format that shows the content of a record, e.g. >> >> var f:textfile >> >> stabs (-g) -> f = record TEXt { HANDLE = 450900519, MODE = 55217 , ...... >> dwarf with sets (-gw -godwarfsets) -> f = record TEXT {} >> dwarf2 (-gw2) -> f = record TEXT {} >> > > Interesting. > I have a feeling that is intention (by the compiler). But you may want > to discuss this on the fpc list. I just wanted to know why you said using stabs is pointless. A while ago I tried dwarf but then I switched back to stabs. I don't think I did it only because of the records but my memory is failing me :-( Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From lazarus at mfriebe.de Fri Oct 25 12:07:55 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 25 Oct 2019 12:07:55 +0200 Subject: [Lazarus] debug "textfile" [[was: Re: Feedback about GDB on Windows]] In-Reply-To: <8b10333a-9bc1-2c56-b0f9-1a6e6a326225@wetron.es> References: <919cee39-ae54-a997-92eb-3e5802145611@mfriebe.de> <1b538434-842e-f5a7-940e-ef173a4800a0@wetron.es> <8b10333a-9bc1-2c56-b0f9-1a6e6a326225@wetron.es> Message-ID: <0d03b16a-3af6-9eea-9b56-2d1034f457c6@mfriebe.de> On 25/10/2019 08:42, Luca Olivetti via lazarus wrote: > I just wanted to know why you said using stabs is pointless. > A while ago I tried dwarf but then I switched back to stabs. I don't > think I did it only because of the records but my memory is failing me > :-( Actually it seems to have (mostly) been based on incorrect memory. - Just looked through my testcase, and there are actually less special cases for stabs, than I remembered.  (And most of them are not important) - There is (while properties do not work): "property Foo read FFoo" direct field access is encoded as field, but afaik only in dwarf. What does really not work, according to a quick test (gdb 8.3 / 32 bit win) are sets. They show an integer value. Otherwise it seems most things are worked around https://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Stabs_.28only_GDB.29 I do however remember the opposite experience that you have. I know that every now and then I was unable to inspect some data, because I accidentally had my settings on stabs. But I do not recall what data that was. Quite possible the need to see the content of a set (in human readable form). Note that "dwarf"  here means "dwarf 2 with sets". Dwarf without sets => no reason to use / dwarf3 with gdb => not stable. From dan2329s at gmail.com Fri Oct 25 15:25:53 2019 From: dan2329s at gmail.com (Dan Star) Date: Fri, 25 Oct 2019 08:25:53 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer Message-ID: >On my other Catalina Mac I cannot install LLDB FPDebug.  I get the >following error when I rebuild the IDE with fpdebug and laz...fplldb >packages: > > Build IDE: Exit code 2, Errors: 3 > Error: ld: framework not found Cocoa > make[2]: *** [lazarus] Error 1 > make[1]: *** [idepkg] Error 2 > Error: make: *** [idepkg] Error 2 > An error occurred while linking > Error: Error while linking > >code 11.1 is installed so I assume the Cocoa Framework (only needed for >Programming or for Macos too?) is installed too.   Please advise. I should add that this Mac OS system had a previous 32 bit version of Laz on it that I removed. The Mac OS system Laz 64 runs fine on never had Laz 32 installed. So was a legacy config left behind from Laz 32 that is mucking things up? From lazarus at mfriebe.de Fri Oct 25 15:34:57 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 25 Oct 2019 15:34:57 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: Message-ID: On 25/10/2019 15:25, Dan Star via lazarus wrote: >> On my other Catalina Mac I cannot install LLDB FPDebug.  I get the >> following error when I rebuild the IDE with fpdebug and laz...fplldb >> packages: >> >>    Build IDE: Exit code 2, Errors: 3 >>    Error: ld: framework not found Cocoa >>    make[2]: *** [lazarus] Error 1 >>    make[1]: *** [idepkg] Error 2 >>    Error: make: *** [idepkg] Error 2 >>    An error occurred while linking >>    Error: Error while linking >> >> code 11.1 is installed so I assume the Cocoa Framework (only needed >> for Programming or for Macos too?) is installed too. Please advise. > > I should add that this Mac OS system had a previous 32 bit version of > Laz on it that I removed.  The Mac OS system Laz 64 runs fine on never > had Laz 32 installed. So was a legacy config left behind from Laz 32 > that is mucking things up? > Unfortunately I don't have to much experience in the Mac related build process. So someone else will need to answer this. I can't think how the fpdebug/lazdebugfp package causes this. Can you rebuild the IDE, if you install other packages? Also do you build from within the IDE, or call make? You may be accidentally building for 32bit. And cocoa does not exist for 32bit. From dan2329s at gmail.com Fri Oct 25 16:54:07 2019 From: dan2329s at gmail.com (Dan Star) Date: Fri, 25 Oct 2019 09:54:07 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: Message-ID: On 10/25/19 8:34 AM, Martin Frb via lazarus wrote: > On 25/10/2019 15:25, Dan Star via lazarus wrote: >>> On my other Catalina Mac I cannot install LLDB FPDebug.  I get the >>> following error when I rebuild the IDE with fpdebug and laz...fplldb >>> packages: >>> >>>    Build IDE: Exit code 2, Errors: 3 >>>    Error: ld: framework not found Cocoa >>>    make[2]: *** [lazarus] Error 1 >>>    make[1]: *** [idepkg] Error 2 >>>    Error: make: *** [idepkg] Error 2 >>>    An error occurred while linking >>>    Error: Error while linking >>> >>> code 11.1 is installed so I assume the Cocoa Framework (only needed >>> for Programming or for Macos too?) is installed too. Please advise. >> >> I should add that this Mac OS system had a previous 32 bit version of >> Laz on it that I removed.  The Mac OS system Laz 64 runs fine on >> never had Laz 32 installed. So was a legacy config left behind from >> Laz 32 that is mucking things up? >> > Unfortunately I don't have to much experience in the Mac related build > process. So someone else will need to answer this. > > I can't think how the fpdebug/lazdebugfp package causes this. Can you > rebuild the IDE, if you install other packages? > > Also do you build from within the IDE, or call make? You may be > accidentally building for 32bit. And cocoa does not exist for 32bit. The 'Build Lazarus" Information window appears OK for Cocoa but just guessing; there is no way to copy this information to the clipboard nor can I find a config file with it.   I looked in ~/tmp and see no build log for today after trying to build again.  Where is the build log file located?   I am building from withing Laz 2.1 MacOS. If I remove those 2 packages and try to build vanilla Laz MacOS 64 I get the same errors so looks like a configuration problem caused by having had Laz 32 installed previously. From lazarus at mfriebe.de Fri Oct 25 17:06:56 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 25 Oct 2019 17:06:56 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: Message-ID: On 25/10/2019 16:54, Dan Star via lazarus wrote: > > If I remove those 2 packages and try to build vanilla Laz MacOS 64 I > get the same errors so looks like a configuration problem caused by > having had Laz 32 installed previously. Maybe go to "configure build lazarus" and choose target cpu (and target OS) From skalogryz.lists at gmail.com Fri Oct 25 17:08:55 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Fri, 25 Oct 2019 11:08:55 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: Message-ID: On Fri, Oct 25, 2019 at 10:54 AM Dan Star via lazarus < lazarus at lists.lazarus-ide.org> wrote: > The 'Build Lazarus" Information window appears OK for Cocoa but just > guessing; there is no way to copy this information to the clipboard nor > can I find a config file with it. > Try to build IDE from command-line, instead -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan2329s at gmail.com Fri Oct 25 17:12:21 2019 From: dan2329s at gmail.com (Dan Star) Date: Fri, 25 Oct 2019 10:12:21 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: Message-ID: <7c6f7f2d-8836-2c95-8330-2d1afc2b5e5c@gmail.com> On 10/25/19 10:06 AM, Martin Frb via lazarus wrote: > On 25/10/2019 16:54, Dan Star via lazarus wrote: >> >> If I remove those 2 packages and try to build vanilla Laz MacOS 64 I >> get the same errors so looks like a configuration problem caused by >> having had Laz 32 installed previously. > Maybe go to "configure build lazarus" and choose target cpu (and > target OS) I tried that initially using MacOS and x86-64 but Laz wouldn't build if I spec'd that stating /Compiler "/Users/Dan/Development/FreePascal/fpc/bin/x86-64-darwin/fpc.sh" does not support target x86-64-macos./ From skalogryz.lists at gmail.com Fri Oct 25 17:16:41 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Fri, 25 Oct 2019 11:16:41 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <7c6f7f2d-8836-2c95-8330-2d1afc2b5e5c@gmail.com> References: <7c6f7f2d-8836-2c95-8330-2d1afc2b5e5c@gmail.com> Message-ID: On Fri, Oct 25, 2019 at 11:12 AM Dan Star via lazarus < lazarus at lists.lazarus-ide.org> wrote: > /Compiler > "/Users/Dan/Development/FreePascal/fpc/bin/x86-64-darwin/fpc.sh" does > not support target x86-64-macos./ > "macos" platform target refers to Classic MacOS (MacOS 9), rather than MacOSX (or the modern name macOS) You might need to adjust platform target as well to "darwin" thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan2329s at gmail.com Fri Oct 25 17:23:29 2019 From: dan2329s at gmail.com (Dan Star) Date: Fri, 25 Oct 2019 10:23:29 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: References: <7c6f7f2d-8836-2c95-8330-2d1afc2b5e5c@gmail.com> Message-ID: <96e8c8e3-6c98-d01e-bd7a-b63709ec71e0@gmail.com> On 10/25/19 10:16 AM, Dmitry Boyarintsev via lazarus wrote: > On Fri, Oct 25, 2019 at 11:12 AM Dan Star via lazarus > > > wrote: > > /Compiler > "/Users/Dan/Development/FreePascal/fpc/bin/x86-64-darwin/fpc.sh" does > not support target x86-64-macos./ > > > "macos" platform target refers to Classic MacOS  (MacOS 9), rather > than MacOSX (or  the modern name macOS) > You might need to adjust platform target as well to "darwin" > > Same error now: Build IDE: Exit code 2, Errors: 3 Error: ld: framework not found Cocoa make[2]: *** [lazarus] Error 1 make[1]: *** [idepkg] Error 2 Error: make: *** [idepkg] Error 2 Linking ../lazarus An error occurred while linking Error: Error while linking so something with config.  Will look up details on how to build from command line and try that.  Thanks. From aaa5500 at ya.ru Sat Oct 26 06:25:45 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 26 Oct 2019 07:25:45 +0300 Subject: [Lazarus] Qt5 build of program, modal dialogs go to background Message-ID: <9ab42502-0ccf-cd58-2dc3-1ff9f516de71@ya.ru> I made Qt5 build of CudaText, pls test and see is my bug present? I test on Ubuntu w/o Qt5: user at PC:~$ qmake --version qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory user at PC:~$ qmake-qt5 --version Command 'qmake-qt5' not found, did you mean:   command 'qmake-qt4' from deb qt4-qmake (4:4.8.7+dfsg-7ubuntu1) steps. - get beta of Qt5 build https://sourceforge.net/projects/cudatext/files/beta_version/ - configure Python engine in it: https://wiki.freepascal.org/CudaText#Python_on_Linux.2C_BSD.2C_Solaris - open Plugins / Options Editor dialog, and drag this dialog by it caption. Here dialog always jumps to BACK of main cudatext dialog during dragging (and it jumps by pixels too). About dialog don't jump. -- Regards, Alexey From zeljko at holobit.net Sat Oct 26 08:49:48 2019 From: zeljko at holobit.net (zeljko) Date: Sat, 26 Oct 2019 08:49:48 +0200 Subject: [Lazarus] Qt5 build of program, modal dialogs go to background In-Reply-To: <9ab42502-0ccf-cd58-2dc3-1ff9f516de71@ya.ru> References: <9ab42502-0ccf-cd58-2dc3-1ff9f516de71@ya.ru> Message-ID: On 10/26/19 6:25 AM, AlexeyT via lazarus wrote: > I made Qt5 build of CudaText, pls test and see is my bug present? I test > on Ubuntu w/o Qt5: > > user at PC:~$ qmake --version > qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such > file or directory > user at PC:~$ qmake-qt5 --version > Command 'qmake-qt5' not found, did you mean: >   command 'qmake-qt4' from deb qt4-qmake (4:4.8.7+dfsg-7ubuntu1) > > steps. > > - get beta of Qt5 build > https://sourceforge.net/projects/cudatext/files/beta_version/ > > - configure Python engine in it: > https://wiki.freepascal.org/CudaText#Python_on_Linux.2C_BSD.2C_Solaris > > - open Plugins / Options Editor dialog, and drag this dialog by it > caption. Here dialog always jumps to BACK of main cudatext dialog during > dragging (and it jumps by pixels too). About dialog don't jump. > Sorry, but I don't understand what is exact problem. You cannot build libQt5Pas with qmake or you have problem with Qt5LCL application ? I'm using LinuxMint 19.2 on my laptop and there I have qmake (qt5) and qmake-qt4 installed. zeljko From aaa5500 at ya.ru Sat Oct 26 09:01:28 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 26 Oct 2019 10:01:28 +0300 Subject: [Lazarus] Qt5 build of program, modal dialogs go to background In-Reply-To: References: <9ab42502-0ccf-cd58-2dc3-1ff9f516de71@ya.ru> Message-ID: I did install the libqt5pas (on Ubuntu x64), i just cannot detect qt5 version from terminal. The problem is with LCL application CudaText: a) its dialog Plugins / Options Editor cannot be dragged by mouse, it always jumps to back of main Cudatext window b) new problem found in application CudaText on FEDORA x64. It has KDE Plasma with qt5 and libqt5pas. (sudo yum install qt5pas). When I call dialog Plugins / Options Editor, Cudatext crashes: ./cudatext: undefined symbol: QTextEdit_setPlaceholderText On 26.10.2019 9:49, zeljko wrote: > Sorry, but I don't understand what is exact problem. You cannot build > libQt5Pas with qmake or you have problem with Qt5LCL application ? > I'm using LinuxMint 19.2 on my laptop and there I have qmake (qt5) and > qmake-qt4 installed. > > zeljko -- Regards, Alexey From aaa5500 at ya.ru Sat Oct 26 10:22:11 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 26 Oct 2019 11:22:11 +0300 Subject: [Lazarus] Qt5 bindings misses QTextEdit_setPlaceholderText In-Reply-To: References: <9ab42502-0ccf-cd58-2dc3-1ff9f516de71@ya.ru> Message-ID: <527b3a8c-8539-dbf1-e91d-3b49c4bf7163@ya.ru> This looks like missed export in qt5.pas https://raw.githubusercontent.com/graemeg/lazarus/upstream/lcl/interfaces/qt5/cbindings/qt5.pas file has the procedure QLineEdit_setPlaceholderText(handle: QLineEditH; AnonParam1: PWideString); cdecl; external Qt5PasLib name 'QLineEdit_setPlaceholderText'; but don't have QTextEdit_setPlaceholderText. On 26.10.2019 10:01, AlexeyT via lazarus wrote: > ./cudatext: undefined symbol: QTextEdit_setPlaceholderText -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Sat Oct 26 10:35:28 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 26 Oct 2019 10:35:28 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <7c6f7f2d-8836-2c95-8330-2d1afc2b5e5c@gmail.com> References: <7c6f7f2d-8836-2c95-8330-2d1afc2b5e5c@gmail.com> Message-ID: <20191026103528.1e0ba14a@limapholos.matflo.wg> On Fri, 25 Oct 2019 10:12:21 -0500 Dan Star via lazarus wrote: > On 10/25/19 10:06 AM, Martin Frb via lazarus wrote: > > On 25/10/2019 16:54, Dan Star via lazarus wrote: > >> > >> If I remove those 2 packages and try to build vanilla Laz MacOS 64 > >> I get the same errors so looks like a configuration problem caused > >> by having had Laz 32 installed previously. > > Maybe go to "configure build lazarus" and choose target cpu (and > > target OS) > > I tried that initially using MacOS and x86-64 but Laz wouldn't build > if I spec'd that stating > > /Compiler > "/Users/Dan/Development/FreePascal/fpc/bin/x86-64-darwin/fpc.sh" does > not support target x86-64-macos./ Is x86-64-macos a typo? The target OS name is "darwin", not "macos"? Mattias From nc-gaertnma at netcologne.de Sat Oct 26 12:30:08 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 26 Oct 2019 12:30:08 +0200 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <96e8c8e3-6c98-d01e-bd7a-b63709ec71e0@gmail.com> References: <7c6f7f2d-8836-2c95-8330-2d1afc2b5e5c@gmail.com> <96e8c8e3-6c98-d01e-bd7a-b63709ec71e0@gmail.com> Message-ID: <20191026123008.6bfcec71@limapholos.matflo.wg> On Fri, 25 Oct 2019 10:23:29 -0500 Dan Star via lazarus wrote: >[...] > Same error now: > > Build IDE: Exit code 2, Errors: 3 > Error: ld: framework not found Cocoa > make[2]: *** [lazarus] Error 1 > make[1]: *** [idepkg] Error 2 > Error: make: *** [idepkg] Error 2 > Linking ../lazarus > An error occurred while linking > Error: Error while linking > > so something with config.  Will look up details on how to build from > command line and try that.  Thanks. The Cocoa LCL passes "-k-framework Cocoa" to fpc. Check your /etc/fpc.cfg for -XR and -Fl options. The -XR prepends a path to all -Fl paths. I don't have Catalina to test, but maybe this works: -Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk Mattias From zeljko at holobit.net Sat Oct 26 12:38:59 2019 From: zeljko at holobit.net (zeljko) Date: Sat, 26 Oct 2019 12:38:59 +0200 Subject: [Lazarus] Qt5 bindings misses QTextEdit_setPlaceholderText In-Reply-To: <527b3a8c-8539-dbf1-e91d-3b49c4bf7163@ya.ru> References: <9ab42502-0ccf-cd58-2dc3-1ff9f516de71@ya.ru> <527b3a8c-8539-dbf1-e91d-3b49c4bf7163@ya.ru> Message-ID: On 10/26/19 10:22 AM, AlexeyT via lazarus wrote: > This looks like missed export in qt5.pas > > https://raw.githubusercontent.com/graemeg/lazarus/upstream/lcl/interfaces/qt5/cbindings/qt5.pas > > file has the > > procedure QLineEdit_setPlaceholderText(handle: QLineEditH; AnonParam1: PWideString); cdecl; external Qt5PasLib name 'QLineEdit_setPlaceholderText'; > > but don't have QTextEdit_setPlaceholderText. No, that means that distro packager did not update libQt5Pas from lazarus trunk. Latest version is 1.2.7, not 1.2.6. zeljko > > > On 26.10.2019 10:01, AlexeyT via lazarus wrote: >> ./cudatext: undefined symbol: QTextEdit_setPlaceholderText > > -- > Regards, > Alexey > > From dan2329s at gmail.com Sun Oct 27 18:04:42 2019 From: dan2329s at gmail.com (Dan Star) Date: Sun, 27 Oct 2019 12:04:42 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <20191026123008.6bfcec71@limapholos.matflo.wg> References: <7c6f7f2d-8836-2c95-8330-2d1afc2b5e5c@gmail.com> <96e8c8e3-6c98-d01e-bd7a-b63709ec71e0@gmail.com> <20191026123008.6bfcec71@limapholos.matflo.wg> Message-ID: On 10/26/19 5:30 AM, Mattias Gaertner via lazarus wrote: > On Fri, 25 Oct 2019 10:23:29 -0500 > Dan Star via lazarus wrote: > >> [...] >> Same error now: >> >> Build IDE: Exit code 2, Errors: 3 >> Error: ld: framework not found Cocoa >> make[2]: *** [lazarus] Error 1 >> make[1]: *** [idepkg] Error 2 >> Error: make: *** [idepkg] Error 2 >> Linking ../lazarus >> An error occurred while linking >> Error: Error while linking >> >> so something with config.  Will look up details on how to build from >> command line and try that.  Thanks. > The Cocoa LCL passes "-k-framework Cocoa" to fpc. > Check your /etc/fpc.cfg for -XR and -Fl options. > The -XR prepends a path to all -Fl paths. > I don't have Catalina to test, but maybe this works: > -Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk > > > Mattias I have 2 fpc.cfg files and the one in /etc is from year 2017 so I think that one only applies to Laz 32.   The other fpc.cfg is in ~/ Development/FreePascal/fpc/bin/x86_64-darwin/fpc.cfg and is from October 18th 2019.   So inspecting this second file I find: #ifndef cpupowerpc64 -XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk #ifdef cpui386 -Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib # searchpath for libraries #-Fl/Users/danstar/Development/FreePascal/fpc/lib #-Fl/lib;/usr/lib -Fl/Users/danstar/Development/FreePascal/fpc/lib/$FPCTARGET # library search path -Fl/usr/lib/$FPCTARGET;/usr/lib/$FPCTARGET-gnu;/lib/$FPCTARGET;/lib/$FPCTARGET-gnu;/usr/lib/gcc/ And my reading of this is -Fl only applies to PowerPC cpu hardware.   So I am confused what to change.  Any help appreciated. From fluisgirardi at gmail.com Mon Oct 28 12:51:07 2019 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Mon, 28 Oct 2019 08:51:07 -0300 Subject: [Lazarus] Qt5 bindings misses QTextEdit_setPlaceholderText In-Reply-To: References: <9ab42502-0ccf-cd58-2dc3-1ff9f516de71@ya.ru> <527b3a8c-8539-dbf1-e91d-3b49c4bf7163@ya.ru> Message-ID: That means that you have to update/compile the libqt5pas.so from sources... Em sáb, 26 de out de 2019 às 07:39, zeljko via lazarus < lazarus at lists.lazarus-ide.org> escreveu: > On 10/26/19 10:22 AM, AlexeyT via lazarus wrote: > > This looks like missed export in qt5.pas > > > > > https://raw.githubusercontent.com/graemeg/lazarus/upstream/lcl/interfaces/qt5/cbindings/qt5.pas > > > > file has the > > > > procedure QLineEdit_setPlaceholderText(handle: QLineEditH; AnonParam1: > PWideString); cdecl; external Qt5PasLib name 'QLineEdit_setPlaceholderText'; > > > > but don't have QTextEdit_setPlaceholderText. > > No, that means that distro packager did not update libQt5Pas from > lazarus trunk. > Latest version is 1.2.7, not 1.2.6. > > zeljko > > > > > > > On 26.10.2019 10:01, AlexeyT via lazarus wrote: > >> ./cudatext: undefined symbol: QTextEdit_setPlaceholderText > > > > -- > > Regards, > > Alexey > > > > > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://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 aaa5500 at ya.ru Mon Oct 28 19:39:13 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 28 Oct 2019 21:39:13 +0300 Subject: [Lazarus] Qt5 OpenDialog/SaveDialog file filter ok? Message-ID: Checked on Ubuntu x64 (with its GTK based Qt5) and Fedora (KDE Plasma) 29. In my app qt5 build, OpenDialog and SaveDialog file filters are empty (while they are set in app). Confirmed? -- Regards, Alexey From bo.berglund at gmail.com Tue Oct 29 12:25:11 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 29 Oct 2019 12:25:11 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? Message-ID: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> I am writing a console application intended to be portable between Windows and Linux and it uses files on the file system for configuration and also for processing data. Since the path delimiter is different on Unix and Windows I believe I have to handle this in my code, but how? I could create all paths inside the application using Windows delimiters and then upon usage send them to a "platform filter" like FixPlatformPath() below, which returns the string with the proper delimiters for the platform. Or else I have to check wherever the paths are dealt with and put conditionals inside the code in many places. Either way it feels a bit convoluted. Is there a better way? function FixPlatformPath(PathIn: string): string; begin {$ifdef UNIX} Result:= StringReplace(PathIn, '\', PathDelim, [rfReplaceAll]); {$else} Result:= StringReplace(PathIn, '/', PathDelim, [rfReplaceAll]); {$endif} end; This would apply to all functions where files are handled such as reading config data, creating data files or reading data files etc... -- Bo Berglund Developer in Sweden From robin.listas at telefonica.net Tue Oct 29 12:31:03 2019 From: robin.listas at telefonica.net (Carlos E. R.) Date: Tue, 29 Oct 2019 12:31:03 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: <56a88eb3-fe55-d018-6567-57cbf22033cd@telefonica.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 29/10/2019 12.25, Bo Berglund via lazarus wrote: > I am writing a console application intended to be portable between > Windows and Linux and it uses files on the file system for > configuration and also for processing data. > > Since the path delimiter is different on Unix and Windows I believe > I have to handle this in my code, but how? Thinking... Define a something case {what system} array of strings. Depending on the system detected, you use one or the other array of (constant?) strings, that contains the paths. Assuming they are fixed. - -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXbgi9AAKCRC1MxgcbY1H 1dj2AJ9Qoqusdw0jaoFvLDSmiblv1bhjVQCfccLWxQ0mQO926h0mtAcS4tSADUk= =/Ojl -----END PGP SIGNATURE----- From m.e.sanliturk at gmail.com Tue Oct 29 12:32:18 2019 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Tue, 29 Oct 2019 14:32:18 +0300 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: In Windows XP , it is possible to use "/" instead of "\" . Therefore , it is NOT necessary to make two different file path representations . I am not using any Windows now , therefore I can not say anything about last Windows versions . It is very easy to check whether "/" is usable on your Windows : Use a file path with "/" . My opinion is that it will find the related file assuming that your file path is correct other than "/" . Mehmet Erol Sanliturk On Tue, Oct 29, 2019 at 2:25 PM Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I am writing a console application intended to be portable between > Windows and Linux and it uses files on the file system for > configuration and also for processing data. > > Since the path delimiter is different on Unix and Windows I believe I > have to handle this in my code, but how? > > I could create all paths inside the application using Windows > delimiters and then upon usage send them to a "platform filter" like > FixPlatformPath() below, which returns the string with the proper > delimiters for the platform. > Or else I have to check wherever the paths are dealt with and put > conditionals inside the code in many places. > Either way it feels a bit convoluted. > > Is there a better way? > > function FixPlatformPath(PathIn: string): string; > begin > {$ifdef UNIX} > Result:= StringReplace(PathIn, '\', PathDelim, [rfReplaceAll]); > {$else} > Result:= StringReplace(PathIn, '/', PathDelim, [rfReplaceAll]); > {$endif} > end; > > This would apply to all functions where files are handled such as > reading config data, creating data files or reading data files etc... > > > -- > Bo Berglund > Developer in Sweden > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Tue Oct 29 12:32:18 2019 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Tue, 29 Oct 2019 14:32:18 +0300 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: In Windows XP , it is possible to use "/" instead of "\" . Therefore , it is NOT necessary to make two different file path representations . I am not using any Windows now , therefore I can not say anything about last Windows versions . It is very easy to check whether "/" is usable on your Windows : Use a file path with "/" . My opinion is that it will find the related file assuming that your file path is correct other than "/" . Mehmet Erol Sanliturk On Tue, Oct 29, 2019 at 2:25 PM Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I am writing a console application intended to be portable between > Windows and Linux and it uses files on the file system for > configuration and also for processing data. > > Since the path delimiter is different on Unix and Windows I believe I > have to handle this in my code, but how? > > I could create all paths inside the application using Windows > delimiters and then upon usage send them to a "platform filter" like > FixPlatformPath() below, which returns the string with the proper > delimiters for the platform. > Or else I have to check wherever the paths are dealt with and put > conditionals inside the code in many places. > Either way it feels a bit convoluted. > > Is there a better way? > > function FixPlatformPath(PathIn: string): string; > begin > {$ifdef UNIX} > Result:= StringReplace(PathIn, '\', PathDelim, [rfReplaceAll]); > {$else} > Result:= StringReplace(PathIn, '/', PathDelim, [rfReplaceAll]); > {$endif} > end; > > This would apply to all functions where files are handled such as > reading config data, creating data files or reading data files etc... > > > -- > Bo Berglund > Developer in Sweden > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Tue Oct 29 12:43:51 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 29 Oct 2019 12:43:51 +0100 (CET) Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: On Tue, 29 Oct 2019, Bo Berglund via lazarus wrote: > I am writing a console application intended to be portable between > Windows and Linux and it uses files on the file system for > configuration and also for processing data. > > Since the path delimiter is different on Unix and Windows I believe I > have to handle this in my code, but how? > > I could create all paths inside the application using Windows > delimiters and then upon usage send them to a "platform filter" like > FixPlatformPath() below, which returns the string with the proper > delimiters for the platform. > Or else I have to check wherever the paths are dealt with and put > conditionals inside the code in many places. > Either way it feels a bit convoluted. > > Is there a better way? > > function FixPlatformPath(PathIn: string): string; > begin > {$ifdef UNIX} > Result:= StringReplace(PathIn, '\', PathDelim, [rfReplaceAll]); > {$else} > Result:= StringReplace(PathIn, '/', PathDelim, [rfReplaceAll]); > {$endif} > end; > > This would apply to all functions where files are handled such as > reading config data, creating data files or reading data files etc... 1. Don't hardcode '/' or '\', use the PathDelim constant instead. You will not need any ifdefs. 2. FPC does not care whether you use '\' or '/', and windows normally will accept '/' as well. 3. your "fixplatformpath' exists in FPC, in 2 forms: https://www.freepascal.org/docs-html/current/rtl/sysutils/dodirseparators.html https://www.freepascal.org/docs-html/current/rtl/sysutils/setdirseparators.html There are many routines that handle all this transparently: https://www.freepascal.org/docs-html/current/rtl/sysutils/filenameroutines.html Michael. From bo.berglund at gmail.com Tue Oct 29 13:02:15 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 29 Oct 2019 13:02:15 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: On Tue, 29 Oct 2019 14:32:18 +0300, Mehmet Erol Sanliturk via lazarus wrote: >In Windows XP , it is possible to use "/" instead of "\" . Therefore , it >is NOT necessary to make two different file path representations . I am not >using any Windows now , therefore I can not say anything about last Windows >versions . > >It is very easy to check whether "/" is usable on your Windows : Use a file >path with "/" . My opinion is that it will find the related file assuming >that your file path is correct other than "/" . > OK, did not know this. Now tested on Windows 7 via Windows Explorer and the command line. Both work fine... So I will use forward slashes in all paths from now on. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Oct 29 13:07:50 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 29 Oct 2019 13:07:50 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: On Tue, 29 Oct 2019 12:43:51 +0100 (CET), Michael Van Canneyt via lazarus wrote: >1. Don't hardcode '/' or '\', use the PathDelim constant instead. > You will not need any ifdefs. The whole thing is that paths might be read from config or other data files and so they will come in either with / or \. I cannot use PathDelim in the target spec because that would not find the erroneous delimiters. That said, both you and Mehmet pointed out that Windows accepts both delimiters, which I did not know. I have been around too long so I remember the old days... Anyway, given that the delimiters do not matter I will just code for Linux (the main platform) and not bother with the Windows case. Thanks for your information! -- Bo Berglund Developer in Sweden From michael at freepascal.org Tue Oct 29 13:59:11 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 29 Oct 2019 13:59:11 +0100 (CET) Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: On Tue, 29 Oct 2019, Bo Berglund via lazarus wrote: > On Tue, 29 Oct 2019 12:43:51 +0100 (CET), Michael Van Canneyt via > lazarus wrote: > >> 1. Don't hardcode '/' or '\', use the PathDelim constant instead. >> You will not need any ifdefs. > > The whole thing is that paths might be read from config or other data > files and so they will come in either with / or \. > I cannot use PathDelim in the target spec because that would not find > the erroneous delimiters. Hence the setdirseparators call. As soon as you read a path from a file, correct it with SetDirSeparators. For the rest you use PathDelim and all will be well. You're not the only one to have to deal with this, we've all been there :-) Michael. From mailinglists at geldenhuys.co.uk Tue Oct 29 21:08:08 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 29 Oct 2019 20:08:08 +0000 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> On 29/10/2019 12:07 pm, Bo Berglund via lazarus wrote: > I have been around too long so I > remember the old days... Same. Windows should get with the times and switch to Unix. ;-) On a side note: After all, Windows still start the drive letters with C: and considering that no PC is the last decade or two has shipped with floppy drives, maybe they could start from A: instead. Most of the people I work with have NO idea why Windows starts with C: as the boot drive instead of A: :-P 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 fpc at pascalprogramming.org Tue Oct 29 21:51:22 2019 From: fpc at pascalprogramming.org (Marco van de Voort) Date: Tue, 29 Oct 2019 21:51:22 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> Message-ID: <1dbb5e02-01b3-0d2e-6e2e-c3870c32f73b@pascalprogramming.org> Op 2019-10-29 om 21:08 schreef Graeme Geldenhuys via lazarus: > On 29/10/2019 12:07 pm, Bo Berglund via lazarus wrote: >> I have been around too long so I >> remember the old days... > Most of the people I work with > have NO idea why Windows starts with C: as the boot drive instead of A: :-P I'm already happy if they can distinguish actual drive files from "most recent used" style virtual folders.:-) From mike.cornflake at gmail.com Tue Oct 29 22:16:56 2019 From: mike.cornflake at gmail.com (Michael Thompson) Date: Wed, 30 Oct 2019 05:16:56 +0800 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> Message-ID: > maybe they could start from A: Noooo :-) I work offshore for a variety of clients, and using their PCs. I always ensure my USB key mount at B: (so I don't have to tweak paths in my fpc and Lazarus installs), I code in an encrypted folder that I mount at A: (using Veracrypt). The encrypted drive also holds both GIT and SVN repositories. Been doing this for 10 years now, no conflict on any client PC anywhere :-) I like those holes in A: and B: It's so convenient that my system at home is the same. Cheers Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at moosemail.net Tue Oct 29 22:33:35 2019 From: doug at moosemail.net (DougC) Date: Tue, 29 Oct 2019 17:33:35 -0400 Subject: [Lazarus] Multi-platform console application,        how to handle file paths? In-Reply-To: References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> Message-ID: <16e19703963.102931ce1659891.7152976616962075105@moosemail.net> For me A: is  always my archives and B: is my regular backup. Easy to remember! ---- On Tue, 29 Oct 2019 17:16:56 -0400 Michael Thompson via lazarus wrote ---- > maybe they could start from A: Noooo :-)     I work offshore for a variety of clients, and using their PCs.  I always ensure my USB key mount at B: (so I don't have to tweak paths in my fpc and Lazarus installs), I code in an encrypted folder that I mount at A: (using Veracrypt). -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Tue Oct 29 22:53:57 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 29 Oct 2019 21:53:57 +0000 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> Message-ID: On 29/10/2019 9:16 pm, Michael Thompson wrote: > Been doing this for 10 years now, no conflict on any client PC > anywhere :-) I like those holes in A: and B: :-D Very clever indeed! Make full use of those relics. I wonder why Microsoft didn't think of that for USB drives. Regards, Graeme From pascaldragon at googlemail.com Tue Oct 29 23:01:45 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Tue, 29 Oct 2019 23:01:45 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> <63f27bd4-d5e6-c239-ba5a-f50d1a408703@geldenhuys.co.uk> Message-ID: Graeme Geldenhuys via lazarus schrieb am Di., 29. Okt. 2019, 21:08: > On 29/10/2019 12:07 pm, Bo Berglund via lazarus wrote: > > I have been around too long so I > > remember the old days... > > Same. Windows should get with the times and switch to Unix. ;-) > > On a side note: > After all, Windows still start the drive letters with C: and considering > that no PC is the last decade or two has shipped with floppy drives, > maybe they could start from A: instead. Most of the people I work with > have NO idea why Windows starts with C: as the boot drive instead of A: :-P > There is still enough software out there that assumes A: and B: are floppy drives and thus either ignores them or handles them especially (I fixed such a relic in our own software just two weeks ago, because a customer had his optical drives as A: and B:, otherwise we wouldn't have noticed that... ). Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Wed Oct 30 10:50:39 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 30 Oct 2019 10:50:39 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: <20191030105039.4cf286a0@limapholos.matflo.wg> On Tue, 29 Oct 2019 13:07:50 +0100 Bo Berglund via lazarus wrote: >[...] > Anyway, given that the delimiters do not matter I will just code for > Linux (the main platform) and not bother with the Windows case. There are some differences. For example filenames are case insensitive. FileExists returns false under Windows for directories. Windows allows empty names, so these are different things: 'C:\a', 'C:\a\', 'C:\a\\'. Windows has one current directory per partition. Windows knows specials paths starting with '\\'. etc. Mattias From nc-gaertnma at netcologne.de Wed Oct 30 10:50:39 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 30 Oct 2019 10:50:39 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> Message-ID: <20191030105039.4cf286a0@limapholos.matflo.wg> On Tue, 29 Oct 2019 13:07:50 +0100 Bo Berglund via lazarus wrote: >[...] > Anyway, given that the delimiters do not matter I will just code for > Linux (the main platform) and not bother with the Windows case. There are some differences. For example filenames are case insensitive. FileExists returns false under Windows for directories. Windows allows empty names, so these are different things: 'C:\a', 'C:\a\', 'C:\a\\'. Windows has one current directory per partition. Windows knows specials paths starting with '\\'. etc. Mattias From bo.berglund at gmail.com Wed Oct 30 11:42:05 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 30 Oct 2019 11:42:05 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> <20191030105039.4cf286a0@limapholos.matflo.wg> Message-ID: On Wed, 30 Oct 2019 10:50:39 +0100, Mattias Gaertner via lazarus wrote: >Windows knows specials paths starting with '\\'. But I don't! :( What is special with these? I have noted tghat if I spell a path wrong (copy paste or oterwise) and get two \\ instead of one it still works fine. But maybe there is some special meaning too? Anyway, I ran the program test on Windows now using the suggested function: FindAllFiles(FileList, TaskDir, '*.conf', false); FileList shows the full path to the files but excluding the drive letter, which is not part of the "TaskDir" variable. It checked the dir in the current drive (where the exe file is located). -- Bo Berglund Developer in Sweden From bartjunk64 at gmail.com Wed Oct 30 13:06:42 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 30 Oct 2019 13:06:42 +0100 Subject: [Lazarus] Multi-platform console application, how to handle file paths? In-Reply-To: References: <227grelbelt5iiu8j1ka76465h9m136rcv@4ax.com> <20191030105039.4cf286a0@limapholos.matflo.wg> Message-ID: On Wed, Oct 30, 2019 at 11:42 AM Bo Berglund via lazarus wrote: > >Windows knows specials paths starting with '\\'. > > But I don't! :( > What is special with these? \\?\C:\foo\bar\..\.. is not the same path as C:\foo\bar\..\.. (which basically is C:\) If a path starts with \\?\ like above, all characters in the path are taken literally (so you cannot construct a relative path), or ot is used to build a UNC path: \\?\UNC\ IIRC then also device names start with \\.\ or something the like. See https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file Bart -- Bart From aaa5500 at ya.ru Wed Oct 30 21:41:26 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Wed, 30 Oct 2019 23:41:26 +0300 Subject: [Lazarus] Qt5 problem with Button accelerator and TEdit input Message-ID: <03f88afd-0772-bc0e-1234-f639655b71c9@ya.ru> Fedora 31, KDE Plasma, Qt5 version of CudaText x64. In one dialog (Plugins / Find in Files 4), I have button with accelerator, "&.*" -it's accelerator for dot char. Now in the same form i have TCombobox. I type text in combobox, when i type dot, button presses! so I cannot enter full text. -- Regards, Alexey From bo.berglund at gmail.com Wed Oct 30 23:17:08 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 30 Oct 2019 23:17:08 +0100 Subject: [Lazarus] Problem installing package from OLPM on Raspbian Message-ID: The system I have is running Raspbian Buster on an RPi4B with 4GB RAM. I use FPC 3.0.4 and Lazarus 2.0.4 Today I was going to transfer a project from Windows to Raspbian through Subversion and then I needed to install some dependencies into Lazarus too. Specifically I used Online Package Manager from the Package menu to find and install UniqueInstance. The process ran for a while then asked me if I wanted to rebuild Lazarus IDE, which I replied yes to and after a little while it stopped with a displayed message: Build IDE: Exit code 2, Errors 1 Fatal: Unit IDECmdLine searched but LazConf found At this point the IDE is still visible on screen but totally unresponsive, cannot even be closed and no menus respond to mouse clicks. In a terminal I can see this: pi at rpi4-gui:~ $ ps aux |grep lazarus pi 31262 0.0 0.5 38492 23992 ? S 22:53 0:00 /home/pi/dev/lazarus/2.0.4/startlazarus --pcp=/home/pi/.lazarus_2.0.4 pi 31264 3.8 2.2 146760 89456 ? Sl 22:53 0:48 /home/pi/dev/lazarus/2.0.4/lazarus --no-splash-screen --started-by-startlazarus --pcp=/home/pi/.lazarus_2.0.4 --force-new-instance What is the cause of this problem and what can I do to solve it? Kill lazarus via terminal or what? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Wed Oct 30 23:41:31 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 30 Oct 2019 23:41:31 +0100 Subject: [Lazarus] Problem installing package from OLPM on Raspbian References: Message-ID: On Wed, 30 Oct 2019 23:17:08 +0100, Bo Berglund via lazarus wrote: >At this point the IDE is still visible on screen but totally >unresponsive, cannot even be closed and no menus respond to mouse >clicks. And it is repeatable too... If I kill the lazarus process launched from Lazarus to rebuild itself both lazaus instances unload and the screen is empty. If I then start over by starting Lazarus and this time creating a new project to get away from my working code for the previous project the exact same thing happens when I try to install UniqueInstance from OnLine Package Manager. Lazarus locks up..... Why? Note: I interact with the desktop on the RPi4 box via RealVNC. -- Bo Berglund Developer in Sweden From aaa5500 at ya.ru Thu Oct 31 07:51:07 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Thu, 31 Oct 2019 09:51:07 +0300 Subject: [Lazarus] Qt5 OpenDialog/SaveDialog file filter ok? In-Reply-To: References: Message-ID: <45c81286-f1b0-e227-3f5f-991952f2dbf1@ya.ru> Sorry, that Filter works ok. Another question. In qt5/qtwsdialogs.pp we have   if (AFileDialog is TSaveDialog) and (trim(TmpFilter)='()') then     Result := ''   else     Result := GetUtf8String(TmpFilter); so that empty dlg.Filter will give empty result Qt filter. Only for SaveDialog! Why only for SaveDailog? it is needed for OpenDialog too, because result "()" looks bad. AT From bo.berglund at gmail.com Thu Oct 31 10:30:08 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 31 Oct 2019 10:30:08 +0100 Subject: [Lazarus] Problem installing package from OLPM on Raspbian References: Message-ID: On Wed, 30 Oct 2019 23:17:08 +0100, Bo Berglund via lazarus wrote: >What is the cause of this problem and what can I do to solve it? > >Kill lazarus via terminal or what? So this is what I did to get the system running: - killed lazarus so it was not running in hanged state - In a terminal I did: pi at rpi4-gui:~/dev/lazarus/2.0.4 $ time make bigide OPT=-dFPC_ARMHF FPC=/home/pi/bin/ppcarm After 6 minutes it was done and then I opened Lazarus and used OLPM to install the uniqueinstance package. This time the rebuild of the Lazarus IDE succeeded and the package icon was installed into the System tab. It seems like lazarus is now ready to be used. So I opened the project I migrated from svn and tried to build it. Now I got this message: Compile Project, Target: ssmonitorctrl: Success, Warnings: 12, Hints: 45 ...... ssmonitorctrl.lpr(73,28) Warning: "crtbegin.o" not found, this will probably cause a linking failure ssmonitorctrl.lpr(73,28) Warning: "crtend.o" not found, this will probably cause a linking failure It seems like something needs to be done "somewhere" in order to fix this warning (I have not seen it in a long time), but where? I don't really know why this all happened, but it might have something to do with me moving the complete fpc/lazarus installation from one SDcard to another with a fresh operating system installed. I have installed FPC and Lazarus from sources downloaded via subversion and done this entirely in the user pi home directory. I spent some time on figuring out how to confine these tools entirely into the home dir so as not to depend on any stuff outside home except for the dependencies installed by apt. All of the dependencies I know of were installed into the new operating system before I copied over the home dirs. And it seemed to work just fine until tye IDE rebuild. Now I wonder if the lazarus "make bigide" puts or modifies stuff outside of the home dir, which I then have failed to copy in from the old installation? The make seems to have corrected whatever problöem was causing the crash... And is there really something outside of home that fpc or lazarus depends on and is not part of the operating system??? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Thu Oct 31 11:06:17 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 31 Oct 2019 11:06:17 +0100 Subject: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why? Message-ID: I am working on a program intended to be run by cron in unattended mode on a Raspberry Pi without GUI installed. I started it in Windows but have now moved the sources over to Raspbian for building on that platform and it does not work as expected... If I open a terminal window inside the Raspbian GUI (I am using VNC to work in the GUI) then the test run works as expected. Right now it is just displaying the content of the directory where the data will be located using this code as a test: function TaskReadyToRun(var ID: string): boolean; var FileList: TStringList; TaskDir: string; i: integer; begin FileList := TStringList.Create; try TaskDir := DATABASEDIR + '/tasks'; FindAllFiles(FileList, TaskDir, '*.conf', false); if FileList.Count > 0 then begin for i := 0 to FileList.Count -1 do Writeln(FileList[i]); end else Writeln('No files found'); Result := (FileList.Count > 0); finally FileList.Free; end; end; In a termional window on Raspbian I get the expected output. But when I run the same in a terminal created by PuTTY on my Windows laptop this is what I see: pi at rpi4-gui:~/projects/MonitorServer $ ./ssmonitorctrl (ssmonitorctrl:5436): Gtk-WARNING **: 10:43:42.775: cannot open display: Even if I run the program and redirect output to a file I get the same error message and the listfiles.txt file is empty: pi at rpi4-gui:~/projects/MonitorServer $ ./ssmonitorctrl > listfiles.txt What is causing this strange problem? I thought that Writeln() is the way to send output to stdout, but maybe not???? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Thu Oct 31 11:15:17 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 31 Oct 2019 11:15:17 +0100 Subject: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why? References: Message-ID: <2pclret98b5rh2slotdi6l48ipngnt1qpf@4ax.com> On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus wrote: >I am working on a program intended to be run by cron in unattended >mode on a Raspberry Pi without GUI installed. > >I started it in Windows but have now moved the sources over to >Raspbian for building on that platform and it does not work as >expected... > After posting here I went into project options and looked for something that could relate to the GUI being present and then I found this: Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides/SetLCLWidgetType/ Here was a selection "nogui", which I set and now the error disappeared!!! Hard to find but seems like I am OK for now... -- Bo Berglund Developer in Sweden From michael at freepascal.org Thu Oct 31 11:26:26 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 31 Oct 2019 11:26:26 +0100 (CET) Subject: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why? In-Reply-To: <2pclret98b5rh2slotdi6l48ipngnt1qpf@4ax.com> References: <2pclret98b5rh2slotdi6l48ipngnt1qpf@4ax.com> Message-ID: On Thu, 31 Oct 2019, Bo Berglund via lazarus wrote: > On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus > wrote: > >> I am working on a program intended to be run by cron in unattended >> mode on a Raspberry Pi without GUI installed. >> >> I started it in Windows but have now moved the sources over to >> Raspbian for building on that platform and it does not work as >> expected... >> > > After posting here I went into project options and looked for > something that could relate to the GUI being present and then I found > this: > > Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides/SetLCLWidgetType/ > > Here was a selection "nogui", which I set and now the error > disappeared!!! > > Hard to find but seems like I am OK for now... You can't run a Linux LCL graphical program through putty, unless you have an X session running on your windows machine, and you set up the necessary port forwarding. What you did in the options is simply completely disable the GUI. As a result, the linux program does not try to connect to the X server. If the program works 100%, you should ask yourself why you needed the GUI routines in the first place ? Michael. From anthony at unihedron.com Thu Oct 31 13:07:19 2019 From: anthony at unihedron.com (Anthony Tekatch) Date: Thu, 31 Oct 2019 08:07:19 -0400 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> References: <20191014200711.38e9f4f7@pino.pino.basement> <7dc77be8-373e-a60b-1af3-1aed86162658@mfriebe.de> Message-ID: <20191031080719.3863becb@pino.pino.basement> On Tue, 15 Oct 2019 02:09:29 +0200, Martin Frb wrote: > You are aware that the IDE now supports LLDB too? > https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html Thank you. LLDB did work and helped me find some problems in my program on to get it to work on Mac OSX Catalina. From nc-gaertnma at netcologne.de Thu Oct 31 13:40:47 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 31 Oct 2019 13:40:47 +0100 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <6743bfcd-3043-1284-d52e-1d0356634438@gmail.com> References: <6743bfcd-3043-1284-d52e-1d0356634438@gmail.com> Message-ID: <20191031134047.757c4be8@limapholos.matflo.wg> On Thu, 24 Oct 2019 15:36:54 -0500 Dan Star via lazarus wrote: > On my other Catalina Mac I cannot install LLDB FPDebug.  I get the > following error when I rebuild the IDE with fpdebug and laz...fplldb > packages: > > Build IDE: Exit code 2, Errors: 3 > Error: ld: framework not found Cocoa > make[2]: *** [lazarus] Error 1 > make[1]: *** [idepkg] Error 2 > Error: make: *** [idepkg] Error 2 > An error occurred while linking > Error: Error while linking > > Xcode 11.1 is installed so I assume the Cocoa Framework (only needed > for programming or for Macos too?) is installed too.   Please advise. I upgraded from Mojave to Catalina executed "xcode-select --install" And then to find the crt1.10.5 I changed in /etc/fpc.cfg the -Fl behind "#ifdef cpux86_64" from -Fl/Applications/Xcode.app/Contents/Developer/Toolchain... to -Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/ Now Lazarus can compile itself. Mattias From dan2329s at gmail.com Thu Oct 31 16:30:03 2019 From: dan2329s at gmail.com (Dan Star) Date: Thu, 31 Oct 2019 10:30:03 -0500 Subject: [Lazarus] OSX 64 bit Cocoa + Catalina Installer In-Reply-To: <20191031134047.757c4be8@limapholos.matflo.wg> References: <20191031134047.757c4be8@limapholos.matflo.wg> Message-ID: <7A2DDAE9-C10F-4973-9C49-A6B2030EE868@gmail.com> On Oct 31, 2019, at 7:40 AM, Mattias Gaertner via lazarus wrote: > > On Thu, 24 Oct 2019 15:36:54 -0500 > Dan Star via lazarus wrote: > >> On my other Catalina Mac I cannot install LLDB FPDebug. I get the >> following error when I rebuild the IDE with fpdebug and laz...fplldb >> packages: >> >> Build IDE: Exit code 2, Errors: 3 >> Error: ld: framework not found Cocoa >> make[2]: *** [lazarus] Error 1 >> make[1]: *** [idepkg] Error 2 >> Error: make: *** [idepkg] Error 2 >> An error occurred while linking >> Error: Error while linking >> >> Xcode 11.1 is installed so I assume the Cocoa Framework (only needed >> for programming or for Macos too?) is installed too. Please advise. > > I upgraded from Mojave to Catalina > > executed "xcode-select --install" > > And then to find the crt1.10.5 I changed in /etc/fpc.cfg the -Fl behind > "#ifdef cpux86_64" from > -Fl/Applications/Xcode.app/Contents/Developer/Toolchain... > to > -Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/ > > Now Lazarus can compile itself. What are the correct file permissions on /etc/fpc.cfg? From bo.berglund at gmail.com Thu Oct 31 19:41:50 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 31 Oct 2019 19:41:50 +0100 Subject: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why? References: <2pclret98b5rh2slotdi6l48ipngnt1qpf@4ax.com> Message-ID: On Thu, 31 Oct 2019 11:26:26 +0100 (CET), Michael Van Canneyt via lazarus wrote: > > >On Thu, 31 Oct 2019, Bo Berglund via lazarus wrote: > >> On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus >> wrote: >> >>> I am working on a program intended to be run by cron in unattended >>> mode on a Raspberry Pi without GUI installed. >>> >>> I started it in Windows but have now moved the sources over to >>> Raspbian for building on that platform and it does not work as >>> expected... >>> >> >> After posting here I went into project options and looked for >> something that could relate to the GUI being present and then I found >> this: >> >> Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides/SetLCLWidgetType/ >> >> Here was a selection "nogui", which I set and now the error >> disappeared!!! >> >> Hard to find but seems like I am OK for now... > >You can't run a Linux LCL graphical program through putty, unless you have an X >session running on your windows machine, and you set up the necessary port forwarding. > >What you did in the options is simply completely disable the GUI. >As a result, the linux program does not try to connect to the X server. > >If the program works 100%, you should ask yourself why you needed the GUI >routines in the first place ? > >Michael. I do *not* have *any* GUI routines or such. The program was created as one of the console types Lazarus offers (I do not really know the difference between them and I don't remember which one I chose). So it is *not* a GUI program at all, it was meant from the start to be run from cron invisible from the user rather like a service. I also set the dependencies to LCLbase to avoid the GUI part. -- Bo Berglund Developer in Sweden From michael at freepascal.org Thu Oct 31 23:02:26 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 31 Oct 2019 23:02:26 +0100 (CET) Subject: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why? In-Reply-To: References: <2pclret98b5rh2slotdi6l48ipngnt1qpf@4ax.com> Message-ID: On Thu, 31 Oct 2019, Bo Berglund via lazarus wrote: >> If the program works 100%, you should ask yourself why you needed the GUI >> routines in the first place ? >> >> Michael. > > I do *not* have *any* GUI routines or such. > The program was created as one of the console types Lazarus offers (I > do not really know the difference between them and I don't remember > which one I chose). > So it is *not* a GUI program at all, it was meant from the start to be > run from cron invisible from the user rather like a service. OK. > > I also set the dependencies to LCLbase to avoid the GUI part. Well, clearly there is still a dependency on a GUI unit because the program tried to make contact with an X server. If the 'interfaces' unit is in the uses clause of your program, try removing it. Michael.