From chavoux at gmail.com Thu Mar 1 23:44:48 2018 From: chavoux at gmail.com (Chavoux Luyt) Date: Fri, 2 Mar 2018 00:44:48 +0200 Subject: [Lazarus] Lazarus Digest, Vol 121, Issue 49 In-Reply-To: References: Message-ID: Hi I am feeling very stupid now, but not sure where exactly to look. I installed Lazarus using aptitude on Debian (under /use/libs/lazarus). However, I see that that whole directory tree belongs to root. So if I install a new package, how does it get added to the IDE (since I am running lazarus as a normal user)? Should the installation not give the lazarus directories to the users group instead of root? I suppose there is some kind of magic involved that makes it work when recompiling the IDE with the new packages, but I would like to understand what. Thanks, Chavoux -------------- next part -------------- An HTML attachment was scrubbed... URL: From chavoux at gmail.com Fri Mar 2 00:02:02 2018 From: chavoux at gmail.com (Chavoux Luyt) Date: Fri, 2 Mar 2018 01:02:02 +0200 Subject: [Lazarus] Lazarus directory settings Message-ID: Second stupid question: Under options I can set the default Lazarus directory. Is there a setting somewhere for default ppu (or unit source) directory? I get an error when trying to install a new component (unrelated to lazreport): lazarus.pp(1,1) Fatal: Cannot find lazreport used by Lazarus. However, I already compiled and installed the lazreport component (And can see it on a tab among the other controls). My only guess is that the ppu file was not created because of a permissions issue? Or else I need to set the default directory for linking installed units somewhere? Thanks again, Chavoux On 2 March 2018 at 00:44, Chavoux Luyt wrote: > Hi > > I am feeling very stupid now, but not sure where exactly to look. I > installed Lazarus using aptitude on Debian (under /use/libs/lazarus). > However, I see that that whole directory tree belongs to root. So if I > install a new package, how does it get added to the IDE (since I am running > lazarus as a normal user)? Should the installation not give the lazarus > directories to the users group instead of root? I suppose there is some > kind of magic involved that makes it work when recompiling the IDE with the > new packages, but I would like to understand what. > > Thanks, > Chavoux > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Fri Mar 2 00:23:47 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 2 Mar 2018 00:23:47 +0100 Subject: [Lazarus] Lazarus Digest, Vol 121, Issue 49 In-Reply-To: References: Message-ID: <20180302002347.31b0c693@limapholos.matflo.wg> On Fri, 2 Mar 2018 00:44:48 +0200 Chavoux Luyt via Lazarus wrote: > Hi > > I am feeling very stupid now, but not sure where exactly to look. I > installed Lazarus using aptitude on Debian (under /use/libs/lazarus). > However, I see that that whole directory tree belongs to root. So if I > install a new package, how does it get added to the IDE (since I am running > lazarus as a normal user)? The IDE notices that the default directories are read only and puts the files instead under ~/.lazarus/lib/. > Should the installation not give the lazarus > directories to the users group instead of root? No, that would be a security hazard. Of course you can install Lazarus in your home directory as your user. The debian packages are not made for that. You can for example use svn. > I suppose there is some > kind of magic involved that makes it work when recompiling the IDE with the > new packages, but I would like to understand what. Mattias From sysrpl at gmail.com Fri Mar 2 08:34:58 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 2 Mar 2018 02:34:58 -0500 Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: <20180228155745.1379fef2@limapholos.matflo.wg> References: <20180228155745.1379fef2@limapholos.matflo.wg> Message-ID: I just wanted to point out that in the 1.8 svn branch the docked sparta form designer does not work with the gtk2 toolkit. A fix was issued in October here: https://bugs.freepascal.org/view.php?id=32199 But it didn't seem to make it into the 1.8 branch. -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Fri Mar 2 09:54:57 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Fri, 2 Mar 2018 09:54:57 +0100 Subject: [Lazarus] TToolButton:.Marked Message-ID: Does anybody know what the property "Marked" of TToolButton is good for? I never realized it, but it's been there at least since Laz 1.0, and in Delphi at least since D7. And it does not do anything, even in Delphi. Delphi's help (http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/ComCtrls_TToolButton_Marked.html) says: "Use Marked to get or set whether the button is marked." What a nonsense! Then: "A marked button has a shaded surface. ". Well, in reality they look the same. And even if this were true what would be the difference to "Down" then? Werner From lazarus at kluug.net Fri Mar 2 11:38:16 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 2 Mar 2018 11:38:16 +0100 Subject: [Lazarus] Strange ComboBox behavior (Windows) In-Reply-To: References: <6ed2539a-0546-fbf0-7d47-1bf30dec63ca@kluug.net> Message-ID: On 28.02.2018 14:02, Rolf Wetjen(rolf.wetjen at mail.de) wrote: > I was in doubt but to my own surprise it's possible to patch only > win32wsstdctrls.pp for both issues. > Patch is attached. Are you the one to apply it or shall I do something > else? Please create a bug report on http://mantis.freepascal.org and attach the patch there. Thank you! Either I'll take a look at it later (I am leaving now for some time) or maybe some other developer. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From rik at graficalc.nl Fri Mar 2 12:57:00 2018 From: rik at graficalc.nl (rvk) Date: Fri, 2 Mar 2018 04:57:00 -0700 (MST) Subject: [Lazarus] TToolButton:.Marked In-Reply-To: References: Message-ID: <1519991820391-0.post@n3.nabble.com> Free Pascal - Lazarus mailing list wrote > Does anybody know what the property "Marked" of TToolButton is good for? According to the Microsoft documentation Marked is TBSTATE_MARKED. Down is TBSTATE_PRESSED OR TBSTATE_CHECKED. So they ARE different. TBSTATE_MARKED is described as: Version 4.71. The button is marked. The interpretation of a marked item is dependent upon the application. https://msdn.microsoft.com/en-us/library/windows/desktop/bb760437(v=vs.85).aspx So it's up to the application to implement this. Just look at it as an extra "option" for the button. Rik -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From lubos.pintes at gmail.com Fri Mar 2 13:40:24 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Fri, 2 Mar 2018 13:40:24 +0100 Subject: [Lazarus] Running Lazarus in Lazarus Message-ID: Hello, Is it possible to run Lazarus as an application in IDE? I have a freeze somewhere, (Windows 10's "not responding" addition in a title bar). A --debug-log doesn't help me much, because it is not flushed. I know how to rebuild IDE, but don't know how to run it so that it can be debugged. Thanks! From nc-gaertnma at netcologne.de Fri Mar 2 13:45:50 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 2 Mar 2018 13:45:50 +0100 Subject: [Lazarus] Running Lazarus in Lazarus In-Reply-To: References: Message-ID: <20180302134550.011bc11c@limapholos.matflo.wg> On Fri, 2 Mar 2018 13:40:24 +0100 Lubos Pintes via Lazarus wrote: > Hello, > Is it possible to run Lazarus as an application in IDE? I have a freeze > somewhere, (Windows 10's "not responding" addition in a title bar). > A --debug-log doesn't help me much, because it is not flushed. > I know how to rebuild IDE, but don't know how to run it so that it can > be debugged. Open the lazarus\lazarus.lpi and run it. Mattias From lubos.pintes at gmail.com Fri Mar 2 14:49:15 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Fri, 2 Mar 2018 14:49:15 +0100 Subject: [Lazarus] Running Lazarus in Lazarus In-Reply-To: <20180302134550.011bc11c@limapholos.matflo.wg> References: <20180302134550.011bc11c@limapholos.matflo.wg> Message-ID: This is /ide/lazarus.lpi, where is directory with whole Lazarus repo right? Because my code I added there is not compiled. I added my files to /interfaces/lcl.lpk. When I build the IDE from tools menu, my code is compiled. But when I open the above-mentioned project, it runs but behaves differently. Dňa 02.03.2018 o 13:45 Mattias Gaertner via Lazarus napísal(a): > On Fri, 2 Mar 2018 13:40:24 +0100 > Lubos Pintes via Lazarus wrote: > >> Hello, >> Is it possible to run Lazarus as an application in IDE? I have a freeze >> somewhere, (Windows 10's "not responding" addition in a title bar). >> A --debug-log doesn't help me much, because it is not flushed. >> I know how to rebuild IDE, but don't know how to run it so that it can >> be debugged. > > Open the lazarus\lazarus.lpi and run it. > > Mattias > From nc-gaertnma at netcologne.de Fri Mar 2 15:05:12 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 2 Mar 2018 15:05:12 +0100 Subject: [Lazarus] Running Lazarus in Lazarus In-Reply-To: References: <20180302134550.011bc11c@limapholos.matflo.wg> Message-ID: <20180302150512.03106802@limapholos.matflo.wg> On Fri, 2 Mar 2018 14:49:15 +0100 Lubos Pintes via Lazarus wrote: > This is /ide/lazarus.lpi, where is directory with > whole Lazarus repo right? Yes, sorry. > Because my code I added there is not compiled. I added my files to > /interfaces/lcl.lpk. Why did you add files to the LCL? That's quiet unusual. > When I build the IDE from tools menu, my > code is compiled. But when I open the above-mentioned project, it runs > but behaves differently. Check Tools/ Options / Lazarus directory. The lazarus.lpi runs the default lazarus.exe. Mattias From lubos.pintes at gmail.com Fri Mar 2 15:36:45 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Fri, 2 Mar 2018 15:36:45 +0100 Subject: [Lazarus] Running Lazarus in Lazarus In-Reply-To: <20180302150512.03106802@limapholos.matflo.wg> References: <20180302134550.011bc11c@limapholos.matflo.wg> <20180302150512.03106802@limapholos.matflo.wg> Message-ID: Hello, I added my files to lcl.lpk, because I am developing an UI Automation support for LCL, Win32 WidgetSet more concretely. And all files from win32 directory are there, so I also added the UIA files there. That means into win32\ subdirectory and to the lcl.lpk. Dňa 02.03.2018 o 15:05 Mattias Gaertner via Lazarus napísal(a): > On Fri, 2 Mar 2018 14:49:15 +0100 > Lubos Pintes via Lazarus wrote: > >> This is /ide/lazarus.lpi, where is directory with >> whole Lazarus repo right? > > Yes, sorry. > >> Because my code I added there is not compiled. I added my files to >> /interfaces/lcl.lpk. > > Why did you add files to the LCL? That's quiet unusual. > > >> When I build the IDE from tools menu, my >> code is compiled. But when I open the above-mentioned project, it runs >> but behaves differently. > > Check Tools/ Options / Lazarus directory. > The lazarus.lpi runs the default lazarus.exe. > > Mattias > From ngbarbier at gmail.com Fri Mar 2 18:07:46 2018 From: ngbarbier at gmail.com (guy barbier) Date: Fri, 2 Mar 2018 18:07:46 +0100 Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: References: <20180228155745.1379fef2@limapholos.matflo.wg> Message-ID: Anybody can tell me why, when I want to download lazarus-1.8.2.deb I have the 1.8.1 one? Thanks 2018-03-02 8:34 GMT+01:00 Anthony Walter via Lazarus < lazarus at lists.lazarus-ide.org>: > I just wanted to point out that in the 1.8 svn branch the docked sparta > form designer does not work with the gtk2 toolkit. A fix was issued in > October here: > > https://bugs.freepascal.org/view.php?id=32199 > > But it didn't seem to make it into the 1.8 branch. > > -- > _______________________________________________ > 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 lubos.pintes at gmail.com Sat Mar 3 10:04:46 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Sat, 3 Mar 2018 10:04:46 +0100 Subject: [Lazarus] Running Lazarus in Lazarus In-Reply-To: <20180302150512.03106802@limapholos.matflo.wg> References: <20180302134550.011bc11c@limapholos.matflo.wg> <20180302150512.03106802@limapholos.matflo.wg> Message-ID: Hi, I think the file is malformed somehow. Yes, indeed it runs the default Lazarus, but it is unable to build it. Obviously, it would be impossible to rewrite the running program. So someone could possibly fix the lazarus.lpi. So I renamed the Lazarus.exe, then opened the renamed IDE, pressed F9 and the "Program not found" error appeared. I then tried to build with Ctrl+F9, and the following was written: The project's compiler options has no compile command. See Project / Compiler Options ... / Compilation So how can I fix this? Or can someone fix the lazarus.lpi? Thanks! Dňa 02.03.2018 o 15:05 Mattias Gaertner via Lazarus napísal(a): > On Fri, 2 Mar 2018 14:49:15 +0100 > Lubos Pintes via Lazarus wrote: > >> This is /ide/lazarus.lpi, where is directory with >> whole Lazarus repo right? > > Yes, sorry. > >> Because my code I added there is not compiled. I added my files to >> /interfaces/lcl.lpk. > > Why did you add files to the LCL? That's quiet unusual. > > >> When I build the IDE from tools menu, my >> code is compiled. But when I open the above-mentioned project, it runs >> but behaves differently. > > Check Tools/ Options / Lazarus directory. > The lazarus.lpi runs the default lazarus.exe. > > Mattias > From nc-gaertnma at netcologne.de Sat Mar 3 10:20:06 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 3 Mar 2018 10:20:06 +0100 Subject: [Lazarus] Running Lazarus in Lazarus In-Reply-To: References: <20180302134550.011bc11c@limapholos.matflo.wg> <20180302150512.03106802@limapholos.matflo.wg> Message-ID: <20180303102006.57ff24d9@limapholos.matflo.wg> On Sat, 3 Mar 2018 10:04:46 +0100 Lubos Pintes via Lazarus wrote: > Hi, > I think the file is malformed somehow. Yes, indeed it runs the default > Lazarus, but it is unable to build it. The lazarus.lpi does not contain the installed packages, so it cannot build the IDE. Use Tools / Build Lazarus to build Lazarus. Mattias From nc-gaertnma at netcologne.de Sat Mar 3 10:29:57 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 3 Mar 2018 10:29:57 +0100 Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: References: <20180228155745.1379fef2@limapholos.matflo.wg> Message-ID: <20180303102957.7c49ce20@limapholos.matflo.wg> On Fri, 2 Mar 2018 18:07:46 +0100 guy barbier via Lazarus wrote: > Anybody can tell me why, when I want to download lazarus-1.8.2.deb I have > the 1.8.1 one? I guess you mean 1.8.0-1. Sourceforge has some trouble since a week. Currently I don't see the 1.8.2 folders. Mattias From nc-gaertnma at netcologne.de Sat Mar 3 10:47:13 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 3 Mar 2018 10:47:13 +0100 Subject: [Lazarus] Lazarus directory settings In-Reply-To: References: Message-ID: <20180303104713.54638b49@limapholos.matflo.wg> On Fri, 2 Mar 2018 01:02:02 +0200 Chavoux Luyt via Lazarus wrote: > Second stupid question: Under options I can set the default Lazarus > directory. Is there a setting somewhere for default ppu (or unit source) > directory? No. Every package has its own ppu directory. > I get an error when trying to install a new component (unrelated > to lazreport): > lazarus.pp(1,1) Fatal: Cannot find lazreport used by Lazarus. Build Lazarus with -vt. See, if the compiler can't find lazreport.ppu or does not like what it found. > However, I already compiled and installed the lazreport component (And can > see it on a tab among the other controls). You lost me. How did you 'installed the lazreport and see it' with a Fatal error? > My only guess is that the ppu file was not created because of a permissions issue? Mattias From michael at freepascal.org Sat Mar 3 11:15:51 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 3 Mar 2018 11:15:51 +0100 (CET) Subject: [Lazarus] Package and project file format Message-ID: Hello, The package .lpk andproject .lpi file use the following format : And similarly Is it possible to get rid of the counts ? Reason: if 2 people add files to a package/project, it always creates conflicts when updating from the VCS. And if you're in bad luck, you need to change a lot of items. On the other hand, if you do The chance of conflicts becomes less, and the resolution easier. Michael. From michalis.kambi at gmail.com Sat Mar 3 11:42:12 2018 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Sat, 3 Mar 2018 11:42:12 +0100 Subject: [Lazarus] Package and project file format In-Reply-To: References: Message-ID: 2018-03-03 11:15 GMT+01:00 Michael Van Canneyt via Lazarus : > > Hello, > > The package .lpk andproject .lpi file use the following format : > > > > > > > > > > > > > > > > > And similarly > > > > > > > > > > > Is it possible to get rid of the counts ? > > Reason: if 2 people add files to a package/project, it always creates > conflicts when updating from the VCS. And if you're in bad luck, you need to > change a lot of items. > > On the other hand, if you do > > > > > > > The chance of conflicts becomes less, and the resolution easier. > I am guessing the Count="xxx" attribute, and the numeric suffixes to , are there to read and write these files using TXMLConfig class. Using TXMLConfig exposes an easy API to work with XML files, but it limits what you can do --- all the children nodes within the same parent must have a different name, so that you can do File1 := XmlConfig.GetValue('Units /Unit1/FileName/Value'); File2 := XmlConfig.GetValue('Units /Unit2/FileName/Value'); .... In Castle Game Engine, we added some extensions to TXMLConfig, in particular TCastleConfig.PathElement to address exactly this. It extracts a DOM element (TDOMElement) from TXMLConfig, and then you can use full power of the DOM unit to operate on this element (iterate on children etc.): https://github.com/castle-engine/castle-engine/blob/master/src/files/castlexmlconfig.pas#L258 . This way you can still use TXMLConfig API (GetValue / SetValue) for some tasks, but you can switch to using more powerful DOM API for other tasks. I thought maybe this is helpful :) Regards, Michalis From mailinglists at geldenhuys.co.uk Sat Mar 3 12:01:14 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 3 Mar 2018 11:01:14 +0000 Subject: [Lazarus] Package and project file format In-Reply-To: References: Message-ID: On 2018-03-03 10:15, Michael Van Canneyt via Lazarus wrote: > > Is it possible to get rid of the counts ? > > Reason: if 2 people add files to a package/project, it always creates > conflicts when updating from the VCS. And if you're in bad luck, you > need to change a lot of items. +1 This has been a long standing annoyance for me too. XML, JSON etc don't need count properties... That's relics from INI file formats. 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 michael at freepascal.org Sat Mar 3 12:11:19 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 3 Mar 2018 12:11:19 +0100 (CET) Subject: [Lazarus] Package and project file format In-Reply-To: References: Message-ID: On Sat, 3 Mar 2018, Graeme Geldenhuys via Lazarus wrote: > On 2018-03-03 10:15, Michael Van Canneyt via Lazarus wrote: >> >> Is it possible to get rid of the counts ? >> >> Reason: if 2 people add files to a package/project, it always creates >> conflicts when updating from the VCS. And if you're in bad luck, you >> need to change a lot of items. > > > +1 > This has been a long standing annoyance for me too. XML, JSON etc don't > need count properties... That's relics from INI file formats. Well, I originally wanted to propose switching to JSON, but I thought that might be stretching the goodwill a bit too much... Michael. From doug at moosemail.net Sat Mar 3 12:40:44 2018 From: doug at moosemail.net (DougC) Date: Sat, 03 Mar 2018 06:40:44 -0500 Subject: [Lazarus] Package and project file format In-Reply-To: References: Message-ID: <161ebaa067a.11b1bcff237031.4513822978324448624@moosemail.net> +1 for switch to JSON! ---- On Sat, 03 Mar 2018 06:11:19 -0500 Michael Van Canneyt via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- Well, I originally wanted to propose switching to JSON, but I thought that might be stretching the goodwill a bit too much... -------------- next part -------------- An HTML attachment was scrubbed... URL: From lubos.pintes at gmail.com Sat Mar 3 12:43:28 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Sat, 3 Mar 2018 12:43:28 +0100 Subject: [Lazarus] Package and project file format In-Reply-To: References: Message-ID: Hi, +1 for this. And really it looks stupid to me to have a different tag for every item like Item1 or Unit1. Dňa 03.03.2018 o 11:15 Michael Van Canneyt via Lazarus napísal(a): > > Hello, > > The package .lpk andproject .lpi file use the following format : > >     >       >         >         >         >       >       >         >         >         >         >         >       > > > And similarly >      >       >         >       >       >         >         >       > > > Is it possible to get rid of the counts ? > > Reason: if 2 people add files to a package/project, it always creates > conflicts when updating from the VCS. And if you're in bad luck, you > need to change a lot of items. > > On the other hand, if you do >      >       >       >         >       > > The chance of conflicts becomes less, and the resolution easier. > > Michael. From dezlov at gmail.com Sat Mar 3 17:27:10 2018 From: dezlov at gmail.com (Denis Kozlov) Date: Sat, 3 Mar 2018 16:27:10 +0000 Subject: [Lazarus] Package and project file format In-Reply-To: References: Message-ID: <20d0a2cf-a1bb-8247-4a9e-074cbab76ae8@gmail.com> +1 for getting rid of unit count and numeric tag suffixes from XML project/package files. They always create trouble for version control. -1 for switching to JSON. Seems radical and unjustified, in my opinion. Denis On 03/03/2018 10:15, Michael Van Canneyt via Lazarus wrote: > > Hello, > > The package .lpk andproject .lpi file use the following format : > >     >       >         >         >         >       >       >         >         >         >         >         >       > > > And similarly >      >       >         >       >       >         >         >       > > > Is it possible to get rid of the counts ? > > Reason: if 2 people add files to a package/project, it always creates > conflicts when updating from the VCS. And if you're in bad luck, you > need to change a lot of items. > > On the other hand, if you do >      >       >       >         >       > > The chance of conflicts becomes less, and the resolution easier. > > Michael. From werner.pamler at freenet.de Sat Mar 3 18:58:11 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Sat, 3 Mar 2018 18:58:11 +0100 Subject: [Lazarus] TToolButton:.Marked In-Reply-To: <1519991820391-0.post@n3.nabble.com> References: <1519991820391-0.post@n3.nabble.com> Message-ID: Thanks. Something like an additional boolean Tag, then. From michael at freepascal.org Sun Mar 4 10:14:24 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 4 Mar 2018 10:14:24 +0100 (CET) Subject: [Lazarus] Package and project file format In-Reply-To: <20d0a2cf-a1bb-8247-4a9e-074cbab76ae8@gmail.com> References: <20d0a2cf-a1bb-8247-4a9e-074cbab76ae8@gmail.com> Message-ID: On Sat, 3 Mar 2018, Denis Kozlov via Lazarus wrote: > +1 for getting rid of unit count and numeric tag suffixes from XML > project/package files. They always create trouble for version control. That was my point. > > -1 for switching to JSON. Seems radical and unjustified, in my opinion. Radical ? Absolutely. Unjustified ? A matter of opinion... JSON has many advantages over XML. Note that I didn't ask for that, it was just a remark on comments by someone else... If the counts are removed, my immediate goal (less conflicts) is reached. Michael. From patspiper at gmail.com Sun Mar 4 12:07:57 2018 From: patspiper at gmail.com (patspiper) Date: Sun, 4 Mar 2018 13:07:57 +0200 Subject: [Lazarus] fpreport designer In-Reply-To: References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> Message-ID: <3c69f6c5-129f-e937-50ff-7684d5a96c67@gmail.com> On 27/02/18 19:04, Michael Van Canneyt via Lazarus wrote: > The problem is in my misunderstanding how the OI works. For some > reason, it > refuses to display component references - even though they are set - > if the component does not include csDesigning in the component state. > I fixed that. > > All reported bugs and feature requests except 1 should now be fixed, I > also made some other improvements. > > Make sure you update the FPC repository, some changes to the base > classes were needed. > > Thanks for reporting the bugs ! Any chance of having the following bug fixed today so that i can continue debugging fpReport? #3306 FPReport IDE designer: Data property doesn't list any Data entries, even though they are listed in the right window Stephano -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sun Mar 4 12:18:22 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 4 Mar 2018 12:18:22 +0100 (CET) Subject: [Lazarus] fpreport designer In-Reply-To: <3c69f6c5-129f-e937-50ff-7684d5a96c67@gmail.com> References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> <3c69f6c5-129f-e937-50ff-7684d5a96c67@gmail.com> Message-ID: On Sun, 4 Mar 2018, patspiper via Lazarus wrote: > On 27/02/18 19:04, Michael Van Canneyt via Lazarus wrote: >> The problem is in my misunderstanding how the OI works. For some reason, it >> refuses to display component references - even though they are set - if the >> component does not include csDesigning in the component state. I fixed >> that. >> >> All reported bugs and feature requests except 1 should now be fixed, I also >> made some other improvements. >> >> Make sure you update the FPC repository, some changes to the base classes >> were needed. >> >> Thanks for reporting the bugs ! > > Any chance of having the following bug fixed today so that i can continue > debugging fpReport? > > #3306 FPReport IDE designer: > Data property doesn't list any Data entries, even though they are listed in > the right window I will try. It's not easy because its something that happens in the IDE. So I must be able to reconstruct it outside the IDE. Michael. From ghf03464 at nifty.ne.jp Sun Mar 4 12:22:31 2018 From: ghf03464 at nifty.ne.jp (Haruo Toda) Date: Sun, 4 Mar 2018 20:22:31 +0900 (JST) Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: <20180303102957.7c49ce20@limapholos.matflo.wg> References: <20180303102957.7c49ce20@limapholos.matflo.wg> <20180228155745.1379fef2@limapholos.matflo.wg> Message-ID: <1242288101.238631520162551701.ghf03464@nifty.ne.jp> Hello Folks, Is Sourceforge troubling? I cannot download 1.8.2 too. ----- Original Message ----- Date: Sat, 3 Mar 2018 10:29:57 +0100 To: lazarus at lists.lazarus-ide.org Subject: Re: [Lazarus] Lazarus Release 1.8.2 From: Mattias Gaertner via Lazarus Cc: Mattias Gaertner On Fri, 2 Mar 2018 18:07:46 +0100 guy barbier via Lazarus wrote: > Anybody can tell me why, when I want to download lazarus-1.8.2.deb I have > the 1.8.1 one? I guess you mean 1.8.0-1. Sourceforge has some trouble since a week. Currently I don't see the 1.8.2 folders. Mattias -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus From patspiper at gmail.com Sun Mar 4 16:58:32 2018 From: patspiper at gmail.com (patspiper) Date: Sun, 4 Mar 2018 17:58:32 +0200 Subject: [Lazarus] fpreport designer In-Reply-To: References: <4e97d91d-92b9-e7f8-c8b4-83d8ab7c3772@gmail.com> <7f33282e-86bc-b9dd-8c4a-c9b7c883f5a3@gmail.com> <54143c4f-cec6-534e-c2de-86900e3cffc4@gmail.com> <61c2157f-3df7-e86e-9f93-fe284d1ad4f7@gmx.at> <2dbf704a-8a9f-e541-367c-1f4641f62361@gmx.at> <3c69f6c5-129f-e937-50ff-7684d5a96c67@gmail.com> Message-ID: <5d33890d-9fae-af04-669e-d6b11edb3a0e@gmail.com> On 04/03/18 13:18, Michael Van Canneyt via Lazarus wrote: > > On Sun, 4 Mar 2018, patspiper via Lazarus wrote: > >> Any chance of having the following bug fixed today so that i can >> continue debugging fpReport? >> >> #3306 FPReport IDE >> designer: Data property doesn't list any Data entries, even though >> they are listed in the right window > > I will try. > > It's not easy because its something that happens in the IDE. So I must > be able to reconstruct it outside the IDE. Thanks for fixing it so quickly! Next in line holding further testing is #3308 (FPReport IDE designer: Handling of New/Open/Save proposal) These 2 bugs are of lower importance than the above, but help make more testing: #3305 FPReport designer: Column headers/footers don't appear in preview when the page's ColumnCount is 1 #3304 FPReport designer: HeaderBand and FooterBands properties of DataBand are not persistent Whenever you have time for them... Stephano -------------- next part -------------- An HTML attachment was scrubbed... URL: From lubos.pintes at gmail.com Sun Mar 4 17:58:09 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Sun, 4 Mar 2018 17:58:09 +0100 Subject: [Lazarus] An expression is returning false, why? Message-ID: Hello, Sorry for possibly stupid subject and maybe off-topic question. In my UIA code, I am testing if a control has focus. So I have a FControl: TControl declared in my class. Now say FControl contains a TForm1 instance, simply we have very simple program with just an empty window. Then an expression: Result := FControl is TWinControl and TWinControl(FControl).Focused; returns false. I am sure the form has focus..., because ShowMessage(BoolToStr(Focused)) returns -1, which represents true... From vojtech.cihak at atlas.cz Sun Mar 4 20:44:59 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sun, 04 Mar 2018 20:44:59 +0100 Subject: [Lazarus] =?utf-8?q?An_expression_is_returning_false=2C_why=3F?= In-Reply-To: 0000000086f700010df00161502e References: 0000000086f700010df00161502e Message-ID: <20180304204459.5E5622B1@atlas.cz> Hi, I just tested. Active Form always returns Focused False. Use property Active instead.   Result := (FControl is TCustomForm) and TCustomForm(FControl).Active;   V. ______________________________________________________________ > Od: Lubos Pintes via Lazarus > Komu: lazarus at lists.lazarus.freepascal.org > Datum: 04.03.2018 17:58 > Předmět: [Lazarus] An expression is returning false, why? > Hello, Sorry for possibly stupid subject and maybe off-topic question. In my UIA code, I am testing if a control has focus. So I have a FControl: TControl declared in my class. Now say FControl contains a TForm1 instance, simply we have very simple program with just an empty window. Then an expression: Result := FControl is TWinControl and TWinControl(FControl).Focused; returns false. I am sure the form has focus..., because ShowMessage(BoolToStr(Focused)) returns -1, which represents true... -- _______________________________________________ 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 lubos.pintes at gmail.com Sun Mar 4 21:48:45 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Sun, 4 Mar 2018 21:48:45 +0100 Subject: [Lazarus] An expression is returning false, why? In-Reply-To: <20180304204459.5E5622B1@atlas.cz> References: <20180304204459.5E5622B1@atlas.cz> Message-ID: Hello and thank for a reply. Do I understand correctly that a form is a special case? What about TEdit or TButton for example? I am encapsulating a TControl instance and am asking for properties needed for UI Automation, occasionally asking if the encapsulated control is a TWinControl instance. I tested the simplest LCL program, just an empty form, and it really caused me headache. I just forcefully set the HasKeyboardFocus property to true for testing and the form was reported correctly. Dňa 04.03.2018 o 20:44 Vojtěch Čihák via Lazarus napísal(a): > Hi, > > I just tested. Active Form always returns Focused False. Use property > Active instead. > > Result := (FControl is TCustomForm) and TCustomForm(FControl).Active; > > V. > > ______________________________________________________________ > > Od: Lubos Pintes via Lazarus > > Komu: lazarus at lists.lazarus.freepascal.org > > Datum: 04.03.2018 17:58 > > Předmět: [Lazarus] An expression is returning false, why? > > > > Hello, > Sorry for possibly stupid subject and maybe off-topic question. In my > UIA code, I am testing if a control has focus. So I have a FControl: > TControl declared in my class. > Now say FControl contains a TForm1 instance, simply we have very simple > program with just an empty window. Then an expression: > Result := FControl is TWinControl and TWinControl(FControl).Focused; > returns false. I am sure the form has focus..., because > ShowMessage(BoolToStr(Focused)) returns -1, which represents true... > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > > From mailinglists at geldenhuys.co.uk Sun Mar 4 23:51:19 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 4 Mar 2018 22:51:19 +0000 Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: <1242288101.238631520162551701.ghf03464@nifty.ne.jp> References: <20180303102957.7c49ce20@limapholos.matflo.wg> <20180228155745.1379fef2@limapholos.matflo.wg> <1242288101.238631520162551701.ghf03464@nifty.ne.jp> Message-ID: On 2018-03-04 11:22, Haruo Toda via Lazarus wrote: > Is Sourceforge troubling? > I cannot download 1.8.2 too. I think there is some global service outage or something. I haven't been able to access a few Git repositories or hosted project websites on SourceForge.net all weekend. 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 capricorn8159 at gmail.com Mon Mar 5 00:08:24 2018 From: capricorn8159 at gmail.com (Shaun O'Connor) Date: Sun, 4 Mar 2018 23:08:24 +0000 Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: References: <20180303102957.7c49ce20@limapholos.matflo.wg> <20180228155745.1379fef2@limapholos.matflo.wg> <1242288101.238631520162551701.ghf03464@nifty.ne.jp> Message-ID: <5a9c7c66.5198df0a.8d5ff.9275@mx.google.com> 1.8.2 successfully downloaded from my area. Could be regional. From: Graeme Geldenhuys via Lazarus Sent: 04 March 2018 22:51 To: lazarus at lists.lazarus-ide.org Cc: Graeme Geldenhuys Subject: Re: [Lazarus] Lazarus Release 1.8.2 On 2018-03-04 11:22, Haruo Toda via Lazarus wrote: > Is Sourceforge troubling? > I cannot download 1.8.2 too. I think there is some global service outage or something. I haven't been able to access a few Git repositories or hosted project websites on SourceForge.net all weekend. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkitty42 at windstream.net Mon Mar 5 03:19:51 2018 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sun, 4 Mar 2018 21:19:51 -0500 Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: References: <20180303102957.7c49ce20@limapholos.matflo.wg> <20180228155745.1379fef2@limapholos.matflo.wg> <1242288101.238631520162551701.ghf03464@nifty.ne.jp> Message-ID: On 03/04/2018 05:51 PM, Graeme Geldenhuys via Lazarus wrote: > On 2018-03-04 11:22, Haruo Toda via Lazarus wrote: >> Is Sourceforge troubling? >> I cannot download 1.8.2 too. > > I think there is some global service outage or something. I haven't been able to > access a few Git repositories or hosted project websites on SourceForge.net all > weekend. SF had a move to a new data center a week or two ago... some projects are still having problems... i've only today just been able to update from numerous repos hosted on SF... it was surprising to a point... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* From zeljko at holobit.net Mon Mar 5 08:53:08 2018 From: zeljko at holobit.net (zeljko) Date: Mon, 5 Mar 2018 08:53:08 +0100 Subject: [Lazarus] An expression is returning false, why? In-Reply-To: References: <20180304204459.5E5622B1@atlas.cz> Message-ID: <0051256a-9084-9441-e30c-a366db8378f7@holobit.net> On 03/04/2018 09:48 PM, Lubos Pintes via Lazarus wrote: > Hello and thank for a reply. Do I understand correctly that a form is a > special case? > What about TEdit or TButton for example? I am encapsulating a TControl > instance and am asking for properties needed for UI Automation, > occasionally asking if the encapsulated control is a TWinControl instance. > I tested the simplest LCL program, just an empty form, and it really > caused me headache. I just forcefully set the HasKeyboardFocus property > to true for testing and the form was reported correctly. Use MyForm.ActiveControl to get focused control on active form. zeljko From zeljko at holobit.net Mon Mar 5 08:53:08 2018 From: zeljko at holobit.net (zeljko) Date: Mon, 5 Mar 2018 08:53:08 +0100 Subject: [Lazarus] An expression is returning false, why? In-Reply-To: References: <20180304204459.5E5622B1@atlas.cz> Message-ID: <0051256a-9084-9441-e30c-a366db8378f7@holobit.net> On 03/04/2018 09:48 PM, Lubos Pintes via Lazarus wrote: > Hello and thank for a reply. Do I understand correctly that a form is a > special case? > What about TEdit or TButton for example? I am encapsulating a TControl > instance and am asking for properties needed for UI Automation, > occasionally asking if the encapsulated control is a TWinControl instance. > I tested the simplest LCL program, just an empty form, and it really > caused me headache. I just forcefully set the HasKeyboardFocus property > to true for testing and the form was reported correctly. Use MyForm.ActiveControl to get focused control on active form. zeljko From lubos.pintes at gmail.com Mon Mar 5 09:41:41 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Mon, 5 Mar 2018 09:41:41 +0100 Subject: [Lazarus] An expression is returning false, why? In-Reply-To: <0051256a-9084-9441-e30c-a366db8378f7@holobit.net> References: <20180304204459.5E5622B1@atlas.cz> <0051256a-9084-9441-e30c-a366db8378f7@holobit.net> Message-ID: Hello and thank. And in general, if I have a TControl instance, can you tell me a reliable algorithm that tells me if the control has a focus? Only if it makes sense of course. So probably something like I tried before, that is the control is a TWinControl instance and the Focused property is true? I know it doesn't work for a form itself. Maybe this is a bug? Dňa 05.03.2018 o 8:53 zeljko via Lazarus napísal(a): > On 03/04/2018 09:48 PM, Lubos Pintes via Lazarus wrote: >> Hello and thank for a reply. Do I understand correctly that a form is >> a special case? >> What about TEdit or TButton for example? I am encapsulating a TControl >> instance and am asking for properties needed for UI Automation, >> occasionally asking if the encapsulated control is a TWinControl >> instance. >> I tested the simplest LCL program, just an empty form, and it really >> caused me headache. I just forcefully set the HasKeyboardFocus >> property to true for testing and the form was reported correctly. > > Use MyForm.ActiveControl to get focused control on active form. > > zeljko From nc-gaertnma at netcologne.de Mon Mar 5 10:41:48 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 5 Mar 2018 10:41:48 +0100 Subject: [Lazarus] Lazarus Release 1.8.2 In-Reply-To: <1242288101.238631520162551701.ghf03464@nifty.ne.jp> References: <20180303102957.7c49ce20@limapholos.matflo.wg> <20180228155745.1379fef2@limapholos.matflo.wg> <1242288101.238631520162551701.ghf03464@nifty.ne.jp> Message-ID: <20180305104148.0e3033eb@limapholos.matflo.wg> On Sun, 4 Mar 2018 20:22:31 +0900 (JST) Haruo Toda via Lazarus wrote: > Hello Folks, > > Is Sourceforge troubling? > I cannot download 1.8.2 too. It seems to be back again. Mattias From giuliano.colla at fastwebnet.it Mon Mar 5 11:08:49 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 5 Mar 2018 11:08:49 +0100 Subject: [Lazarus] An expression is returning false, why? In-Reply-To: References: <20180304204459.5E5622B1@atlas.cz> <0051256a-9084-9441-e30c-a366db8378f7@holobit.net> Message-ID: Il 05/03/2018 09:41, Lubos Pintes via Lazarus ha scritto: > Hello and thank. And in general, if I have a TControl instance, can > you tell me a reliable algorithm that tells me if the control has a > focus? By definition, the focused control is the control which receives keyboard input. That's why the form in itself is never focused because a form doesn't handle keyboard input. With just a form you may strike any key, and nothing will happen: the keyboard input is simply ignored. The Form's ActiveControl property tells you which control has focus and will receive the keyboard input. The control's Focused property tells you if the control has focus. The focused control may be a button a TEdit, or whatever control which may perform an action upon striking a key. You may push a focused button by striking the enter key or the space bar, you may enter text on a Tedit, etc. Giuliano From giuliano.colla at fastwebnet.it Mon Mar 5 11:08:49 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 5 Mar 2018 11:08:49 +0100 Subject: [Lazarus] An expression is returning false, why? In-Reply-To: References: <20180304204459.5E5622B1@atlas.cz> <0051256a-9084-9441-e30c-a366db8378f7@holobit.net> Message-ID: Il 05/03/2018 09:41, Lubos Pintes via Lazarus ha scritto: > Hello and thank. And in general, if I have a TControl instance, can > you tell me a reliable algorithm that tells me if the control has a > focus? By definition, the focused control is the control which receives keyboard input. That's why the form in itself is never focused because a form doesn't handle keyboard input. With just a form you may strike any key, and nothing will happen: the keyboard input is simply ignored. The Form's ActiveControl property tells you which control has focus and will receive the keyboard input. The control's Focused property tells you if the control has focus. The focused control may be a button a TEdit, or whatever control which may perform an action upon striking a key. You may push a focused button by striking the enter key or the space bar, you may enter text on a Tedit, etc. Giuliano From patspiper at gmail.com Mon Mar 5 12:09:39 2018 From: patspiper at gmail.com (patspiper) Date: Mon, 5 Mar 2018 13:09:39 +0200 Subject: [Lazarus] TFPRreport vs TFPJSONReport Message-ID: TFPRreport and TFPJSONReport need some clarifications. Maybe MVC can confirm/correct the below: TFPRreport: - Report design can be setup by code *only*. - TFPReportData components must be linked to TFRReport by code - Can invoke the IDE integrated editor to design reports and open/save them from/to file. But they are useless to TFPRreport. TFPJSONReport: - Report design can be setup by code. - Can load/save report designs from/to file/stream/json (discarding design data if any). - TFPReportData components have to be linked to TFPJSONReport by code (sample code is needed when the report is loaded from file) - Can invoke the IDE integrated editor to design reports that are loaded/saved from/to the lfm only. - The IDE integrated editor cannot open a report designed by the standalone designer, or save a file to be used by the standalone designer. Note: Actually it can currently open a file, but possibly with nasty side effects. Stephano -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Mon Mar 5 12:20:56 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 5 Mar 2018 12:20:56 +0100 (CET) Subject: [Lazarus] TFPRreport vs TFPJSONReport In-Reply-To: References: Message-ID: On Mon, 5 Mar 2018, patspiper wrote: > TFPRreport and TFPJSONReport need some clarifications. Maybe MVC can > confirm/correct the below: > > TFPRreport: > - Report design can be setup by code *only*. Not correct. You can load from file. See WIKI, I added a section on that. > - TFPReportData components must be linked to TFRReport by code This is always so, but: The IDE contains a menu item in the component editor that links the available datasets to the report to make this easier. See also below for improvements in runtime. > - Can invoke the IDE integrated editor to design reports and open/save them > from/to file. But they are useless to TFPRreport. Not correct. You can load the design from file. It doesn't happen 'out of the box' of course. > > TFPJSONReport: > - Report design can be setup by code. Correct. > - Can load/save report designs from/to file/stream/json (discarding design > data if any). Correct. > - TFPReportData components have to be linked to TFPJSONReport by code (sample > code is needed when the report is loaded from file) Correct. > - Can invoke the IDE integrated editor to design reports that are > loaded/saved from/to the lfm only. They can also be loaded/saved to file, if you so desire. > - The IDE integrated editor cannot open a report designed by the standalone > designer, or save a file to be used by the standalone designer. Note: > Actually it can currently open a file, but possibly with nasty side effects. It should definitely be able to open it. What happens with the data, this is up for discussion. Currently I am toying with the idea that the IDE offers to add the missing data definitions to the form. I want to refactor the data handling a little so it can be used outside the designer - as you noticed, when loading a design from file, the data definitions are discarded. Then the loading in IDE can be improved... Please look at the WIKI, http://wiki.freepascal.org/FPReport, I added some explanations. I will add the 'Lazarus support' page after lunch. Michael. From giuliano.colla at fastwebnet.it Mon Mar 5 13:19:55 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 5 Mar 2018 13:19:55 +0100 Subject: [Lazarus] Lazarus Digest, Vol 121, Issue 49 In-Reply-To: References: Message-ID: <9d163041-a7ed-4ba9-7733-ba1e98a4b468@fastwebnet.it> Il 01/03/2018 23:44, Chavoux Luyt via Lazarus ha scritto: > I suppose there is some kind of magic involved that makes it work when > recompiling the IDE with the new packages, but I would like to > understand what. The magic is performed by Lazarus IDE, and by startlazarus. If Lazarus IDE detects that your installation directory is read-only, when recompiling it will put the new Lazarus copy in your home directory (~/.lazarus/...) When you launch Lazarus via startlazarus, it will check if your home directory holds a Lazarus newer than the one in installation directory. If such is the case it will launch your personal copy. If you happen to update Lazarus, then the system copy in /usr/lib will be newer than your personal copy. In that case startlazarus will ask you which one you want to start. If you choose to launch the newly installed copy, the IDE will detect that your additional packages are missing and will add them to the list of required packages. Recompiling the IDE will add those packages and create a new personal copy, which now becomes newer than the system one, and you are properly set. Giuliano From lubos.pintes at gmail.com Tue Mar 6 11:18:07 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Tue, 6 Mar 2018 11:18:07 +0100 Subject: [Lazarus] Object inspector bug - exception Message-ID: Hello, Can you reproduce this? In Lazarus, execute this key sequence: F11, Ctrl+Tab, Tab, o, n, k Then this exception is raised: [Window Title] Lazarus IDE v1.9.0 - project1 [Content] List index (-1) out of bounds. Press OK to ignore and risk data corruption. Press Abort to kill the program. [OK] [Abort] Version doesn't matter, I believe this exists for a very long time, although I have fairly fresh version, several days old. From tc at epidata.info Tue Mar 6 11:22:38 2018 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Tue, 6 Mar 2018 11:22:38 +0100 Subject: [Lazarus] Object inspector bug - exception In-Reply-To: References: Message-ID: On 2018-03-06 11:18, Lubos Pintes via Lazarus wrote: > Hello, > Can you reproduce this? In Lazarus, execute this key sequence: > F11, Ctrl+Tab, Tab, o, n, k > Then this exception is raised: > [Window Title] > Lazarus IDE v1.9.0 - project1 > > [Content] > List index (-1) out of bounds. > > Press OK to ignore and risk data corruption. > Press Abort to kill the program. > > [OK] [Abort] > Version doesn't matter, I believe this exists for a very long time, > although I have fairly fresh version, several days old. > I can reproduce here: Lazarus 1.9.0 r57449M FPC 3.0.0 x86_64-linux-gtk2 I already get the A/V on pressing the "n" key. Regards, Torsten. From bartjunk64 at gmail.com Tue Mar 6 12:24:04 2018 From: bartjunk64 at gmail.com (Bart) Date: Tue, 6 Mar 2018 12:24:04 +0100 Subject: [Lazarus] Object inspector bug - exception In-Reply-To: References: Message-ID: On Tue, Mar 6, 2018 at 11:22 AM, Torsten Bonde Christiansen via Lazarus wrote: >> Can you reproduce this? In Lazarus, execute this key sequence: >> F11, Ctrl+Tab, Tab, o, n, k >> Then this exception is raised: >> List index (-1) out of bounds. >> > I can reproduce here: > Lazarus 1.9.0 r57449M FPC 3.0.0 x86_64-linux-gtk2 > > I already get the A/V on pressing the "n" key. I get it on "o" already. TApplication.HandleException List index (-1) out of bounds Stack trace: $0048587F $006F5663 FINDPROPERTYBYSEARCHTEXT, line 2526 of objectinspector.pp $006F5584 HANDLEUNSHIFTED, line 1492 of objectinspector.pp $006F51E8 TOICUSTOMPROPERTYGRID__HANDLESTANDARDKEYS, line 2590 of objectinspector.pp $006FE4D8 TOBJECTINSPECTORDLG__KEYDOWN, line 5562 of objectinspector.pp $005532C5 TWINCONTROL__KEYDOWNBEFOREINTERFACE, line 5679 of ./include/wincontrol.inc $00553520 TWINCONTROL__DOKEYDOWNBEFOREINTERFACE, line 5810 of ./include/wincontrol.inc $00553485 TWINCONTROL__DOKEYDOWNBEFOREINTERFACE, line 5791 of ./include/wincontrol.inc $00555987 TWINCONTROL__CNKEYDOWN, line 7183 of ./include/wincontrol.inc $0040F4D8 $00552BF1 TWINCONTROL__WNDPROC, line 5406 of ./include/wincontrol.inc $00601B39 DELIVERMESSAGE, line 112 of lclmessageglue.pas $0053AD1B TWINDOWPROCHELPER__DOWINDOWPROC, line 2534 of ./win32/win32callback.inc $0053B39B WINDOWPROC, line 2696 of ./win32/win32callback.inc $7563E0BB $75648849 $7564B145 LAZARUS END - cleaning up ... Hint: (lazarus) [TMainIDE.Destroy] B -> inherited Destroy... TMainIDE Bart From rik at graficalc.nl Tue Mar 6 14:45:16 2018 From: rik at graficalc.nl (Rik van Kekem) Date: Tue, 6 Mar 2018 14:45:16 +0100 Subject: [Lazarus] Object inspector bug - exception In-Reply-To: References: Message-ID: Op 06-03-2018 12:24 schreef Bart via Lazarus: > On Tue, Mar 6, 2018 at 11:22 AM, Torsten Bonde Christiansen via > Lazarus wrote: > >>> Can you reproduce this? In Lazarus, execute this key sequence: >>> F11, Ctrl+Tab, Tab, o, n, k >>> Then this exception is raised: >>> List index (-1) out of bounds. >>> > On Windows Lazarus 1.9 trunk too. You can shorten it to: - in a new project click on filter in the object inspector - press tab - press o - wait 1 second *) List index (-1) out of bounds. It's only a problem if you press Tab in the filter-edit and then press any key. Rik From bartjunk64 at gmail.com Tue Mar 6 15:35:46 2018 From: bartjunk64 at gmail.com (Bart) Date: Tue, 6 Mar 2018 15:35:46 +0100 Subject: [Lazarus] Object inspector bug - exception In-Reply-To: References: Message-ID: On Tue, Mar 6, 2018 at 2:45 PM, Rik van Kekem via Lazarus wrote: > On Windows Lazarus 1.9 trunk too. > You can shorten it to: > - in a new project click on filter in the object inspector > - press tab > - press o > - wait 1 second > *) List index (-1) out of bounds. > > It's only a problem if you press Tab in the filter-edit and then press any > key. Can someone file a bugreport please. I am unable to do so ATM. Bart From rik at graficalc.nl Tue Mar 6 17:12:40 2018 From: rik at graficalc.nl (Rik van Kekem) Date: Tue, 6 Mar 2018 17:12:40 +0100 Subject: [Lazarus] Object inspector bug - exception In-Reply-To: References: Message-ID: <96c92ff9-e129-edbe-745c-0a9c310845c0@graficalc.nl> > Can someone file a bugreport please. > I am unable to do so ATM. Done. https://bugs.freepascal.org/view.php?id=33344 Rik From rolf.wetjen at mail.de Tue Mar 6 18:52:30 2018 From: rolf.wetjen at mail.de (Rolf Wetjen(rolf.wetjen@mail.de)) Date: Tue, 06 Mar 2018 17:52:30 +0000 Subject: [Lazarus] ListView.ScrollBy not working? Message-ID: Does anybody know how to scroll a listview? Seems that ListView.ScrollBy isn't working, at least not for Windows. There's no TCustomListView.ScrollBy procedure and of course the default TWinControl implementation doesn't send a LVM_SCROLL message to the MS ListView control. Probably a bug? Rolf -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Tue Mar 6 20:27:58 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 06 Mar 2018 20:27:58 +0100 Subject: [Lazarus] =?utf-8?q?Floats_not_streamed_always_=28bug_in_trunk=29?= Message-ID: <20180306202758.C4C4D08D@atlas.cz> Hi,   I found bug in Lazarus 1.9 (Lazarus 1.9.0 r57442M FPC 3.1.1 x86_64-linux-qt). Properties of type Float are not streamed to *.lfm when theirs value =0. It is not problem with for example TFloatSpinEdit where is "default" =0 (default means "value set in constructor" here, since floats cannot have default). Some my components has "default" -100 and when I change it to 0, it is not stored.   Is it Lazarus or FPC issue? I'll fill bugreptort.   V. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Tue Mar 6 22:01:34 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 06 Mar 2018 22:01:34 +0100 Subject: [Lazarus] =?utf-8?q?Floats_not_streamed_always_=28bug_in_trunk=29?= In-Reply-To: 0000000087120001410801614f98 References: 0000000087120001410801614f98 Message-ID: <20180306220134.2EEC7767@atlas.cz> Reported: https://bugs.freepascal.org/view.php?id=33348   It happens with FPC 3.1.1 only, 3.0.4 works fine, so I reported it to FPC mantis.   V.  ______________________________________________________________ > Od: Vojtěch Čihák via Lazarus > Komu: Lazarus mailing list > Datum: 06.03.2018 20:27 > Předmět: [Lazarus] Floats not streamed always (bug in trunk) > Hi,   I found bug in Lazarus 1.9 (Lazarus 1.9.0 r57442M FPC 3.1.1 x86_64-linux-qt). Properties of type Float are not streamed to *.lfm when theirs value =0. It is not problem with for example TFloatSpinEdit where is "default" =0 (default means "value set in constructor" here, since floats cannot have default). Some my components has "default" -100 and when I change it to 0, it is not stored.   Is it Lazarus or FPC issue? I'll fill bugreptort.   V. ---------- -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Thu Mar 8 13:10:49 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Thu, 8 Mar 2018 15:10:49 +0300 Subject: [Lazarus] TMenu clone don't work, LCL bug? Message-ID: I think it's LCL bug. in demo, press button which copies MainMenu to PopupMenu and shows it. Linux gtk2: new menu works like mainmenu. Win10: new menu items don't work, menu item handler don't run. Alexey -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: tst-repro-showmenu.zip Type: application/zip Size: 3579 bytes Desc: not available URL: From svaa at ciberpiula.net Thu Mar 8 16:07:46 2018 From: svaa at ciberpiula.net (Santiago A.) Date: Thu, 8 Mar 2018 16:07:46 +0100 Subject: [Lazarus] SQLdb_Tutorial3 error Message-ID: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> Hello: I'm trying to "SQLdb_Tutorial3" example with sqlite3 connector. When the program executes Fquery.open it raises a SIGSEGV exception. sqlite3.dll is in the same directory that the binary. I have created the table employee, just in case. I don't know what else to check.  I can't debug anything else, the debug can't enter in "open" method. Any hint? Windows 7 32 bits, Lazarus 1.8.0 SVN: 56594, fpc 3.0.4 -- Saludos Santiago A. From leledumbo_cool at yahoo.co.id Thu Mar 8 20:42:59 2018 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Thu, 8 Mar 2018 12:42:59 -0700 (MST) Subject: [Lazarus] SQLdb_Tutorial3 error In-Reply-To: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> References: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> Message-ID: <1520538179625-0.post@n3.nabble.com> > Any hint? Code please. Zipped project directory (use Publish Project feature) is OK if single file example is not possible. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From rik at graficalc.nl Thu Mar 8 21:05:27 2018 From: rik at graficalc.nl (Rik van Kekem) Date: Thu, 8 Mar 2018 21:05:27 +0100 Subject: [Lazarus] Object inspector bug - exception In-Reply-To: <96c92ff9-e129-edbe-745c-0a9c310845c0@graficalc.nl> References: <96c92ff9-e129-edbe-745c-0a9c310845c0@graficalc.nl> Message-ID: On 06/03/18 17:12, Rik van Kekem via Lazarus wrote: > > Can someone file a bugreport please. > > I am unable to do so ATM. > > Done. > https://bugs.freepascal.org/view.php?id=33344 The exception is fixed in trunk. But I was under the impression that using TAB in the Component-filter in Object Inspector would set the focus on the TreeView with the components. It doesn't. I never use it but apparently it sets the focus directly on the Property view. Is this the proper behavior (it was always this way) or is it supposed to go to the treeview? Again, I never use the keyboard there so maybe it's supposed to be that way. In Delphi you can "Tab" into the Component Treeview but it hasn't a Component-filter-edit. Rik From mlnglsts at bgss.hu Fri Mar 9 10:14:51 2018 From: mlnglsts at bgss.hu (Gabor Boros) Date: Fri, 9 Mar 2018 10:14:51 +0100 Subject: [Lazarus] How to catch an unhandled exception? Message-ID: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> Hi All, The result of the attached example (which use MWA's Firebird Pascal API) for me is an exception: Gstat execution time Fri Mar 9 09:29:18 2018 Database header page information: Flags 0 Generation 173 System Change Number 0 Page size 8192 ODS version 12.0 Oldest transaction 161 Oldest active 162 Oldest snapshot 162 Next transaction 164 Sequence number 0 Next attachment ID 27 Implementation HW=AMD/Intel/x64 little-endian OS=Linux CC=gcc Shadow count 0 Page buffers 0 Next header page 0 Database dialect 3 Creation date Feb 2, 2018 14:07:24 Attributes force write Variable header data: *END* Gstat completion time Fri Mar 9 09:29:18 2018 Heap dump by heaptrc unit 355 memory blocks allocated : 948252/948432 355 memory blocks freed : 948252/948432 0 unfreed memory blocks : 0 True heap size : 131072 True free heap : 131072 An unhandled exception occurred at $00007FF97F0A3147: EAccessViolation: $00007FF97F0A3147 If comment out cthreads from the uses the exception is: An unhandled exception occurred at $00007F21B71F5147: EAccessViolation: $00007F21B71F5147 $00007F21B71F751B $00007F21B71F769C $00007F21B746BFFF If run with gdb (and cthreads): Heap dump by heaptrc unit 355 memory blocks allocated : 948252/948432 355 memory blocks freed : 948252/948432 0 unfreed memory blocks : 0 True heap size : 131072 True free heap : 131072 [Thread 0x7ffff5991700 (LWP 2874) exited] [Thread 0x7ffff6192700 (LWP 2873) exited] [Thread 0x7ffff7fe3740 (LWP 2869) exited] Cannot find user-level thread for LWP 2875: generic error Any idea how to detect what/where is the source of the exception? I use Linux 64bit, FPC 3.0.4 and Lazarus fixes_1_8. Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: FB3API_IBX.tar.gz Type: application/x-gzip Size: 1617 bytes Desc: not available URL: From lubos.pintes at gmail.com Fri Mar 9 10:17:24 2018 From: lubos.pintes at gmail.com (Lubos Pintes) Date: Fri, 9 Mar 2018 10:17:24 +0100 Subject: [Lazarus] LCLMessageGlue.pas, typo in debug output? Message-ID: Hello, Just noticed in LCLMessageGlue.pas on line 98: and (TLMessage(AMessage).Msg < CN_KEYDOWN ) maybe there could be <> like on other lines in that IFDEF? Not sure, just noticed little asymmetry. From svaa at ciberpiula.net Fri Mar 9 10:41:49 2018 From: svaa at ciberpiula.net (Santiago A.) Date: Fri, 9 Mar 2018 10:41:49 +0100 Subject: [Lazarus] SQLdb_Tutorial3 error In-Reply-To: <1520538179625-0.post@n3.nabble.com> References: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> <1520538179625-0.post@n3.nabble.com> Message-ID: <558fc42d-85db-d3ca-96dc-3c68df88a4bf@ciberpiula.net> El 08/03/2018 a las 20:42, leledumbo via Lazarus escribió: >> Any hint? > Code please. Zipped project directory (use Publish Project feature) is OK if > single file example is not possible. I will zip it, but sure you have it. The code is one of the examples installed with the standard lazarus 1.8.0 In windows: \examples\database\sqldbtutorial3\ Error in mainform.pas line 221, using sqlite connector -- Saludos Santiago A. -------------- next part -------------- A non-text attachment was scrubbed... Name: sqdbltutorial3.zip Type: application/x-zip-compressed Size: 8953 bytes Desc: not available URL: From tony.whyman at mccallumwhyman.com Fri Mar 9 10:47:43 2018 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Fri, 9 Mar 2018 09:47:43 +0000 Subject: [Lazarus] How to catch an unhandled exception? In-Reply-To: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> References: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> Message-ID: <7bfde85b-8d88-9a99-5af7-264d488c886c@mccallumwhyman.com> Gabor, I can't duplicate your problem which probably implies that we are looking at some weird race condition during the program tidy up phase. I did see occasionally something like this before with Lazarus 1.6.4 on Windows with heaptrc - but I never saw it without heaptrc and it cleared up with Lazarus 1.8 and hence  I never bothered to pursue it assuming that it was a Lazarus bug that got fixed. You are seeing this problem not so much with IBX, but with the Firebird Pascal API. Your example program has excluded the IBX part and focused purely on the API. What might be an issue here is that the FirebirdAPI is accessed via a COM interface and the IFirebirdAPI interface is not explicitly released. The software just relies upon the system to clean it up at the end. There may be a race condition here between the clear up of the interface and the dynamic library manager. This is because when the interface is released, it then unloads the Firebird DLL/SO. Try adding a finalization clause to IB.pas setting "FFirebirdAPI := nil" and see if that clears it up - or whether the exception occurs before this point. It is not obvious if there is a real issue with cthreads. The library should only create multiple threads when handling asynchronous Firebird events and your program is not using this capability. Otherwise, yes, it would be really useful to be able to find where this exception is being raised. Tony Whyman MWA On 09/03/18 09:14, Gabor Boros via Lazarus wrote: > Hi All, > > The result of the attached example (which use MWA's Firebird Pascal > API) for me is an exception: > > > Gstat execution time Fri Mar  9 09:29:18 2018 > > Database header page information: >         Flags                   0 >         Generation              173 >         System Change Number    0 >         Page size               8192 >         ODS version             12.0 >         Oldest transaction      161 >         Oldest active           162 >         Oldest snapshot         162 >         Next transaction        164 >         Sequence number         0 >         Next attachment ID      27 >         Implementation          HW=AMD/Intel/x64 little-endian > OS=Linux CC=gcc >         Shadow count            0 >         Page buffers            0 >         Next header page        0 >         Database dialect        3 >         Creation date           Feb 2, 2018 14:07:24 >         Attributes              force write > >     Variable header data: >         *END* > Gstat completion time Fri Mar  9 09:29:18 2018 > > Heap dump by heaptrc unit > 355 memory blocks allocated : 948252/948432 > 355 memory blocks freed     : 948252/948432 > 0 unfreed memory blocks : 0 > True heap size : 131072 > True free heap : 131072 > An unhandled exception occurred at $00007FF97F0A3147: > EAccessViolation: >   $00007FF97F0A3147 > > > If comment out cthreads from the uses the exception is: > > > An unhandled exception occurred at $00007F21B71F5147: > EAccessViolation: >   $00007F21B71F5147 >   $00007F21B71F751B >   $00007F21B71F769C >   $00007F21B746BFFF > > > If run with gdb (and cthreads): > > > Heap dump by heaptrc unit > 355 memory blocks allocated : 948252/948432 > 355 memory blocks freed     : 948252/948432 > 0 unfreed memory blocks : 0 > True heap size : 131072 > True free heap : 131072 > [Thread 0x7ffff5991700 (LWP 2874) exited] > [Thread 0x7ffff6192700 (LWP 2873) exited] > [Thread 0x7ffff7fe3740 (LWP 2869) exited] > Cannot find user-level thread for LWP 2875: generic error > > > Any idea how to detect what/where is the source of the exception? > > I use Linux 64bit, FPC 3.0.4 and Lazarus fixes_1_8. > > Gabor > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From giuliano.colla at fastwebnet.it Fri Mar 9 10:56:48 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Fri, 9 Mar 2018 10:56:48 +0100 Subject: [Lazarus] How to catch an unhandled exception? In-Reply-To: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> References: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> Message-ID: <028814e2-844e-9b0e-e693-8bd64a48716f@fastwebnet.it> Il 09/03/2018 10:14, Gabor Boros via Lazarus ha scritto: > Any idea how to detect what/where is the source of the exception? > > I use Linux 64bit, FPC 3.0.4 and Lazarus fixes_1_8. To obtain meaningful information from gdb I do the following: 1) Compile both Lazarus LCL and fpc with debug info 2) Install the glibc-debuginfo packages Otherwise you get only the information about exceptions which generate directly from your source code, which is many cases isn't sufficient. Hope that it helps, Giuliano From tony.whyman at mccallumwhyman.com Fri Mar 9 11:12:26 2018 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Fri, 9 Mar 2018 10:12:26 +0000 Subject: [Lazarus] How to catch an unhandled exception? In-Reply-To: <028814e2-844e-9b0e-e693-8bd64a48716f@fastwebnet.it> References: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> <028814e2-844e-9b0e-e693-8bd64a48716f@fastwebnet.it> Message-ID: <2c9f7ffc-6318-f3c0-c625-0ccd97374d10@mccallumwhyman.com> Giulian, You may in a roundabout way have pointed me at where the problem lies. I always work with fpc debug libraries as well and I can't catch the problem. I changed to the standard release and the bug appears! Unfortunately, while duplicating the problem is one thing, tracking it down when your main debugging tool is unavailable is another... Tony Whyman MWA On 09/03/18 09:56, Giuliano Colla via Lazarus wrote: > Il 09/03/2018 10:14, Gabor Boros via Lazarus ha scritto: > >> Any idea how to detect what/where is the source of the exception? >> >> I use Linux 64bit, FPC 3.0.4 and Lazarus fixes_1_8. > > To obtain meaningful information from gdb I do the following: > 1) Compile both Lazarus LCL and fpc with debug info > 2) Install the glibc-debuginfo packages > Otherwise you get only the information about exceptions which generate > directly from your source code, which is many cases isn't sufficient. > > Hope that it helps, > > Giuliano From tony.whyman at mccallumwhyman.com Fri Mar 9 12:09:24 2018 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Fri, 9 Mar 2018 11:09:24 +0000 Subject: [Lazarus] How to catch an unhandled exception? [FIXED - but there is an FPC bug here] In-Reply-To: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> References: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> Message-ID: <1cc7c3bc-67cb-eb1a-df37-67616ede6bea@mccallumwhyman.com> Thanks to Giuliano mentioning debug libraries I have been able to duplicate the problem and to find the source of the bug - but it is as weird as it gets. FYI: tests done on Linux Mint 18 with Lazarus 1.8.0 and fpc 3.0.4. The evidence so far: 1. Gabor's program ends with an exception when using the FPC release  RTL and FCL, but not when using RTL and FCL libraries compiled for debugging. 2. If I use GDB to step through the final steps of the program, the bug disappears! 3. If I add a delay at the end (e.g. a call to sleep(1)), the bug disappears. 4. Playing around with code optimisations and debugging flags seems to have no effect. 5. Using the age old technique of commenting out bits of the code until the bug disappears, I tracked the problem down. In Gabor's program, the bug is removed by commenting out this line (shown in context)       for i:=0 to SQR.GetCount-1 do        begin          case SQR[i].getItemType of isc_info_svc_line:begin // s:=SQR[i].getAsString;  {This is where the problem starts}                                                       end;          end;          if (s<>'') then WriteLn(s);        end; Going deeper into the fbintf package, I have further tracked the problem down to this line of code SetString(Result,FBufPtr+3,len,CP_ACP); FBufPtr is a pointer and it is fairly simple bit of code, copying a string from a buffer (received from Firebird) into an AnsiString. Commenting out the line stops the bug. The bug also goes away by changing it to var s: string;       i: integer; ...  Result := '';   SetString(s,FBufPtr+3,len,CP_ACP);   for i := 1 to length(s) do     Result += s[i]; which can only be described as a WTF moment. The problem has to be due to string disposal. Finally, knowing all this, I go back to Gabor's program and add the line (again shown in context):    repeat       SQR:=SM.Query(nil,SRB);       for i:=0 to SQR.GetCount-1 do        begin          case SQR[i].getItemType of isc_info_svc_line:begin s:=SQR[i].getAsString;                                                       end;          end;          if (s<>'') then WriteLn(s);          s := '';                                             {Line added here}        end;     until (s=''); and guess what - bug goes away. It looks like what is happening is that SetString is setting an AnsiString in such as away as to cause a problem when the memory manager cleans up - but only as a race condition and if the string is not cleaned up explicitly. Looks like an FPC bug report to me. On 09/03/18 09:14, Gabor Boros via Lazarus wrote: > Hi All, > > The result of the attached example (which use MWA's Firebird Pascal > API) for me is an exception: > > > Gstat execution time Fri Mar  9 09:29:18 2018 > > Database header page information: >         Flags                   0 >         Generation              173 >         System Change Number    0 >         Page size               8192 >         ODS version             12.0 >         Oldest transaction      161 >         Oldest active           162 >         Oldest snapshot         162 >         Next transaction        164 >         Sequence number         0 >         Next attachment ID      27 >         Implementation          HW=AMD/Intel/x64 little-endian > OS=Linux CC=gcc >         Shadow count            0 >         Page buffers            0 >         Next header page        0 >         Database dialect        3 >         Creation date           Feb 2, 2018 14:07:24 >         Attributes              force write > >     Variable header data: >         *END* > Gstat completion time Fri Mar  9 09:29:18 2018 > > Heap dump by heaptrc unit > 355 memory blocks allocated : 948252/948432 > 355 memory blocks freed     : 948252/948432 > 0 unfreed memory blocks : 0 > True heap size : 131072 > True free heap : 131072 > An unhandled exception occurred at $00007FF97F0A3147: > EAccessViolation: >   $00007FF97F0A3147 > > > If comment out cthreads from the uses the exception is: > > > An unhandled exception occurred at $00007F21B71F5147: > EAccessViolation: >   $00007F21B71F5147 >   $00007F21B71F751B >   $00007F21B71F769C >   $00007F21B746BFFF > > > If run with gdb (and cthreads): > > > Heap dump by heaptrc unit > 355 memory blocks allocated : 948252/948432 > 355 memory blocks freed     : 948252/948432 > 0 unfreed memory blocks : 0 > True heap size : 131072 > True free heap : 131072 > [Thread 0x7ffff5991700 (LWP 2874) exited] > [Thread 0x7ffff6192700 (LWP 2873) exited] > [Thread 0x7ffff7fe3740 (LWP 2869) exited] > Cannot find user-level thread for LWP 2875: generic error > > > Any idea how to detect what/where is the source of the exception? > > I use Linux 64bit, FPC 3.0.4 and Lazarus fixes_1_8. > > Gabor > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.whyman at mccallumwhyman.com Fri Mar 9 12:29:11 2018 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Fri, 9 Mar 2018 11:29:11 +0000 Subject: [Lazarus] How to catch an unhandled exception? [FIXED - but there is an FPC bug here] In-Reply-To: <1cc7c3bc-67cb-eb1a-df37-67616ede6bea@mccallumwhyman.com> References: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> <1cc7c3bc-67cb-eb1a-df37-67616ede6bea@mccallumwhyman.com> Message-ID: A supplementary for anyone confused by the last extra parameter to SetString in the previous post (repeated below). When I wrote up the bug report, I should have gone one step lower in the code. The SetString commented out below is actually an internal function: procedure TOutputBlockItem.SetString(out S: AnsiString; Buf: PByte;   Len: integer; CodePage: TSystemCodePage); var rs: RawByteString; begin   system.SetString(rs,PAnsiChar(Buf),len);   SetCodePage(rs,CodePage,false);   S := rs; end; However, the same result (e.g. the bug disappears) is achieved by commenting out the call to system.Setstring. On 09/03/18 11:09, Tony Whyman via Lazarus wrote: > > Thanks to Giuliano mentioning debug libraries I have been able to > duplicate the problem and to find the source of the bug - but it is as > weird as it gets. > > FYI: tests done on Linux Mint 18 with Lazarus 1.8.0 and fpc 3.0.4. > > The evidence so far: > > 1. Gabor's program ends with an exception when using the FPC release  > RTL and FCL, but not when using RTL and FCL libraries compiled for > debugging. > > 2. If I use GDB to step through the final steps of the program, the > bug disappears! > > 3. If I add a delay at the end (e.g. a call to sleep(1)), the bug > disappears. > > 4. Playing around with code optimisations and debugging flags seems to > have no effect. > > 5. Using the age old technique of commenting out bits of the code > until the bug disappears, I tracked the problem down. > > In Gabor's program, the bug is removed by commenting out this line > (shown in context) > >       for i:=0 to SQR.GetCount-1 do >        begin >          case SQR[i].getItemType of isc_info_svc_line:begin > // s:=SQR[i].getAsString;  {This is where the problem starts} >                                                       end; >          end; >          if (s<>'') then WriteLn(s); >        end; > > Going deeper into the fbintf package, I have further tracked the > problem down to this line of code > > SetString(Result,FBufPtr+3,len,CP_ACP); > > FBufPtr is a pointer and it is fairly simple bit of code, copying a > string from a buffer (received from Firebird) into an AnsiString. > Commenting out the line stops the bug. The bug also goes away by > changing it to > > var s: string; >       i: integer; > > ... >  Result := ''; >   SetString(s,FBufPtr+3,len,CP_ACP); >   for i := 1 to length(s) do >     Result += s[i]; > > which can only be described as a WTF moment. The problem has to be due > to string disposal. > > Finally, knowing all this, I go back to Gabor's program and add the > line (again shown in context): > >    repeat >       SQR:=SM.Query(nil,SRB); >       for i:=0 to SQR.GetCount-1 do >        begin >          case SQR[i].getItemType of isc_info_svc_line:begin > s:=SQR[i].getAsString; >                                                       end; >          end; >          if (s<>'') then WriteLn(s); >          s := ''; {Line added here} >        end; >     until (s=''); > > and guess what - bug goes away. > > It looks like what is happening is that SetString is setting an > AnsiString in such as away as to cause a problem when the memory > manager cleans up - but only as a race condition and if the string is > not cleaned up explicitly. > > Looks like an FPC bug report to me. > > On 09/03/18 09:14, Gabor Boros via Lazarus wrote: >> Hi All, >> >> The result of the attached example (which use MWA's Firebird Pascal >> API) for me is an exception: >> >> >> Gstat execution time Fri Mar  9 09:29:18 2018 >> >> Database header page information: >>         Flags                   0 >>         Generation              173 >>         System Change Number    0 >>         Page size               8192 >>         ODS version             12.0 >>         Oldest transaction      161 >>         Oldest active           162 >>         Oldest snapshot         162 >>         Next transaction        164 >>         Sequence number         0 >>         Next attachment ID      27 >>         Implementation          HW=AMD/Intel/x64 little-endian >> OS=Linux CC=gcc >>         Shadow count            0 >>         Page buffers            0 >>         Next header page        0 >>         Database dialect        3 >>         Creation date           Feb 2, 2018 14:07:24 >>         Attributes              force write >> >>     Variable header data: >>         *END* >> Gstat completion time Fri Mar  9 09:29:18 2018 >> >> Heap dump by heaptrc unit >> 355 memory blocks allocated : 948252/948432 >> 355 memory blocks freed     : 948252/948432 >> 0 unfreed memory blocks : 0 >> True heap size : 131072 >> True free heap : 131072 >> An unhandled exception occurred at $00007FF97F0A3147: >> EAccessViolation: >>   $00007FF97F0A3147 >> >> >> If comment out cthreads from the uses the exception is: >> >> >> An unhandled exception occurred at $00007F21B71F5147: >> EAccessViolation: >>   $00007F21B71F5147 >>   $00007F21B71F751B >>   $00007F21B71F769C >>   $00007F21B746BFFF >> >> >> If run with gdb (and cthreads): >> >> >> Heap dump by heaptrc unit >> 355 memory blocks allocated : 948252/948432 >> 355 memory blocks freed     : 948252/948432 >> 0 unfreed memory blocks : 0 >> True heap size : 131072 >> True free heap : 131072 >> [Thread 0x7ffff5991700 (LWP 2874) exited] >> [Thread 0x7ffff6192700 (LWP 2873) exited] >> [Thread 0x7ffff7fe3740 (LWP 2869) exited] >> Cannot find user-level thread for LWP 2875: generic error >> >> >> Any idea how to detect what/where is the source of the exception? >> >> I use Linux 64bit, FPC 3.0.4 and Lazarus fixes_1_8. >> >> Gabor >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlnglsts at bgss.hu Fri Mar 9 13:45:42 2018 From: mlnglsts at bgss.hu (Gabor Boros) Date: Fri, 9 Mar 2018 13:45:42 +0100 Subject: [Lazarus] How to catch an unhandled exception? [FIXED - but there is an FPC bug here] In-Reply-To: <1cc7c3bc-67cb-eb1a-df37-67616ede6bea@mccallumwhyman.com> References: <3cef622d-8155-25d7-65b2-647d649d6374@bgss.hu> <1cc7c3bc-67cb-eb1a-df37-67616ede6bea@mccallumwhyman.com> Message-ID: <7bc6be33-e7a1-d480-eed1-0776efdf4309@bgss.hu> 2018. 03. 09. 12:09 keltezéssel, Tony Whyman via Lazarus írta: > Finally, knowing all this, I go back to Gabor's program and add the line > (again shown in context): > >    repeat >       SQR:=SM.Query(nil,SRB); >       for i:=0 to SQR.GetCount-1 do >        begin >          case SQR[i].getItemType of isc_info_svc_line:begin > s:=SQR[i].getAsString; >                                                       end; >          end; >          if (s<>'') then WriteLn(s); >          s := '';                                             {Line > added here} >        end; >     until (s=''); > > and guess what - bug goes away. Confirmed. Executed the Debug and Release builds more than 100 times without any exception. Gabor From juha.manninen62 at gmail.com Fri Mar 9 23:33:32 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 10 Mar 2018 00:33:32 +0200 Subject: [Lazarus] Object inspector bug - exception In-Reply-To: References: <96c92ff9-e129-edbe-745c-0a9c310845c0@graficalc.nl> Message-ID: On Thu, Mar 8, 2018 at 10:05 PM, Rik van Kekem via Lazarus wrote: > But I was under the impression that using TAB in the Component-filter in > Object Inspector would set the focus on the TreeView with the components. It > doesn't. I never use it but apparently it sets the focus directly on the > Property view. The key handling in OI is a little complicated. Now the TAB is also handled in TObjectInspectorDlg.KeyDown(). I added commens etc. in r57490. Please debug and experiment with the code. Maybe you can fix it. Juha From sysrpl at gmail.com Sat Mar 10 04:41:19 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 9 Mar 2018 22:41:19 -0500 Subject: [Lazarus] Special Request: Theme entire IDE support Message-ID: I just wanted to put this idea out there, which I feel would bring significant pleasure to a lot of Lazarus users. Would someone consider adding or working on support to theme the entire Lazarus IDE? I've found myself quite fond of darker themed IDE, such as VS code: Darker themed IDE example As it stand Lazarus has already the ability to change the color of the source code editor, and some support for changing the object inspector colors, and message window colors, but all three of these customization systems operate independently of each other. Also there are many other tool windows whose colors or styles cannot be customized, such as the components list in the object inspector, the project manager, and elsewhere. An optimal solution would be to add a single IDE theme dialog allowing users controls the colors and default sizes of everything in the IDE. Items could be categorized in simple groups such as background color, text color/size, highlight color, border color/size, and so on. Color and size settings could be saved using a name, restored, and exported for others to use. I can think of a few ways this could be implemented, mainly through offering a hook into the Graphics unit to redefine custom values for system colors, and a flag to denote values have been overridden. If anyone has desire to communicate the pros/cons of this proposal (both of the concept and implementation) could you please it discuss here? -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Sat Mar 10 05:41:46 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Mar 2018 07:41:46 +0300 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: <7165418a-3aef-e0ec-fd21-c555689538be@ya.ru>  >theme the entire Lazarus IDE? Big problem with scrollbars: Treeviews, Listboxes, Listviews, Synedits. I made big work to theme scrollbars in CudaText. -- Regards, Alexey From freedos.la at gmail.com Sat Mar 10 06:13:27 2018 From: freedos.la at gmail.com (Ralf Quint) Date: Fri, 9 Mar 2018 21:13:27 -0800 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: On 3/9/2018 7:41 PM, Anthony Walter via Lazarus wrote: > I just wanted to put this idea out there, which I feel would bring > significant pleasure to a lot of Lazarus users. > > Would someone consider adding or working on support to theme the > entire Lazarus IDE? I've found myself quite fond of darker themed IDE, > such as VS code: > > Darker themed IDE example > > Oh, hell no!... (sorry, but you asked) Ralf --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Sat Mar 10 06:44:33 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Sat, 10 Mar 2018 00:44:33 -0500 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: Ralf, I believe your response was to to dark screenshot. I was hoping people would not consider one particular style and judge customization one that, but rather the idea of making customization of colors and size user accessible. Regarding completeness of custom colors and themes, yes some items may not be easily themed, such as scrollbars. IMO though an attempt would not have to 100% complete at that start. That is, creating an simplified way to change some or most of the colors and size would be a good start. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Sat Mar 10 09:27:00 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Mar 2018 11:27:00 +0300 Subject: [Lazarus] Call context menu in my component Message-ID: <9b19220c-d8ce-d4a2-ffb1-76a6e6a033e6@ya.ru> Hi. I try to call context menu inside ATSynEdit: - DoContextMenu(...)- does nothing - Perform(LM_CONTEXTMENU, 0, 0)- does nothing - WMContextMenu() must work but I need TMessage param for it, how to get it? -- Regards, Alexey From svaa at ciberpiula.net Sat Mar 10 12:23:57 2018 From: svaa at ciberpiula.net (Santiago A.) Date: Sat, 10 Mar 2018 12:23:57 +0100 Subject: [Lazarus] SQLdb_Tutorial3 error In-Reply-To: <558fc42d-85db-d3ca-96dc-3c68df88a4bf@ciberpiula.net> References: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> <1520538179625-0.post@n3.nabble.com> <558fc42d-85db-d3ca-96dc-3c68df88a4bf@ciberpiula.net> Message-ID: El 09/03/2018 a las 10:41, Santiago A. via Lazarus escribió: > El 08/03/2018 a las 20:42, leledumbo via Lazarus escribió: >>> Any hint? >> Code please. Zipped project directory (use Publish Project feature) is OK if >> single file example is not possible. > I will zip it, but sure you have it. The code is one of the examples > installed with the standard lazarus 1.8.0 > > In windows: \examples\database\sqldbtutorial3\ > > Error in mainform.pas line 221, using sqlite connector Any suggestion of what could be wrong? Where to look? Any hint? -- Saludos Santiago A. From vojtech.cihak at atlas.cz Sat Mar 10 14:41:49 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sat, 10 Mar 2018 14:41:49 +0100 Subject: [Lazarus] =?utf-8?q?Special_Request=3A_Theme_entire_IDE_support?= In-Reply-To: 0000000087440001660c01624fd0 References: 0000000087440001660c01624fd0 Message-ID: <20180310144149.4EC79264@atlas.cz> Hi,   you can do it for Qt applications, just run Lazarus (or any Laz. project built as Qt) as:   ./lazarus -stylesheet mydarkstyle.qss   where mydarkstyle.qss must be valid Qt Style Sheet file, see: http://doc.qt.io/archives/qt-4.8/stylesheet.html#stylesheet   V. ______________________________________________________________ > Od: Anthony Walter via Lazarus > Komu: Lazarus mailing list > Datum: 10.03.2018 04:41 > Předmět: [Lazarus] Special Request: Theme entire IDE support > I just wanted to put this idea out there, which I feel would bring significant pleasure to a lot of Lazarus users.Would someone consider adding or working on support to theme the entire Lazarus IDE? I've found myself quite fond of darker themed IDE, such as VS code:...If anyone has desire to communicate the pros/cons of this proposal (both of the concept and implementation) could you please it discuss here? ---------- -- _______________________________________________ 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 zeljko at holobit.net Sat Mar 10 16:53:59 2018 From: zeljko at holobit.net (zeljko) Date: Sat, 10 Mar 2018 16:53:59 +0100 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: <20180310144149.4EC79264@atlas.cz> References: <20180310144149.4EC79264@atlas.cz> Message-ID: <256db61a-90a9-94b0-58c5-d84bc11e5778@holobit.net> On 03/10/2018 02:41 PM, Vojtěch Čihák via Lazarus wrote: > Hi, > > you can do it for Qt applications, just run Lazarus (or any Laz. project > built as Qt) as: > > ./lazarus -stylesheet mydarkstyle.qss > > where mydarkstyle.qss must be valid Qt Style Sheet file, > see: http://doc.qt.io/archives/qt-4.8/stylesheet.html#stylesheet But again I've found scrollbars problematic since they look ugly when they're completely drawn by stylesheet :) zeljko From vojtech.cihak at atlas.cz Sat Mar 10 16:56:27 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sat, 10 Mar 2018 16:56:27 +0100 Subject: [Lazarus] =?utf-8?q?Call_context_menu_in_my_component?= In-Reply-To: 00000000874800016dd001625003 References: 00000000874800016dd001625003 Message-ID: <20180310165627.47C35D21@atlas.cz> Hi,   DoContextMenu(...) cannot work, this method only manages OnContextPopup event. Perform(LM_CONTEXTMENU, 0, 0) (or SendMessage or PostMessage) works here (Qt). Handle must have assigned PopupMenu and it needs correct parameters, not just (...,0, 0) which shows Popmenu in the top-left screen corner here.   V.   ______________________________________________________________ > Od: AlexeyT via Lazarus > Komu: Lazarus mailing list > Datum: 10.03.2018 09:27 > Předmět: [Lazarus] Call context menu in my component > Hi. I try to call context menu inside ATSynEdit: - DoContextMenu(...)- does nothing - Perform(LM_CONTEXTMENU, 0, 0)- does nothing - WMContextMenu() must work but I need TMessage param for it, how to get it? -- Regards, Alexey -- _______________________________________________ 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 sandro.cumerlato at gmail.com Sat Mar 10 16:57:08 2018 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Sat, 10 Mar 2018 16:57:08 +0100 Subject: [Lazarus] StringGrid1.SaveToCSVFile - UTF-8 with BOM Message-ID: Hello, how can I save StringGrid content to a CSV file encoded to "UTF-8 with BOM" format? (as default it is saved to "UTF-8 without BOM" format) Thank you in advance for your help! Sandro Cumerlato -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Sat Mar 10 16:57:54 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Mar 2018 18:57:54 +0300 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: <256db61a-90a9-94b0-58c5-d84bc11e5778@holobit.net> References: <20180310144149.4EC79264@atlas.cz> <256db61a-90a9-94b0-58c5-d84bc11e5778@holobit.net> Message-ID: <80151b36-393d-9c8c-45ea-8207b6cca58b@ya.ru> On 10.03.2018 18:53, zeljko via Lazarus wrote: > But again I've found scrollbars problematic since they look ugly when > they're completely drawn by stylesheet :) I thinked about how to replace LCL scrollbas with ATScrollbar. Ie some LCL change which hooks SetScrollInfo too. Maybe it's possible to create ATScrollbars instead of OS bars and change them by SetScrollInfo. And change ClientRect of control. -- Regards, Alexey From aaa5500 at ya.ru Sat Mar 10 17:09:21 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 10 Mar 2018 19:09:21 +0300 Subject: [Lazarus] Suggest LCL refactor for ShowContextMenu Message-ID: Maybe it's good to have LCL method to show context menu, w/o using Perform(LM_contextmenu,...). Name it ShowContextMenu(X, Y) - method must be main part of TControl.WMContextMenu procedure TControl.WMContextMenu(var Message: TLMContextMenu); var   TempPopupMenu: TPopupMenu;   P: TPoint;   Handled: Boolean; begin   if (csDesigning in ComponentState) or (Message.Result <> 0) then Exit;   P := GetMousePosFromMessage(Message.Pos);   // X and Y = -1 when user clicks on keyboard menu button   if P.X <> -1 then     P := ScreenToClient(P);   Handled := False;   DoContextPopup(P, Handled);   if Handled then   begin     Message.Result := 1;     Exit;   end;   TempPopupMenu := GetPopupMenu;   if (TempPopupMenu <> nil) then   begin     if not TempPopupMenu.AutoPopup then Exit;     TempPopupMenu.PopupComponent := Self;     if P.X = -1 then       P := Point(0, 0);     P := ClientToScreen(P);     TempPopupMenu.Popup(P.X, P.Y);     Message.Result := 1;   end; end; so WMCOntextMenu will be some checks + getting X/Y + call to new ShowContextMenu(X,Y) + Message.Result:=1. -- Regards, Alexey From nc-gaertnma at netcologne.de Sat Mar 10 17:21:20 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 10 Mar 2018 17:21:20 +0100 Subject: [Lazarus] StringGrid1.SaveToCSVFile - UTF-8 with BOM In-Reply-To: References: Message-ID: <20180310172120.74baafda@limapholos.matflo.wg> On Sat, 10 Mar 2018 16:57:08 +0100 Sandro Cumerlato via Lazarus wrote: > Hello, > how can I save StringGrid content to a CSV file encoded to "UTF-8 with BOM" > format? (as default it is saved to "UTF-8 without BOM" format) var s: string; ms: TMemoryStream ms:=TMemoryStream.Create; try s:=UTF8BOM; ms.Write(s[1],length(s)); Grid.SaveToCSVStream(ms) ms.Position:=0; ms.SaveToFile('foo.csv'); finally ms.Free; end; From michael at freepascal.org Sat Mar 10 17:25:48 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 10 Mar 2018 17:25:48 +0100 (CET) Subject: [Lazarus] StringGrid1.SaveToCSVFile - UTF-8 with BOM In-Reply-To: <20180310172120.74baafda@limapholos.matflo.wg> References: <20180310172120.74baafda@limapholos.matflo.wg> Message-ID: On Sat, 10 Mar 2018, Mattias Gaertner via Lazarus wrote: > On Sat, 10 Mar 2018 16:57:08 +0100 > Sandro Cumerlato via Lazarus wrote: > >> Hello, >> how can I save StringGrid content to a CSV file encoded to "UTF-8 with BOM" >> format? (as default it is saved to "UTF-8 without BOM" format) > > var > s: string; > ms: TMemoryStream > > ms:=TMemoryStream.Create; > try > s:=UTF8BOM; > ms.Write(s[1],length(s)); > Grid.SaveToCSVStream(ms) > ms.Position:=0; > ms.SaveToFile('foo.csv'); > finally > ms.Free; > end; You can also just use a filestream ? Michael. From nc-gaertnma at netcologne.de Sat Mar 10 17:32:12 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 10 Mar 2018 17:32:12 +0100 Subject: [Lazarus] LCLMessageGlue.pas, typo in debug output? In-Reply-To: References: Message-ID: <20180310173212.15ad1f56@limapholos.matflo.wg> On Fri, 9 Mar 2018 10:17:24 +0100 Lubos Pintes via Lazarus wrote: > Hello, > Just noticed in LCLMessageGlue.pas on line 98: > and (TLMessage(AMessage).Msg < CN_KEYDOWN ) > maybe there could be <> like on other lines in that IFDEF? > Not sure, just noticed little asymmetry. It's merely debugging code. I changed it so you can hunt your bug. Keep in mind it can change any time. Mattias From r030t1 at gmail.com Sat Mar 10 17:44:11 2018 From: r030t1 at gmail.com (R0b0t1) Date: Sat, 10 Mar 2018 10:44:11 -0600 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: <20180310144149.4EC79264@atlas.cz> References: <20180310144149.4EC79264@atlas.cz> Message-ID: On Saturday, March 10, 2018, Vojtěch Čihák via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Hi, > > > > you can do it for Qt applications, just run Lazarus (or any Laz. project built as Qt) as: > > > > ./lazarus -stylesheet mydarkstyle.qss > > > > where mydarkstyle.qss must be valid Qt Style Sheet file, see: http://doc.qt.io/archives/qt-4.8/stylesheet.html#stylesheet > > I think the issue with this is that some elements use pictures with fixed colors, and some elements do not honor style settings (like the TreeView in the component editor, which always has a white cell background). A complete list would be helpful. Perhaps searching for instances where colors are set directly? Cheers, R0b0t1 > > V. > > ______________________________________________________________ >> Od: Anthony Walter via Lazarus >> Komu: Lazarus mailing list >> Datum: 10.03.2018 04:41 >> Předmět: [Lazarus] Special Request: Theme entire IDE support >> > > I just wanted to put this idea out there, which I feel would bring significant pleasure to a lot of Lazarus users. > Would someone consider adding or working on support to theme the entire Lazarus IDE? I've found myself quite fond of darker themed IDE, such as VS code: > ... > If anyone has desire to communicate the pros/cons of this proposal (both of the concept and implementation) could you please it discuss here? > > ---------- > > -- > _______________________________________________ > 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 nc-gaertnma at netcologne.de Sat Mar 10 18:17:00 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 10 Mar 2018 18:17:00 +0100 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: <20180310181700.10ee6980@limapholos.matflo.wg> On Fri, 9 Mar 2018 22:41:19 -0500 Anthony Walter via Lazarus wrote: >[...] > As it stand Lazarus has already the ability to change the color of the > source code editor, and some support for changing the object inspector > colors, and message window colors, but all three of these customization > systems operate independently of each other. Also there are many other tool > windows whose colors or styles cannot be customized, such as the components > list in the object inspector, the project manager, and elsewhere. > > An optimal solution would be to add a single IDE theme dialog allowing > users controls the colors and default sizes of everything in the IDE. Items > could be categorized in simple groups such as background color, text > color/size, highlight color, border color/size, and so on. Color and size > settings could be saved using a name, restored, and exported for others to > use. +1 > I can think of a few ways this could be implemented, mainly through > offering a hook into the Graphics unit to redefine custom values for system > colors, and a flag to denote values have been overridden. What about the colors that have no counterpart in graphics? Mattias From frepsclazfrm at dyadic.org Sat Mar 10 20:28:20 2018 From: frepsclazfrm at dyadic.org (Bilbo47) Date: Sat, 10 Mar 2018 12:28:20 -0700 (MST) Subject: [Lazarus] Menu editor unstable? In-Reply-To: References: Message-ID: <1520710100111-0.post@n3.nabble.com> Lazarus would become unresponsive after trying to add a new menu item using the Menu Editor. Don't know what the problem was. Got around it by manually adding the menu item by editing the .LFM file while Lazarus was not running. Also added the declaration and procedure body for the Click event in the .PAS file. FPC compiler ate it up, and the new menu item's event fired as expected. Lazarus was then able to modify the new menu item as expected. Version 1.8.0 32/64 bit on Windows 8.0. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From sandro.cumerlato at gmail.com Sun Mar 11 07:01:03 2018 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Sun, 11 Mar 2018 07:01:03 +0100 Subject: [Lazarus] StringGrid1.SaveToCSVFile - UTF-8 with BOM In-Reply-To: References: <20180310172120.74baafda@limapholos.matflo.wg> Message-ID: Thank you Mattias and Michael for your help! procedure TForm1.ButtonSaveClick(Sender: TObject); const UTF8BOM = #$EF#$BB#$BF; var s: String; fs: TFileStream; begin s := ChangeFileExt(Application.ExeName, '.csv'); try fs := TFileStream.Create(s, fmCreate); fs.Write(UTF8BOM, SizeOf(UTF8BOM)); StringGrid1.SaveToCSVStream(fs, ';', True, False); finally fs.free; end; end; On 10 March 2018 at 17:25, Michael Van Canneyt via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Sat, 10 Mar 2018, Mattias Gaertner via Lazarus wrote: > > On Sat, 10 Mar 2018 16:57:08 +0100 >> Sandro Cumerlato via Lazarus wrote: >> >> Hello, >>> how can I save StringGrid content to a CSV file encoded to "UTF-8 with >>> BOM" >>> format? (as default it is saved to "UTF-8 without BOM" format) >>> >> >> var >> s: string; >> ms: TMemoryStream >> >> ms:=TMemoryStream.Create; >> try >> s:=UTF8BOM; >> ms.Write(s[1],length(s)); >> Grid.SaveToCSVStream(ms) >> ms.Position:=0; >> ms.SaveToFile('foo.csv'); >> finally >> ms.Free; >> end; >> > > You can also just use a filestream ? > > Michael. > > -- > _______________________________________________ > 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 rik at graficalc.nl Mon Mar 12 13:41:47 2018 From: rik at graficalc.nl (Rik van Kekem) Date: Mon, 12 Mar 2018 13:41:47 +0100 Subject: [Lazarus] SQLdb_Tutorial3 error In-Reply-To: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> References: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> Message-ID: <0aaa859e-0d87-4115-74fa-d320c8456eb2@graficalc.nl> Op 08-03-2018 16:07 schreef Santiago A. via Lazarus: > sqlite3.dll is in the same directory that the binary. I have created the > table employee, just in case. I don't know what else to check.  I can't > debug anything else, the debug can't enter in "open" method. Creating the database and table employee wasn't "just in case". It was a requirement if you want to use that example with sqlite. http://wiki.lazarus.freepascal.org/SQLdb_Tutorial3#Getting_database_data_into_normal_controls And surely you changed something (like the .ini) otherwise you end up with Firebird db connection. So zipping your project (with the database) is still best. Tip: You are sure sqlite3.dll has the same 'bitness' (i.e. 32 of 64 bit) as your executable? Rik From markMLl.lazarus at telemetry.co.uk Mon Mar 12 18:25:57 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 12 Mar 2018 17:25:57 +0000 Subject: [Lazarus] TStringGrid and cancelling a modal form Message-ID: Running on (Debian) Linux on AMD64 or ARM, Lazarus 1.6.4 and FPC 3.0.2, I'm seeing different behaviour depending on whether a program uses Qt or GTK2. The program changes the hardware configuration of a mouse (Logitech G600) using hidraw, and as such needs to run with root privilege (e.g. kdesudo or sudo -E). On the main form I've got (a tabbed notebook containing multiple instances of) a TStringGrid. The OnSelection event invokes a modal form (containing nothing of significant complexity) with OK and Cancel buttons, and stripped down looks like this: procedure TFormLG600.StringGridMode1UnshiftedSelection(Sender: TObject; aCol, aRow: Integer); begin {...} if ButtonsAndKeys.ShowModal() = mrOk then begin {...} end end; This is fine if built for Qt, but if built for GTK2 what I see is that after the modal form is exited any mouse activity over the grid appears to cause an erratic multicell selection and the modal form immediately pops up again. This is reproducible if the Cancel button is pressed, and in at least some cases after OK. I've seen indeterminate discussion of this in the foramina, and have followed up the indicated wiki pages etc. Does anybody have any suggestions, preferably not along the lines of "don't use GTK2" since I was thinking of sticking this on Sourceforge and that restriction would probably be unpopular? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From zeljko at holobit.net Mon Mar 12 18:37:49 2018 From: zeljko at holobit.net (zeljko) Date: Mon, 12 Mar 2018 18:37:49 +0100 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: References: Message-ID: On 03/12/2018 06:25 PM, Mark Morgan Lloyd via Lazarus wrote: > Running on (Debian) Linux on AMD64 or ARM, Lazarus 1.6.4 and FPC 3.0.2, > I'm seeing different behaviour depending on whether a program uses Qt or > GTK2. The program changes the hardware configuration of a mouse > (Logitech G600) using hidraw, and as such needs to run with root > privilege (e.g. kdesudo or sudo -E). > > On the main form I've got (a tabbed notebook containing multiple > instances of) a TStringGrid. The OnSelection event invokes a modal form > (containing nothing of significant complexity) with OK and Cancel > buttons, and stripped down looks like this: > > procedure TFormLG600.StringGridMode1UnshiftedSelection(Sender: TObject; > aCol, aRow: Integer); > > begin > {...} > if ButtonsAndKeys.ShowModal() = mrOk then begin > {...} > end > end; > > This is fine if built for Qt, but if built for GTK2 what I see is that > after the modal form is exited any mouse activity over the grid appears > to cause an erratic multicell selection and the modal form immediately > pops up again. This is reproducible if the Cancel button is pressed, and > in at least some cases after OK. > > I've seen indeterminate discussion of this in the foramina, and have > followed up the indicated wiki pages etc. Does anybody have any > suggestions, preferably not along the lines of "don't use GTK2" since I > was thinking of sticking this on Sourceforge and that restriction would > probably be unpopular? > hmm, try LCLIntf.SetCapture(0) after closing modal form , just to isolate capture problems. zeljko From joshyfun at gmail.com Mon Mar 12 18:38:09 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 12 Mar 2018 18:38:09 +0100 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: References: Message-ID: <24569ad5-f6ed-f1e1-c1b1-fb643fa4aa82@gmail.com> El 12/03/2018 a las 18:25, Mark Morgan Lloyd via Lazarus escribió: > Running on (Debian) Linux on AMD64 or ARM, Lazarus 1.6.4 and FPC 3.0.2, > I'm seeing different behaviour depending on whether a program uses Qt or > GTK2. The program changes the hardware configuration of a mouse > (Logitech G600) using hidraw, and as such needs to run with root > privilege (e.g. kdesudo or sudo -E). > > On the main form I've got (a tabbed notebook containing multiple > instances of) a TStringGrid. The OnSelection event invokes a modal form > (containing nothing of significant complexity) with OK and Cancel > buttons, and stripped down looks like this: Hello, Just for testing the OnSelection is raised by mouse click ? If the answer is yes, try to click the cell and keep the mouse button pressed. If the form appears the grid is still waiting for a MOUSE_UP (thinking you are holding MOUSE_DOWN to perform a selection) and the modal form has its own queue, so MOUSE_UP never arrives. -- From markMLl.lazarus at telemetry.co.uk Mon Mar 12 20:01:45 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 12 Mar 2018 19:01:45 +0000 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: References: Message-ID: On 12/03/18 18:15, zeljko wrote: > On 03/12/2018 06:25 PM, Mark Morgan Lloyd via Lazarus wrote: >> Running on (Debian) Linux on AMD64 or ARM, Lazarus 1.6.4 and FPC >> 3.0.2, I'm seeing different behaviour depending on whether a program >> uses Qt or GTK2. The program changes the hardware configuration of a >> mouse (Logitech G600) using hidraw, and as such needs to run with root >> privilege (e.g. kdesudo or sudo -E). >> >> On the main form I've got (a tabbed notebook containing multiple >> instances of) a TStringGrid. The OnSelection event invokes a modal >> form (containing nothing of significant complexity) with OK and Cancel >> buttons, and stripped down looks like this: >> >> procedure TFormLG600.StringGridMode1UnshiftedSelection(Sender: >> TObject; aCol, aRow: Integer); >> >> begin >> {...} >>    if ButtonsAndKeys.ShowModal() = mrOk then begin >> {...} >>    end >> end; >> >> This is fine if built for Qt, but if built for GTK2 what I see is that >> after the modal form is exited any mouse activity over the grid >> appears to cause an erratic multicell selection and the modal form >> immediately pops up again. This is reproducible if the Cancel button >> is pressed, and in at least some cases after OK. >> >> I've seen indeterminate discussion of this in the foramina, and have >> followed up the indicated wiki pages etc. Does anybody have any >> suggestions, preferably not along the lines of "don't use GTK2" since >> I was thinking of sticking this on Sourceforge and that restriction >> would probably be unpopular? >> > > hmm, try LCLIntf.SetCapture(0) after closing modal form , just to > isolate capture problems. Like this? } end ; LCLIntf.SetCapture(0) end { TFormLG600.StringGridMode1UnshiftedSelection } ; No obvious change- what should I be looking for? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From markMLl.lazarus at telemetry.co.uk Mon Mar 12 20:05:41 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 12 Mar 2018 19:05:41 +0000 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: <24569ad5-f6ed-f1e1-c1b1-fb643fa4aa82@gmail.com> References: <24569ad5-f6ed-f1e1-c1b1-fb643fa4aa82@gmail.com> Message-ID: On 12/03/18 17:45, José Mejuto via Lazarus wrote: > El 12/03/2018 a las 18:25, Mark Morgan Lloyd via Lazarus escribió:> > On the main form I've got (a > tabbed notebook containing multiple > instances of) a TStringGrid. The > OnSelection event invokes a modal form > (containing nothing of > significant complexity) with OK and Cancel > buttons, and stripped down > looks like this: > Hello, > Just for testing the OnSelection is raised by mouse click ? If the > answer is yes, try to click the cell and keep the mouse button pressed. > If the form appears the grid is still waiting for a MOUSE_UP (thinking > you are holding MOUSE_DOWN to perform a selection) and the modal form > has its own queue, so MOUSE_UP never arrives. Yes, the modal form appears while the mouse button is held down (for both GTK2 and Qt). -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From mailinglists at geldenhuys.co.uk Mon Mar 12 22:04:45 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 12 Mar 2018 21:04:45 +0000 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: On 2018-03-10 03:41, Anthony Walter via Lazarus wrote: > Would someone consider adding or working on support to theme the entire > Lazarus IDE? I've found myself quite fond of darker themed IDE, such as > VS code: > > Darker themed IDE example > I like darker themes too - much easier on my eyes. Hence my eyes bleed [not really] when I look at Windows 10. If somebody was to complete the LCL-fpGUI widgetset (so you can actually compile the IDE with LCL-fpGUI), then you could simply use the dark themes included with fpGUI and your solution is done. ;-) fpGUI applications can apply application specific themes and not depend on desktop environments. They can be switched at runtime too. For examples of those dark fpGUI themes, see the Carbon or Plastic Dark themes shown here: http://geldenhuys.co.uk/~graemeg/themes/start.html I would imagine that the LCL-Qt interface could do the same, as that shouldn't depend on a desktop environment. Or does it? 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 Tue Mar 13 02:39:34 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 12 Mar 2018 21:39:34 -0400 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: Graeme, thanks for the feedback. To everyone, I already have a plan for a basic theme system for all platforms which I'll be publishing as a design time package soon. It will work using text theme define files, and apply properties values to everything in the IDE using a pattern matching system with groups. It will search for published properties of all controls inside the IDE, changing them to the values specified in the define file. It will also provide a preview of changes to a select group of controls such that you can preview a theme by clicking on its name from a list of available themes. The drawback to this approach is that some elements in certain toolkits aren't themeable using strictly property values. Scrollbars are one example already mentioned, but this problem also applies to some buttons, toolbars, page tabs, and I'm sure a few other things. But I think this will the best that can be hoped for given the current design of LCL controls. I do have a plan to allow for theming of icons/glyphs inside the IDE, including the menu, tree view, and component icons. All revertible of course. Finally, I believe the proper solution to a fully themeable IDE would be to use custom painted controls for the entirety of the IDE. It wouldn't really be that hard. I've coded my own tree view, list view, edits, buttons, menus and such from scratch on a few platforms. It would be more portable as well. It's just a bit tedious. If implemented it probably should use a more advanced graphics subsystem that does not mimic plain old GDI/TCanvas. I'll leave that someone else someday. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Mar 13 02:53:08 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 12 Mar 2018 21:53:08 -0400 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: Graeme, I looked at some on your fpGUI screenshots and some are quite nice. What's the compatibility level of your controls with LCL controls code wise? Also, what graphics API are you using for different platforms? For example have you implemented a common advanced graphics API bridging Cairo on GTK, Direct2D on Windows, Quartz2D on OSX, and QPainter for KDE? -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko at holobit.net Tue Mar 13 08:46:44 2018 From: zeljko at holobit.net (zeljko) Date: Tue, 13 Mar 2018 08:46:44 +0100 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: References: <24569ad5-f6ed-f1e1-c1b1-fb643fa4aa82@gmail.com> Message-ID: On 03/12/2018 08:05 PM, Mark Morgan Lloyd via Lazarus wrote: > On 12/03/18 17:45, José Mejuto via Lazarus wrote: >> El 12/03/2018 a las 18:25, Mark Morgan Lloyd via Lazarus escribió:> > >> On the main form I've got (a tabbed notebook containing multiple > >> instances of) a TStringGrid. The OnSelection event invokes a modal >> form > (containing nothing of significant complexity) with OK and >> Cancel > buttons, and stripped down looks like this: >> Hello, >> Just for testing the OnSelection is raised by mouse click ? If the >> answer is yes, try to click the cell and keep the mouse button >> pressed. If the form appears the grid is still waiting for a MOUSE_UP >> (thinking you are holding MOUSE_DOWN to perform a selection) and the >> modal form has its own queue, so MOUSE_UP never arrives. > > Yes, the modal form appears while the mouse button is held down (for > both GTK2 and Qt). > So, yes, seem that grid expects mouseup From markMLl.lazarus at telemetry.co.uk Tue Mar 13 09:21:31 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Tue, 13 Mar 2018 08:21:31 +0000 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: References: <24569ad5-f6ed-f1e1-c1b1-fb643fa4aa82@gmail.com> Message-ID: On 13/03/18 08:00, zeljko wrote: > On 03/12/2018 08:05 PM, Mark Morgan Lloyd via Lazarus wrote: >> On 12/03/18 17:45, José Mejuto via Lazarus wrote: >>> El 12/03/2018 a las 18:25, Mark Morgan Lloyd via Lazarus escribió:> >> >>> On the main form I've got (a tabbed notebook containing multiple > >>> instances of) a TStringGrid. The OnSelection event invokes a modal >>> form > (containing nothing of significant complexity) with OK and >>> Cancel > buttons, and stripped down looks like this: >>> Hello, >>> Just for testing the OnSelection is raised by mouse click ? If the >>> answer is yes, try to click the cell and keep the mouse button >>> pressed. If the form appears the grid is still waiting for a MOUSE_UP >>> (thinking you are holding MOUSE_DOWN to perform a selection) and the >>> modal form has its own queue, so MOUSE_UP never arrives. >> >> Yes, the modal form appears while the mouse button is held down (for >> both GTK2 and Qt). >> > > So, yes, seem that grid expects mouseup Is there a portable way this can be sent? Otherwise I presume I could fudge it with something like QueueAsyncCall()... unless that also went through before the mouse activity was sorted out. I'm fairly keen to hack this in such a way that it's not tied to one version of the LCL since I want this program to be fairly easy to build even for people with an old (or no existing) copy of Lazarus etc. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From joshyfun at gmail.com Tue Mar 13 09:56:27 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Tue, 13 Mar 2018 09:56:27 +0100 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: References: <24569ad5-f6ed-f1e1-c1b1-fb643fa4aa82@gmail.com> Message-ID: El 13/03/2018 a las 9:21, Mark Morgan Lloyd via Lazarus escribió: >>> Yes, the modal form appears while the mouse button is held down (for >>> both GTK2 and Qt). >>> >> >> So, yes, seem that grid expects mouseup > > Is there a portable way this can be sent? Otherwise I presume I could > fudge it with something like QueueAsyncCall()... unless that also went > through before the mouse activity was sorted out. > > I'm fairly keen to hack this in such a way that it's not tied to one > version of the LCL since I want this program to be fairly easy to build > even for people with an old (or no existing) copy of Lazarus etc. Hello, I think the proper solution is to instruct GTK2 to use the MOUSE_UP event, but meanwhile QueueAsyncCall will not be the solution as when the AsyncCall will be processed grid will be still waiting for MOUSE_UP, so my solution would be add a MOUSE_UP and MOUSE_DOWN handlers, something like this in pseudo code: MOUSE_DOWN: SelectChanged:=false; ON_SELECT: SelectChanged:=true; MOUSE_UP: if SelectChanged then Form.ShowModal(); -- From michael at freepascal.org Tue Mar 13 10:03:31 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 13 Mar 2018 10:03:31 +0100 (CET) Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: On Mon, 12 Mar 2018, Anthony Walter via Lazarus wrote: > Graeme, thanks for the feedback. > > To everyone, I already have a plan for a basic theme system for all > platforms which I'll be publishing as a design time package soon. It will > work using text theme define files, and apply properties values to > everything in the IDE using a pattern matching system with groups. It will > search for published properties of all controls inside the IDE, changing > them to the values specified in the define file. It will also provide a > preview of changes to a select group of controls such that you can preview > a theme by clicking on its name from a list of available themes. I don't think this is a good idea. If you do this, then you're again offsetting a real solution by years by providing a half-baked solution that maybe satisfies an itch you have now, but fails to provide a long-term solution. So if you do intend to make an effort (and I realize it is one), please do it on a lower level, namely the LCL. That can mean making fpGUI widgetset really usable for the IDE, or the customdrawn widgetset, or something else. But at least then all applications can benefit from the effort. There is nothing wrong with having vision and a long-term plan. But yes, it does take perseverance and resisting scratching an immediate itch. Michael. From markMLl.lazarus at telemetry.co.uk Tue Mar 13 10:13:08 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Tue, 13 Mar 2018 09:13:08 +0000 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: References: <24569ad5-f6ed-f1e1-c1b1-fb643fa4aa82@gmail.com> Message-ID: On 13/03/18 09:00, José Mejuto via Lazarus wrote: > El 13/03/2018 a las 9:21, Mark Morgan Lloyd via Lazarus escribió:>>> > Yes, the modal form appears while the mouse button is held down (for >>> > both GTK2 and Qt).>>>>>>> So, yes, seem that grid expects mouseup> > Is > there a portable way this can be sent? Otherwise I presume I could > > fudge it with something like QueueAsyncCall()... unless that also went> > through before the mouse activity was sorted out.> > I'm fairly keen to > hack this in such a way that it's not tied to one > version of the LCL > since I want this program to be fairly easy to build > even for people > with an old (or no existing) copy of Lazarus etc. > Hello, > I think the proper solution is to instruct GTK2 to use the MOUSE_UP > event, but meanwhile QueueAsyncCall will not be the solution as when the > AsyncCall will be processed grid will be still waiting for MOUSE_UP, so > my solution would be add a MOUSE_UP and MOUSE_DOWN handlers, something > like this in pseudo code: > MOUSE_DOWN:   SelectChanged:=false; > ON_SELECT:   SelectChanged:=true; > MOUSE_UP:   if SelectChanged then Form.ShowModal(); Thanks, I'd just about worked that one out. I'll try later- I'm spending the day helping with some flocking sheep ;-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From svaa at ciberpiula.net Tue Mar 13 10:43:13 2018 From: svaa at ciberpiula.net (Santiago A.) Date: Tue, 13 Mar 2018 10:43:13 +0100 Subject: [Lazarus] SQLdb_Tutorial3 error In-Reply-To: <0aaa859e-0d87-4115-74fa-d320c8456eb2@graficalc.nl> References: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> <0aaa859e-0d87-4115-74fa-d320c8456eb2@graficalc.nl> Message-ID: <841d50bc-3d7b-a94a-27a9-e39672a682d8@ciberpiula.net> El 12/03/2018 a las 13:41, Rik van Kekem via Lazarus escribió: > Op 08-03-2018 16:07 schreef Santiago A. via Lazarus: >> sqlite3.dll is in the same directory that the binary. I have created the >> table employee, just in case. I don't know what else to check.  I can't >> debug anything else, the debug can't enter in "open" method. > > Creating the database and table employee wasn't "just in case". > It was a requirement if you want to use that example with sqlite. I mean "Just in case" not to get the TStringGrid properly filled, but to get an exception like "Table not found", not a "SIGSEGV exception" > http://wiki.lazarus.freepascal.org/SQLdb_Tutorial3#Getting_database_data_into_normal_controls > That is the piece of code that raises the error, in the line "Fquery.open" > > And surely you changed something (like the .ini) otherwise you end up > with Firebird db connection. No, the default is still firebird, and it woks fine. Well, it doesn't work because employee doesn't exits, and I get an "Database not found exception" I select on propose sqlite3. and I get SIGSEGV  with no more clue in the Fquery.open > > So zipping your project (with the database) is still best. > > Tip: You are sure sqlite3.dll has the same 'bitness' (i.e. 32 of 64 > bit) as your executable? Well, it is the dll I use for some old delphi 32bits utilities. My point is if I'm missing some package, or the dll should be in other path, or a hint how to dig and debug deeper, beacuse I can't debug into open. -- Saludos Santiago A. -------------- next part -------------- A non-text attachment was scrubbed... Name: publishedproject.zip Type: application/x-zip-compressed Size: 8953 bytes Desc: not available URL: From rik at graficalc.nl Tue Mar 13 11:30:33 2018 From: rik at graficalc.nl (Rik van Kekem) Date: Tue, 13 Mar 2018 11:30:33 +0100 Subject: [Lazarus] SQLdb_Tutorial3 error In-Reply-To: <841d50bc-3d7b-a94a-27a9-e39672a682d8@ciberpiula.net> References: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> <0aaa859e-0d87-4115-74fa-d320c8456eb2@graficalc.nl> <841d50bc-3d7b-a94a-27a9-e39672a682d8@ciberpiula.net> Message-ID: <8c612345-da9a-7b40-44ef-c250412db1f1@graficalc.nl> Op 13-03-2018 10:43 schreef Santiago A. via Lazarus: > My point is if I'm missing some package, or the dll should be in other > path, or a hint how to dig and debug deeper, beacuse I can't debug into > open. No, the SQLite3.dll and your DB should be sufficient. Could you include your .ini file and your SQLite db? Normally the firebird employee database is in C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\EMPLOYEE.FDB (which you can copy to another location so you can access it) But for SQLite you'll need to create your own DB with the correct table and content. Rik From sysrpl at gmail.com Tue Mar 13 12:18:09 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 13 Mar 2018 07:18:09 -0400 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: Michael, I agree with you somewhat that my proposal isn't a total solution, but perhaps there is another point of view to consider that has been overlooked. And that is this: There ought to be a way to edit component properties sweepingly either in an application or in the IDE. I say this because I have often edited the Lazarus source to make remove toolbar button captions, change edge borders, fix the position of edit boxes, increase the height of a panel, turn on tool tips. or remove an unneeded panel. All for the effort of adjusting layouts to make the IDE space more efficient, fix what I see as a design problem, or create a layout better suited to a personal taste. Allowing anyone to easily make sweeping changes like these to the IDE, and making those changes easily shareable and modifiable without the need to search for the correct lfm, or pas file to edit and recompile the IDE would be a good thing. That is, imagine being able to group alter properties of controls/components within the IDE (or any application written with fpc/laszarus), and see those changes instantly, and easily reverted, without the need to search for files and rebuild. As such I think that there is merit to such a tool. It might not need to be branded as a "themer" or "skinner". Perhaps as a "property pattern editor" or something thereof. Regarding a long term solution, I agree that would be best. What I would see as the optimal way to handle this would be to use entirely owner drawn controls based which depend on external resource files, to determine styles such as color, sizes, padding, font, alignment, glyphs, and visibility among a few potential possibilities. Actual control drawing would be handled through an abstraction layer to a platforms best possible graphics API to efficiently handle antialiasing, smoothing, subpixel, and hdpi rendering in a manner that makes it complete transparent to controls. This would allow one code base for all controls for all platforms, solving not only layout problems among different widget sets, but also behavioral problems that creep into usage due to difference or restrictions of the underlying native widgets. Of course, such a design should be completely optional to allow people to continue using native controls whenever they want, but if they're interested in a totally themeable and consistent usage applications across all platforms, then using this alternate widget set would be a pleasant second option. -------------- next part -------------- An HTML attachment was scrubbed... URL: From svaa at ciberpiula.net Tue Mar 13 12:22:44 2018 From: svaa at ciberpiula.net (Santiago A.) Date: Tue, 13 Mar 2018 12:22:44 +0100 Subject: [Lazarus] SQLdb_Tutorial3 error In-Reply-To: <8c612345-da9a-7b40-44ef-c250412db1f1@graficalc.nl> References: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> <0aaa859e-0d87-4115-74fa-d320c8456eb2@graficalc.nl> <841d50bc-3d7b-a94a-27a9-e39672a682d8@ciberpiula.net> <8c612345-da9a-7b40-44ef-c250412db1f1@graficalc.nl> Message-ID: El 13/03/2018 a las 11:30, Rik van Kekem via Lazarus escribió: > Op 13-03-2018 10:43 schreef Santiago A. via Lazarus: >> My point is if I'm missing some package, or the dll should be in other >> path, or a hint how to dig and debug deeper, beacuse I can't debug into >> open. > No, the SQLite3.dll and your DB should be sufficient. > > Could you include your .ini file and your SQLite db? > > Normally the firebird employee database is in > C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\EMPLOYEE.FDB > (which you can copy to another location so you can access it) > > But for SQLite you'll need to create your own DB with the correct > table and content. > > Rik Thanks. Finally it works. I created the table employee and set the full path of the file. Nevertheless, it looks that sqlite3 is a little... well... sending SIGSEGV is not a valid error, "cant' find file", "table doesn't exits" etc would be much better. I would like to dig a little and try to improve error detection. Is there any way I can debug into open?. I've tried compiling Lazarus IDE with debug, but skips over "open" call. What should I compile in debug mode to parse FQuery.open? -- Saludos Santiago A. From rik at graficalc.nl Tue Mar 13 12:46:05 2018 From: rik at graficalc.nl (Rik van Kekem) Date: Tue, 13 Mar 2018 12:46:05 +0100 Subject: [Lazarus] SQLdb_Tutorial3 error In-Reply-To: References: <9e304a44-1676-134f-ce5e-1e74191b81fd@ciberpiula.net> <0aaa859e-0d87-4115-74fa-d320c8456eb2@graficalc.nl> <841d50bc-3d7b-a94a-27a9-e39672a682d8@ciberpiula.net> <8c612345-da9a-7b40-44ef-c250412db1f1@graficalc.nl> Message-ID: <4ab0e5f4-991b-3297-454b-3c5c334715fc@graficalc.nl> Op 13-03-2018 12:22 schreef Santiago A. via Lazarus: > Thanks. Finally it works. I created the table employee and set the full > path of the file. > > Nevertheless, it looks that sqlite3 is a little... well... sending > SIGSEGV is not a valid error, "cant' find file", "table doesn't exits" > etc would be much better. > > I would like to dig a little and try to improve error detection. Is > there any way I can debug into open?. I've tried compiling Lazarus IDE > with debug, but skips over "open" call. What should I compile in debug > mode to parse FQuery.open? I take it you already activated the debugging options (which were disabled in your published project). Otherwise you wouldn't even be able to trace to the Open line. Next problem is that the database sources are not part of the Lazarus IDE. They are from FPC. So you would need to recompile the complete FPC to be able to step through it. (Recompiling Lazarus IDE only compiles the IDE part with debugging information) I use the trunk version from my own script but you could use fpcupdeluxe to install a development version, in which you could trace through the whole source. http://wiki.freepascal.org/fpcupdeluxe Here, I get the correct and expected warnings/errors when using the SQLite3 driver (in both Lazarus 1.9 and 1.8.2). SQLite will automatically create an empty database if it does not exist. After that it should warn about the absence of the employee table. -- Rik From michael at freepascal.org Tue Mar 13 13:42:13 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 13 Mar 2018 13:42:13 +0100 (CET) Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: On Tue, 13 Mar 2018, Anthony Walter wrote: > Michael, > > I agree with you somewhat that my proposal isn't a total solution, but > perhaps there is another point of view to consider that has been > overlooked. > > And that is this: > > There ought to be a way to edit component properties sweepingly either in > an application or in the IDE. Sounds rather hackish to me :) > I say this because I have often edited the Lazarus source to make remove > toolbar button captions, change edge borders, fix the position of edit > boxes, increase the height of a panel, turn on tool tips. or remove an > unneeded panel. All for the effort of adjusting layouts to make the IDE > space more efficient, fix what I see as a design problem, or create a > layout better suited to a personal taste. > > Allowing anyone to easily make sweeping changes like these to the IDE, and > making those changes easily shareable and modifiable without the need to > search for the correct lfm, or pas file to edit and recompile the IDE would > be a good thing. That is, imagine being able to group alter properties of > controls/components within the IDE (or any application written with > fpc/laszarus), and see those changes instantly, and easily reverted, > without the need to search for files and rebuild. > > As such I think that there is merit to such a tool. It might not need to be > branded as a "themer" or "skinner". Perhaps as a "property pattern editor" > or something thereof. That would indeed be more aptly named :) > > Regarding a long term solution, I agree that would be best. What I would > see as the optimal way to handle this would be to use entirely owner drawn > controls based which depend on external resource files, to determine styles > such as color, sizes, padding, font, alignment, glyphs, and visibility > among a few potential possibilities. Actual control drawing would be > handled through an abstraction layer to a platforms best possible graphics > API to efficiently handle antialiasing, smoothing, subpixel, and hdpi > rendering in a manner that makes it complete transparent to controls. This > would allow one code base for all controls for all platforms, solving not > only layout problems among different widget sets, but also behavioral > problems that creep into usage due to difference or restrictions of the > underlying native widgets. I believe this is the aim of fpGUI and the customdrawn widgetset. That is why I proposed extending them to the point of usability needed for the IDE. > > Of course, such a design should be completely optional to allow people to > continue using native controls whenever they want, but if they're > interested in a totally themeable and consistent usage applications across > all platforms, then using this alternate widget set would be a pleasant > second option. Agreed. My main concern is more "strategical": Our time is limited (and by "our" I mean you too). This "property pattern editor" - while it definitely has reasons for existing - will provide something halfway decent (because it can never do everything required for proper theming), and will most likely divert attention/time from the root problem... But it is obviously a free world, I can only point out a concern I see... Michael. From vojtech.cihak at atlas.cz Tue Mar 13 14:07:48 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 13 Mar 2018 14:07:48 +0100 Subject: [Lazarus] =?utf-8?q?Lazarus_projects_=28wiki=29?= Message-ID: <20180313140748.F6133B99@atlas.cz> Hello,   I noticed that wiki pages http://wiki.freepascal.org/Lazarus_Application_Gallery and http://wiki.freepascal.org/Projects_using_Lazarus become too comprehensive and therefore obuscated. Especially the second should/can be separated to more pages - Components and Libraries, Multimedia, Games etc. because it is well separated in content of the page. No idea how to separate Application Gallery. Alphabetically?   V.   From mailinglists at geldenhuys.co.uk Tue Mar 13 20:14:36 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 13 Mar 2018 19:14:36 +0000 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: <63e9fb0a-4d6c-d3bb-4654-ae25bf14688a@geldenhuys.co.uk> On 2018-03-13 11:18, Anthony Walter via Lazarus wrote: > Regarding a long term solution, I agree that would be best. What I would > see as the optimal way to handle this would be to use entirely owner > drawn controls based which depend on external resource files, to > determine styles such as color, sizes, padding, font, alignment, glyphs, > and visibility among a few potential possibilities. Actual control > drawing would be handled through an abstraction layer to a platforms > best possible graphics API to efficiently handle antialiasing, > smoothing, subpixel, and hdpi rendering in a manner that makes it > complete transparent to controls. hehehe... And everything you mentioned there is already supported in fpGUI. fpGUI is a 100% custom drawn toolkit, with no 3rd party library dependencies. It includes a 100% Object Pascal based 2D rendering engine (called AggPas) which does anti-aliasing, and high quality sub-pixel rendering. fpGUI already supports theming - via code or external image resources. The only part lacking from your wish list, is the LCL-fpGUI widgetset implementation. A lot is already working, but it still needs a bit more work to get the Lazarus IDE to compile with LCL-fpGUI. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Tue Mar 13 20:25:04 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 13 Mar 2018 19:25:04 +0000 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: <19611e97-88ee-7239-5368-569382656ed4@geldenhuys.co.uk> On 2018-03-13 01:53, Anthony Walter wrote: > What's the compatibility level of your controls with LCL controls code > wise? fpGUI's controls can not be mixed with LCL controls. But the LCL-fpGUI implements a bridge between the two, making fpGUI controls behave like LCL developers are used to. > Also, what graphics API are you using for different platforms? For > example have you implemented a common advanced graphics API bridging Both. fpGUI v1.4.1 talks directly to the underlying OS platform's graphics API. That's Xlib for X11 based systems, GDI for Windows/WinCE etc. You as a developer don't need to worry about the differences, simply code using the TfpgCanvas class and the framework takes care of the rest. This also means fpGUI applications run pretty much everywhere without needing installations or megabytes of 3rd party libraries and DLL's (eg: Qt, GTK libraries are huge). The "develop" branch of fpGUI does the same as before, but also has a new option... AggPas, which will become the default canvas and 2D rendering API. It is 100% platform independent, because it is 100% implemented in Object Pascal. And as I already mentioned in my other reply, it does anti-alias sub-pixel rendering as standard. It also has the ability to read TTF font files directly and thus incorporate high quality text rendering in the output too. 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 markMLl.lazarus at telemetry.co.uk Tue Mar 13 21:42:12 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Tue, 13 Mar 2018 20:42:12 +0000 Subject: [Lazarus] TStringGrid and cancelling a modal form In-Reply-To: References: <24569ad5-f6ed-f1e1-c1b1-fb643fa4aa82@gmail.com> Message-ID: On 13/03/18 09:00, José Mejuto via Lazarus wrote: > El 13/03/2018 a las 9:21, Mark Morgan Lloyd via Lazarus escribió:>>> > Yes, the modal form appears while the mouse button is held down (for >>> > both GTK2 and Qt).>>>>>>> So, yes, seem that grid expects mouseup> > I think the proper solution is to instruct GTK2 to use the MOUSE_UP > event, but meanwhile QueueAsyncCall will not be the solution as when the > AsyncCall will be processed grid will be still waiting for MOUSE_UP, so > my solution would be add a MOUSE_UP and MOUSE_DOWN handlers, something > like this in pseudo code: > MOUSE_DOWN:   SelectChanged:=false; > ON_SELECT:   SelectChanged:=true; > MOUSE_UP:   if SelectChanged then Form.ShowModal(); I can confirm that that approach appears reliable. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From juha.manninen62 at gmail.com Wed Mar 14 14:58:18 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 14 Mar 2018 15:58:18 +0200 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: On Sat, Mar 10, 2018 at 5:41 AM, Anthony Walter via Lazarus wrote: > As it stand Lazarus has already the ability to change the color of the > source code editor, and some support for changing the object inspector > colors, and message window colors, but all three of these customization > systems operate independently of each other. Also there are many other tool > windows whose colors or styles cannot be customized, such as the components > list in the object inspector, the project manager, and elsewhere. > > An optimal solution would be to add a single IDE theme dialog allowing users > controls the colors and default sizes of everything in the IDE. Items could > be categorized in simple groups such as background color, text color/size, > highlight color, border color/size, and so on. Color and size settings could > be saved using a name, restored, and exported for others to use. > > I can think of a few ways this could be implemented, mainly through offering > a hook into the Graphics unit to redefine custom values for system colors, > and a flag to denote values have been overridden. OI and other special IDE windows should indeed support theming. Now they have fixed colors. However LCL itself already supports theming because it maps to native widgets. The native style + theme is used. It means you should change a style for your entire desktop instead for Lazarus alone. LCL has some complex components like TreeView which are custom drawn instead of native. Theming for them must be implemented using the theme services already included in LCL. Adding an external theme support for LCL apps sounds like a very bad idea. It would combine the bad parts of a custom drawn and native widget libraries. Mapping to native widgets is a clear design decision which has both pros and cons. Custom drawing everything is another design decision with its own pros and cons. Or, maybe there is something about this issue I don't fully understand. Juha From juha.manninen62 at gmail.com Wed Mar 14 15:00:11 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 14 Mar 2018 16:00:11 +0200 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: <7165418a-3aef-e0ec-fd21-c555689538be@ya.ru> References: <7165418a-3aef-e0ec-fd21-c555689538be@ya.ru> Message-ID: On Sat, Mar 10, 2018 at 6:41 AM, AlexeyT via Lazarus wrote: > I made big work to theme scrollbars in CudaText. TScrollBar is a native widget, isn't it? Why does it not follow the native theme? Juha From zeljko at holobit.net Wed Mar 14 17:51:27 2018 From: zeljko at holobit.net (zeljko) Date: Wed, 14 Mar 2018 17:51:27 +0100 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: <7165418a-3aef-e0ec-fd21-c555689538be@ya.ru> Message-ID: <270a2471-6b04-ab49-0915-4ed685b19380@holobit.net> On 03/14/2018 03:00 PM, Juha Manninen via Lazarus wrote: > On Sat, Mar 10, 2018 at 6:41 AM, AlexeyT via Lazarus > wrote: >> I made big work to theme scrollbars in CudaText. > > TScrollBar is a native widget, isn't it? Why does it not follow the > native theme? It follows native theme of the widgetset, but not eg color setted up from lcl (well, Qt can handle that but not for mswindows and cocoa themes). I think that Alexey wants to customize scrollbars (eg with different color), but he cannot do so with lcl TScrollbar which is native widgetset control. Same as you cannot set TBitBtn.Color under win32 ws. zeljko From sysrpl at gmail.com Wed Mar 14 17:52:00 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 14 Mar 2018 12:52:00 -0400 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: Juha, Thanks for the info about tree views. I had attempted to alter the theme on Linux with Qt4 widgetset and a stylesheet argument on the command line and I noticed the tree views were not taking on the styles I defined. I think they probably need to be adjusted to respect system colors at the minimum. Regarding changing the OS theme to change the application theme, in some cases this is undesirable. For example some paint type programs, and even some code editors, use their own independent theme to subdue their interface making the work more prominent. In these types of situations it's not reasonable to retheme the entire OS, rather just retheme an individual application. And of course in these situations an application theme is often a matter of personal taste, so the actual styling should be externalized. What we're left with is the logical solution, to support application level user defined theme information in external styling files. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Thu Mar 15 09:44:29 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 15 Mar 2018 10:44:29 +0200 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: On Wed, Mar 14, 2018 at 6:52 PM, Anthony Walter via Lazarus wrote: > Regarding changing the OS theme to change the application theme, in some > cases this is undesirable. For example some paint type programs, and even > some code editors, use their own independent theme to subdue their interface > making the work more prominent. In these types of situations it's not > reasonable to retheme the entire OS, rather just retheme an individual > application. And of course in these situations an application theme is often > a matter of personal taste, so the actual styling should be externalized. > What we're left with is the logical solution, to support application level > user defined theme information in external styling files. Ok, I understand. I am not against such theming if somebody implements it. Juha From nc-gaertnma at netcologne.de Thu Mar 15 10:01:44 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Mar 2018 10:01:44 +0100 Subject: [Lazarus] Lazarus projects (wiki) In-Reply-To: <20180313140748.F6133B99@atlas.cz> References: <20180313140748.F6133B99@atlas.cz> Message-ID: <20180315100144.158eee3a@limapholos.matflo.wg> On Tue, 13 Mar 2018 14:07:48 +0100 Vojtěch Čihák via Lazarus wrote: > Hello, >   > I noticed that wiki pages http://wiki.freepascal.org/Lazarus_Application_Gallery and http://wiki.freepascal.org/Projects_using_Lazarus become too comprehensive and therefore obuscated. Obfuscated for doing what? It's a long list of mostly independent projects. Maybe tagging them would help. > Especially the second should/can be separated to more pages - > Components and Libraries, Multimedia, Games etc. because it is well > separated in content of the page. No idea how to separate Application > Gallery. Alphabetically? I don't see how splitting the list alphabetically helps. Mattias From jmlandmesser at gmx.de Thu Mar 15 10:59:19 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Thu, 15 Mar 2018 10:59:19 +0100 Subject: [Lazarus] Howto use Tooltip for function pos( for example? Message-ID: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> sorry, couldn't google it  ... if i type for example function  pos(   in Lazarus-Editor. Tooltip windows appears and at the right end of the tooltip window there are buttons ... what for? Thanks! From jmlandmesser at gmx.de Thu Mar 15 11:06:31 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Thu, 15 Mar 2018 11:06:31 +0100 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> Message-ID: <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> got it: insert parameters!! Didn't work correctly with first try: snip:       pos(       Application.Minimize, v2); v2 ist put to wrong position, if the line Application.Minimize; follows! Am 15.03.2018 um 10:59 schrieb Landmesser John via Lazarus: > sorry, couldn't google it  ... > > if i type for example function  pos(   in Lazarus-Editor. > > Tooltip windows appears and at the right end of the tooltip window > there are buttons ... what for? > > Thanks! > From juha.manninen62 at gmail.com Thu Mar 15 11:38:47 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 15 Mar 2018 12:38:47 +0200 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> Message-ID: On Thu, Mar 15, 2018 at 12:06 PM, Landmesser John via Lazarus wrote: > pos( > Application.Minimize, v2); > v2 ist put to wrong position, if the line > Application.Minimize; > follows! Wow, you found a bug! Please report. It happens if any function call is following the line where you try to insert parameters, not only with Application.Minimize call. You did not mention your Lazarus version. I can reproduce at least with Lazarus trunk. Is it a regression? Did it work earlier? What revision broke it? Juha From nc-gaertnma at netcologne.de Thu Mar 15 11:44:53 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Mar 2018 11:44:53 +0100 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> Message-ID: <20180315114453.673a1b7f@limapholos.matflo.wg> On Thu, 15 Mar 2018 11:06:31 +0100 Landmesser John via Lazarus wrote: > got it: insert parameters!! > > Didn't work correctly with first try: > > > snip: > >       pos( >       Application.Minimize, v2); > > > v2 ist put to wrong position, if the line > > Application.Minimize; > > follows! It does not check, if the parameter is compatible. It sees pos( something.something; Mattias From juha.manninen62 at gmail.com Thu Mar 15 12:15:43 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 15 Mar 2018 13:15:43 +0200 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: <20180315114453.673a1b7f@limapholos.matflo.wg> References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> <20180315114453.673a1b7f@limapholos.matflo.wg> Message-ID: On Thu, Mar 15, 2018 at 12:44 PM, Mattias Gaertner via Lazarus wrote: > It does not check, if the parameter is compatible. > It sees > pos( something.something; It changes: sl := TStringList.Create; into: pos( sl := TStringList.Create, v2); which can never be right. I think a newline should break searching for existing parameters in this case. When a user wants to insert template parameters, he typically has no existing parameters at that point. If he has existing parameters, then he uses Ctrl-Space and Ctrl-Shift-Space to modify / verify them. Juha From nc-gaertnma at netcologne.de Thu Mar 15 12:48:47 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Mar 2018 12:48:47 +0100 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> <20180315114453.673a1b7f@limapholos.matflo.wg> Message-ID: <20180315124847.289f6bea@limapholos.matflo.wg> On Thu, 15 Mar 2018 13:15:43 +0200 Juha Manninen via Lazarus wrote: > On Thu, Mar 15, 2018 at 12:44 PM, Mattias Gaertner via Lazarus > wrote: > > It does not check, if the parameter is compatible. > > It sees > > pos( something.something; > > It changes: > sl := TStringList.Create; > into: > pos( > sl := TStringList.Create, v2); > > which can never be right. True. Feel free to improve the heuristic. > I think a newline should break searching for existing parameters in this case. Maybe better: "when the closing bracket is missing, a newline should break". > When a user wants to insert template parameters, he typically has no > existing parameters at that point. > If he has existing parameters, then he uses Ctrl-Space and > Ctrl-Shift-Space to modify / verify them. You can't use Ctrl-Space to add v2. Mattias From jmlandmesser at gmx.de Thu Mar 15 13:07:46 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Thu, 15 Mar 2018 13:07:46 +0100 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: <20180315124847.289f6bea@limapholos.matflo.wg> References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> <20180315114453.673a1b7f@limapholos.matflo.wg> <20180315124847.289f6bea@limapholos.matflo.wg> Message-ID: Don't know if that feature ever worked! Info: Lazarus 1.9.0 trunk FPC 3.0.4 i386-win32-win32/win64 Should i write bug-report? Am 15.03.2018 um 12:48 schrieb Mattias Gaertner via Lazarus: > On Thu, 15 Mar 2018 13:15:43 +0200 > Juha Manninen via Lazarus wrote: > >> On Thu, Mar 15, 2018 at 12:44 PM, Mattias Gaertner via Lazarus >> wrote: >>> It does not check, if the parameter is compatible. >>> It sees >>> pos( something.something; >> It changes: >> sl := TStringList.Create; >> into: >> pos( >> sl := TStringList.Create, v2); >> >> which can never be right. > True. Feel free to improve the heuristic. > >> I think a newline should break searching for existing parameters in this case. > Maybe better: "when the closing bracket is missing, a newline should > break". > >> When a user wants to insert template parameters, he typically has no >> existing parameters at that point. >> If he has existing parameters, then he uses Ctrl-Space and >> Ctrl-Shift-Space to modify / verify them. > You can't use Ctrl-Space to add v2. > > Mattias From juha.manninen62 at gmail.com Thu Mar 15 13:21:35 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 15 Mar 2018 14:21:35 +0200 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> <20180315114453.673a1b7f@limapholos.matflo.wg> <20180315124847.289f6bea@limapholos.matflo.wg> Message-ID: On Thu, Mar 15, 2018 at 2:07 PM, Landmesser John via Lazarus wrote: > Should i write bug-report? Yes please. Juha From nc-gaertnma at netcologne.de Thu Mar 15 13:40:34 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 15 Mar 2018 13:40:34 +0100 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> <20180315114453.673a1b7f@limapholos.matflo.wg> <20180315124847.289f6bea@limapholos.matflo.wg> Message-ID: <20180315134034.26b1bb9d@limapholos.matflo.wg> On Thu, 15 Mar 2018 13:07:46 +0100 Landmesser John via Lazarus wrote: > Don't know if that feature ever worked! It always worked like this. Mattias From jmlandmesser at gmx.de Thu Mar 15 13:51:53 2018 From: jmlandmesser at gmx.de (John Landmesser) Date: Thu, 15 Mar 2018 13:51:53 +0100 Subject: [Lazarus] Howto use Tooltip for function pos( for example? In-Reply-To: References: <75760803-d915-e114-d90e-ab3d46b17f29@gmx.de> <97de4736-3c83-0dc1-6243-ba1f13a9e96b@gmx.de> <20180315114453.673a1b7f@limapholos.matflo.wg> <20180315124847.289f6bea@limapholos.matflo.wg> Message-ID: <7c9bc923-b3ce-8072-5fd6-895842d3c17b@gmx.de> bug-report, done https://bugs.freepascal.org/view.php?id=33433 Am 15.03.2018 um 13:21 schrieb Juha Manninen via Lazarus: > On Thu, Mar 15, 2018 at 2:07 PM, Landmesser John via Lazarus > wrote: >> Should i write bug-report? > Yes please. > > Juha From mailinglists at geldenhuys.co.uk Thu Mar 15 21:59:35 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 15 Mar 2018 20:59:35 +0000 Subject: [Lazarus] Special Request: Theme entire IDE support In-Reply-To: References: Message-ID: <9e4ac5df-e224-900e-e0bd-91dac375a048@geldenhuys.co.uk> On 2018-03-14 16:52, Anthony Walter via Lazarus wrote: > Regarding changing the OS theme to change the application theme, in some > cases this is undesirable. I've made that argument over 12 years ago to the Lazarus team, and every few years after that. They shot me down every time. Initially I wanted to use LCL and Lazarus IDE for enterprise based commercial software. All my clients wanted own styled applications - separate from the OS. LCL couldn't deliver [and for some more reasons] I had to leave LCL behind. I then implemented a whole new toolkit (and partly for fun and learning) to accomplish cross-platform development with FPC and that allows individual applications to be fully themeable. I'm glad to hear that LCL finally has some sort of themeing interface, but based on these discussions, I guess it is not working 100% for all LCL based applications. At least the project is heading in the right direction. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From aaa5500 at ya.ru Sat Mar 17 18:40:46 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 17 Mar 2018 20:40:46 +0300 Subject: [Lazarus] Printers PageSetupDialog margin default Message-ID: <980470b4-f214-685b-a13c-d4eaa1650f75@ya.ru> I don't know how to set "default" for new props of PageSetupDialog- MarginNNN and MinMarginNNN and PageWidth, PageHeight. Currently set to some int, but Delphi wiki tells they dont have default (missed "default"). So need to del default? -- Regards, Alexey From sysrpl at gmail.com Sun Mar 18 19:59:58 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 18 Mar 2018 14:59:58 -0400 Subject: [Lazarus] Help: What color group is this? Message-ID: I am trying to create some alternate styles for Lazarus and its code editor but am having a problem identifying some elements. Can anyone tell me what element group to which these belong? http://cache.getlazarus.org/images/code-color-problem.png These elements appear when you put your cursor on an identifier and code tools automatically highlights all identical identifiers within the same scope. I've tried changing all colors in both template and sycrhon edit, but they have no effect. I'm beginning to suspect that the color values are hard coded somewhere. Does anyone know where these colros values they are set or if they can be modified through the IDE display colors dialog? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Sun Mar 18 20:09:30 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 18 Mar 2018 20:09:30 +0100 Subject: [Lazarus] Help: What color group is this? In-Reply-To: References: Message-ID: <5af3a368-b287-492f-0e83-f6e7e216605a@mfriebe.de> On 18/03/18 19:59, Anthony Walter via Lazarus wrote: > I am trying to create some alternate styles for Lazarus and its code > editor but am having a problem identifying some elements. > > Can anyone tell me what element group to which these belong? > > http://cache.getlazarus.org/images/code-color-problem.png > > These elements appear when you put your cursor on an identifier and > code tools automatically highlights all identical identifiers within > the same scope. "Text" > "Highlight current word" You can also go to "Markup and Matches", and behind "Disable timer for markup current word" press "edit color" its not "scope" but "entire file" -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Sun Mar 18 20:11:02 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 18 Mar 2018 15:11:02 -0400 Subject: [Lazarus] Help: What color group is this? In-Reply-To: <5af3a368-b287-492f-0e83-f6e7e216605a@mfriebe.de> References: <5af3a368-b287-492f-0e83-f6e7e216605a@mfriebe.de> Message-ID: Thanks, that did it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Mon Mar 19 05:03:00 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 19 Mar 2018 00:03:00 -0400 Subject: [Lazarus] Linux make libQt5Pas fails Message-ID: On Linux when following the instructions in the in lcl/interfaces/qt5/cbindings/README.TXT, I get this error during the make stage: g++ -c -m64 -pipe -Wfatal-errors -g -w -D_REENTRANT -fPIC -DBINUX -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtX11Extras -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Itmp -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o tmp/qwindow_c.o src/qwindow_c.cpp In file included from src/qwindow_c.cpp:12:0: src/qwindow_c.h:54:113: error: ‘QWindow::AncestorMode’ is not a class or namespace handle, const QWindowH child, QWindow::AncestorMode mode = QWindow::AncestorMod ^ compilation terminated due to -Wfatal-errors. Makefile:2587: recipe for target 'tmp/qwindow_c.o' failed make: *** [tmp/qwindow_c.o] Error 1 Building on Ubuntu 16.04. Any suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko at holobit.net Mon Mar 19 08:55:18 2018 From: zeljko at holobit.net (zeljko) Date: Mon, 19 Mar 2018 08:55:18 +0100 Subject: [Lazarus] Linux make libQt5Pas fails In-Reply-To: References: Message-ID: <956d69a4-4115-e185-833b-43554dcf149d@holobit.net> On 03/19/2018 05:03 AM, Anthony Walter via Lazarus wrote: > Building on Ubuntu 16.04. Any suggestions? Probably you're using Qt5 lib < 5.6. AFAIR Ubuntu 16.04 have Qt-5.5 by default (same as mint 18.3), I've successfully installed Qt5 5.6.1 from some ubuntu repo and it works like a charm. zeljko From zeljko at holobit.net Mon Mar 19 08:55:18 2018 From: zeljko at holobit.net (zeljko) Date: Mon, 19 Mar 2018 08:55:18 +0100 Subject: [Lazarus] Linux make libQt5Pas fails In-Reply-To: References: Message-ID: <956d69a4-4115-e185-833b-43554dcf149d@holobit.net> On 03/19/2018 05:03 AM, Anthony Walter via Lazarus wrote: > Building on Ubuntu 16.04. Any suggestions? Probably you're using Qt5 lib < 5.6. AFAIR Ubuntu 16.04 have Qt-5.5 by default (same as mint 18.3), I've successfully installed Qt5 5.6.1 from some ubuntu repo and it works like a charm. zeljko From petr at petrhlozek.cz Tue Mar 20 10:44:01 2018 From: petr at petrhlozek.cz (=?UTF-8?B?UGV0ciBIbG/FvmVr?=) Date: Tue, 20 Mar 2018 10:44:01 +0100 Subject: [Lazarus] Application crash when scrolling DB Grid Message-ID: Hi, my application uses DB grid and when user hit and hold pgdown/pgup, or hit CTRL+Home/End, applicaiton always crashes. Gdb gets this information: 0x000000000091bd68 in BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT () (gdb) bt #0 0x000000000091bd68 in BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT () #1 0x000000000092053c in BUFDATASET$_$TCUSTOMBUFDATASET_$__$$_COMPAREBOOKMARKS$TBYTES$TBYTES$$LONGINT () #2 0x0000000003736588 in () #3 0x0000000003410718 in () #4 0x00007fffffffc9d8 in () #5 0x00007fffffffcb20 in () #6 0x0000000000000001 in () #7 0x0000000001a9ac98 in () #8 0x00007fffffffca50 in () #9 0x000000000000000f in () #10 0x000000000106f1b0 in .Ld263 () #11 0x0000000001ad6778 in () #12 0x000000000066cef0 in WSREGISTERCLASS (self=0x7fffffffca90) at include/customcontrol.inc:99 #13 0x00000000008ad882 in FIND (this=0x1add2d8, ITEM=0x3736588, AINDEX=0) at dbgrids.pas:4619 #14 0x00000000008adb65 in INDEXOF (this=0x1add2d8, ITEM=0x3736588) at dbgrids.pas:4627 #15 0x00000000008ace9d in GETCURRENTROWSELECTED (this=0x1add2d8) at dbgrids.pas:4388 #16 0x00000000008a8a8a in DRAWROW (this=0x1ad6778, AROW=1) at dbgrids.pas:3084 #17 0x0000000000845cc0 in DRAWALLROWS (this=0x1ad6778) at grids.pas:4174 #18 0x00000000008a88d3 in DRAWALLROWS (this=0x1ad6778) at dbgrids.pas:3054 #19 0x0000000000844465 in PAINT (this=0x1ad6778) at grids.pas:3742 #20 0x000000000066d006 in PAINTWINDOW (this=0x1ad6778, DC=26725384) at include/customcontrol.inc:132 #21 0x0000000000653c88 in PAINTHANDLER (this=0x1ad6778, THEMESSAGE=...) at include/wincontrol.inc:4819 #22 0x00000000006581c9 in WMPAINT (this=0x1ad6778, MSG=...) at include/wincontrol.inc:6772 #23 0x000000000066cf3c in WMPAINT (this=0x1ad6778, MESSAGE=...) at include/customcontrol.inc:112 #24 0x0000000000431def in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal () #25 0x000000000106f1a8 in .Ld263 () #26 0x000000000106e8c0 in VMT_$CONTROLS_$$_TCUSTOMCONTROL () #27 0x0000000000000001 in () #28 0x000000000000000f in () #29 0x00007fffffffd278 in () #30 0x0000000001ad6778 in () #31 0x00007ffff6c8fb10 in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 #32 0x00000000031d4660 in () #33 0x00007fffffffd550 in () #34 0x00007fffffffd4f0 in () #35 0x0000000000738500 in GTK2PROC_$$_GTKEXPOSEEVENT$PGTKWIDGET$PGDKEVENTEXPOSE$POINTER$$BOOLEAN32 () #36 0x0000000000662a17 in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at include/control.inc:2234 #37 0x000000000065525d in WNDPROC (this=0x1ad6778, MESSAGE=...) at include/wincontrol.inc:5396 #38 0x000000000084779a in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at grids.pas:4701 #39 0x00000000008a3a7d in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at dbgrids.pas:1444 #40 0x0000000000828792 in DELIVERMESSAGE (TARGET=0x1ad6778, AMESSAGE=0) at lclmessageglue.pas:112 ---Type to continue, or q to quit---q Quit (gdb) bt #0 0x000000000091bd68 in BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT () #1 0x000000000092053c in BUFDATASET$_$TCUSTOMBUFDATASET_$__$$_COMPAREBOOKMARKS$TBYTES$TBYTES$$LONGINT () #2 0x0000000003736588 in () #3 0x0000000003410718 in () #4 0x00007fffffffc9d8 in () #5 0x00007fffffffcb20 in () #6 0x0000000000000001 in () #7 0x0000000001a9ac98 in () #8 0x00007fffffffca50 in () #9 0x000000000000000f in () #10 0x000000000106f1b0 in .Ld263 () #11 0x0000000001ad6778 in () #12 0x000000000066cef0 in WSREGISTERCLASS (self=0x7fffffffca90) at include/customcontrol.inc:99 #13 0x00000000008ad882 in FIND (this=0x1add2d8, ITEM=0x3736588, AINDEX=0) at dbgrids.pas:4619 #14 0x00000000008adb65 in INDEXOF (this=0x1add2d8, ITEM=0x3736588) at dbgrids.pas:4627 #15 0x00000000008ace9d in GETCURRENTROWSELECTED (this=0x1add2d8) at dbgrids.pas:4388 #16 0x00000000008a8a8a in DRAWROW (this=0x1ad6778, AROW=1) at dbgrids.pas:3084 #17 0x0000000000845cc0 in DRAWALLROWS (this=0x1ad6778) at grids.pas:4174 #18 0x00000000008a88d3 in DRAWALLROWS (this=0x1ad6778) at dbgrids.pas:3054 #19 0x0000000000844465 in PAINT (this=0x1ad6778) at grids.pas:3742 #20 0x000000000066d006 in PAINTWINDOW (this=0x1ad6778, DC=26725384) at include/customcontrol.inc:132 #21 0x0000000000653c88 in PAINTHANDLER (this=0x1ad6778, THEMESSAGE=...) at include/wincontrol.inc:4819 #22 0x00000000006581c9 in WMPAINT (this=0x1ad6778, MSG=...) at include/wincontrol.inc:6772 #23 0x000000000066cf3c in WMPAINT (this=0x1ad6778, MESSAGE=...) at include/customcontrol.inc:112 #24 0x0000000000431def in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal () #25 0x000000000106f1a8 in .Ld263 () #26 0x000000000106e8c0 in VMT_$CONTROLS_$$_TCUSTOMCONTROL () #27 0x0000000000000001 in () #28 0x000000000000000f in () #29 0x00007fffffffd278 in () #30 0x0000000001ad6778 in () #31 0x00007ffff6c8fb10 in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 #32 0x00000000031d4660 in () #33 0x00007fffffffd550 in () #34 0x00007fffffffd4f0 in () #35 0x0000000000738500 in GTK2PROC_$$_GTKEXPOSEEVENT$PGTKWIDGET$PGDKEVENTEXPOSE$POINTER$$BOOLEAN32 () #36 0x0000000000662a17 in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at include/control.inc:2234 #37 0x000000000065525d in WNDPROC (this=0x1ad6778, MESSAGE=...) at include/wincontrol.inc:5396 #38 0x000000000084779a in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at grids.pas:4701 #39 0x00000000008a3a7d in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at dbgrids.pas:1444 #40 0x0000000000828792 in DELIVERMESSAGE (TARGET=0x1ad6778, AMESSAGE=0) at lclmessageglue.pas:112 ---Type to continue, or q to quit---bt #41 0x000000000072b665 in DELIVERMESSAGE (TARGET=0x1ad6778, AMESSAGE=0) at gtk2proc.inc:3702 #42 0x0000000000736f92 in DODELIVERPAINTMESSAGE (TARGET=0x1ad6778, PAINTMSG=...) at gtk2callback.inc:27 #43 0x000000000073706a in DELIVERPAINTMESSAGE (TARGET=0x1ad6778, THEMESSAGE=0) at gtk2callback.inc:45 #44 0x0000000000737254 in DELIVERGTKPAINTMESSAGE (TARGET=0x1ad6778, WIDGET=0x31d4660, AREA=0x7fffffffd8c4, REPAINTALL=false, ISAFTERGTK=false) at gtk2callback.inc:103 #45 0x0000000000738576 in GTKEXPOSEEVENT (WIDGET=0x31d4660, EVENT=0x7fffffffd8b0, DATA=0x1ad6778) at gtk2callback.inc:694 #46 0x00007ffff6c8fb7b in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 #47 0x00007ffff6919f9d in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #48 0x00007ffff692ccde in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #49 0x00007ffff6934e4f in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #50 0x00007ffff6935ecf in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #51 0x00007ffff6da5f9c in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 #52 0x00007ffff6c8e958 in gtk_main_do_event () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 #53 0x00007ffff773eb9f in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #54 0x00007ffff773eb45 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #55 0x00007ffff773eb45 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #56 0x00007ffff773eb45 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #57 0x00007ffff773b623 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #58 0x00007ffff773bfb0 in gdk_window_process_all_updates () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #59 0x00007ffff773bff9 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #60 0x00007ffff771ac1c in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #61 0x00007ffff6640e25 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #62 0x00007ffff66411f0 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #63 0x00007ffff664127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #64 0x00000000005f90e8 in APPPROCESSMESSAGES (this=0x1549918) at gtk2widgetset.inc:2338 #65 0x000000000045b4bd in HANDLEMESSAGE (this=0x1547348) at include/application.inc:1276 #66 0x000000000045ba3d in RUNLOOP (this=0x1547348) at include/application.inc:1413 #67 0x0000000000717208 in APPRUN (this=0x1549918, ALOOP=...) at include/interfacebase.inc:54 #68 0x000000000045b9e4 in RUN (this=0x1547348) at include/application.inc:1401 #69 0x000000000041f715 in main () at cqrlog.lpr:81 (gdb) Do you have any idea what could be wrong, please? Thanks! Lazarus 1.8.0, fpc 3.0.4 Ubuntu 16.04, Ubuntu 17.10, the same problem with Lazarus 1.6.x in Fedora/Ubuntu/Debian etc. Petr -- web: https://petrhlozek.cz email: petr at petrhlozek.cz From jmlandmesser at gmx.de Tue Mar 20 11:22:47 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Tue, 20 Mar 2018 11:22:47 +0100 Subject: [Lazarus] Application crash when scrolling DB Grid In-Reply-To: References: Message-ID: <315e7102-de07-270b-462c-8ee561dd5df9@gmx.de> no probs in this situation with DBGrid and Oracle Database by ZQuery on Windows XP Try to use dbnavigator -> Button-last ?! Am 20.03.2018 um 10:44 schrieb Petr Hložek via Lazarus: > Hi, > > my application uses DB grid and when user hit and hold pgdown/pgup, or > hit CTRL+Home/End, applicaiton always crashes. Gdb gets this > information: > > 0x000000000091bd68 in > BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT > () > (gdb) bt > #0 0x000000000091bd68 in > BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT > () > #1 0x000000000092053c in > BUFDATASET$_$TCUSTOMBUFDATASET_$__$$_COMPAREBOOKMARKS$TBYTES$TBYTES$$LONGINT > () > #2 0x0000000003736588 in () > #3 0x0000000003410718 in () > #4 0x00007fffffffc9d8 in () > #5 0x00007fffffffcb20 in () > #6 0x0000000000000001 in () > #7 0x0000000001a9ac98 in () > #8 0x00007fffffffca50 in () > #9 0x000000000000000f in () > #10 0x000000000106f1b0 in .Ld263 () > #11 0x0000000001ad6778 in () > #12 0x000000000066cef0 in WSREGISTERCLASS (self=0x7fffffffca90) at > include/customcontrol.inc:99 > #13 0x00000000008ad882 in FIND (this=0x1add2d8, ITEM=0x3736588, > AINDEX=0) at dbgrids.pas:4619 > #14 0x00000000008adb65 in INDEXOF (this=0x1add2d8, ITEM=0x3736588) at > dbgrids.pas:4627 > #15 0x00000000008ace9d in GETCURRENTROWSELECTED (this=0x1add2d8) at > dbgrids.pas:4388 > #16 0x00000000008a8a8a in DRAWROW (this=0x1ad6778, AROW=1) at dbgrids.pas:3084 > #17 0x0000000000845cc0 in DRAWALLROWS (this=0x1ad6778) at grids.pas:4174 > #18 0x00000000008a88d3 in DRAWALLROWS (this=0x1ad6778) at dbgrids.pas:3054 > #19 0x0000000000844465 in PAINT (this=0x1ad6778) at grids.pas:3742 > #20 0x000000000066d006 in PAINTWINDOW (this=0x1ad6778, DC=26725384) at > include/customcontrol.inc:132 > #21 0x0000000000653c88 in PAINTHANDLER (this=0x1ad6778, > THEMESSAGE=...) at include/wincontrol.inc:4819 > #22 0x00000000006581c9 in WMPAINT (this=0x1ad6778, MSG=...) at > include/wincontrol.inc:6772 > #23 0x000000000066cf3c in WMPAINT (this=0x1ad6778, MESSAGE=...) at > include/customcontrol.inc:112 > #24 0x0000000000431def in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal () > #25 0x000000000106f1a8 in .Ld263 () > #26 0x000000000106e8c0 in VMT_$CONTROLS_$$_TCUSTOMCONTROL () > #27 0x0000000000000001 in () > #28 0x000000000000000f in () > #29 0x00007fffffffd278 in () > #30 0x0000000001ad6778 in () > #31 0x00007ffff6c8fb10 in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 > #32 0x00000000031d4660 in () > #33 0x00007fffffffd550 in () > #34 0x00007fffffffd4f0 in () > #35 0x0000000000738500 in > GTK2PROC_$$_GTKEXPOSEEVENT$PGTKWIDGET$PGDKEVENTEXPOSE$POINTER$$BOOLEAN32 > () > #36 0x0000000000662a17 in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at > include/control.inc:2234 > #37 0x000000000065525d in WNDPROC (this=0x1ad6778, MESSAGE=...) at > include/wincontrol.inc:5396 > #38 0x000000000084779a in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at > grids.pas:4701 > #39 0x00000000008a3a7d in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at > dbgrids.pas:1444 > #40 0x0000000000828792 in DELIVERMESSAGE (TARGET=0x1ad6778, > AMESSAGE=0) at lclmessageglue.pas:112 > ---Type to continue, or q to quit---q > Quit > (gdb) bt > #0 0x000000000091bd68 in > BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT > () > #1 0x000000000092053c in > BUFDATASET$_$TCUSTOMBUFDATASET_$__$$_COMPAREBOOKMARKS$TBYTES$TBYTES$$LONGINT > () > #2 0x0000000003736588 in () > #3 0x0000000003410718 in () > #4 0x00007fffffffc9d8 in () > #5 0x00007fffffffcb20 in () > #6 0x0000000000000001 in () > #7 0x0000000001a9ac98 in () > #8 0x00007fffffffca50 in () > #9 0x000000000000000f in () > #10 0x000000000106f1b0 in .Ld263 () > #11 0x0000000001ad6778 in () > #12 0x000000000066cef0 in WSREGISTERCLASS (self=0x7fffffffca90) at > include/customcontrol.inc:99 > #13 0x00000000008ad882 in FIND (this=0x1add2d8, ITEM=0x3736588, > AINDEX=0) at dbgrids.pas:4619 > #14 0x00000000008adb65 in INDEXOF (this=0x1add2d8, ITEM=0x3736588) at > dbgrids.pas:4627 > #15 0x00000000008ace9d in GETCURRENTROWSELECTED (this=0x1add2d8) at > dbgrids.pas:4388 > #16 0x00000000008a8a8a in DRAWROW (this=0x1ad6778, AROW=1) at dbgrids.pas:3084 > #17 0x0000000000845cc0 in DRAWALLROWS (this=0x1ad6778) at grids.pas:4174 > #18 0x00000000008a88d3 in DRAWALLROWS (this=0x1ad6778) at dbgrids.pas:3054 > #19 0x0000000000844465 in PAINT (this=0x1ad6778) at grids.pas:3742 > #20 0x000000000066d006 in PAINTWINDOW (this=0x1ad6778, DC=26725384) at > include/customcontrol.inc:132 > #21 0x0000000000653c88 in PAINTHANDLER (this=0x1ad6778, > THEMESSAGE=...) at include/wincontrol.inc:4819 > #22 0x00000000006581c9 in WMPAINT (this=0x1ad6778, MSG=...) at > include/wincontrol.inc:6772 > #23 0x000000000066cf3c in WMPAINT (this=0x1ad6778, MESSAGE=...) at > include/customcontrol.inc:112 > #24 0x0000000000431def in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal () > #25 0x000000000106f1a8 in .Ld263 () > #26 0x000000000106e8c0 in VMT_$CONTROLS_$$_TCUSTOMCONTROL () > #27 0x0000000000000001 in () > #28 0x000000000000000f in () > #29 0x00007fffffffd278 in () > #30 0x0000000001ad6778 in () > #31 0x00007ffff6c8fb10 in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 > #32 0x00000000031d4660 in () > #33 0x00007fffffffd550 in () > #34 0x00007fffffffd4f0 in () > #35 0x0000000000738500 in > GTK2PROC_$$_GTKEXPOSEEVENT$PGTKWIDGET$PGDKEVENTEXPOSE$POINTER$$BOOLEAN32 > () > #36 0x0000000000662a17 in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at > include/control.inc:2234 > #37 0x000000000065525d in WNDPROC (this=0x1ad6778, MESSAGE=...) at > include/wincontrol.inc:5396 > #38 0x000000000084779a in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at > grids.pas:4701 > #39 0x00000000008a3a7d in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at > dbgrids.pas:1444 > #40 0x0000000000828792 in DELIVERMESSAGE (TARGET=0x1ad6778, > AMESSAGE=0) at lclmessageglue.pas:112 > ---Type to continue, or q to quit---bt > #41 0x000000000072b665 in DELIVERMESSAGE (TARGET=0x1ad6778, > AMESSAGE=0) at gtk2proc.inc:3702 > #42 0x0000000000736f92 in DODELIVERPAINTMESSAGE (TARGET=0x1ad6778, > PAINTMSG=...) at gtk2callback.inc:27 > #43 0x000000000073706a in DELIVERPAINTMESSAGE (TARGET=0x1ad6778, > THEMESSAGE=0) at gtk2callback.inc:45 > #44 0x0000000000737254 in DELIVERGTKPAINTMESSAGE (TARGET=0x1ad6778, > WIDGET=0x31d4660, AREA=0x7fffffffd8c4, REPAINTALL=false, > ISAFTERGTK=false) at gtk2callback.inc:103 > #45 0x0000000000738576 in GTKEXPOSEEVENT (WIDGET=0x31d4660, > EVENT=0x7fffffffd8b0, DATA=0x1ad6778) at gtk2callback.inc:694 > #46 0x00007ffff6c8fb7b in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 > #47 0x00007ffff6919f9d in g_closure_invoke () at > /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 > #48 0x00007ffff692ccde in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 > #49 0x00007ffff6934e4f in g_signal_emit_valist () at > /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 > #50 0x00007ffff6935ecf in g_signal_emit () at > /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 > #51 0x00007ffff6da5f9c in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 > #52 0x00007ffff6c8e958 in gtk_main_do_event () at > /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 > #53 0x00007ffff773eb9f in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 > #54 0x00007ffff773eb45 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 > #55 0x00007ffff773eb45 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 > #56 0x00007ffff773eb45 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 > #57 0x00007ffff773b623 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 > #58 0x00007ffff773bfb0 in gdk_window_process_all_updates () at > /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 > #59 0x00007ffff773bff9 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 > #60 0x00007ffff771ac1c in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 > #61 0x00007ffff6640e25 in g_main_context_dispatch () at > /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #62 0x00007ffff66411f0 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #63 0x00007ffff664127c in g_main_context_iteration () at > /lib/x86_64-linux-gnu/libglib-2.0.so.0 > #64 0x00000000005f90e8 in APPPROCESSMESSAGES (this=0x1549918) at > gtk2widgetset.inc:2338 > #65 0x000000000045b4bd in HANDLEMESSAGE (this=0x1547348) at > include/application.inc:1276 > #66 0x000000000045ba3d in RUNLOOP (this=0x1547348) at > include/application.inc:1413 > #67 0x0000000000717208 in APPRUN (this=0x1549918, ALOOP=...) at > include/interfacebase.inc:54 > #68 0x000000000045b9e4 in RUN (this=0x1547348) at include/application.inc:1401 > #69 0x000000000041f715 in main () at cqrlog.lpr:81 > (gdb) > > Do you have any idea what could be wrong, please? Thanks! > > Lazarus 1.8.0, fpc 3.0.4 Ubuntu 16.04, Ubuntu 17.10, the same problem > with Lazarus 1.6.x in Fedora/Ubuntu/Debian etc. > > Petr > From michael at freepascal.org Thu Mar 22 20:49:34 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 22 Mar 2018 20:49:34 +0100 (CET) Subject: [Lazarus] Color and transparancy selection ? Message-ID: Hello, Is there a version of TColorDialog which allows to specify an Alpha channel ? Michael. From lazarus at kluug.net Thu Mar 22 21:36:15 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 22 Mar 2018 21:36:15 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: Message-ID: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> On 22.03.2018 20:49, Michael Van Canneyt via Lazarus wrote: > Is there a version of TColorDialog which allows to specify an Alpha > channel ? Not in the LCL itself. Maybe you can try to build one using http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers I didn't use it myself, it just popped up in a Google search. Ondrej From michael at freepascal.org Thu Mar 22 21:41:31 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 22 Mar 2018 21:41:31 +0100 (CET) Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> References: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> Message-ID: On Thu, 22 Mar 2018, Ondrej Pokorny via Lazarus wrote: > On 22.03.2018 20:49, Michael Van Canneyt via Lazarus wrote: >> Is there a version of TColorDialog which allows to specify an Alpha >> channel ? > > Not in the LCL itself. Maybe you can try to build one using > http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers > > I didn't use it myself, it just popped up in a Google search. Hm. I didn't find that. Must have used the wrong terms. However, none of them seems to support Alpha. It looks like I will have to make one myself :( Michael. From werner.pamler at freenet.de Fri Mar 23 01:25:50 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Fri, 23 Mar 2018 01:25:50 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> References: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> Message-ID: <7b089142-2da5-196f-e375-b160bd3e67d5@freenet.de> Am 22.03.2018 um 21:36 schrieb Ondrej Pokorny via Lazarus: > > Not in the LCL itself. Maybe you can try to build one using > http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers I did the port to Lazarus. But no - none of them supports an alpha channel, they focus on color selection based on a variety of color models. Maybe you should have a look at BGRABitmap and associated controls. Looking at the demo of the mbColorLib again after some time I see now a terrible flicker on Windows. Ondrej, I fear your change in double-buffering killed a majority of third-party components. It may take some time until all authors will fix this (and most of them left their babies...). Werner From vojtech.cihak at atlas.cz Fri Mar 23 02:05:58 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Fri, 23 Mar 2018 02:05:58 +0100 Subject: [Lazarus] =?utf-8?q?Color_and_transparancy_selection_=3F?= In-Reply-To: 0000000087a90001340401654fd1 References: 0000000087a90001340401654fd1 Message-ID: <20180323020558.D6B23E9E@atlas.cz> Hello,   native TColorDialog in Qt4 has slider and edit for Alpha channel but this value is never in the result (i.e. TColorDialog.Color property). TColor uses upper 8 bits for other purposes than alpha.   V. ______________________________________________________________ > Od: Michael Van Canneyt via Lazarus > Komu: Lazarus mailing list > Datum: 22.03.2018 20:49 > Předmět: [Lazarus] Color and transparancy selection ? > Hello, Is there a version of TColorDialog which allows to specify an Alpha channel ? Michael. -- _______________________________________________ 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 sysrpl at gmail.com Fri Mar 23 04:06:23 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 22 Mar 2018 23:06:23 -0400 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: <20180323020558.D6B23E9E@atlas.cz> References: <20180323020558.D6B23E9E@atlas.cz> Message-ID: I've written a pascal version of some color controls which I've ported to Lazarus. Here is a link to a page with demo video: https://www.codebot.org/delphi/?doc=9524 These controls includes a hue picker that has 2 styles (radial as shown and bar), a saturation pick again with 2 styles, and an alpha picker. I also have a color value slider edit box, where you can type out a R, G, B values in bytes or floats, and it has a drop down with a left right slider that shows you the colors. They should be enough to create a decent pascal native color picker. Quick example, adding the alpha picker and drop down edit is trivial: https://s3.amazonaws.com/cache.codebot.org/videos/color-lazarus-example.mp4 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Fri Mar 23 08:01:39 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 23 Mar 2018 08:01:39 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> Message-ID: <40403457-6903-d292-850a-b5cc9071afae@kluug.net> On 22.03.2018 21:41, Michael Van Canneyt via Lazarus wrote: > On Thu, 22 Mar 2018, Ondrej Pokorny via Lazarus wrote: > >> On 22.03.2018 20:49, Michael Van Canneyt via Lazarus wrote: >> >> Maybe you can try to build one using >> http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers > > It looks like I will have to make one myself :( This is exactly what I meant by "you can try to build one using ...". It shouldn't be that hard - just use the color picker you like (e.g. THSColorPicker) and put a spinedit next to it for the alpha channel value. Ondrej From michael at freepascal.org Fri Mar 23 08:11:33 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 23 Mar 2018 08:11:33 +0100 (CET) Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: <40403457-6903-d292-850a-b5cc9071afae@kluug.net> References: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> <40403457-6903-d292-850a-b5cc9071afae@kluug.net> Message-ID: On Fri, 23 Mar 2018, Ondrej Pokorny via Lazarus wrote: > On 22.03.2018 21:41, Michael Van Canneyt via Lazarus wrote: >> On Thu, 22 Mar 2018, Ondrej Pokorny via Lazarus wrote: >> >>> On 22.03.2018 20:49, Michael Van Canneyt via Lazarus wrote: >>> >>> Maybe you can try to build one using >>> http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers >> >> It looks like I will have to make one myself :( > > This is exactly what I meant by "you can try to build one using ...". It > shouldn't be that hard - just use the color picker you like (e.g. > THSColorPicker) and put a spinedit next to it for the alpha channel value. Since I don't want dependencies on other packages - only the LCL can be used - this is not an option... Michael. From lazarus at kluug.net Fri Mar 23 08:27:16 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 23 Mar 2018 08:27:16 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: <7b089142-2da5-196f-e375-b160bd3e67d5@freenet.de> References: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> <7b089142-2da5-196f-e375-b160bd3e67d5@freenet.de> Message-ID: <95740b10-9ce9-cbed-83ed-884263721736@kluug.net> On 23.03.2018 1:25, Werner Pamler via Lazarus wrote: > Looking at the demo of the mbColorLib again after some time I see now > a terrible flicker on Windows. Ondrej, I fear your change in > double-buffering killed a majority of third-party components. It may > take some time until all authors will fix this (and most of them left > their babies...). Why killed? You can still set the DoubleBuffered property to True. In 1.8 the DoubleBuffered property was ignored on Windows for all controls. Instead DoubleBuffered=True was forced without the chance to disable it. I.e. the property was absolutely useless since it is not used on Linux/OSX either. I just disabled the forced DoubleBuffered=True - the same what Delphi does. The only thing LCL misses is ParentDoubleBuffered that makes things easier. If you don't like the Delphi way but like the Lazarus 1.8 way - it's a valid scenario as well, but then the DoubleBuffered property should be deprecated/removed and DoubleBuffered should be handled automatically with protected methods to override the default behavior. If you want to discuss it, it will be better to open a new thread. Ondrej From zeljko at holobit.net Fri Mar 23 08:57:53 2018 From: zeljko at holobit.net (zeljko) Date: Fri, 23 Mar 2018 08:57:53 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: Message-ID: On 03/22/2018 08:49 PM, Michael Van Canneyt via Lazarus wrote: > > Hello, > > Is there a version of TColorDialog which allows to specify an Alpha > channel ? Qt4/Qt5 ws have alpha option in standard color dialog. zeljko From michael at freepascal.org Fri Mar 23 09:27:59 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 23 Mar 2018 09:27:59 +0100 (CET) Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: Message-ID: On Fri, 23 Mar 2018, zeljko wrote: > On 03/22/2018 08:49 PM, Michael Van Canneyt via Lazarus wrote: >> >> Hello, >> >> Is there a version of TColorDialog which allows to specify an Alpha channel >> ? > > Qt4/Qt5 ws have alpha option in standard color dialog. That's no good to me. It needs to work on all platforms, all widgetsets. This is lazarus, after all - it should work on all supported platforms. Michael. From zeljko at holobit.net Fri Mar 23 10:16:59 2018 From: zeljko at holobit.net (zeljko) Date: Fri, 23 Mar 2018 10:16:59 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: Message-ID: <2a293fff-c594-66fe-d2ad-e5549018537e@holobit.net> On 03/23/2018 09:27 AM, Michael Van Canneyt via Lazarus wrote: > > > On Fri, 23 Mar 2018, zeljko wrote: > >> On 03/22/2018 08:49 PM, Michael Van Canneyt via Lazarus wrote: >>> >>> Hello, >>> >>> Is there a version of TColorDialog which allows to specify an Alpha >>> channel ? >> >> Qt4/Qt5 ws have alpha option in standard color dialog. > > That's no good to me. It needs to work on all platforms, all widgetsets. > > This is lazarus, after all - it should work on all supported platforms. Well, Qt works on all supported desktop platforms :) zeljko From michael at freepascal.org Fri Mar 23 10:27:07 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 23 Mar 2018 10:27:07 +0100 (CET) Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: <2a293fff-c594-66fe-d2ad-e5549018537e@holobit.net> References: <2a293fff-c594-66fe-d2ad-e5549018537e@holobit.net> Message-ID: On Fri, 23 Mar 2018, zeljko wrote: > On 03/23/2018 09:27 AM, Michael Van Canneyt via Lazarus wrote: >> >> >> On Fri, 23 Mar 2018, zeljko wrote: >> >>> On 03/22/2018 08:49 PM, Michael Van Canneyt via Lazarus wrote: >>>> >>>> Hello, >>>> >>>> Is there a version of TColorDialog which allows to specify an Alpha >>>> channel ? >>> >>> Qt4/Qt5 ws have alpha option in standard color dialog. >> >> That's no good to me. It needs to work on all platforms, all widgetsets. >> >> This is lazarus, after all - it should work on all supported platforms. > > Well, Qt works on all supported desktop platforms :) Oh please, you know what I meant :) s/platforms/platforms+widgetsets/g :) Michael. From zeljko at holobit.net Fri Mar 23 10:33:09 2018 From: zeljko at holobit.net (zeljko) Date: Fri, 23 Mar 2018 10:33:09 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: <2a293fff-c594-66fe-d2ad-e5549018537e@holobit.net> Message-ID: <9535f1bb-d61d-3ca5-3a39-f527640d04c1@holobit.net> On 03/23/2018 10:27 AM, Michael Van Canneyt via Lazarus wrote: ported platforms. >> >> Well, Qt works on all supported desktop platforms :) > > Oh please, you know what I meant :) > > s/platforms/platforms+widgetsets/g :) Of course I know :) zeljko From lazarus at kluug.net Fri Mar 23 10:48:44 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 23 Mar 2018 10:48:44 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> <40403457-6903-d292-850a-b5cc9071afae@kluug.net> Message-ID: <7d6ae92b-ba52-6a7a-c0d4-1136bab0c4db@kluug.net> On 23.03.2018 8:11, Michael Van Canneyt via Lazarus wrote: > Since I don't want dependencies on other packages - only the LCL can > be used - this is not an option... Unfortunately LCL always uses native widgets - including dialogs. Non-native and custom widgets (that are not in the VCL) are left for 3rd party vendors. The Lazarus CCR (where mbColorLib is hosted) is a good place for such 3rd party custom components. E.g. virtual tree view and fpspreadsheet are hosted there as well. I am sure you can get commit rights for it if you want to improve libraries stored there. If you like to write your own alpha channel color dialog (based on mbColorLib or not), you are welcome to host it on LazarusCCR as well. Ondrej From michael at freepascal.org Fri Mar 23 10:51:48 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 23 Mar 2018 10:51:48 +0100 (CET) Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: <7d6ae92b-ba52-6a7a-c0d4-1136bab0c4db@kluug.net> References: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> <40403457-6903-d292-850a-b5cc9071afae@kluug.net> <7d6ae92b-ba52-6a7a-c0d4-1136bab0c4db@kluug.net> Message-ID: On Fri, 23 Mar 2018, Ondrej Pokorny via Lazarus wrote: > On 23.03.2018 8:11, Michael Van Canneyt via Lazarus wrote: >> Since I don't want dependencies on other packages - only the LCL can >> be used - this is not an option... > > Unfortunately LCL always uses native widgets - including dialogs. > Non-native and custom widgets (that are not in the VCL) are left for 3rd > party vendors. The Lazarus CCR (where mbColorLib is hosted) is a good > place for such 3rd party custom components. E.g. virtual tree view and > fpspreadsheet are hosted there as well. I am sure you can get commit > rights for it if you want to improve libraries stored there. > > If you like to write your own alpha channel color dialog (based on > mbColorLib or not), you are welcome to host it on LazarusCCR as well. I need it for FPReport, meaning it must be in Lazarus itself, so I will write a minimalistic dialog that supports Alpha and include it in the report designer package. Michael. From lazarus at kluug.net Fri Mar 23 11:00:06 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 23 Mar 2018 11:00:06 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: <3e7bf2fe-5cac-96ad-f07f-34b7fcdb44da@kluug.net> <40403457-6903-d292-850a-b5cc9071afae@kluug.net> <7d6ae92b-ba52-6a7a-c0d4-1136bab0c4db@kluug.net> Message-ID: <5bcf6035-91bd-1ef3-ea95-510f3ecac4ea@kluug.net> On 23.03.2018 10:51, Michael Van Canneyt via Lazarus wrote: > I need it for FPReport, meaning it must be in Lazarus itself, so I will > write a minimalistic dialog that supports Alpha and include it in the > report > designer package. Yes, that makes sense. In Lazarus itself the same problem is solved by selecting the color and alpha channel independently: But I am aware it doesn't need to suit your needs either. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nchanealnhaieffg.png Type: image/png Size: 32106 bytes Desc: not available URL: From donald at ziesig.org Mon Mar 26 04:02:14 2018 From: donald at ziesig.org (Donald Ziesig) Date: Sun, 25 Mar 2018 22:02:14 -0400 Subject: [Lazarus] Beep? Message-ID: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> Hi Everyone! I am using Lazarus 1.8 on Linux Mint.  I would like to use the Windows.Beep( Freq, Duration) function, or (if not available) SysUtils.Beep subprograms. Simplest problem.  SysUtils.Beep compiles and links but is silent. Slightly more difficult (according to StackOverflow) I should be able to insert (manually) Windows in the uses clause, then call the windows.beep( f, d) function, but fcp can't find Windows even though there are several windows.pp files in the fpcscr directories. Failing that, the article says: |functionBeep(dwFreq,dwDuration:DWORD):BOOL;stdcall;external'kernel32.dll';| should work, but it causes a linker error after compilation.  I don't have lernel32.dll on my Linux system. A long time ago, I used the Windows.Beep (on windows) to produce Morse Code error messages while debugging visual components.  I would like to do that now if possible, but on Linux. Any suggestions would be appreciated. Thanks, Don Ziesig -------------- next part -------------- An HTML attachment was scrubbed... URL: From robin.listas at telefonica.net Mon Mar 26 06:09:27 2018 From: robin.listas at telefonica.net (Carlos E. R.) Date: Mon, 26 Mar 2018 06:09:27 +0200 Subject: [Lazarus] Beep? In-Reply-To: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> References: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> Message-ID: <92e079be-8803-a856-4d72-27c8393df001@telefonica.net> On 2018-03-26 04:02, Donald Ziesig via Lazarus wrote: > Hi Everyone! > > I am using Lazarus 1.8 on Linux Mint.  I would like to use the > Windows.Beep( Freq, Duration) function, or (if not available) > SysUtils.Beep subprograms. AFAIK, you can not call Windows functions in Linux. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From sysrpl at gmail.com Mon Mar 26 06:22:46 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 26 Mar 2018 00:22:46 -0400 Subject: [Lazarus] Test this please Message-ID: Hey guys. I wrote this web tool a while ago which emulates a desktop application in a few ways and wanted some feedback. http://storage.codebot.org login: tester password: funkytown The tool is a private cloud file server application. People will be able to get the source and configure it on their web server so that they can backup/share/transfer files to themselves or among friend. The admin account can manage users, their rights, and storage limits. What I've tried to do with this app is emulate a desktop application a bit, which might be similar to a desktop app written with Lazarus. Features: You can drag and drop files or click to browse for uploads. Large uploads can be resumed if you close the page before the upload completes. Uploads can be paused and resumed. The selection in file list can be navigated with up down and page up down arrow keys. Shift multi selects both with the mouse and keyboard. Control can toggle select on individual items. Some files including video and audio can be viewed. It has code for http stream allowing seeking to positions in large video files without the need to download. Multi select can be used to create play lists. If you select a group of songs, then open the song and play it will continue playing the next song when the current song is done. Enter selects items/ Function keys F2 renames inline, F3 search filters, F4 gives the option to turn sharing on/off (works with multiselect). File columns can be sorted. The front end code was written using my own typescript library. Any feedback would be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From svaa at ciberpiula.net Mon Mar 26 13:47:21 2018 From: svaa at ciberpiula.net (Santiago A.) Date: Mon, 26 Mar 2018 13:47:21 +0200 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: El 26/03/2018 a las 6:22, Anthony Walter via Lazarus escribió: > Hey guys. I wrote this web tool a while ago which emulates a desktop > application in a few ways and wanted some feedback. > > http://storage.codebot.org > > login: tester > password: funkytown > > The tool is a private cloud file server application. People will be > able to get the source and configure it on their web server so that > they can backup/share/transfer files to themselves or among friend. > The admin account can manage users, their rights, and storage limits. > > What I've tried to do with this app is emulate a desktop application a > bit, which might be similar to a desktop app written with Lazarus. > > Features: > > You can drag and drop files or click to browse for uploads. Large > uploads can be resumed if you close the page before the upload > completes. Uploads can be paused and resumed. > > The selection in file list can be navigated with up down and page up > down arrow keys. Shift multi selects both with the mouse and keyboard. > Control can toggle select on individual items. > > Some files including video and audio can be viewed. It has code for > http stream allowing seeking to positions in large video files without > the need to download. Multi select can be used to create play lists. > If you select a group of songs, then open the song and play it will > continue playing the next song when the current song is done. > > Enter selects items/ Function keys F2 renames inline, F3 search > filters, F4 gives the option to turn sharing on/off (works with > multiselect). File columns can be sorted. > > The front end code was written using my own typescript library. > > Any feedback would be appreciated. > > Nice interface. Some points: Wrong password doesn't gives an error, simple ignores it no "Invalid user or password". Downloading videos is not posible. When I tried to reproduce it I got an error "No compatible video mime format", Maybe my browser fault, but couldn't dowload it either. I suppose this is realtaed to freepascal some way. Isn't it? -- Saludos Santiago A. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ngbarbier at gmail.com Mon Mar 26 14:14:01 2018 From: ngbarbier at gmail.com (guy barbier) Date: Mon, 26 Mar 2018 14:14:01 +0200 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: For me it doesn't work. Only the sign in page and nothing more. 2018-03-26 13:47 GMT+02:00 Santiago A. via Lazarus < lazarus at lists.lazarus-ide.org>: > El 26/03/2018 a las 6:22, Anthony Walter via Lazarus escribió: > > Hey guys. I wrote this web tool a while ago which emulates a desktop > application in a few ways and wanted some feedback. > > http://storage.codebot.org > > login: tester > password: funkytown > > The tool is a private cloud file server application. People will be able > to get the source and configure it on their web server so that they can > backup/share/transfer files to themselves or among friend. The admin > account can manage users, their rights, and storage limits. > > What I've tried to do with this app is emulate a desktop application a > bit, which might be similar to a desktop app written with Lazarus. > > Features: > > You can drag and drop files or click to browse for uploads. Large uploads > can be resumed if you close the page before the upload completes. Uploads > can be paused and resumed. > > The selection in file list can be navigated with up down and page up down > arrow keys. Shift multi selects both with the mouse and keyboard. Control > can toggle select on individual items. > > Some files including video and audio can be viewed. It has code for http > stream allowing seeking to positions in large video files without the need > to download. Multi select can be used to create play lists. If you select a > group of songs, then open the song and play it will continue playing the > next song when the current song is done. > > Enter selects items/ Function keys F2 renames inline, F3 search filters, > F4 gives the option to turn sharing on/off (works with multiselect). File > columns can be sorted. > > The front end code was written using my own typescript library. > > Any feedback would be appreciated. > > > Nice interface. > > Some points: > > Wrong password doesn't gives an error, simple ignores it no "Invalid user > or password". > > Downloading videos is not posible. When I tried to reproduce it I got an > error "No compatible video mime format", Maybe my browser fault, but > couldn't dowload it either. > > I suppose this is realtaed to freepascal some way. Isn't it? > > > -- > Saludos > > Santiago A. > > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Mon Mar 26 15:16:56 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 26 Mar 2018 09:16:56 -0400 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: Santiago, Thanks for the feedback. Regarding the failed login, my initial though was to not add a "Failed login" dialog for security purposes. That is to not tell people why nothing happened in an attempt to better secure your files. Several people have already mentioned this problem, so I may add a failed login dialog or message. Regarding the Lazarus connection, I frequently post here about fpc and lazarus, but also sometimes post other programming work if I feel it overlaps with Lazarus. In this case I am attempting to write a webpage that acts like a desktop app, something for which I'd always use Lazarus as my first choice, that is desktop development. With this app I've made some efforts to carry over desktop user interactions. Shift and control click selection, some dialog looking things, inline renaming of files, arrow key moves the current selection, and what not. As such I am interested in the feedback of desktop developers and thought lazarus people might have a perspective I wanted for feedback. Anyhow thanks for your opinions. They are appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmlandmesser at gmx.de Mon Mar 26 15:26:28 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Mon, 26 Mar 2018 15:26:28 +0200 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: <030830c0-0b22-c6aa-4181-64691188937e@gmx.de> works for Win XP SP2 and Google-Chrome! Am 26.03.2018 um 06:22 schrieb Anthony Walter via Lazarus: > Hey guys. I wrote this web tool a while ago which emulates a desktop > application in a few ways and wanted some feedback. > > http://storage.codebot.org > > login: tester > password: funkytown > > The tool is a private cloud file server application. People will be > able to get the source and configure it on their web server so that > they can backup/share/transfer files to themselves or among friend. > The admin account can manage users, their rights, and storage limits. > > What I've tried to do with this app is emulate a desktop application a > bit, which might be similar to a desktop app written with Lazarus. > > Features: > > You can drag and drop files or click to browse for uploads. Large > uploads can be resumed if you close the page before the upload > completes. Uploads can be paused and resumed. > > The selection in file list can be navigated with up down and page up > down arrow keys. Shift multi selects both with the mouse and keyboard. > Control can toggle select on individual items. > > Some files including video and audio can be viewed. It has code for > http stream allowing seeking to positions in large video files without > the need to download. Multi select can be used to create play lists. > If you select a group of songs, then open the song and play it will > continue playing the next song when the current song is done. > > Enter selects items/ Function keys F2 renames inline, F3 search > filters, F4 gives the option to turn sharing on/off (works with > multiselect). File columns can be sorted. > > The front end code was written using my own typescript library. > > Any feedback would be appreciated. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r030t1 at gmail.com Mon Mar 26 16:25:18 2018 From: r030t1 at gmail.com (R0b0t1) Date: Mon, 26 Mar 2018 09:25:18 -0500 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: On Sun, Mar 25, 2018 at 11:22 PM, Anthony Walter via Lazarus wrote: > Any feedback would be appreciated. > Bad: 1) The webpage is fixed width, or has a minimum width. 2) I can't view videos, but this may be me. 3) The popover for viewing file content could be replaced with opening a browser window (usually a tab). 4) Not as shiny as some web services. Good: 1) It works! 2) Doesn't look horrible (i.e. bare HTML). 3) Keyboard navigation, keyboard shortcuts. Maybe add some more in this regard? I find this is what I miss the most with web content. Cheers, R0b0t1 From r030t1 at gmail.com Mon Mar 26 16:25:18 2018 From: r030t1 at gmail.com (R0b0t1) Date: Mon, 26 Mar 2018 09:25:18 -0500 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: On Sun, Mar 25, 2018 at 11:22 PM, Anthony Walter via Lazarus wrote: > Any feedback would be appreciated. > Bad: 1) The webpage is fixed width, or has a minimum width. 2) I can't view videos, but this may be me. 3) The popover for viewing file content could be replaced with opening a browser window (usually a tab). 4) Not as shiny as some web services. Good: 1) It works! 2) Doesn't look horrible (i.e. bare HTML). 3) Keyboard navigation, keyboard shortcuts. Maybe add some more in this regard? I find this is what I miss the most with web content. Cheers, R0b0t1 From markbass72 at zoho.com Mon Mar 26 16:46:35 2018 From: markbass72 at zoho.com (Marcello) Date: Mon, 26 Mar 2018 16:46:35 +0200 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: <76fecd5b-63db-2383-aa43-737f54d032e1@zoho.com> on linux + chrome works interesting project nomorelogic On 26/03/2018 06:22, Anthony Walter via Lazarus wrote: > Hey guys. I wrote this web tool a while ago which emulates a desktop > application in a few ways and wanted some feedback. From wkitty42 at windstream.net Mon Mar 26 17:42:14 2018 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Mon, 26 Mar 2018 11:42:14 -0400 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: On 03/26/2018 09:16 AM, Anthony Walter via Lazarus wrote: > Santiago, > > Thanks for the feedback. Regarding the failed login, my initial though was to > not add a "Failed login" dialog for security purposes. That is to not tell > people why nothing happened in an attempt to better secure your files. Several > people have already mentioned this problem, so I may add a failed login dialog > or message. that's why the response says "invalid user or password"... you can't tell which one is bad... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* From sysrpl at gmail.com Mon Mar 26 17:42:46 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 26 Mar 2018 11:42:46 -0400 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: wkitty42, Okay will add it. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Mon Mar 26 20:40:17 2018 From: bartjunk64 at gmail.com (Bart) Date: Mon, 26 Mar 2018 20:40:17 +0200 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: On Mon, Mar 26, 2018 at 6:22 AM, Anthony Walter via Lazarus wrote: > Hey guys. I wrote this web tool a while ago which emulates a desktop > application in a few ways and wanted some feedback. Seems to work OK (Win10, FF) Looks OK too. Bart From M.Santhoff at web.de Mon Mar 26 21:59:13 2018 From: M.Santhoff at web.de (Marc Santhoff) Date: Mon, 26 Mar 2018 21:59:13 +0200 Subject: [Lazarus] Beep? In-Reply-To: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> References: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> Message-ID: <1522094353.4545.3.camel@web.de> (sending again from the subscribed mail address... if moderation is active, please drop the other mail - sorry and thanks) On Sun, 2018-03-25 at 22:02 -0400, Donald Ziesig via Lazarus wrote: > > Any suggestions would be appreciated. Make sure your computer can beep? (speaker connected, etc.) Try "writeln(#07)"? Check if X has beeps switched off ("xset -b")? HTH anyhow, Marc -- Marc Santhoff From jmlandmesser at gmx.de Tue Mar 27 08:11:24 2018 From: jmlandmesser at gmx.de (Landmesser John) Date: Tue, 27 Mar 2018 08:11:24 +0200 Subject: [Lazarus] Beep? In-Reply-To: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> References: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> Message-ID: <44aa88c9-5188-447f-f2fc-6e2a88e8c5b7@gmx.de> perhaps: * A simple visual component to play WAVe files in Windows or Linux * For more information, see: http://wiki.freepascal.org/TPlaySound Am 26.03.2018 um 04:02 schrieb Donald Ziesig via Lazarus: > > Hi Everyone! > > I am using Lazarus 1.8 on Linux Mint.  I would like to use the > Windows.Beep( Freq, Duration) function, or (if not available) > SysUtils.Beep subprograms. > > Simplest problem.  SysUtils.Beep compiles and links but is silent. > > Slightly more difficult (according to StackOverflow) > > I should be able to insert (manually) Windows in the uses clause, then > call the windows.beep( f, d) function, but fcp can't find Windows even > though there are several windows.pp files in the fpcscr directories. > > Failing that, the article says: > > |functionBeep(dwFreq,dwDuration:DWORD):BOOL;stdcall;external'kernel32.dll';| > > should work, but it causes a linker error after compilation.  I don't > have lernel32.dll on my Linux system. > > A long time ago, I used the Windows.Beep (on windows) to produce Morse > Code error messages while debugging visual components.  I would like > to do that now if possible, but on Linux. > > Any suggestions would be appreciated. > > Thanks, > > Don Ziesig > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From norbert at crettol.ch Wed Mar 28 19:25:47 2018 From: norbert at crettol.ch (Norbert Crettol) Date: Wed, 28 Mar 2018 19:25:47 +0200 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: <1c71b652-9467-1183-5062-e86a75091e8f@crettol.ch> On 26. 03. 18 06:22, Anthony Walter via Lazarus wrote: > Hey guys. I wrote this web tool a while ago which emulates a desktop application in a few ways and wanted some feedback. > > http://storage.codebot.org > Hello, I've tried it on Debian Stretch, Firefox. Works great. I could see the images, watch the video, upload a big file and delete it. Nice tool. Regards Norbert From octopushole at gmail.com Wed Mar 28 22:48:46 2018 From: octopushole at gmail.com (duilio foschi) Date: Wed, 28 Mar 2018 22:48:46 +0200 Subject: [Lazarus] devmgmt.msc Message-ID: if I run devmgmt.msc on W7 I get this info on screen: http://i66.tinypic.com/2lucq4n.jpg Is there a Winows API I can call from my Lazarus program and get the same info ? My aim is to detect which COM number was assigned to the USB device "MSP Application UART1" Thank you Peppe From sysrpl at gmail.com Thu Mar 29 04:15:53 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 28 Mar 2018 22:15:53 -0400 Subject: [Lazarus] Test this please In-Reply-To: <1c71b652-9467-1183-5062-e86a75091e8f@crettol.ch> References: <1c71b652-9467-1183-5062-e86a75091e8f@crettol.ch> Message-ID: Thanks for the feedback Norbert. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robin.listas at telefonica.net Thu Mar 29 12:12:48 2018 From: robin.listas at telefonica.net (Carlos E. R.) Date: Thu, 29 Mar 2018 12:12:48 +0200 (CEST) Subject: [Lazarus] Beep? In-Reply-To: <92e079be-8803-a856-4d72-27c8393df001@telefonica.net> References: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> <92e079be-8803-a856-4d72-27c8393df001@telefonica.net> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2018-03-26 at 06:09 +0200, Carlos E. R. via Lazarus wrote: > On 2018-03-26 04:02, Donald Ziesig via Lazarus wrote: >> Hi Everyone! >> >> I am using Lazarus 1.8 on Linux Mint.  I would like to use the >> Windows.Beep( Freq, Duration) function, or (if not available) >> SysUtils.Beep subprograms. > > AFAIK, you can not call Windows functions in Linux. Further, my understanding is that the loudspeaker is associated to the terminal in Linux. You can not thus beep from a daemon, something that would be useful. We apparently do not get access to program the chip as in MsDOS, nor freq,duration. Here I post an attempt I did back on 2005. It doesn't compile, and this moment I can't check why. Nor, of course, do I remember what I was trying. program beeper; uses linux; var Saved43, Saved61: byte; LoadClock: word; frequency: word; duration: real; RequestedDuration, RemainingDuration: timespec; hh,mm,ss, msec, usec: word; begin (* if paramcount <> 2 then begin writeln('Produces a beep of the indicated frequency and duration.'); writeln('Usage: beeper frequency duration'); halt(1); end; frequency:= round(ParamStr(1)); duration:= ParamStr(2); *) frequency:= 500; duration:= 1.2; RequestedDuration.tv_sec:= trunc(duration); RequestedDuration.tv_nsec:= trunc(frac(duration)*1e9); {ioperm(from, num, value)} writeln($61, ' ', $42); writeln(ioperm($61, 1, 1), ' ', ioperm($42, 2, 1)); {timer prepare} ReadPort($43, Saved43); writeln('43h', ' ', Saved43); writeport($43, byte($B6)); {Channel 2, LSB/MSB} LoadClock:= 1193180 div frequency; writeport($42, Lo(LoadClock)); writeport($42, Hi(LoadClock)); ReadPort($61, Saved61); writeln('61h', ' ', Saved61); writeport($61, byte(Saved61 or $3)); {Speaker on} {Select(0, nil, nil, nil, 1000);} gettime(hh,mm,ss, msec, usec); writeln(hh,':', mm, ':', ss, '.', msec, ' ', usec); nanosleep(RequestedDuration, RemainingDuration); gettime(hh,mm,ss, msec, usec); writeln(hh,':', mm, ':', ss, '.', msec, ' ', usec); writeport($61, Saved61); {Speaker off} end. I also have copies of some c code I got from fidonet posts that I can look at another day, in assembler. I don't remember if they worked, probably not. - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlq8vCgACgkQtTMYHG2NR9W0MQCfW3PJfWFopnrWMV9V+bCcA1ZQ 2goAn3C6b2V2kwsunTiqB5o1vIQIaF8H =v6dw -----END PGP SIGNATURE----- From joshyfun at gmail.com Thu Mar 29 14:22:00 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Thu, 29 Mar 2018 14:22:00 +0200 Subject: [Lazarus] devmgmt.msc In-Reply-To: References: Message-ID: <010c17b7-8d63-e787-de2c-9d4bbf0ce00c@gmail.com> El 28/03/2018 a las 22:48, duilio foschi via Lazarus escribió: > if I run devmgmt.msc on W7 I get this info on screen: > Is there a Winows API I can call from my Lazarus program and get the same info ? > My aim is to detect which COM number was assigned to the USB device > "MSP Application UART1" Hello, Attached unit will help you to implement a COM port browsing. There is a bit of extra code as original comes from a bigger unit, and this is an extract. -- -------------- next part -------------- unit udeviceenumwin; {$mode objfpc}{$H+} interface uses Classes, SysUtils; function EnumDevices: integer; implementation uses windows; const WINDOWS_SETUPAPI_NAME='setupapi.dll'; DIGCF_DEFAULT = $00000001; DIGCF_PRESENT = $00000002; DIGCF_ALLCLASSES = $00000004; DIGCF_PROFILE = $00000008; DIGCF_DEVICEINTERFACE = $00000010; SPDRP_FRIENDLYNAME = $0000000C; type {$PackRecords C} HDEVINFO = type THANDLE; SP_DEVINFO_DATA = record cbSize: DWORD; ClassGuid: TGUID; DevInst: DWORD; // DEVINST handle Reserved: Pointer; end; PSP_DEVINFO_DATA=^SP_DEVINFO_DATA; SP_DEVICE_INTERFACE_DATA = record cbSize: DWORD; InterfaceClassGuid: TGUID; Flags: DWORD; Reserved: Pointer; end; PSP_DEVICE_INTERFACE_DATA= ^SP_DEVICE_INTERFACE_DATA; SP_DEVICE_INTERFACE_DETAIL_DATA_W = packed record cbSize: DWORD; DevicePath: array [0..0] of WideChar; end; PSP_DEVICE_INTERFACE_DETAIL_DATA_W = ^SP_DEVICE_INTERFACE_DETAIL_DATA_W; // SETUPAPI.DLL TSetupDiGetClassDevs = function (var aGUID: TGUID; aEnumerator: PWideChar; hwndParent: SizeInt; aFlags: DWORD): HDEVINFO; stdcall; TSetupDiEnumDeviceInterfaces = function (DeviceInfoSet: HDEVINFO; DeviceInfoData: PSP_DEVINFO_DATA; var InterfaceClassGuid: TGUID; MemberIndex: DWORD; var DeviceInterfaceData: SP_DEVICE_INTERFACE_DATA): WINBOOL; stdcall; TSetupDiGetDeviceInterfaceDetailW = function (DeviceInfoSet: HDEVINFO; DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA; DeviceInterfaceDetailData: PSP_DEVICE_INTERFACE_DETAIL_DATA_W; DeviceInterfaceDetailDataSize: DWORD; var RequiredSize: DWORD; DeviceInfoData: PSP_DEVINFO_DATA): WINBOOL; stdcall; TSetupDiDestroyDeviceInfoList = function (DeviceInfoSet: HDEVINFO): WINBOOL; stdcall; TSetupDiGetDeviceRegistryPropertyA = function (DeviceInfoSet: HDEVINFO; DeviceInfoData: PSP_DEVINFO_DATA; PropertyID: DWORD; PropertyRegDataType: PDWORD; PropertyBuffer: PBYTE; PropertyBufferSize: DWORD; RequiredSize: PDWORD): WINBOOL; stdcall; TSetupDiEnumDeviceInfo = function (DeviceInfoSet: HDEVINFO; MemberIndex: DWORD; var DeviceInterfaceData: SP_DEVICE_INTERFACE_DATA): WINBOOL; stdcall; type TDLLSetupAPIEntriesRecord=record SetupDiGetClassDevs: TSetupDiGetClassDevs; SetupDiEnumDeviceInterfaces: TSetupDiEnumDeviceInterfaces; SetupDiGetDeviceInterfaceDetailW: TSetupDiGetDeviceInterfaceDetailW; SetupDiDestroyDeviceInfoList: TSetupDiDestroyDeviceInfoList; SetupDiGetDeviceRegistryPropertyA: TSetupDiGetDeviceRegistryPropertyA; SetupDiEnumDeviceInfo: TSetupDiEnumDeviceInfo; end; var DLLSetupAPIHandle: TLibHandle; DLLInitializedFlag: Boolean=false; DLLInitializedSuccess: Boolean=false; DLLSetupAPIFunctions: TDLLSetupAPIEntriesRecord; function InitializeLibraries: Boolean; forward; procedure DEBUG_OUTPUT(msg: string); begin writeln(msg); end; function EnumDevices(): integer; var lGUID: TGUID='{4d36e978-e325-11ce-bfc1-08002be10318}'; // COM PORTS and LPT lDeviceInfoList: HDEVINFO; lDeviceInfo: SP_DEVICE_INTERFACE_DATA; lMemberIndex: integer; lStopEnumeration: Boolean=false; lIndex: integer; lFriendlyName: array [0..511] of char; begin if not InitializeLibraries then exit(1); ldeviceInfoList := DLLSetupAPIFunctions.SetupDiGetClassDevs(lGUID, nil, 0, DIGCF_PRESENT or DIGCF_DEVICEINTERFACE); if lDeviceInfoList=INVALID_HANDLE_VALUE then begin exit(2); end; lDeviceInfo.cbSize:=SizeOf(lDeviceInfo); lMemberIndex:=0; while true do begin if not DLLSetupAPIFunctions.SetupDiEnumDeviceInterfaces(ldeviceInfoList, nil, lGUID, lMemberIndex, lDeviceInfo) then begin // Browse finished lStopEnumeration:=true; break; end; lIndex:=0; while true do begin if DLLSetupAPIFunctions.SetupDiEnumDeviceInfo(lDeviceInfoList,lIndex,lDeviceInfo)=FALSE then begin break; end; if DLLSetupAPIFunctions.SetupDiGetDeviceRegistryPropertyA(lDeviceInfoList, at lDeviceInfo,SPDRP_FRIENDLYNAME,nil, at lFriendlyName[0],sizeof(lFriendlyName)-1,nil) then begin DEBUG_OUTPUT(lFriendlyName); end; inc(lIndex); end; if lStopEnumeration then break; inc(lMemberIndex); end; DLLSetupAPIFunctions.SetupDiDestroyDeviceInfoList(lDeviceInfoList); Result:=0; end; function InitializeLibraries: Boolean; var lSuccessFunctions: Boolean=true; function CheckFunctionsRecord(p: Pointer; aEntries: integer): Boolean; var j: integer; pProc: Pointer; lAssigned: Boolean=true; pp: PPointer; begin pp:=p; for j := 0 to Pred(aEntries) do begin pProc:=pp^; if not Assigned(pProc) then begin lAssigned:=false; break; end; inc(pp); end; Result:=lAssigned; end; begin if DLLInitializedFlag then exit(DLLInitializedSuccess); DLLSetupAPIFunctions:=Default(TDLLSetupAPIEntriesRecord); DLLInitializedFlag:=true; DLLSetupAPIHandle:=LoadLibrary(WINDOWS_SETUPAPI_NAME); if DLLSetupAPIHandle<>0 then begin Pointer(DLLSetupAPIFunctions.SetupDiGetClassDevs):=GetProcAddress(DLLSetupAPIHandle,'SetupDiGetClassDevsW'); Pointer(DLLSetupAPIFunctions.SetupDiEnumDeviceInterfaces):=GetProcAddress(DLLSetupAPIHandle,'SetupDiEnumDeviceInterfaces'); Pointer(DLLSetupAPIFunctions.SetupDiGetDeviceInterfaceDetailW):=GetProcAddress(DLLSetupAPIHandle,'SetupDiGetDeviceInterfaceDetailW'); Pointer(DLLSetupAPIFunctions.SetupDiDestroyDeviceInfoList):=GetProcAddress(DLLSetupAPIHandle,'SetupDiDestroyDeviceInfoList'); Pointer(DLLSetupAPIFunctions.SetupDiGetDeviceRegistryPropertyA):=GetProcAddress(DLLSetupAPIHandle,'SetupDiGetDeviceRegistryPropertyA'); Pointer(DLLSetupAPIFunctions.SetupDiEnumDeviceInfo):=GetProcAddress(DLLSetupAPIHandle,'SetupDiEnumDeviceInfo'); end; if lSuccessFunctions then begin lSuccessFunctions:=CheckFunctionsRecord(@DLLSetupAPIFunctions,sizeof(DLLSetupAPIFunctions) div sizeof(Pointer)); end; if not lSuccessFunctions then begin DEBUG_OUTPUT('LoadLibrary error'); end; DLLInitializedSuccess:=lSuccessFunctions; Result:=DLLInitializedSuccess; end; finalization if DLLInitializedFlag then begin if (DLLSetupAPIHandle<>0) then FreeLibrary(DLLSetupAPIHandle); end; end. From donald at ziesig.org Thu Mar 29 15:42:28 2018 From: donald at ziesig.org (Donald Ziesig) Date: Thu, 29 Mar 2018 09:42:28 -0400 Subject: [Lazarus] Beep? In-Reply-To: References: <35147946-a2ef-3aa1-492d-23e20107e57f@ziesig.org> <92e079be-8803-a856-4d72-27c8393df001@telefonica.net> Message-ID: <59f759df-d977-85dd-27e1-47c66516ef62@ziesig.org> On 03/29/2018 06:12 AM, Carlos E. R. via Lazarus wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > On Monday, 2018-03-26 at 06:09 +0200, Carlos E. R. via Lazarus wrote: > >> On 2018-03-26 04:02, Donald Ziesig via Lazarus wrote: >>> Hi Everyone! >>> >>> I am using Lazarus 1.8 on Linux Mint.  I would like to use the >>> Windows.Beep( Freq, Duration) function, or (if not available) >>> SysUtils.Beep subprograms. >> >> AFAIK, you can not call Windows functions in Linux. > > Further, my understanding is that the loudspeaker is associated to the > terminal in Linux. You can not thus beep from a daemon, something that > would be useful. We apparently do not get access to program the chip > as in MsDOS, nor freq,duration. > > > Here I post an attempt I did back on 2005. It doesn't compile, and > this moment I can't check why. Nor, of course, do I remember what I > was trying. > > program beeper; > > uses linux; > > var >         Saved43, Saved61: byte; >         LoadClock: word; >         frequency: word; >         duration:  real; >         RequestedDuration, RemainingDuration: timespec; > >         hh,mm,ss, msec, usec: word; > begin > (* >         if paramcount <> 2 then begin >                 writeln('Produces a beep of the indicated frequency > and duration.'); >                 writeln('Usage: beeper frequency duration'); >                 halt(1); >         end; > > >         frequency:= round(ParamStr(1)); >         duration:= ParamStr(2); > *) > >         frequency:= 500; >         duration:=  1.2; > > >         RequestedDuration.tv_sec:=      trunc(duration); >         RequestedDuration.tv_nsec:=     trunc(frac(duration)*1e9); > >         {ioperm(from, num, value)} >         writeln($61, '   ', $42); >         writeln(ioperm($61, 1, 1), ' ', ioperm($42, 2, 1)); > >                 {timer prepare} >         ReadPort($43, Saved43); >         writeln('43h', ' ', Saved43); >         writeport($43, byte($B6));      {Channel 2, LSB/MSB} > >         LoadClock:= 1193180 div frequency; >         writeport($42, Lo(LoadClock)); >         writeport($42, Hi(LoadClock)); > >         ReadPort($61, Saved61); >         writeln('61h', ' ', Saved61); >         writeport($61, byte(Saved61 or $3));    {Speaker on} > > >                 {Select(0, nil, nil, nil, 1000);} >         gettime(hh,mm,ss, msec, usec); >         writeln(hh,':', mm, ':', ss, '.', msec, ' ', usec); >         nanosleep(RequestedDuration, RemainingDuration); >         gettime(hh,mm,ss, msec, usec); >         writeln(hh,':', mm, ':', ss, '.', msec, ' ', usec); > >         writeport($61, Saved61);        {Speaker off} > > end. > > > I also have copies of some c code I got from fidonet posts that I can > look at another day, in assembler. I don't remember if they worked, > probably not. > > > - -- Cheers, >        Carlos E. R. >        (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iEYEARECAAYFAlq8vCgACgkQtTMYHG2NR9W0MQCfW3PJfWFopnrWMV9V+bCcA1ZQ > 2goAn3C6b2V2kwsunTiqB5o1vIQIaF8H > =v6dw > -----END PGP SIGNATURE----- > > Thanks Carlos! I am presently recovering from surgery and taking medication for pain.  I will try your suggestion once my pain is gone and I can think straight ;-). Don -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Mar 29 20:34:52 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 29 Mar 2018 19:34:52 +0100 Subject: [Lazarus] Color and transparancy selection ? In-Reply-To: References: Message-ID: On 2018-03-23 08:27, Michael Van Canneyt via Lazarus wrote: > This is lazarus, after all - it should work on all supported platforms. ROFL. Sorry, I couldn't resist. ;-) Regards, Graeme From wv99999 at gmail.com Fri Mar 30 08:03:18 2018 From: wv99999 at gmail.com (Wolf) Date: Fri, 30 Mar 2018 19:03:18 +1300 Subject: [Lazarus] AT&T assembler syntax Message-ID: Is there a way to change the syntax for the Lazarus Assembler window (View->Debug Windows->Assembler) to display Intel syntax? https://stackoverflow.com/questions/19149105/how-to-disable-att-enable-intel-syntax-in-lazarus-debug-window says: In the section Tools-Debugger->General->Debugger_Startup_Options paste: |-eval-command="set disassembly-flavor intel" . | |Unfortunately, It doesn't work on my Kubuntu system.| |Any suggestions on how to make it work?| |Thanks| | | |Wolf | -------------- next part -------------- An HTML attachment was scrubbed... URL: From leledumbo_cool at yahoo.co.id Fri Mar 30 14:04:21 2018 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Fri, 30 Mar 2018 05:04:21 -0700 (MST) Subject: [Lazarus] AT&T assembler syntax In-Reply-To: References: Message-ID: <1522411461037-0.post@n3.nabble.com> > Any suggestions on how to make it work? Open View->Debug Windows->Debug Output, is your -eval-command parameter passed to gdb? -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From octopushole at gmail.com Fri Mar 30 15:43:42 2018 From: octopushole at gmail.com (duilio foschi) Date: Fri, 30 Mar 2018 15:43:42 +0200 Subject: [Lazarus] devmgmt.msc In-Reply-To: <010c17b7-8d63-e787-de2c-9d4bbf0ce00c@gmail.com> References: <010c17b7-8d63-e787-de2c-9d4bbf0ce00c@gmail.com> Message-ID: Hi Jose', thank you for the code, but 1. I get a number of error messages while compiling the unit with Lazarus 1.6.4 under W7 (see below) 2. I cannot understand how I can get the enumerated COM device names into a TStringList as I need to process the names. Thank you Peppe Compile Project, Target: C:\Users\PCCE88~1.BUF\AppData\Local\Temp\project1.exe: Exit code 1, Errors: 11 udeviceenumwin.pas(83,22) Error: Identifier not found "TLibHandle" udeviceenumwin.pas(83,32) Error: Error in type definition udeviceenumwin.pas(164,23) Error: Operator is not overloaded: "" = "ShortInt" udeviceenumwin.pas(165,88) Error: Incompatible type for arg no. 1: Got "", expected "QWord" udeviceenumwin.pas(166,96) Error: Incompatible type for arg no. 1: Got "", expected "QWord" udeviceenumwin.pas(167,101) Error: Incompatible type for arg no. 1: Got "", expected "QWord" udeviceenumwin.pas(168,97) Error: Incompatible type for arg no. 1: Got "", expected "QWord" udeviceenumwin.pas(169,102) Error: Incompatible type for arg no. 1: Got "", expected "QWord" udeviceenumwin.pas(170,90) Error: Incompatible type for arg no. 1: Got "", expected "QWord" udeviceenumwin.pas(184,26) Error: Operator is not overloaded: "" = "ShortInt" udeviceenumwin.pas(184,65) Error: Incompatible type for arg no. 1: Got "", expected "QWord" 2018-03-29 14:22 GMT+02:00 José Mejuto : > El 28/03/2018 a las 22:48, duilio foschi via Lazarus escribió: >> >> if I run devmgmt.msc on W7 I get this info on screen: >> Is there a Winows API I can call from my Lazarus program and get the same >> info ? >> My aim is to detect which COM number was assigned to the USB device >> "MSP Application UART1" > > > Hello, > > Attached unit will help you to implement a COM port browsing. There is a bit > of extra code as original comes from a bigger unit, and this is an extract. > > > -- > From joshyfun at gmail.com Fri Mar 30 18:34:53 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Fri, 30 Mar 2018 18:34:53 +0200 Subject: [Lazarus] devmgmt.msc In-Reply-To: References: <010c17b7-8d63-e787-de2c-9d4bbf0ce00c@gmail.com> Message-ID: El 30/03/2018 a las 15:43, duilio foschi escribió: > thank you for the code, but > 1. I get a number of error messages while compiling the unit with > Lazarus 1.6.4 under W7 (see below) > 2. I cannot understand how I can get the enumerated COM device names > into a TStringList as I need to process the names. Hello, I'm unable to understand how you get the first error :-? TLibHandle is in system unit which is mandatory, so I do not know how to you can get an "Identifier not found" :-? Anyway, attached you can get a project sample, so you can process the data. You can extract the COM number from the name displayed. -- -------------- next part -------------- A non-text attachment was scrubbed... Name: enumdevicessample.zip Type: application/x-zip-compressed Size: 3912 bytes Desc: not available URL: From wv99999 at gmail.com Fri Mar 30 22:00:24 2018 From: wv99999 at gmail.com (Wolf) Date: Sat, 31 Mar 2018 09:00:24 +1300 Subject: [Lazarus] AT&T assembler syntax In-Reply-To: <1522411461037-0.post@n3.nabble.com> References: <1522411461037-0.post@n3.nabble.com> Message-ID: <9d611cdd-4dc4-f4b2-cd96-15113119b1bb@gmail.com> These are my options settings, following the recipe quoted. Where do I pass them to gdb? Thanks Wolf On 31/03/2018 01:04, leledumbo via Lazarus wrote: >> Any suggestions on how to make it work? > Open View->Debug Windows->Debug Output, is your -eval-command parameter > passed to gdb? > > > > -- > Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IDE Options-1.jpg Type: image/jpeg Size: 70160 bytes Desc: not available URL: From octopushole at gmail.com Fri Mar 30 22:45:21 2018 From: octopushole at gmail.com (duilio foschi) Date: Fri, 30 Mar 2018 22:45:21 +0200 Subject: [Lazarus] devmgmt.msc In-Reply-To: References: <010c17b7-8d63-e787-de2c-9d4bbf0ce00c@gmail.com> Message-ID: Hi Jose', doubting a configuration error, I uninstalled Lazarus, then installed it again (current version is 1.8.2). Unfortunately I could not get rid of the error on TLibHandle. Then I found out that this type (TLibHandle) is not declared in system.pas but in rtl/dynlibs.pas http://i67.tinypic.com/20ft940.jpg I fixed the problem by adding dynlibs.pas to the project. Unfortunately when I compile the code I get new error messages (see below) in unit lnfodwrf. See http://i68.tinypic.com/116qrdy.jpg Well, I am sure I will fix all problems before or later :) Thank you Peppe lnfodwrf.pp(846,23) Error: Incompatible types: got "
" expected "" From minkob at mail.t-com.sk Sat Mar 31 10:54:41 2018 From: minkob at mail.t-com.sk (=?UTF-8?Q?Milan_Ba=c5=a1a?=) Date: Sat, 31 Mar 2018 10:54:41 +0200 Subject: [Lazarus] Test this please In-Reply-To: References: Message-ID: <296e4f9e-3780-5d21-bc3c-c5ddf21c3a31@mail.t-com.sk> Fedora 27 + Firefox, Qupzilla works fine. pdf is not associated. Dňa 26.03.2018 o 06:22 Anthony Walter via Lazarus napísal(a): > Any feedback would be appreciated. > > From sysrpl at gmail.com Sat Mar 31 14:17:58 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Sat, 31 Mar 2018 08:17:58 -0400 Subject: [Lazarus] Test this please In-Reply-To: <296e4f9e-3780-5d21-bc3c-c5ddf21c3a31@mail.t-com.sk> References: <296e4f9e-3780-5d21-bc3c-c5ddf21c3a31@mail.t-com.sk> Message-ID: > pdf is not associated. I am not sure if pdf is previewable in a browser except maybe through a frame? -------------- next part -------------- An HTML attachment was scrubbed... URL: From badsectoracula at gmail.com Sat Mar 31 17:30:27 2018 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Sat, 31 Mar 2018 18:30:27 +0300 Subject: [Lazarus] Test this please In-Reply-To: References: <296e4f9e-3780-5d21-bc3c-c5ddf21c3a31@mail.t-com.sk> Message-ID: Is this written in Lazarus/FreePascal? If it is a single-bin program (CGI?) i can drop somewhere in my VPS it would be awesome because i was trying to make something like that a while ago (but got bored :-P). It seems to work fine, but my only request is to allow for "untyped" URLs, ie instead of /texts/, /images/, etc use /files/ or something generic so i can - for example - upload an HTML file that refers to other files. For example i uploaded foo.html that tries to refer to foo.png (which i also uploaded) but it doesn't work: https://storage.codebot.org/tester/texts/foo.html This could be an option. Also for bonus credits, add an option to upload a zip file and have it being decompressed in a (sub)directory. On Sat, Mar 31, 2018 at 3:17 PM, Anthony Walter via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > pdf is not associated. > > I am not sure if pdf is previewable in a browser except maybe through a > frame? > > -- > _______________________________________________ > 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 sysrpl at gmail.com Sat Mar 31 19:02:18 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Sat, 31 Mar 2018 13:02:18 -0400 Subject: [Lazarus] Test this please In-Reply-To: References: <296e4f9e-3780-5d21-bc3c-c5ddf21c3a31@mail.t-com.sk> Message-ID: Kostas, It's written in C# and an ASP.NET application. It's easy enough to setup on Windows, Linux, or even on a Raspberry Pi. The instance I linked originally is actually running on an Amazon micro EC2 instance. For those using Debian based Linux, getting ASP.NET running on Apache is as simple as: sudo apt install apache2 mono-complete libapache2-mod-mono mono-apache-server4 sudo a2enmod mod_mono_auto sudo service apache2 restart After than you simply drop my project into your public /var/www/html/, navigate to http://localhost, and everything will work. I am adding a few more nice features like a graph of user activity for administrators and some installation/usage guides to explain what the project is and is not, and then I'll be posting the project plus all its source to my gihhub account. Regarding enhancements, yes I am open to anything, but I want get it published with features and documentation I mentioned it first before I start adding more enhancements such as the ones you were suggested (which were great btw). And finally, to all about the source code and implementation: This project is based on my existing C# library and Typescript library already on github. No Webforms, no MVC, no Bootstrap, no jQuery, or other frameworks are used. Here is the source code to the actual home page of the application: https://pastebin.com/qrXz3t2S -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshyfun at gmail.com Sat Mar 31 20:34:18 2018 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sat, 31 Mar 2018 20:34:18 +0200 Subject: [Lazarus] devmgmt.msc In-Reply-To: References: <010c17b7-8d63-e787-de2c-9d4bbf0ce00c@gmail.com> Message-ID: El 30/03/2018 a las 22:45, duilio foschi escribió: > Hi Jose', > > doubting a configuration error, I uninstalled Lazarus, then installed > it again (current version is 1.8.2). > > Unfortunately I could not get rid of the error on TLibHandle. > > Then I found out that this type (TLibHandle) is not declared in > system.pas but in rtl/dynlibs.pas > Hello, You have a somehow corrupted Lazarus/fpc installation. Ensure that your Lazarus configuration points to the right fpc executable, or start a configuration from scratch using the "--pcp" executable parameter. Something like "Lazarus.exe --pcp C:\Lazarus\CleanConfig" TLibHandle is defined in "sysdlh.inc" which is included by "dynlibh.inc" which is included by "system" unit in Windows platform. Also you get a compilation error in the dwarf support which has been included long time ago, so your Lazarus configuration is pointing to an old fpc 2.2 or something like that. --