From lazarus at kluug.net Sun Jul 2 22:21:13 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 2 Jul 2017 22:21:13 +0200 Subject: [Lazarus] CodeTools knowledge about a project - find a class In-Reply-To: <4233cdf0-4435-a0e6-ba0f-5cb02ade1964@geldenhuys.co.uk> References: <39f9aa45-5339-6cec-8f2f-701e90dc9c9e@geldenhuys.co.uk> <4233cdf0-4435-a0e6-ba0f-5cb02ade1964@geldenhuys.co.uk> Message-ID: <6fbafa74-3e70-3523-fca5-9172e6c1b51b@kluug.net> On 26.05.2017 13:11, Graeme Geldenhuys via Lazarus wrote: > It seems it already exists (as Mattias pointed out) - we just didn’t > know about it. :) All that remains is to assign a shortcut to it, if > a default one doesn't exist. I absolutely fell in love with FPC/Lazarus now. It offers everything I need. Another wishes would be a faster compiler (it won't happen I know :) ), a better+faster debugger (I hope for fpDebug in the future) and maybe full Cocoa support (which I don't need yet, though). But these are minor issues. It's very impressive what the FPC and Lazarus teams and other component vendors achieved. Ondrej From JuuS at mailbox.org Mon Jul 3 08:25:50 2017 From: JuuS at mailbox.org (Julius) Date: Mon, 3 Jul 2017 08:25:50 +0200 Subject: [Lazarus] sqlite slowdown in release vs Lazarus IDE Message-ID: <27c83fd0-6ff7-c97c-a6f9-dcfb9d194969@mailbox.org> Hi, I wonder if someone could perhaps suggest what could be causing a rather large insert slowdown issue with a sqlite component. I'm compiling in Debian Jessie, using qt widgetset, and Lazarus 1.6. I've got a small database, about 200 items. In debug/IDE mode under Lazarus the insertion of these data is blindingly fast, less than an eyeblink. There is hardly a blip in CPU history window. But when I build and use the release standalone version the same insert process takes 25 seconds, about 10,000 times slower. A single thread shows up in the CPU history window and hangs there during this time. My program also supports a text DB (based on INI files). It is also blindingly fast, and in both IDE and standalone. Literally, the only difference is not running through the IDE. I've used the debug, unoptimized version, which works perfectly in IDE, outside as standalone, and the slowdown remains. The only difference in the project options are optimizations and debug information, but as I said, the slowdown is true of both optimized and unoptimized outside of the IDE. Any ideas gratefully accepted. -- Julius From aaa5500 at ya.ru Mon Jul 3 14:37:45 2017 From: aaa5500 at ya.ru (Alexey) Date: Mon, 3 Jul 2017 15:37:45 +0300 Subject: [Lazarus] Comment about new LCL diff Message-ID: <6f284164-b2a1-b800-69e8-d5d405dded6f@ya.ru> +function TDragManagerDefault.IsCanBeStartDragging(Site: TWinControl; AThreshold: Integer; X,Y:Integer): boolean; +var + Threshold:integer; + aRect:TRect; +begin + if AThreshold<=0 then + Threshold:=DragThreshold + else + Threshold:=AThreshold; + aRect := Site.ClientRect; + InflateRect(aRect, Threshold, Threshold); + if not PtInRect(aRect, Point(X, Y)) then + Result:=true + else + Result:=false; +end; 1) name IsCanNNN, and even worse IsCanBeNNN. Pls rename to CanStartDragging 2) end of func: replace to Result:= not PtInRect(..); -- Regards, Alexey From werner.pamler at freenet.de Mon Jul 3 15:21:04 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 3 Jul 2017 15:21:04 +0200 Subject: [Lazarus] Comment about new LCL diff In-Reply-To: <6f284164-b2a1-b800-69e8-d5d405dded6f@ya.ru> References: <6f284164-b2a1-b800-69e8-d5d405dded6f@ya.ru> Message-ID: <542fc703-3c37-e988-9a2e-d83681ca9138@freenet.de> Am 03.07.2017 um 14:37 schrieb Alexey via Lazarus: > 1) name IsCanNNN, and even worse IsCanBeNNN. Pls rename to > CanStartDragging > 2) end of func: replace to Result:= not PtInRect(..); Done (r55428). From md at delfire.net Tue Jul 4 05:32:40 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Tue, 4 Jul 2017 00:32:40 -0300 Subject: [Lazarus] Android & iOS Message-ID: Hi, Direct to the subject: Can I create Apps for Android and iOS using Lazarus nowadays? I've seen frameworks like Castle-Engine that have a Tool which claims to be more easy to building and packaging Apps: https://github.com/castle-engine/castle-engine/wiki/Build-Tool This framework looks like a piece of art, but I'm more interested to build business applications with Forms, Grids, Lists and so on. I believe that Ionic framework is a good choice to build mobile apps, but if could have such apps using Free Pascal and Lazarus, would be nice. Can I do that using Lazarus and its default widgets? Thanks. Best regards, Marcos Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Tue Jul 4 08:04:11 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 4 Jul 2017 08:04:11 +0200 (CEST) Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: On Tue, 4 Jul 2017, Marcos Douglas B. Santos via Lazarus wrote: > Hi, > > Direct to the subject: > Can I create Apps for Android and iOS using Lazarus nowadays? > > I've seen frameworks like Castle-Engine that have a Tool which claims to be > more easy to building and packaging Apps: > https://github.com/castle-engine/castle-engine/wiki/Build-Tool > > This framework looks like a piece of art, but I'm more interested to build > business applications with Forms, Grids, Lists and so on. > > I believe that Ionic framework is a good choice to build mobile apps, but > if could have such apps using Free Pascal and Lazarus, would be nice. > > Can I do that using Lazarus and its default widgets? You can create some form of apps using the customdrawn widgetset, but I cannot honestly recommend this approach. I do not think it works on iOS (I could be mistaken) and it looks simply abysmal on android. I have created some android apps using the FPC JVM compiler, but then you need to start all over for iOS. I believe there is still some iOS desiger package by Joost van der Sluis. So at the moment the developer experience would not be very good, I think you're better off using a HTML5 based Ionic app. Michael. From JuuS at mailbox.org Tue Jul 4 11:57:11 2017 From: JuuS at mailbox.org (Julius) Date: Tue, 4 Jul 2017 11:57:11 +0200 Subject: [Lazarus] sqlite slowdown in release vs Lazarus IDE In-Reply-To: <27c83fd0-6ff7-c97c-a6f9-dcfb9d194969@mailbox.org> References: <27c83fd0-6ff7-c97c-a6f9-dcfb9d194969@mailbox.org> Message-ID: <015e74b9-d05d-3780-1586-ef8aa25d0aa5@mailbox.org> Hi, I appear to have figured it out. FWIW, I was using a single sqlite transaction per item insert. I tested today under a single transaction for all item inserts and it was very fast. The question in my mind remains however. Why was this slowdown not apparent in the IDE?? In any case, all seems to be well. On 07/03/2017 08:25 AM, Julius via Lazarus wrote: > Hi, > > I wonder if someone could perhaps suggest what could be causing a rather > large insert slowdown issue with a sqlite component. From aaa5500 at ya.ru Tue Jul 4 12:35:58 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 4 Jul 2017 13:35:58 +0300 Subject: [Lazarus] Comment about TAChart diff Message-ID: <62a876c1-dd6a-97df-9484-680caddc7433@ya.ru> + procedure HTMLTagFound(NoCaseTag, ActualTag: String); + procedure HTMLTextFound_Size(AText: String); + procedure HTMLTextFound_Out(AText: String); Better to use "const Par: string", since "const" param passed by ref, it is faster than "value parameter" w/o "const". -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Tue Jul 4 12:50:22 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 4 Jul 2017 13:50:22 +0300 Subject: [Lazarus] Commment-2 about TAChart diff Message-ID: <06e0f7e3-8f4b-6d33-700f-99fd83327210@ya.ru> + else if (pos('#', AText) = 1) and (Length(AText) = 7) then begin + Delete(AText, 1, 1); + Result.Red := StrToInt('$' + copy(AText, 1, 2)) shl 8; + Result.Green := StrToInt('$' + copy(AText, 3, 2)) shl 8; + Result.Blue := StrToInt('$' + copy(AText, 5, 2)) shl 8; + end else + you convert #rrggbb, but don't convert #rgb (eg #123 means #112233). example from ATSynEdit - //allow only #rgb, #rrggbb Len:= Length(s); if (Len<>3) and (Len<>6) then exit; for i:= 1 to Len do if not IsCharHex(s[i]) then exit; if Len=6 then begin N1:= StrToInt('$'+Copy(s, 1, 2)); N2:= StrToInt('$'+Copy(s, 3, 2)); N3:= StrToInt('$'+Copy(s, 5, 2)); end else begin N1:= StrToInt('$'+s[1]+s[1]); N2:= StrToInt('$'+s[2]+s[2]); N3:= StrToInt('$'+s[3]+s[3]); end; Result:= RGBToColor(N1, N2, N3); end; my code also has checking for Hex, and yours dont have check for hex. so '#aazz33' will crash. -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at meadows.pair.com Tue Jul 4 13:50:56 2017 From: brian at meadows.pair.com (brian) Date: Tue, 4 Jul 2017 07:50:56 -0400 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: <20170630141547.52cbf7a6@limapholos.matflo.wg> References: <20170630141547.52cbf7a6@limapholos.matflo.wg> Message-ID: On 06/30/2017 08:15 AM, Mattias Gaertner via Lazarus wrote: > The Lazarus team is glad to announce the third release candidate of > Lazarus 1.8. > <...> > > == How to test == > > Download and install the 1.8 RC3. > - On Windows you can install as a 2ndary install, that will not affect your current install: > http://wiki.lazarus.freepascal.org/Multiple_Lazarus#Installation_of_multiple_Lazarus > - On other platforms, if you install to a new location you need to use --primary-config-path > > In either case you should make backups. (including your primary config) > > Open your project in the current Lazarus (1.6.x), and use "Publish Project" from the project menu. This creates a clean copy of your project. > > You can then open that copy in the RC3. Please test: > - If you can edit forms in the designer > - rename components / change properties in Object inspector / Add new events > - Add components to form / Move components on form > - Frames, if you use them > - If you can navigate the source code (e.g. jump to implementation) > - Auto completion in source code > - Compile, debug and run > - Anything else you use in your daily work > > I'm seeing an *extremely* strange problem with 1.8.0 RC3, AMD64 version as DEBs, as downloaded from SourceForge. I'm using the latest Ubuntu Studio 64-bit, which basically means Ubuntu 17.04. Using the Lazarus IDE, and creating a totally new application, every keypress appears multiple times, e.g. if I try to type the word 'Array' in the editor it will come out as something like 'AAArrrraayyy'. I have tried typing a single line of code and attempting to compile, and yes, the compiler does generate a syntax error, it's not some problem with the display. I don't see this on ANY other application which I've tried - LibreOffice works OK, I can type URLs into Firefox without a problem, JEdit works just fine, and I'm writing this message in Thunderbird on the same system without any multiple characters. The FP IDE works OK too, FWIW. Obviously this makes RC3 totally unusable as far as I'm concerned, however fortunately (for me? (: ) v 1.6.4 still works OK. My DEBs for 1.6.4 were also obtained from Sourceforge, they're not from the Ubuntu repositories. I have no idea what's going on here, and I'm amazed to see that nobody else is reporting this. If the developers have anything they want me to try to help diagnose the problem, then by all means ask. Brian. -- Please note the forthcoming minor change of e-mail address, brian at meadows.pairSITE.com not brian at meadows.pair.com. Both addresses will work for a while. The new address is active now. From aaa5500 at ya.ru Tue Jul 4 12:52:23 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 4 Jul 2017 13:52:23 +0300 Subject: [Lazarus] Commment-2 about TAChart diff Message-ID: <80a1130d-b7a6-f13a-fdd8-a1cd1d043a1d@ya.ru> + else if (pos('#', AText) = 1) and (Length(AText) = 7) then begin + Delete(AText, 1, 1); + Result.Red := StrToInt('$' + copy(AText, 1, 2)) shl 8; + Result.Green := StrToInt('$' + copy(AText, 3, 2)) shl 8; + Result.Blue := StrToInt('$' + copy(AText, 5, 2)) shl 8; + end else + you convert #rrggbb, but don't convert #rgb (eg #123 means #112233). example from ATSynEdit - //allow only #rgb, #rrggbb Len:= Length(s); if (Len<>3) and (Len<>6) then exit; for i:= 1 to Len do if not IsCharHex(s[i]) then exit; if Len=6 then begin N1:= StrToInt('$'+Copy(s, 1, 2)); N2:= StrToInt('$'+Copy(s, 3, 2)); N3:= StrToInt('$'+Copy(s, 5, 2)); end else begin N1:= StrToInt('$'+s[1]+s[1]); N2:= StrToInt('$'+s[2]+s[2]); N3:= StrToInt('$'+s[3]+s[3]); end; Result:= RGBToColor(N1, N2, N3); end; my code also has checking for Hex, and yours dont have check for hex. so '#aazz33' will crash. -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From md at delfire.net Tue Jul 4 14:21:28 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Tue, 4 Jul 2017 09:21:28 -0300 Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: On Tue, Jul 4, 2017 at 3:04 AM, Michael Van Canneyt via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > You can create some form of apps using the customdrawn > widgetset, but I cannot honestly recommend this approach. I do not think it > works on iOS (I could be mistaken) and it looks simply abysmal on android. > > I have created some android apps using the FPC JVM compiler, but then you > need to start all over for iOS. I believe there is still some iOS desiger > package by Joost van der Sluis. > > So at the moment the developer experience would not be very good, I think > you're better off using a HTML5 based Ionic app. > Ok Michael, thanks for the advice. Marcos Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From JuuS at mailbox.org Tue Jul 4 17:37:03 2017 From: JuuS at mailbox.org (Julius) Date: Tue, 4 Jul 2017 17:37:03 +0200 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: References: <20170630141547.52cbf7a6@limapholos.matflo.wg> Message-ID: On 07/04/2017 01:50 PM, brian via Lazarus wrote: > I'm seeing an *extremely* strange problem with 1.8.0 RC3, AMD64 > version as DEBs, as downloaded from SourceForge. > > I'm using the latest Ubuntu Studio 64-bit, which basically means > Ubuntu 17.04. Using the Lazarus IDE, and creating a totally new > application, every keypress appears multiple times, e.g. if I try to You have been bitten by ibus, last upgrade must have installed it or activated it. I don't have it on my system anymore so can't do a help on it but what you need to do is turn it off, something like: ibus -close or something. Then, Problem gone. ibus has something to do with asian keyboards I believe and causes double keystroke problems. -- Julius From brian at meadows.pair.com Tue Jul 4 18:33:29 2017 From: brian at meadows.pair.com (brian) Date: Tue, 4 Jul 2017 12:33:29 -0400 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: References: <20170630141547.52cbf7a6@limapholos.matflo.wg> Message-ID: On 07/04/2017 11:37 AM, Julius via Lazarus wrote: > > > On 07/04/2017 01:50 PM, brian via Lazarus wrote: >> I'm seeing an *extremely* strange problem with 1.8.0 RC3, AMD64 >> version as DEBs, as downloaded from SourceForge. >> >> I'm using the latest Ubuntu Studio 64-bit, which basically means >> Ubuntu 17.04. Using the Lazarus IDE, and creating a totally new >> application, every keypress appears multiple times, e.g. if I try to > > You have been bitten by ibus, last upgrade must have installed it or > activated it. > > I don't have it on my system anymore so can't do a help on it but what > you need to do is turn it off, something like: > > ibus -close > > or something. Then, Problem gone. > > ibus has something to do with asian keyboards I believe and causes > double keystroke problems. > Well, I'm certainly not using an Asian keyboard (not unless you mean manufactured in Asia! :) ) and I don't understand, in that case, why it's apparently ONLY the Lazarus 1.8 RC3 IDE that's affected. In case you missed it in my original posting, I can still use 1.6.4 with no evidence of the problem. However, out of curiosity, I did check, and ibus is NOT installed on my system. Brian. -- Please note the forthcoming minor change of e-mail address, brian at meadows.pairSITE.com not brian at meadows.pair.com. Both addresses will work for a while. The new address is active now. From nc-gaertnma at netcologne.de Tue Jul 4 19:36:04 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 4 Jul 2017 19:36:04 +0200 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: References: <20170630141547.52cbf7a6@limapholos.matflo.wg> Message-ID: <20170704193604.5c10fb8f@limapholos.matflo.wg> On Tue, 4 Jul 2017 12:33:29 -0400 brian via Lazarus wrote: >[...] > Well, I'm certainly not using an Asian keyboard (not unless you mean > manufactured in Asia! :) ) and I don't understand, in that case, why > it's apparently ONLY the Lazarus 1.8 RC3 IDE that's affected. In case > you missed it in my original posting, I can still use 1.6.4 with no > evidence of the problem. Can you find the revision that broke it? Mattias From aaa5500 at ya.ru Tue Jul 4 19:54:45 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 4 Jul 2017 20:54:45 +0300 Subject: [Lazarus] Comment-3 about TAChart diff Message-ID: <46ead209-003d-5f35-b0f5-07e12f9ae5ea@ya.ru> + if len = 3 then begin + Result.Red := StrToInt('$' + AText[1]); + Result.Green := StrToInt('$' + AText[2]); + Result.Blue := StrToInt('$' + AText[3]); + end; not OK: #abe means color components $aa $bb $ee, not $a $b $e. -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.cumerlato at gmail.com Tue Jul 4 20:55:28 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Tue, 4 Jul 2017 20:55:28 +0200 Subject: [Lazarus] Revision 55440 - TAChart: Allow 3-digit HTML color codes. In-Reply-To: References: Message-ID: I respond myself :) 1) "shl 8" is necessary to get TFPColor values (The TFPColor record contains the Red, Green, Blue and Alpha channel values as left adjusted 16 bit words, with increasing intensity from 0 to $FFFF). Not TColor values as I thought. 2) 3 digits case has been just fixed in revision 55441. Best regards. Sandro Cumerlato On Jul 4, 2017 7:47 PM, "Sandro Cumerlato" wrote: Hello, looking at revision 55440 I noticed two strange things: 1) 6 digits case: I do not understand why you "shl 8" values. Am I misunderstanding something? 2) 3 digits case: 3 digits codes should be shorthand, #FED should correspond to #FFEEDD html color IIRC (https://stackoverflow.com/ questions/3108860/how-to-use-3-digit-color-codes-rather- than-6-digit-color-codes-in-css) Thank you for your clarifications. Sandro Cumerlato -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.cumerlato at gmail.com Tue Jul 4 19:47:14 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Tue, 4 Jul 2017 19:47:14 +0200 Subject: [Lazarus] Revision 55440 - TAChart: Allow 3-digit HTML color codes. In-Reply-To: References: Message-ID: Hello, looking at revision 55440 I noticed two strange things: 1) 6 digits case: I do not understand why you "shl 8" values. Am I misunderstanding something? 2) 3 digits case: 3 digits codes should be shorthand, #FED should correspond to #FFEEDD html color IIRC ( https://stackoverflow.com/questions/3108860/how-to-use-3-digit-color-codes-rather-than-6-digit-color-codes-in-css ) Thank you for your clarifications. Sandro Cumerlato -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2017-07-04 19.35.52.png Type: image/png Size: 180656 bytes Desc: not available URL: From juha.manninen62 at gmail.com Tue Jul 4 22:25:29 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 4 Jul 2017 23:25:29 +0300 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: References: <20170630141547.52cbf7a6@limapholos.matflo.wg> Message-ID: It surely is reported. See this and the related issues: https://bugs.freepascal.org/view.php?id=30863 Nobody has found a way to fix it for good on every system. It is annoying, yes. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmuogs at gmail.com Tue Jul 4 22:58:36 2017 From: zmuogs at gmail.com (=?UTF-8?Q?Valdas_Jank=c5=abnas?=) Date: Tue, 4 Jul 2017 23:58:36 +0300 Subject: [Lazarus] Strange Font.Height Message-ID: Hello, code (WS: GTK2): i := Canvas.TextHeight('I'); writeln(i); Canvas.Font.Height := i; i:= Canvas.TextHeight('I'); writeln(i); Canvas.Font.Height := i; i:= Canvas.TextHeight('I'); writeln(i); I get: 24 33 45 I think that "Canvas.Font.Height" and "Canvas.TextHeight('a')" should be same. Why it increases after assignment, is it a bug or I don't know something? Is there DPI (mine is 141) related somehow? Kubuntu 17.04, Lazarus 1.9.0, FPC 3.0.0 -- Valdas Jankūnas From brian at meadows.pair.com Tue Jul 4 23:00:02 2017 From: brian at meadows.pair.com (brian) Date: Tue, 4 Jul 2017 17:00:02 -0400 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: <20170704193604.5c10fb8f@limapholos.matflo.wg> References: <20170630141547.52cbf7a6@limapholos.matflo.wg> <20170704193604.5c10fb8f@limapholos.matflo.wg> Message-ID: On 07/04/2017 01:36 PM, Mattias Gaertner via Lazarus wrote: > On Tue, 4 Jul 2017 12:33:29 -0400 > brian via Lazarus wrote: > >> [...] >> Well, I'm certainly not using an Asian keyboard (not unless you mean >> manufactured in Asia! :) ) and I don't understand, in that case, why >> it's apparently ONLY the Lazarus 1.8 RC3 IDE that's affected. In case >> you missed it in my original posting, I can still use 1.6.4 with no >> evidence of the problem. > > Can you find the revision that broke it? > I can try installing the other two release candidates on SourceForge, sure. The answer will be up here my ( = USA Eastern) time tomorrow morning. Brian. -- Please note the forthcoming minor change of e-mail address, brian at meadows.pairSITE.com not brian at meadows.pair.com. Both addresses will work for a while. The new address is active now. From lazarus at kluug.net Tue Jul 4 23:19:20 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 4 Jul 2017 23:19:20 +0200 Subject: [Lazarus] Strange Font.Height In-Reply-To: References: Message-ID: On 04.07.2017 22:58, Valdas Jankūnas via Lazarus wrote: > code (WS: GTK2): > > i := Canvas.TextHeight('I'); > writeln(i); > Canvas.Font.Height := i; > i:= Canvas.TextHeight('I'); > writeln(i); > Canvas.Font.Height := i; > i:= Canvas.TextHeight('I'); > writeln(i); > > I get: > 24 > 33 > 45 > > I think that "Canvas.Font.Height" and "Canvas.TextHeight('a')" should > be same. Why it increases after assignment, is it a bug or I don't > know something? Is there DPI (mine is 141) related somehow? Can you test Lazarus 1.6.x, please? Ondrej From brian at meadows.pair.com Tue Jul 4 23:49:54 2017 From: brian at meadows.pair.com (brian) Date: Tue, 4 Jul 2017 17:49:54 -0400 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: References: <20170630141547.52cbf7a6@limapholos.matflo.wg> Message-ID: <957c1039-fbef-1d01-69f9-8aeb54f2e391@meadows.pair.com> On 07/04/2017 04:25 PM, Juha Manninen via Lazarus wrote: > It surely is reported. See this and the related issues: > https://bugs.freepascal.org/view.php?id=30863 > Nobody has found a way to fix it for good on every system. It is > annoying, yes. > OK, I'll not bother testing the other two release candidates then. I think "annoying" is a bit of an understatement, myself. If the final release of 1.8 still shows the problem *for me*, then I'm certainly going to be staying with 1.6.4. Brian. -- Please note the forthcoming minor change of e-mail address, brian at meadows.pairSITE.com not brian at meadows.pair.com. Both addresses will work for a while. The new address is active now. From zmuogs at gmail.com Wed Jul 5 00:44:09 2017 From: zmuogs at gmail.com (=?UTF-8?Q?Valdas_Jank=c5=abnas?=) Date: Wed, 5 Jul 2017 01:44:09 +0300 Subject: [Lazarus] Strange Font.Height In-Reply-To: References: Message-ID: <0dd1efd9-5507-d933-3f2f-0bd4113e643d@gmail.com> 2017.07.05 00:19, Ondrej Pokorny via Lazarus rašė: > Can you test Lazarus 1.6.x, please? > > Ondrej attaching test project. Results: Kubuntu 17.04 (in virtualbox); Lazarus 1.6.4; FPC 3.0.2; WS Gtk2: 18 24 33 45 61 83 Kubuntu 17.04 (in virtualbox); Lazarus 1.6.4; FPC 3.0.2; WS Qt: 14 16 19 22 25 29 Ubuntu 17.04 (in virtualbox); Lazarus 1.6.4; FPC 3.0.2; WS Gtk2: 17 19 22 25 28 31 Ubuntu 17.04 (in virtualbox); Lazarus 1.6.4; FPC 3.0.2; WS Qt: 17 19 22 25 28 31 -- Valdas Jankūnas -------------- next part -------------- A non-text attachment was scrubbed... Name: test_project.zip Type: application/zip Size: 3790 bytes Desc: not available URL: From luizamericop at gmail.com Wed Jul 5 01:57:01 2017 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Tue, 4 Jul 2017 20:57:01 -0300 Subject: [Lazarus] Questionnaire GUI component In-Reply-To: References: Message-ID: 2017-06-30 15:33 GMT-03:00 Sandro Cumerlato via Lazarus < lazarus at lists.lazarus-ide.org>: > Hello, > I need a GUI component to implement a Questionnaire (label + combo boxes > right aligned), all in a line like this: > > Question 1? (Option A) (Option B) > > You can look at https://github.com/blikblum/luipack/blob/master/vtvextras/vtvutils/vtjsonex.pas The layout is a bit different Example: https://github.com/blikblum/luipack/tree/master/vtvextras/vtvutils/demos/jsonquestiontree For boolean values i use: https://github.com/blikblum/luipack/blob/master/luicontrols/jsonmediators.pas Example: https://github.com/blikblum/luipack/tree/master/luicontrols/demos/jsonbooleangroup Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Wed Jul 5 09:52:29 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 5 Jul 2017 10:52:29 +0300 Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: <957c1039-fbef-1d01-69f9-8aeb54f2e391@meadows.pair.com> References: <20170630141547.52cbf7a6@limapholos.matflo.wg> <957c1039-fbef-1d01-69f9-8aeb54f2e391@meadows.pair.com> Message-ID: On Wed, Jul 5, 2017 at 12:49 AM, brian via Lazarus wrote: > I think "annoying" is a bit of an understatement, myself. If the final > release of 1.8 still shows the problem *for me*, then I'm certainly > going to be staying with 1.6.4. It is not so serious because there are workarounds. The problem happens only in some Linux distro / desktop combinations and even there not always. Users were able to configure their systems to get rid of the problem. For example I have used various distros with XFCE and KDE but never seen the problem. One option is to dive into LCL-GTK2 code and fix the problem. That should be done by somebody who actually experiences it. [OutOfTopic] I can recommend Manjaro Linux + KDE. It always has the latest released versions of everything and KDE5 has matured beautifully. I always screwed up my Ubuntu derivatives when I tried to install new stuff without using their package repos. Ubuntu was the state or art > 10 years ago but not any more. Things have advanced since then. [/OutOfTopic] From michael at freepascal.org Wed Jul 5 09:57:03 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 5 Jul 2017 09:57:03 +0200 (CEST) Subject: [Lazarus] Lazarus Release Candidate 3 of 1.8.0 In-Reply-To: References: <20170630141547.52cbf7a6@limapholos.matflo.wg> <957c1039-fbef-1d01-69f9-8aeb54f2e391@meadows.pair.com> Message-ID: On Wed, 5 Jul 2017, Juha Manninen via Lazarus wrote: > On Wed, Jul 5, 2017 at 12:49 AM, brian via Lazarus > wrote: >> I think "annoying" is a bit of an understatement, myself. If the final >> release of 1.8 still shows the problem *for me*, then I'm certainly >> going to be staying with 1.6.4. > > It is not so serious because there are workarounds. > The problem happens only in some Linux distro / desktop combinations > and even there not always. Users were able to configure their systems > to get rid of the problem. > For example I have used various distros with XFCE and KDE but never > seen the problem. > One option is to dive into LCL-GTK2 code and fix the problem. That > should be done by somebody who actually experiences it. > > [OutOfTopic] > I can recommend Manjaro Linux + KDE. It always has the latest released > versions of everything and KDE5 has matured beautifully. { "OutOfTopic" : ["If by mature you mean 'bloated', then yes.", "KDE has become so bloated, it has driven me away.", "To linux mint and cinnamon." ] } ;) Michael. From mschnell at lumino.de Wed Jul 5 12:05:55 2017 From: mschnell at lumino.de (Michael Schnell) Date: Wed, 5 Jul 2017 12:05:55 +0200 Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: On 04.07.2017 08:04, Michael Van Canneyt via Lazarus wrote: > So at the moment the developer experience would not be very good, I > think you're better off using a HTML5 based Ionic app. This of course is bad news, but we do hope for improvement when time comes.... See -> http://www.remobjects.com/ . They claim to allow for writing multi-target pascal applications: "NEW: Elements 9.1, Oxygene, C# & Swift, for iOS, Android, Mac, .NET & more." (Of course not free / Open Source) -Michael From mschnell at lumino.de Wed Jul 5 12:22:50 2017 From: mschnell at lumino.de (Michael Schnell) Date: Wed, 5 Jul 2017 12:22:50 +0200 Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: They claim Delphi VCL compatibility and hence it should be compatible to LCL, as well. -> http://www.elementscompiler.com/elements/whatsnew.aspx (I did not test any of their products.) -Michael From markMLl.lazarus at telemetry.co.uk Wed Jul 5 13:57:49 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Wed, 5 Jul 2017 11:57:49 +0000 Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: On 05/07/17 10:30, Michael Schnell via Lazarus wrote: > They claim Delphi VCL compatibility and hence it should be compatible to > LCL, as well. > -> http://www.elementscompiler.com/elements/whatsnew.aspx > (I did not test any of their products.) Might also be worth bering https://blog.jetbrains.com/kotlin/2017/05/kotlin-on-android-now-official/ in mind. Not Pascal, but at least was designed with Pascal in mind. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From aaa5500 at ya.ru Wed Jul 5 14:08:39 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 5 Jul 2017 15:08:39 +0300 Subject: [Lazarus] Which HTML render component better? Message-ID: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> Which of these two: THtmlPort, TurboPower, is better rendering complex HTML files, with CSS included, etc? Seems THtmlPort wiki page is big, so it is better/bigger maybe? TurboPower is not ok at rendeding my homepage w/o JS (cannot test 2nd yet). -- Regards, Alexey From md at delfire.net Wed Jul 5 14:17:44 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Wed, 5 Jul 2017 09:17:44 -0300 Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: On Wed, Jul 5, 2017 at 7:05 AM, Michael Schnell via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > This of course is bad news, but we do hope for improvement when time > comes.... > > See -> http://www.remobjects.com/ . > They claim to allow for writing multi-target pascal applications: > "NEW: Elements 9.1, Oxygene, C# & Swift, for iOS, Android, Mac, .NET & > more." > > (Of course not free / Open Source) > I've read something about RemObjects but I prefer stay in FPC that is Open Source. But thanks, anyway. Best regards, Marcos Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From md at delfire.net Wed Jul 5 14:23:46 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Wed, 5 Jul 2017 09:23:46 -0300 Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: On Wed, Jul 5, 2017 at 8:57 AM, Mark Morgan Lloyd via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Might also be worth bering https://blog.jetbrains.com/kot > lin/2017/05/kotlin-on-android-now-official/ in mind. Not Pascal, but at > least was designed with Pascal in mind. > I didn't know Kotlin compiles to iOS. They are using LLVM — but FPC has a branch for that too, right? — but "...Kotlin/Native is far from complete, so this Technology Preview has a number of limitations that will be eliminated at later stages" see https://blog.jetbrains.com/kotlin/2017/04/kotlinnative-tech-preview-kotlin-without-a-vm/ So, I believe Ionic and JavaScript is winning until now. Best regards, Marcos Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From alfred at consulab.nl Wed Jul 5 14:30:47 2017 From: alfred at consulab.nl (Alfred) Date: Wed, 05 Jul 2017 12:30:47 +0000 Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: I you limit yourself to Android: with LAMW you can make perfect Android apps ! https://github.com/jmpessoa/lazandroidmodulewizard http://forum.lazarus.freepascal.org/index.php/topic,21919.0.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From md at delfire.net Wed Jul 5 14:38:52 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Wed, 5 Jul 2017 09:38:52 -0300 Subject: [Lazarus] Android & iOS In-Reply-To: References: Message-ID: On Wed, Jul 5, 2017 at 9:30 AM, Alfred via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > I you limit yourself to Android: with LAMW you can make perfect Android > apps ! > > https://github.com/jmpessoa/lazandroidmodulewizard > > http://forum.lazarus.freepascal.org/index.php/topic,21919.0.html > I saw this project. Looks good... but my client needs Android and iOS so... :( Best regards, Marcos Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Wed Jul 5 16:22:56 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Wed, 5 Jul 2017 16:22:56 +0200 Subject: [Lazarus] Which HTML render component better? In-Reply-To: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> References: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> Message-ID: Am 05.07.2017 um 14:08 schrieb Alexey via Lazarus: > Which of these two: THtmlPort, TurboPower, is better rendering complex > HTML files, with CSS included, etc? > > Seems THtmlPort wiki page is big, so it is better/bigger maybe? > TurboPower is not ok at rendeding my homepage w/o JS (cannot test 2nd > yet). In my Delphi times I had a few projects which used the original THtmlPort component (THtmlViewer), and this worked great. Later, I tried the Lazarus version in ccr, but it did not even compile, and it still does not today. There is a newer version on BerndGabriel's gitbub (https://github.com/BerndGabriel/HtmlViewer), it contains a Lazarus package, but it does not compile either (I did not investigate how difficult it is to fix this). The old Delphi version ignored JavaScript, I don't know whether this has changed in Bernd Garbriel's version, but I don't think so. Then I switched to the TurboPower Ipro HTMLPanel. It was very buggy then, I could improved it to some degree, but it still has lots of issues (look at our LHelp viewer). It has some css support, but I would not expect too much. Certainly no support of JavaScript. It is good for small pages, such as for some more interesting renderuing of the acknowledgements on the About page of an application. From aaa5500 at ya.ru Wed Jul 5 16:51:04 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 5 Jul 2017 17:51:04 +0300 Subject: [Lazarus] Which HTML render component better? In-Reply-To: References: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> Message-ID: <630b9cc8-1790-bec0-77d6-8cf10750b755@ya.ru> So, THtmlPort has more html features (and css too). Thanks. will try on test project too. AlexeyT. From aaa5500 at ya.ru Wed Jul 5 18:19:54 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 5 Jul 2017 19:19:54 +0300 Subject: [Lazarus] Which HTML render component better? In-Reply-To: References: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> Message-ID: <406e57f9-2ce8-3a40-f45f-c7bbe46221c0@ya.ru> I also seen error on compile THtmlPort, and fixed it, posted fix to github, then Lazarus demo crashes in loading 35K HTML file. and doesn't show simpler html file. Not ok code AlexeyT From skalogryz.lists at gmail.com Wed Jul 5 20:14:24 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Wed, 5 Jul 2017 14:14:24 -0400 Subject: [Lazarus] Which HTML render component better? In-Reply-To: <406e57f9-2ce8-3a40-f45f-c7bbe46221c0@ya.ru> References: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> <406e57f9-2ce8-3a40-f45f-c7bbe46221c0@ya.ru> Message-ID: Chromium embedded would be the best HTML rendering option as of today. http://wiki.freepascal.org/fpCEF3 It would actually put a heavy toll on a size of any project, but it takes care of it all (html, js... whatever). -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.mauri.75 at gmail.com Thu Jul 6 10:41:45 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Thu, 6 Jul 2017 10:41:45 +0200 Subject: [Lazarus] GetAppConfigDir and GetAppConfigDirUTF8 and Apache Message-ID: <23405209-e25b-83c5-141a-2ee7abd2e6da@gmail.com> Dear all, I have a question related GetAppConfigDir function when the application is called from a script being run by apache. One of my application user gets this result from GetAppConfigDir(False): /root/.config/myappname since my app uses the local config dir to store some files if the directory does not exit, the app tries to create it. Anyway since the resulting directory is in the root my app is not able to create the file. Obviously the user doesn't want to give apache root permissions. Is there any solution? Any hint? Andrea Mauri From michael at freepascal.org Thu Jul 6 10:55:58 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 6 Jul 2017 10:55:58 +0200 (CEST) Subject: [Lazarus] GetAppConfigDir and GetAppConfigDirUTF8 and Apache In-Reply-To: <23405209-e25b-83c5-141a-2ee7abd2e6da@gmail.com> References: <23405209-e25b-83c5-141a-2ee7abd2e6da@gmail.com> Message-ID: On Thu, 6 Jul 2017, Andrea Mauri via Lazarus wrote: > Dear all, > > I have a question related GetAppConfigDir function when the application > is called from a script being run by apache. > One of my application user gets this result from GetAppConfigDir(False): > > /root/.config/myappname > > since my app uses the local config dir to store some files if the > directory does not exit, the app tries to create it. > Anyway since the resulting directory is in the root my app is not able > to create the file. > Obviously the user doesn't want to give apache root permissions. > > Is there any solution? Any hint? Normally, this means that the program is run as the root user. I do not see how else the GetAppConfigDir can return the root user home dir ? Michael. From michael at freepascal.org Thu Jul 6 11:09:07 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 6 Jul 2017 11:09:07 +0200 (CEST) Subject: [Lazarus] GetAppConfigDir and GetAppConfigDirUTF8 and Apache In-Reply-To: References: <23405209-e25b-83c5-141a-2ee7abd2e6da@gmail.com> Message-ID: On Thu, 6 Jul 2017, Michael Van Canneyt via Lazarus wrote: > > > On Thu, 6 Jul 2017, Andrea Mauri via Lazarus wrote: > >> Dear all, >> >> I have a question related GetAppConfigDir function when the application >> is called from a script being run by apache. >> One of my application user gets this result from GetAppConfigDir(False): >> >> /root/.config/myappname >> >> since my app uses the local config dir to store some files if the >> directory does not exit, the app tries to create it. >> Anyway since the resulting directory is in the root my app is not able >> to create the file. >> Obviously the user doesn't want to give apache root permissions. >> >> Is there any solution? Any hint? > > Normally, this means that the program is run as the root user. > I do not see how else the GetAppConfigDir can return the root user home dir > ? > Forgot to say: If you let apache set the XDG_CONFIG_HOME or HOME environment directories to something sensible, they will be used to determine the config dir. Michael. From andrea.mauri.75 at gmail.com Thu Jul 6 11:12:29 2017 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Thu, 6 Jul 2017 11:12:29 +0200 Subject: [Lazarus] GetAppConfigDir and GetAppConfigDirUTF8 and Apache In-Reply-To: References: <23405209-e25b-83c5-141a-2ee7abd2e6da@gmail.com> Message-ID: <35654efa-83f5-6d78-1608-eb75250bc84c@gmail.com> >> I have a question related GetAppConfigDir function when the >> application is called from a script being run by apache. >> One of my application user gets this result from GetAppConfigDir(False): >> >> /root/.config/myappname >> >> since my app uses the local config dir to store some files if the >> directory does not exit, the app tries to create it. >> Anyway since the resulting directory is in the root my app is not able >> to create the file. >> Obviously the user doesn't want to give apache root permissions. >> >> Is there any solution? Any hint? > > Normally, this means that the program is run as the root user. > I do not see how else the GetAppConfigDir can return the root user home dir > ? > > Michael. > I cannot test it, I will ask for more details. Thanks, Andrea From juha.manninen62 at gmail.com Thu Jul 6 14:07:02 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 6 Jul 2017 15:07:02 +0300 Subject: [Lazarus] KDE 5 Message-ID: Moved from the "Release Candidate 3" thread: On Wed, Jul 5, 2017 at 10:57 AM, Michael Van Canneyt wrote: > { > "OutOfTopic" : ["If by mature you mean 'bloated', then yes.", > "KDE has become so bloated, it has driven me away.", > "To linux mint and cinnamon." ] } > > ;) This is a little out of scope of the whole Lazarus list but I comment anyway. KDE 5 is not bloated at all. It is slimmer that KDE 4. If you only use KDE and QT applications, it is very snappy and light. The only bloat effect comes when you must start an application made with other widget libs like GTK 2/3. Firefox and LibreOffice are good examples. They start slowly and hog memory. However that does not mean KDE is bloated. It means the "foreign" apps and their libs are bloated. Yes, I believe Firefox starts faster in a system built on top of GTK libs because the shared libs are already loaded there. Example: I have a 64-bit system with 4GB mem. With a resource monitor KSysGuard open 0.4GB mem is used. When I also have Dolphin and Qupzilla with 8 page tabs open the mem usage goes to 0.7GB. I have plenty of eye-candy desktop effects enabled and services like "KDE Connect" for my Android phone etc. It is not a stripped down system anyhow. There are KDE specific versions of most SW: picture view and edit, PDF view, diff view (kompare, good!), music and video players, etc. etc. ... When I use them, everything is snappy and around 1-1.3 GB mem is used. Most of the memory is free and used for Linux file system buffering. I have to start Firefox for some special web pages because Qupzilla has problems with them. Then memory consumption jumps higher. Still, the swap partition is almost never used. My 32-bit e-machines mini-laptop with 1GB mem also has KDE 5 which then takes much less memory, less than 0.5GB. 32-bit code needs less mem and the kernel also adjusts its usage for lower total mem. Only if I start many big apps, things get a little sticky there. In real life situations KDE can be lighter and snappier than the so called light desktop environments because there are so many apps made with KDE/QT libs. With "light" DEs you typically get diverse widget libs with all the diverse apps. Gnome / Cinnamon have the same benefit as KDE with their dedicated apps. In general the obsession for very light window managers is useless. Their GUI experience is more limited. They may save few MB of memory but when a user opens all those big bloated apps hogging 2GB, who cares about the window manager's memory? Modern Linux distros can still run on old computers with low memory. KDE is very usable in a machine with 0.5GB memory. Yes! ... but how many people really use such machines? I have an abundant 4GB, many people have more. When I run only KDE apps and look at the resource monitor, I feel 4GB is too much. It could run with much less. This is the opposite of bloat! Ok, when I debug Lazarus with another instance of Lazarus and have music player and browser and other apps running, then 4GB is nice. Regards, Juha From listbox at martoks-place.de Thu Jul 6 15:05:05 2017 From: listbox at martoks-place.de (Martok) Date: Thu, 6 Jul 2017 15:05:05 +0200 Subject: [Lazarus] Which HTML render component better? In-Reply-To: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> References: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> Message-ID: Am 05.07.2017 um 14:08 schrieb Alexey via Lazarus: > Which of these two: THtmlPort, TurboPower, is better rendering complex > HTML files, with CSS included, etc? Those are the two main native HTML renderers, but both have their problems. My main complaint would be that neither uses the DOM internally, which makes extensions a bit difficult and DHTML almost impossible. Depending on your platform target, Microsofts IE COMControl is actually pretty good. Or use the CEF, but that bloats your application by about 35MB... AFAIK, we don't have anything as small and simple as a QWebView in Qt. I have a fairly complete concept for a completely CSS-based renderer flying around. "Only" a matter of actually writing it. From r030t1 at gmail.com Thu Jul 6 16:52:02 2017 From: r030t1 at gmail.com (R0b0t1) Date: Thu, 6 Jul 2017 09:52:02 -0500 Subject: [Lazarus] KDE 5 In-Reply-To: References: Message-ID: On Thu, Jul 6, 2017 at 7:07 AM, Juha Manninen via Lazarus wrote: > Moved from the "Release Candidate 3" thread: > > On Wed, Jul 5, 2017 at 10:57 AM, Michael Van Canneyt > wrote: >> { >> "OutOfTopic" : ["If by mature you mean 'bloated', then yes.", >> "KDE has become so bloated, it has driven me away.", >> "To linux mint and cinnamon." ] } >> >> ;) > > This is a little out of scope of the whole Lazarus list but I comment anyway. > KDE 5 is not bloated at all. It is slimmer that KDE 4. If you only use > KDE and QT applications, it is very snappy and light. > Hello, If such comments are not unwelcome I would also suggest there are many architectural improvements in the code and invite Mr. Canneyt to peruse the Plasma 5 source (KDE 5 doesn't exist). That said there are some changes that have broken UI compatibility with KDE 4 and made the menus slightly harder to use for people with poor eyesight, but many things have similar problems. > The only bloat effect comes when you must start an application made > with other widget libs like GTK 2/3. Firefox and LibreOffice are good > examples. They start slowly and hog memory. > However that does not mean KDE is bloated. It means the "foreign" apps > and their libs are bloated. > Yes, I believe Firefox starts faster in a system built on top of GTK > libs because the shared libs are already loaded there. > > Example: > I have a 64-bit system with 4GB mem. > With a resource monitor KSysGuard open 0.4GB mem is used. > When I also have Dolphin and Qupzilla with 8 page tabs open the mem > usage goes to 0.7GB. > I have plenty of eye-candy desktop effects enabled and services like > "KDE Connect" for my Android phone etc. It is not a stripped down > system anyhow. > There are KDE specific versions of most SW: picture view and edit, PDF > view, diff view (kompare, good!), music and video players, etc. etc. > ... > When I use them, everything is snappy and around 1-1.3 GB mem is used. > Most of the memory is free and used for Linux file system buffering. > I have to start Firefox for some special web pages because Qupzilla > has problems with them. Then memory consumption jumps higher. > Still, the swap partition is almost never used. > > My 32-bit e-machines mini-laptop with 1GB mem also has KDE 5 which > then takes much less memory, less than 0.5GB. 32-bit code needs less > mem and the kernel also adjusts its usage for lower total mem. > Only if I start many big apps, things get a little sticky there. > > In real life situations KDE can be lighter and snappier than the so > called light desktop environments because there are so many apps made > with KDE/QT libs. With "light" DEs you typically get diverse widget > libs with all the diverse apps. > Gnome / Cinnamon have the same benefit as KDE with their dedicated apps. > > In general the obsession for very light window managers is useless. > Their GUI experience is more limited. They may save few MB of memory > but when a user opens all those big bloated apps hogging 2GB, who > cares about the window manager's memory? > > Modern Linux distros can still run on old computers with low memory. > KDE is very usable in a machine with 0.5GB memory. Yes! > ... but how many people really use such machines? > I have an abundant 4GB, many people have more. > When I run only KDE apps and look at the resource monitor, I feel 4GB > is too much. It could run with much less. This is the opposite of > bloat! > > Ok, when I debug Lazarus with another instance of Lazarus and have > music player and browser and other apps running, then 4GB is nice. > From aaa5500 at ya.ru Fri Jul 7 01:23:12 2017 From: aaa5500 at ya.ru (Alexey) Date: Fri, 7 Jul 2017 02:23:12 +0300 Subject: [Lazarus] TAChart unit names Message-ID: <99b7b201-f1b0-29b0-e4d6-918db04ec0d7@ya.ru> @Werner, To make no confusions of unit names (with some other units from _big_ app) i suggest to rename all units in TAChart like: tachart_animatedsource tachart_types tachart_bgra tachart_geometry ..... with same prefix. AlexeyT From werner.pamler at freenet.de Fri Jul 7 02:25:39 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Fri, 7 Jul 2017 02:25:39 +0200 Subject: [Lazarus] TAChart unit names In-Reply-To: <99b7b201-f1b0-29b0-e4d6-918db04ec0d7@ya.ru> References: <99b7b201-f1b0-29b0-e4d6-918db04ec0d7@ya.ru> Message-ID: Am 07.07.2017 um 01:23 schrieb Alexey via Lazarus: > @Werner, To make no confusions of unit names (with some other units > from _big_ app) i suggest to rename all units in TAChart like: > > tachart_animatedsource > > tachart_types > > tachart_bgra > > tachart_geometry > > ..... with same prefix. > > AlexeyT Huuuh? Certainly not. This will break the code of EVERY TAChart user. From noreply at z505.com Fri Jul 7 23:36:54 2017 From: noreply at z505.com (noreply at z505.com) Date: Fri, 07 Jul 2017 16:36:54 -0500 Subject: [Lazarus] Which HTML render component better? In-Reply-To: References: <492bb870-5f5d-98c0-97a1-17062e34d429@ya.ru> Message-ID: <7e4c234dd18f851dca478f917e52c9cb@z505.com> On 2017-07-06 08:05, Martok via Lazarus wrote: > Or use the CEF, but that bloats your application by about > 35MB... > I think more... maybe 35mb back in the cef 1 days? But now it is larger with cef3 From mlistft at mail.ru Sat Jul 8 21:26:55 2017 From: mlistft at mail.ru (=?UTF-8?B?RlR1cnRsZQ==?=) Date: Sat, 08 Jul 2017 22:26:55 +0300 Subject: [Lazarus] =?utf-8?q?IDE_gutter_icons?= Message-ID: <1499542015.510494048@f290.i.mail.ru> What are parameters for high-DPI versions of gutter icons? -- FTurtle -------------- next part -------------- An HTML attachment was scrubbed... URL: From mircocasini at libero.it Sat Jul 8 22:36:18 2017 From: mircocasini at libero.it (Mirco Casini) Date: Sat, 8 Jul 2017 23:36:18 +0300 Subject: [Lazarus] =?utf-8?q?look_what_I=27ve_found?= Message-ID: <1533449867.20170708223618@libero.it> Hey! Look what I've just found on the web, that really cool, yeah, more info here http://viraad.dk/files/cache/pages/5/a/unfold.php?e5e4 Best, Mirco Casini From: lazarus [mailto:lazarus at lists.lazarus.freepascal.org] Sent: Saturday, July 08, 2017 3:36 PM To: mircocasini at libero.it Subject: but WHAT IF? Hell yes. Came here to say this. There may be other good ideas but you can stimulate his prostate by pressing upward on the taint skin behind his balls! This good idea takes 2 seconds tops, and I bet he'll like it. If you google prostate stimulation, rape him anally, and then are confused by the lack of a positive turnout.... well there may be other factors here. Anyway, try giving him perineum stimulation! Sent from Mail for Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: F14EEDB279423F92FE830111DEDAB4EE.jpg Type: image/jpeg Size: 20528 bytes Desc: not available URL: From hfiandor at ceniai.inf.cu Sat Jul 8 23:22:32 2017 From: hfiandor at ceniai.inf.cu (hfiandor) Date: Sat, 8 Jul 2017 17:22:32 -0400 Subject: [Lazarus] quitar foco a un componente get off focus Message-ID: Dear colleagues Estimados listeros: I have a form with a button that get focus to make easy the action. When the action is finished, the button remain with focus, and I want that this focus (borders with dotted lines) disappear. Somebody sent to me the command to be included in the proper line of the program, but I missed, and now I need this. Please, help me. Tengo una forma con un botón que coge foco para viabilizar la operación. Cuando la acción prevista se termina, el botón muestra el foco (no lo pierde), como yo deseo. Alguien con muy buena intención me mandó el comando que lo lograba, pero yo lo perdí, y ahora lo necesito de nuevo. Por favor, tírenme alguna ayuda. Saludos Ing. Héctor F. Fiandor Rosario -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Sun Jul 9 00:22:14 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Sun, 9 Jul 2017 00:22:14 +0200 Subject: [Lazarus] Scaling of toolbar icons Message-ID: <7b829648-311c-9622-5138-01061154f875@freenet.de> Ondrej, you implemented scaling of the images used for the toolbar and menu of the IDE. Where can I find these methods? Are they available for standard imagelists for non-IDE usage? From lazarus at kluug.net Sun Jul 9 07:18:57 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 9 Jul 2017 07:18:57 +0200 Subject: [Lazarus] Scaling of toolbar icons In-Reply-To: <7b829648-311c-9622-5138-01061154f875@freenet.de> References: <7b829648-311c-9622-5138-01061154f875@freenet.de> Message-ID: <23fe4a5b-fd96-0f4c-8ee2-b4bd7ae9c475@kluug.net> On 09.07.2017 0:22, Werner Pamler via Lazarus wrote: > Ondrej, you implemented scaling of the images used for the toolbar and > menu of the IDE. Where can I find these methods? IDEImagesIntf.pas > Are they available for standard imagelists for non-IDE usage? No, the current solution is Lazarus specific. (It doesn't make sense to have IDEImagesIntf.pas in LCL.) You can use a similar approach for your applications, though. Ondrej From lazarus at kluug.net Sun Jul 9 07:20:44 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 9 Jul 2017 07:20:44 +0200 Subject: [Lazarus] IDE gutter icons In-Reply-To: <1499542015.510494048@f290.i.mail.ru> References: <1499542015.510494048@f290.i.mail.ru> Message-ID: <727aa6c2-c561-d981-2d7a-52497381b221@kluug.net> On 08.07.2017 21:26, FTurtle via Lazarus wrote: > What are parameters for high-DPI versions of gutter icons? I am not sure there is high-DPI support for gutter icons yet. I have to check. But the parameters/file names have to be the same (*_150, *_200). Ondrej From werner.pamler at freenet.de Sun Jul 9 11:34:17 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Sun, 9 Jul 2017 11:34:17 +0200 Subject: [Lazarus] Scaling of toolbar icons In-Reply-To: <23fe4a5b-fd96-0f4c-8ee2-b4bd7ae9c475@kluug.net> References: <7b829648-311c-9622-5138-01061154f875@freenet.de> <23fe4a5b-fd96-0f4c-8ee2-b4bd7ae9c475@kluug.net> Message-ID: <4ddd0884-f4c1-b713-c196-d1272526c300@freenet.de> Am 09.07.2017 um 07:18 schrieb Ondrej Pokorny via Lazarus: > On 09.07.2017 0:22, Werner Pamler via Lazarus wrote: >> Ondrej, you implemented scaling of the images used for the toolbar >> and menu of the IDE. Where can I find these methods? > > IDEImagesIntf.pas > >> Are they available for standard imagelists for non-IDE usage? > > No, the current solution is Lazarus specific. (It doesn't make sense > to have IDEImagesIntf.pas in LCL.) You can use a similar approach for > your applications, though. Thanks. I have the idea of writing a "TScaledImageList" which needs up to three imagelists with different resolutions. It will calculate the required image size from its BaseWidth/BaseHeight and BasePixelsPerInch settings and the current PixelsPerInch. If the requested image size matches one of the linked image lists it will copy these images to itself. If the image size does not match it will create stretchdrawn images from those with the closest size. The ScaledImageList is the imagelist linked to form components, such as TListView or TTreeView. I did not start any coding, yet, but I think it should work and should greatly facilitate using scaled images at the application level. From zmuogs at gmail.com Sun Jul 9 17:14:08 2017 From: zmuogs at gmail.com (=?UTF-8?Q?Valdas_Jank=C5=ABnas?=) Date: Sun, 9 Jul 2017 18:14:08 +0300 Subject: [Lazarus] Strange Font.Height In-Reply-To: <7b76bbff-b785-0a8c-1a0d-f102865b4e22@gmail.com> References: <7b76bbff-b785-0a8c-1a0d-f102865b4e22@gmail.com> Message-ID: 2017-07-05 1:39 GMT+03:00 Valdas Jankūnas : > 2017.07.05 00:19, Ondrej Pokorny via Lazarus rašė: > >> Can you test Lazarus 1.6.x, please? >> >> Ondrej >> > > attaching test project. Results: > > Kubuntu 17.04 (in virtualbox); Lazarus 1.6.4; FPC 3.0.2; WS Gtk2: > 18 > 24 > 33 > 45 > 61 > 83 > > Kubuntu 17.04 (in virtualbox); Lazarus 1.6.4; FPC 3.0.2; WS Qt: > 14 > 16 > 19 > 22 > 25 > 29 > > Ubuntu 17.04 (in virtualbox); Lazarus 1.6.4; FPC 3.0.2; WS Gtk2: > 17 > 19 > 22 > 25 > 28 > 31 > > Ubuntu 17.04 (in virtualbox); Lazarus 1.6.4; FPC 3.0.2; WS Qt: > 17 > 19 > 22 > 25 > 28 > 31 > I ran this code (Lazarus 1.9.0): Writeln('Canvas.Font.PixelsPerInch = ', + Canvas.Font.PixelsPerInch); writeln('Forms.Screen.PixelsPerInch = ', + Forms.Screen.PixelsPerInch); writeln('Graphics.ScreenInfo.PixelsPerInchX = ', Graphics.ScreenInfo.PixelsPerInchX); and got: Canvas.Font.PixelsPerInch = 96 Forms.Screen.PixelsPerInch = 141 Graphics.ScreenInfo.PixelsPerInchX = 141 "xdpyinfo | grep dots" in console gives "resolution: 141x141 dots per inch". PPI of Font differs from rest PPI. Is this intended or a bug? ______ Valdas Jankūnas -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Sun Jul 9 17:41:48 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 9 Jul 2017 17:41:48 +0200 Subject: [Lazarus] Strange Font.Height In-Reply-To: References: <7b76bbff-b785-0a8c-1a0d-f102865b4e22@gmail.com> Message-ID: <91a0abf8-7389-24ee-43ff-24b5cc11b170@kluug.net> On 09.07.2017 17:14, Valdas Jankūnas via Lazarus wrote: > PPI of Font differs from rest PPI. Is this intended or a bug? It depends what your code is. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmuogs at gmail.com Sun Jul 9 17:45:40 2017 From: zmuogs at gmail.com (=?UTF-8?Q?Valdas_Jank=C5=ABnas?=) Date: Sun, 9 Jul 2017 18:45:40 +0300 Subject: [Lazarus] Strange Font.Height In-Reply-To: <91a0abf8-7389-24ee-43ff-24b5cc11b170@kluug.net> References: <7b76bbff-b785-0a8c-1a0d-f102865b4e22@gmail.com> <91a0abf8-7389-24ee-43ff-24b5cc11b170@kluug.net> Message-ID: I created simple GUI project and OnCreate added previously mentioned code. Is this a bug in Lazarus? 2017-07-09 18:41 GMT+03:00 Ondrej Pokorny via Lazarus < lazarus at lists.lazarus-ide.org>: > On 09.07.2017 17:14, Valdas Jankūnas via Lazarus wrote: > > PPI of Font differs from rest PPI. Is this intended or a bug? > > > It depends what your code is. > > Ondrej > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > > -- ______ Valdas Jankūnas -------------- next part -------------- An HTML attachment was scrubbed... URL: From r030t1 at gmail.com Mon Jul 10 08:12:05 2017 From: r030t1 at gmail.com (R0b0t1) Date: Mon, 10 Jul 2017 01:12:05 -0500 Subject: [Lazarus] Cross OS API Wrappers Message-ID: Hello, I was wondering if cross-platform (Linux, BSD, Windows) wrappers exist for certain goals like "create a system timer" or "use asynchronous IO." A good example would be a class which uses timerfds and epoll on Linux, kqueues and kevent on BSD, or Waitable Timers on Windows to do very accurate asynchronous timing. The typical solution to a lot of problems like this (as seen on the Lazarus IDE forums, but also on answers on other sites tagged as using Delphi) is to use more threads. This works but isn't necessarily an ideal solution. I have personal interest in adding code to accomplish things like the above, but some of the names would conflict with things which already behave in a certain way (i.e. I can't call the class outlined above "TTimer"). Is there a recommended way to name things and a recommended place to add what I want to do to either the FP units or the LCL? R0b0t1. From michael at freepascal.org Mon Jul 10 09:07:18 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 10 Jul 2017 09:07:18 +0200 (CEST) Subject: [Lazarus] Cross OS API Wrappers In-Reply-To: References: Message-ID: On Mon, 10 Jul 2017, R0b0t1 via Lazarus wrote: > Hello, > > I was wondering if cross-platform (Linux, BSD, Windows) wrappers exist > for certain goals like "create a system timer" or "use asynchronous > IO." > > A good example would be a class which uses timerfds and epoll on > Linux, kqueues and kevent on BSD, or Waitable Timers on Windows to do > very accurate asynchronous timing. The typical solution to a lot of > problems like this (as seen on the Lazarus IDE forums, but also on > answers on other sites tagged as using Delphi) is to use more threads. > This works but isn't necessarily an ideal solution. > > I have personal interest in adding code to accomplish things like the > above, but some of the names would conflict with things which already > behave in a certain way (i.e. I can't call the class outlined above > "TTimer"). Is there a recommended way to name things and a recommended > place to add what I want to do to either the FP units or the LCL? There are no conventions to speak of. But TAsyncTimer seems an obvious choice. You may want to check libasync.pp and fpasync in the fcl-async package before reinventing the wheel. It is old code, but is a nice start. Michael. From coppolastudio at gmail.com Mon Jul 10 12:43:57 2017 From: coppolastudio at gmail.com (coppolastudio) Date: Mon, 10 Jul 2017 12:43:57 +0200 Subject: [Lazarus] quitar foco a un componente get off focus References: Message-ID: An HTML attachment was scrubbed... URL: From dezlov at gmail.com Tue Jul 11 00:43:45 2017 From: dezlov at gmail.com (Denis Kozlov) Date: Mon, 10 Jul 2017 23:43:45 +0100 Subject: [Lazarus] quitar foco a un componente get off focus In-Reply-To: References: Message-ID: In Delphi, this can be accomplished by TForm.ActiveControl := nil. In Lazarus world, there is no substitute yet. The closest seems to be Windows.SetFocus(0). Bug report: https://bugs.freepascal.org/view.php?id=25396 On 08/07/2017 22:22, hfiandor via Lazarus wrote: > > Dear colleagues Estimados listeros: > > I have a form with a button that get focus to make easy the action. > When the action is finished, the button remain with focus, and I want > that this focus (borders with dotted lines) disappear. > > Somebody sent to me the command to be included in the proper line of > the program, but I missed, and now I need this. > > Please, help me. > > Tengo una forma con un botón que coge foco para viabilizar la > operación. Cuando la acción prevista se termina, el botón muestra el > foco (no lo pierde), como yo deseo. > > Alguien con muy buena intención me mandó el comando que lo lograba, > pero yo lo perdí, y ahora lo necesito de nuevo. > > Por favor, tírenme alguna ayuda. > > Saludos > > Ing. Héctor F. Fiandor Rosario > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Jul 13 02:11:32 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 13 Jul 2017 01:11:32 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! Message-ID: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> Hi Guys, This is just to give everybody that works on FPC or Lazarus a pat on the back. Seriously, you guys are doing an *excellent* job. Even though I am sometimes a bit hard on you guys. Having moved back to Delphi (I'm using XE at the moment) for a contracting job, I got to the realization how bad Delphi has become. Compared to Lazarus IDE, Delphi IDE is a joke!! [rant on] My issues with Delphi IDE in the last two weeks: - Error Insight (red squiggles for Unknown Identifiers) is horribly broken. My code editor looks as if my 1 year old drew with a red marker all over the screen! More sad news - the IDE Product Manager of Delphi told me personally that the latest Delphi version is better, but there are still many false positives. Oh dear. - Delphi Project Manager window is useless! It has drag-n-drop and shows you a nice blue target drop location, but those are all fake features. You can't drag-n-drop units to reorganize your project. There is a kludge work-around - using F2 to rename a unit (but that too, only works sometimes) by giving it a relative path and file name. But then... - Delphi IDE doesn't update all references to the old units, in case of a unit rename. - Delphi IDE doesn't delete or rename the old DCU file, so have fun debugging code that doesn't seem to update, because it is silently using the old DCU file still lying around. - Delphi IDE doesn't sort the units after a rename. Hell, it's not even sorted after I restart the IDE or reload the project. - Delphi IDE is so SLOW to start up, and I'm running a beefy Intel i7 with 32GB RAM. - You can't customise IDE shortcuts. What EMBT gives you is what you are forced to live with. I use a custom Dvorak keyboard layout, and many QWERTY-centric shortcuts are terrible to type using my keyboard layout. Lazarus allows me to customise them as needed. - Delphi IDE seems to randomly decide some files will contain BOM markers and others not. I still haven't figured out if there is actually any logic in the way it works. - Delphi compiler gives no hints on unused units. - Oh why is "Save Project As..." under the File menu and not the Project menu! - Delphi IDE doesn't have a keyboard shortcut for File -> Open!!! Have they not heard about Ctrl+O ??? - No editor option to switch off "cursor past end of line" feature. ...and this is just the tip of the iceberg!!! [rant off] I promise, I'll never complain about Lazarus IDE or FPC again! :) Long live open source development tools. ps: There was ONE thing I did like about Delphi - the "File -> New -> XML Data Binding" option, where it generates interfaces and classes to work with XML data or a schema. That was pretty useful. Does Lazarus have something like that yet? 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 Thu Jul 13 07:54:56 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 13 Jul 2017 07:54:56 +0200 (CEST) Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> Message-ID: On Thu, 13 Jul 2017, Graeme Geldenhuys via Lazarus wrote: > I promise, I'll never complain about Lazarus IDE or FPC again! :) > Long live open source development tools. I have put this little snippet of text aside, so I can use it for future reference ;) > > > ps: > There was ONE thing I did like about Delphi - the "File -> New -> > XML Data Binding" option, where it generates interfaces and > classes to work with XML data or a schema. That was pretty > useful. Does Lazarus have something like that yet? Not to my knowledge. Having moved to JSON, I have written json2pas, which serves a similar purpose, but a xml2pas is still on my todo list. However, WST and the SDO toolkit (the latter in FPC) do provide something similar. WST can be used to convert a XSD to pascal code. Michael. PS. Note 2 self: still need to insert json2pas in the json viewer tool. From lazarus at kluug.net Thu Jul 13 08:22:33 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 13 Jul 2017 08:22:33 +0200 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> Message-ID: <9eb71da1-a855-71b3-7dea-5e52c8d22e27@kluug.net> On 13.07.2017 2:11, Graeme Geldenhuys via Lazarus wrote: > There was ONE thing I did like about Delphi - the "File -> New -> > XML Data Binding" option, where it generates interfaces and > classes to work with XML data or a schema. That was pretty > useful. Does Lazarus have something like that yet? OXml can do that for Lazarus (it's my commercial project): http://www.kluug.net/oxml.php Ondrej From mailinglists at geldenhuys.co.uk Thu Jul 13 09:36:06 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 13 Jul 2017 08:36:06 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> Message-ID: <49a8c4e3-dc25-8987-df30-ff75539ade85@geldenhuys.co.uk> On 2017-07-13 06:54, Michael Van Canneyt via Lazarus wrote: > I have put this little snippet of text aside, so I can use it for future > reference ;) Yeah, knowing this list [nobody here ever forgets], that is something that going to bite me in the a** at some point. :) Regards, Graeme From michael at freepascal.org Thu Jul 13 09:37:31 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 13 Jul 2017 09:37:31 +0200 (CEST) Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <49a8c4e3-dc25-8987-df30-ff75539ade85@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <49a8c4e3-dc25-8987-df30-ff75539ade85@geldenhuys.co.uk> Message-ID: On Thu, 13 Jul 2017, Graeme Geldenhuys via Lazarus wrote: > On 2017-07-13 06:54, Michael Van Canneyt via Lazarus wrote: >> I have put this little snippet of text aside, so I can use it for future >> reference ;) > > Yeah, knowing this list [nobody here ever forgets], that is something > that going to bite me in the a** at some point. :) Auntie Google has a long memory, and she likes to gossip :) Michael. From mailinglists at geldenhuys.co.uk Thu Jul 13 09:44:29 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 13 Jul 2017 08:44:29 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <9eb71da1-a855-71b3-7dea-5e52c8d22e27@kluug.net> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <9eb71da1-a855-71b3-7dea-5e52c8d22e27@kluug.net> Message-ID: <13cb930b-725b-ac3d-4494-0a9fbd1cc4d3@geldenhuys.co.uk> On 2017-07-13 07:22, Ondrej Pokorny via Lazarus wrote: > OXml can do that for Lazarus (it's my commercial project): > http://www.kluug.net/oxml.php Well done. One small note... On that page it mentions "OXml supports Lazarus 1.0 and newer on all platforms (tested Win32, Win64, Linux, MacOSX)." - that doesn't mean much to anybody that uses Lazarus from SVN - a common option. Nowhere do you mention what FPC versions are supported, though you do explicitly mention what Delphi versions are supported. It would be very useful if you can add the FPC version info too. Just a thought. 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 Fri Jul 14 08:18:42 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 14 Jul 2017 02:18:42 -0400 Subject: [Lazarus] Video: Terrain Demo Message-ID: I've been working on actually finishing Bare Game version 2. This evening I created another example program and thought some of you might want to view it. It's a procedural terrain generation example. You can view a small screen capture of it at this page: https://www.getlazarus.org/videos/bareterrain -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmuogs at gmail.com Fri Jul 14 11:06:58 2017 From: zmuogs at gmail.com (=?UTF-8?Q?Valdas_Jank=c5=abnas?=) Date: Fri, 14 Jul 2017 12:06:58 +0300 Subject: [Lazarus] Translation becomes "fuzzy". Why? Message-ID: Hello, In file "languages/lazaruside.lt.po" resides string: #: lazarusidestrconsts.lischangedscoordofsfromdtodinsides msgid "Changed %s coord of %s from \"%d\" to \"%d\" inside %s." I translate it to: msgstr "„%4:s“ viduje „%1:s“ koordinatė „%0:s“ pakeista iš „%2:d“ į „%3:d“." After revision update this translation is always marked as "fuzzy,badformat". Why? Is rearrangement of arguments prohibited, or I don't see where I made a mistake? -- Valdas Jankūnas From JuuS at mailbox.org Fri Jul 14 11:38:08 2017 From: JuuS at mailbox.org (Julius) Date: Fri, 14 Jul 2017 11:38:08 +0200 Subject: [Lazarus] Translation becomes "fuzzy". Why? In-Reply-To: References: Message-ID: On 07/14/2017 11:06 AM, Valdas Jankūnas via Lazarus wrote: > > msgstr "„%4:s“ viduje „%1:s“ koordinatė „%0:s“ pakeista iš „%2:d“ į > „%3:d“." > > After revision update this translation is always marked as > "fuzzy,badformat". Why? Is rearrangement of arguments prohibited, or I > don't see where I made a mistake? > > In my experience this is due to a missing "msgctxt" entry. Sometimes the po system writes one but often not. I believe when that is specified uniquely that problem goes away. For instance: #: linuxtrix.cltprocessinput msgid "Input" msgstr "Mwwaregrhh " vs. #: linuxtrix.cltprocessinput msgctxt "linuxtrix.cltprocessinput" msgid "Input" msgstr "Mwwaregrhh " But I'm not sure that that will get overwritten the next time po files are written out, I don't think it does and so it should be a good fix forever, but please let us know here if you find something different. -- Julius From aaa5500 at ya.ru Fri Jul 14 15:11:15 2017 From: aaa5500 at ya.ru (Alexey) Date: Fri, 14 Jul 2017 16:11:15 +0300 Subject: [Lazarus] TShape cross shape Message-ID: <8694a31a-5d82-2c45-7b8b-8ef5dd99e326@ya.ru> IDE uses x mark for ComponentPalettePopup. it paints it custom way. I want to add TShape kind "cross". It may be used here in PalettePopup. For cross, so needed to add property "width of cross". I want to add prop ShapeSizeSmall: it may be width of cross + radius for rounded-rect. (now radius is MinSize/4). Ok? -- Regards, Alexey T From ganmax at narod.ru Fri Jul 14 17:55:44 2017 From: ganmax at narod.ru (Maxim Ganetsky) Date: Fri, 14 Jul 2017 18:55:44 +0300 Subject: [Lazarus] Translation becomes "fuzzy". Why? In-Reply-To: References: Message-ID: 14.07.2017 12:06, Valdas Jankūnas via Lazarus пишет: > Hello, > > In file "languages/lazaruside.lt.po" resides string: > > #: lazarusidestrconsts.lischangedscoordofsfromdtodinsides > msgid "Changed %s coord of %s from \"%d\" to \"%d\" inside %s." > > I translate it to: > > msgstr "„%4:s“ viduje „%1:s“ koordinatė „%0:s“ pakeista iš „%2:d“ į > „%3:d“." > > After revision update this translation is always marked as > "fuzzy,badformat". Why? Is rearrangement of arguments prohibited, or I > don't see where I made a mistake? IIRC currently formatting arguments in translation should match original string, otherwise formatting is considered incorrect. It is not very flexible, but it is simple and allows to avoid subtle errors in translations. Probably this check can be relaxed/made more elaborate, but I don't think it is worth potential risks and complications. -- Best regards, Maxim Ganetsky mailto:ganmax at narod.ru From sysrpl at gmail.com Fri Jul 14 20:24:43 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 14 Jul 2017 14:24:43 -0400 Subject: [Lazarus] Video: Terrain Demo In-Reply-To: References: Message-ID: Update: I added the a "mars" planet style to the example. This new style includes depth of field and atmospheric effects. https://www.getlazarus.org/videos/bareterrain/#mars -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcov at stack.nl Tue Jul 18 10:44:55 2017 From: marcov at stack.nl (Marco van de Voort) Date: Tue, 18 Jul 2017 10:44:55 +0200 (CEST) Subject: [Lazarus] Free Pascal 3.0.4-rc1 released! Message-ID: <20170718084455.12B0E5082D@toad.stack.nl> Hello, We have placed the first release candidate of the Free Pascal Compiler version 3.0.4 on our ftp servers. You can help improve the upcoming 3.0.4 release by downloading and testing this release. If you want you can report what you have done here: http://wiki.freepascal.org/Testers_3.0.4 or in the maillist. Changes that may break backwards compatibility will be documented at: http://wiki.freepascal.org/User_Changes_3.0.4 Downloads are available at the main FTP server and ftp://freepascal.stack.nl/pub/mirrors/fpc/beta/3.0.4-rc1/ Enjoy! The Free Pascal Compiler Team Free Pascal Compiler Version 3.0.4 ****************************************************************************** What's New in 3.0.4 ****************************************************************************** Free Pascal 3.0.4 is a point release of the 3.0.x fixes branch. Please also see http://wiki.freepascal.org/User_Changes_3.0.4 for a list of changes that may affect the behaviour of previously working code, and how to cope with these changes. Some highlights are: Rtl: * fix traceback on ELF based systems Packages: * fcl-pdf updates * fcl-passrc updates. See http://bugs.freepascal.org/changelog_page.php for the list of reported bugs which have been fixed in this release. From md at delfire.net Tue Jul 18 15:42:52 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Tue, 18 Jul 2017 10:42:52 -0300 Subject: [Lazarus] Running Unit tests for all projects Message-ID: Hi, I have several projects that have FPCUnit tests. I would like to know if there is a tool or a simple way to compile, run and catch the results for all projects. Motivation: When I update FPC, 3rd libs/frameworks and Lazarus, some changes may broke my code, but not in all projects. I would like to know which projects will be broke before update my stable versions for each compiler/lib/framework/ide. Best regards, Marcos Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Jul 18 15:53:44 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 18 Jul 2017 09:53:44 -0400 Subject: [Lazarus] IDE-SynEdit Caret Color Message-ID: Hello Is there an option to control caret color of IDE editor? I typically use classic color scheme, that means blue background with yellow text. However, the OS caret still draws the caret in black. On SynEdit internals, there's a way to use an internal caret painter TSynEditScreenCaret.Create(.., TSynEditScreenCaretPainterInternal) and that provides a precise control over how caret looks. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Tue Jul 18 16:11:23 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 18 Jul 2017 15:11:23 +0100 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: References: Message-ID: On 2017-07-18 14:42, Marcos Douglas B. Santos via Lazarus wrote: > I would like to know if there is a tool or a simple way to compile, run and > catch the results for all projects. MSEide+MSEgui has such a tool in its MSEUniverse repository. It's a bit cryptic to use (and no help as always), but once you get the gist of things (Martin will surely lend a hand explaining things) it works pretty well. For my own projects I simply have batch scripts that execute automatically via cron jobs every amount of minutes or hours. The produce XML output which gets processed by XSLT to generate a HTML page which is automatically published. I also get a unit test summary email sent to me. The process is very similar to what I do with the tiOPF project. Take a look at the /InstallScripts/freebsd/ directory for an example. Oh yeah, I also use FPTest (a DUnit2 clone but FPC specific) - instead of FPCUnit, but the latter should be able to do the above (I think). 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 Tue Jul 18 17:38:36 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 18 Jul 2017 18:38:36 +0300 Subject: [Lazarus] IDE-SynEdit Caret Color In-Reply-To: References: Message-ID: <92eeca11-d170-7442-12ef-9535e283dfac@ya.ru> Caret should paint via pmNotXor (or pmXor) pen mode. MacOS WS bug - it paints it always black. Win32 should paint Ok. Alexey From lazarus at mfriebe.de Tue Jul 18 18:11:52 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 18 Jul 2017 17:11:52 +0100 Subject: [Lazarus] IDE-SynEdit Caret Color In-Reply-To: References: Message-ID: On 18/07/2017 14:53, Dmitry Boyarintsev via Lazarus wrote: > Hello > > Is there an option to control caret color of IDE editor? > > I typically use classic color scheme, that means blue background with > yellow text. > However, the OS caret still draws the caret in black. > > On SynEdit internals, there's a way to use an internal caret painter > TSynEditScreenCaret.Create(.., TSynEditScreenCaretPainterInternal) > and that provides a precise control over how caret looks. > No, the IDE does not (yet) have that options (patches welcome / maybe also a not focused color?) SynEdit has 2 different caret handlers: System / Internal The default for SynEdit is system, but if multi caret is added, it changes to internal (the IDE has multi caret) System can not be modified (well may depend on OS). System (at least on win) allows only one caret per app (so an app with 2 SynEdit can still only have one caret) Internal can be modified, or at least that can be added. Internal does not (yet) follow the system blink rate. From skalogryz.lists at gmail.com Tue Jul 18 18:33:25 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 18 Jul 2017 12:33:25 -0400 Subject: [Lazarus] IDE-SynEdit Caret Color In-Reply-To: <92eeca11-d170-7442-12ef-9535e283dfac@ya.ru> References: <92eeca11-d170-7442-12ef-9535e283dfac@ya.ru> Message-ID: On Tue, Jul 18, 2017 at 11:38 AM, Alexey via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Caret should paint via pmNotXor (or pmXor) pen mode. MacOS WS bug - it > paints it always black. Win32 should paint Ok. A stand-alone project with SynEdit, draws the caret as expected (with internal colors) However, IDE caret always appears to be black. Drawing of the caret doesn't seem to be happening via WS. So I'm wondering is multi-caret / Internal synedit drawing is enabled at all time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Jul 18 18:33:47 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 18 Jul 2017 12:33:47 -0400 Subject: [Lazarus] IDE-SynEdit Caret Color In-Reply-To: References: <92eeca11-d170-7442-12ef-9535e283dfac@ya.ru> Message-ID: On Tue, Jul 18, 2017 at 12:33 PM, Dmitry Boyarintsev < skalogryz.lists at gmail.com> wrote: > A stand-alone project with SynEdit, draws the caret as expected (with > internal colors) > * (with inverted colors) -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Jul 18 18:41:43 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 18 Jul 2017 12:41:43 -0400 Subject: [Lazarus] IDE-SynEdit Caret Color In-Reply-To: References: <92eeca11-d170-7442-12ef-9535e283dfac@ya.ru> Message-ID: On Tue, Jul 18, 2017 at 12:33 PM, Dmitry Boyarintsev < skalogryz.lists at gmail.com> wrote: > On Tue, Jul 18, 2017 at 11:38 AM, Alexey via Lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> Caret should paint via pmNotXor (or pmXor) pen mode. MacOS WS bug - it >> paints it always black. Win32 should paint Ok. > > > A stand-alone project with SynEdit, draws the caret as expected (with > internal colors) > However, IDE caret always appears to be black. Drawing of the caret > doesn't seem to be happening via WS. > > So I'm wondering is multi-caret / Internal synedit drawing is enabled at > all time. > Just like Martin said - the internal painter is used. The code of the internal caret painter sets pmNotXor mode when drawing lines. The value seems to be ignored by WS -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Tue Jul 18 18:45:19 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 18 Jul 2017 19:45:19 +0300 Subject: [Lazarus] IDE-SynEdit Caret Color In-Reply-To: References: <92eeca11-d170-7442-12ef-9535e283dfac@ya.ru> Message-ID: <43b9d82d-4142-e81e-accb-908fd3bcbda3@ya.ru> >The code of the internal caret painter sets pmNotXor mode when drawing lines. The value seems to be ignored by WS Yes, it is ignored in Mac WSes. -- Regards, Alexey From lazarus at mfriebe.de Tue Jul 18 18:48:16 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 18 Jul 2017 17:48:16 +0100 Subject: [Lazarus] IDE-SynEdit Caret Color In-Reply-To: References: <92eeca11-d170-7442-12ef-9535e283dfac@ya.ru> Message-ID: <2f2e9dca-71e1-fcbf-3cb1-a42dd2b5eb22@mfriebe.de> On 18/07/2017 17:41, Dmitry Boyarintsev via Lazarus wrote: > On Tue, Jul 18, 2017 at 12:33 PM, Dmitry Boyarintsev > > wrote: > > > So I'm wondering is multi-caret / Internal synedit drawing is > enabled at all time. > In the IDE yes. It becomes active when the multi caret plugin is added. Independent of the amount of carets used. > > Just like Martin said - the internal painter is used. > > The code of the internal caret painter sets pmNotXor mode when drawing > lines. > The value seems to be ignored by WS > Yes must be WS. Tested on w32 white BG => black caret black BG => white caret However since the current color for pmNotXor inverts all bits, there is one case: If your BG is grey 7F 7F 7F, the the caret is 80 80 80. Not really helpful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Jul 18 20:33:49 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 18 Jul 2017 14:33:49 -0400 Subject: [Lazarus] IDE-SynEdit Caret Color In-Reply-To: <2f2e9dca-71e1-fcbf-3cb1-a42dd2b5eb22@mfriebe.de> References: <92eeca11-d170-7442-12ef-9535e283dfac@ya.ru> <2f2e9dca-71e1-fcbf-3cb1-a42dd2b5eb22@mfriebe.de> Message-ID: Alexey, Martin, thank you for pointing to the right direction. it's now fixed for carbon. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Jul 19 08:57:01 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 19 Jul 2017 02:57:01 -0400 Subject: [Lazarus] Sparta Form Designer change Message-ID: I noticed hnb checked in quite a few changes to the sparta docked form designer yesterday. Is this the majority of the changes coming for sparta? I was going to do some testing on it, but I want to wait until the bulk of the new changes, which I hear are coming, have been checked in. Oh, and a small summary of what's changed would be appreciated. Let me know. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Jul 19 09:05:26 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 19 Jul 2017 03:05:26 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Okay, I was a little fast on the submit with my last message. I checked with the bug tracker and I can see the sparta related issues to test. Thanks for the fixes and kudos. Your work is very much appreciated! -------------- next part -------------- An HTML attachment was scrubbed... URL: From hnb.code at gmail.com Wed Jul 19 09:11:18 2017 From: hnb.code at gmail.com (Maciej Izak) Date: Wed, 19 Jul 2017 09:11:18 +0200 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: 2017-07-19 9:05 GMT+02:00 Anthony Walter via Lazarus < lazarus at lists.lazarus-ide.org>: > Okay, I was a little fast on the submit with my last message. I checked > with the bug tracker and I can see the sparta related issues to test. > > Thanks for the fixes and kudos. Your work is very much appreciated! > Is to early to say "thanks" ;) we need more tests. For now I know from Juha Manninen that Sparta for Qt under Linux is broken :\ -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Jul 19 09:26:46 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 19 Jul 2017 03:26:46 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: I don't use for qt lcl widget set, but I can test under window, linux gtk2, and mac carbon. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hnb.code at gmail.com Wed Jul 19 09:41:11 2017 From: hnb.code at gmail.com (Maciej Izak) Date: Wed, 19 Jul 2017 09:41:11 +0200 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: 2017-07-19 9:26 GMT+02:00 Anthony Walter via Lazarus < lazarus at lists.lazarus-ide.org>: > I don't use for qt lcl widget set, but I can test under window, linux > gtk2, and mac carbon. > would be great! -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Wed Jul 19 13:01:28 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 19 Jul 2017 14:01:28 +0300 Subject: [Lazarus] MessageBox mb_defbutton1 Message-ID: <0b533bb7-8b0f-5f53-be97-2df4a96e53d1@ya.ru> This must show def-button Retry, as button#1, but shows def-button Cancel. Is it a bug? Linux gtk2 x64 if MsgBox{simple wrapper}(msgCannotSaveFile+#10+FFileName, MB_RETRYCANCEL or MB_ICONERROR or MB_DEFBUTTON1) = .. -- Regards, Alexey From md at delfire.net Wed Jul 19 14:43:02 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Wed, 19 Jul 2017 09:43:02 -0300 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: References: Message-ID: On Tue, Jul 18, 2017 at 11:11 AM, Graeme Geldenhuys via Lazarus wrote: > On 2017-07-18 14:42, Marcos Douglas B. Santos via Lazarus wrote: > > MSEide+MSEgui has such a tool in its MSEUniverse repository. It's a bit > cryptic to use (and no help as always), but once you get the gist of things > (Martin will surely lend a hand explaining things) it works pretty well. Thanks, I'll take a look. > For my own projects I simply have batch scripts that execute automatically > via cron jobs every amount of minutes or hours. The produce XML output > which gets processed by XSLT to generate a HTML page which is automatically > published. I also get a unit test summary email sent to me. The process is > very similar to what I do with the tiOPF project. Take a look at the > /InstallScripts/freebsd/ directory for an example. Oh yeah, I also > use FPTest (a DUnit2 clone but FPC specific) - instead of FPCUnit, but the > latter should be able to do the above (I think). I saw. It's simple and works to tiOPF. I thought in a program to run all tests in all my programs... that is it, I should to create a program, register all project paths and run. How do you get the compiler arguments for each project? Mabe using the XML that Lazarus creates for each program? Best regards, Marcos Douglas From mse00000 at gmail.com Wed Jul 19 14:53:03 2017 From: mse00000 at gmail.com (Martin Schreiber) Date: Wed, 19 Jul 2017 14:53:03 +0200 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: References: Message-ID: <201707191453.03841.mse00000@gmail.com> On Wednesday 19 July 2017 14:43:02 Marcos Douglas B. Santos via Lazarus wrote: > On Tue, Jul 18, 2017 at 11:11 AM, Graeme Geldenhuys via Lazarus > > wrote: > > On 2017-07-18 14:42, Marcos Douglas B. Santos via Lazarus wrote: > > > > MSEide+MSEgui has such a tool in its MSEUniverse repository. It's a bit > > cryptic to use (and no help as always), but once you get the gist of > > things (Martin will surely lend a hand explaining things) it works pretty > > well. > > Thanks, I'll take a look. > Screenshot: http://mseide-msegui.sourceforge.net/pics/mserun.png Binaries: https://sourceforge.net/projects/mseuniverse/files/mserun/ Source: https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun Martin From nc-gaertnma at netcologne.de Wed Jul 19 14:59:58 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 19 Jul 2017 14:59:58 +0200 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: References: Message-ID: <20170719145958.0be18308@limapholos.matflo.wg> On Wed, 19 Jul 2017 09:43:02 -0300 "Marcos Douglas B. Santos via Lazarus" wrote: >[...] > How do you get the compiler arguments for each project? Mabe using the > XML that Lazarus creates for each program? You can either compile each project using lazbuild, or you can fetch the options from the produced .compiled file (xml format). Mattias From md at delfire.net Wed Jul 19 15:08:55 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Wed, 19 Jul 2017 10:08:55 -0300 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: <201707191453.03841.mse00000@gmail.com> References: <201707191453.03841.mse00000@gmail.com> Message-ID: On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus wrote: > > Screenshot: > http://mseide-msegui.sourceforge.net/pics/mserun.png > Binaries: > https://sourceforge.net/projects/mseuniverse/files/mserun/ > Source: > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun Hi Martin, It looks like it's about Git, not about testing... right? Marcos Douglas From juha.manninen62 at gmail.com Wed Jul 19 15:10:57 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 19 Jul 2017 16:10:57 +0300 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: On Wed, Jul 19, 2017 at 10:11 AM, Maciej Izak via Lazarus wrote: > For now I know from Juha Manninen that > Sparta for Qt under Linux is broken :\ I tested a little more. Sparta form designer is broken for both GTK2 and QT. I used FPC trunk but I guess it makes no difference. Manjaro Linux + KDE. With an empty form the designer just does nothing. It does not react to mouse clicks even when a component from palette is selected. The component remains selected in palette. Then I tested with a form with many components. With GTK2 the designer stays empty. The IDE still works otherwise. With QT the IDE freezes. An empty editor shows an hourglass. The process must be killed. What more, testing an empty form with QT, the designer shows up initially when Lazarus starts. Normally the editor is shown initially. I remember a similar bug was fixed a long time ago (> a year). Juha From md at delfire.net Wed Jul 19 15:23:16 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Wed, 19 Jul 2017 10:23:16 -0300 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: <20170719145958.0be18308@limapholos.matflo.wg> References: <20170719145958.0be18308@limapholos.matflo.wg> Message-ID: On Wed, Jul 19, 2017 at 9:59 AM, Mattias Gaertner via Lazarus wrote: > On Wed, 19 Jul 2017 09:43:02 -0300 > "Marcos Douglas B. Santos via Lazarus" > wrote: > >>[...] >> How do you get the compiler arguments for each project? Mabe using the >> XML that Lazarus creates for each program? > > You can either compile each project using lazbuild, or you can fetch > the options from the produced .compiled file (xml format). OMG, that is it. I didn't think in that possibility. Using lazbuild is better because it's smart enough to automatically compiles required packages. But I only use lazbuild to build the IDE. I've took a look in this page http://wiki.lazarus.freepascal.org/lazbuild and I haven't found an argument related to the project file (lpi or lpr). Can I just do that? (sorry, I'm not with my Lazarus environment now to test) lazbuild [options] /path/myproject.lpi Regards, Marcos Douglas PS. This is really cool too "--build-mode" and will make my life easier. Thanks From nc-gaertnma at netcologne.de Wed Jul 19 15:26:20 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 19 Jul 2017 15:26:20 +0200 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: References: <20170719145958.0be18308@limapholos.matflo.wg> Message-ID: <20170719152620.5b7cf0da@limapholos.matflo.wg> On Wed, 19 Jul 2017 10:23:16 -0300 "Marcos Douglas B. Santos via Lazarus" wrote: >[...] > But I only use lazbuild to build the IDE. I've took a look in this > page http://wiki.lazarus.freepascal.org/lazbuild and I haven't found > an argument related to the project file (lpi or lpr). See Synopsis and Description. > Can I just do that? > (sorry, I'm not with my Lazarus environment now to test) > lazbuild [options] /path/myproject.lpi Yes. > This is really cool too "--build-mode" and will make my life easier. Thanks You are welcome. Mattias From list2010 at BrenemanLabs.com Wed Jul 19 15:31:58 2017 From: list2010 at BrenemanLabs.com (Paul Breneman) Date: Wed, 19 Jul 2017 09:31:58 -0400 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: References: <201707191453.03841.mse00000@gmail.com> Message-ID: On 07/19/2017 09:08 AM, Marcos Douglas B. Santos via Lazarus wrote: > On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus > wrote: >> >> Screenshot: >> http://mseide-msegui.sourceforge.net/pics/mserun.png >> Binaries: >> https://sourceforge.net/projects/mseuniverse/files/mserun/ >> Source: >> https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun > > Hi Martin, > It looks like it's about Git, not about testing... right? > > Marcos Douglas > Sourceforge displays the latest file (msegit*) but if you look at the mserun folders all of the mserun* files are there. From mse00000 at gmail.com Wed Jul 19 15:32:44 2017 From: mse00000 at gmail.com (Martin Schreiber) Date: Wed, 19 Jul 2017 15:32:44 +0200 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: References: <201707191453.03841.mse00000@gmail.com> Message-ID: <201707191532.44933.mse00000@gmail.com> On Wednesday 19 July 2017 15:08:55 Marcos Douglas B. Santos via Lazarus wrote: > On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus > > wrote: > > Screenshot: > > http://mseide-msegui.sourceforge.net/pics/mserun.png > > Binaries: > > https://sourceforge.net/projects/mseuniverse/files/mserun/ > > Source: > > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun > > Hi Martin, > It looks like it's about Git, not about testing... right? > Why do you think so? The screenshot shows the unittests of MSElang. Another screenshot which shows the run to create MSE* releases. http://mseide-msegui.sourceforge.net/pics/mserun1.png Martin From md at delfire.net Wed Jul 19 15:50:05 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Wed, 19 Jul 2017 10:50:05 -0300 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: <201707191532.44933.mse00000@gmail.com> References: <201707191453.03841.mse00000@gmail.com> <201707191532.44933.mse00000@gmail.com> Message-ID: On Wed, Jul 19, 2017 at 10:32 AM, Martin Schreiber via Lazarus wrote: > On Wednesday 19 July 2017 15:08:55 Marcos Douglas B. Santos via Lazarus wrote: >> On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus >> >> Hi Martin, >> It looks like it's about Git, not about testing... right? >> > Why do you think so? The screenshot shows the unittests of MSElang. > Another screenshot which shows the run to create MSE* releases. > http://mseide-msegui.sourceforge.net/pics/mserun1.png Hmm... sorry, my fault. Martin (and Paul Breneman), I will get the sources and take a look more closer. Regards, Marcos Douglas From pdigonzelli at softsargentina.com Wed Jul 19 15:56:36 2017 From: pdigonzelli at softsargentina.com (pdigonzelli-softs) Date: Wed, 19 Jul 2017 10:56:36 -0300 Subject: [Lazarus] Running Unit tests for all projects In-Reply-To: <201707191532.44933.mse00000@gmail.com> References: <201707191453.03841.mse00000@gmail.com> <201707191532.44933.mse00000@gmail.com> Message-ID: <8f108865-2f58-2139-3dec-df68fb4509f1@softsargentina.com> unsubscribe El 19/07/17 a las 10:32, Martin Schreiber via Lazarus escribió: > On Wednesday 19 July 2017 15:08:55 Marcos Douglas B. Santos via Lazarus wrote: >> On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus >> >> wrote: >>> Screenshot: >>> http://mseide-msegui.sourceforge.net/pics/mserun.png >>> Binaries: >>> https://sourceforge.net/projects/mseuniverse/files/mserun/ >>> Source: >>> https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun >> Hi Martin, >> It looks like it's about Git, not about testing... right? >> > Why do you think so? The screenshot shows the unittests of MSElang. > Another screenshot which shows the run to create MSE* releases. > http://mseide-msegui.sourceforge.net/pics/mserun1.png > > Martin -- *Ing. Pablo Digonzelli* Software Solutions IP-Solutiones SRL 25 de Mayo 521 Email: pdigonzelli at softsargentina.com pdigonzelli at gmail.com Cel: 543815982714 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Jul 19 16:09:39 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 19 Jul 2017 10:09:39 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: I tested on windows a few hours ago and noticed a few things. The biggest problem is that even without sparta installed, inherited forms is no longer working in trunk revisions. In fact when I try to register and then create an inherited form using the "File > New..." dialog, the lazarus IDE crashes. I am using code which worked on lazarus a few months back. I will investigate further before filing a bug. Also, on windows the sparta form design on resize shows the color green in any area that is freshly revealed. I assume that was left in there for testing reasons and is not some strange unexpected behavior. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Wed Jul 19 18:10:04 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 19 Jul 2017 19:10:04 +0300 Subject: [Lazarus] pmNotXor on Carbon Message-ID: <146fd8a2-470e-9d28-b772-8fdc7cb00810@ya.ru> Dmitry, can you see, pls, how to add the same on Cocoa WS. Maybe easy... -- Regards, Alexey From skalogryz.lists at gmail.com Wed Jul 19 19:18:19 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Wed, 19 Jul 2017 13:18:19 -0400 Subject: [Lazarus] pmNotXor on Carbon In-Reply-To: <146fd8a2-470e-9d28-b772-8fdc7cb00810@ya.ru> References: <146fd8a2-470e-9d28-b772-8fdc7cb00810@ya.ru> Message-ID: 2017-07-19 12:10 GMT-04:00 Alexey via Lazarus : > Dmitry, can you see, pls, how to add the same on Cocoa WS. Maybe easy... Should be similar. I'll take a look later today. Are testing it with (cocoa) Lazarus itself? -------------- next part -------------- An HTML attachment was scrubbed... URL: From acardenas at bsd-peru.org Thu Jul 20 01:12:30 2017 From: acardenas at bsd-peru.org (=?UTF-8?Q?Alonso_C=C3=A1rdenas_M=C3=A1rquez?=) Date: Wed, 19 Jul 2017 18:12:30 -0500 Subject: [Lazarus] lazbuild and package output dirirectory Message-ID: Hi I'm maintainer of fpc and lazarus on FreeBSD and I have added some lazarus apps to ports tree (peazip and transmision-remote-gui for example), but I'm having some problems when an app needs some packages not compiled by default with lazarus (editors/lazarus is compiled like BIGIDE on FreeBSD). Currently, I'm using lazbuild -d to compile lazarus apps. If I remove -d parameter, lazbuild will compile missing package from lazarus source code (source code is part of editor/lazarus port). The main problem is that outputdir of these packages always is created into --lazarusdir. It break some ports rules because it'll create files out of working directory. How can I define output directory of missing packages? I want that missing package output directory will be create into current working directory and it doesn't touch lazarusdir directory (similar way like when lazarusdir is not writable. It create output directory to home directory). I was looking into lazbuild source code to try add a new option but I read that touch lazbuild is not a good idea. Maybe It could be defined into *.lpi file. Any idea about it? Greetings ACM -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Thu Jul 20 03:22:38 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 19 Jul 2017 21:22:38 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Okay I've tested on windows it it works great, but not at all on gtk2 linux. I created a test project for inherited forms, because it might not be so straight forward for some of you test. I attached the test project to issue 29615 Here is a page with a video screen capture of the docked form designer working with inherited forms on windows: https://www.getlazarus.org/videos/dockedform/ Browsable sources at: https://github.com/sysrpl/dockedform Unfortunately I think the sparta docked form editor is currently not working on all other platforms. Here is a link to the original issue with its status reverted back to "assigned". https://bugs.freepascal.org/view.php?id=29615 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Thu Jul 20 03:32:19 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 19 Jul 2017 21:32:19 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: If it wasn't clear, here are the EXAMPLE units which define and register an inheritable form. Example note form: https://github.com/sysrpl/dockedform/blob/master/docknotefrm.pas The logic of the registration code: https://github.com/sysrpl/dockedform/blob/master/dockerformdesign.pas Usage: procedure Register; begin RegisterForm(TDockNoteForm, 'Note Form', 'A form to take notes', 'DockNoteFrm'); end; -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Thu Jul 20 03:44:21 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Wed, 19 Jul 2017 21:44:21 -0400 Subject: [Lazarus] pmNotXor on Carbon In-Reply-To: <146fd8a2-470e-9d28-b772-8fdc7cb00810@ya.ru> References: <146fd8a2-470e-9d28-b772-8fdc7cb00810@ya.ru> Message-ID: 2017-07-19 12:10 GMT-04:00 Alexey via Lazarus : > Dmitry, can you see, pls, how to add the same on Cocoa WS. Maybe easy... Done. r55543 Same approach as carbon. I'd call it "good enough". -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Thu Jul 20 07:57:01 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 20 Jul 2017 01:57:01 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Okay I tested on OSX. The sparta docked form designer mostly works. Notable problems on OSX are: 1) Forms appear at runtime without a border. This can be fixed by setting the BorderStyle at runtime to bsSingle or bsSizeable. Note setting the BorderStyle at design time causes the border to be disabled at runtime, meaning buttons in the caption area are disabled and do not respond to mouse events. 2) Forms are green. I searched the sparta forms files and found the clGreen used as the color of a few items. I switched them to clBtnFace and the look normal again. I assume the green color is/was for testing. It's no problem to fix. 3) Not much of a big deal, but resizing the designer seems a bit laggy, especially when you release the mouse. It takes a second for the designer to refresh when this happens. again not a big deal but it would be nice if it felt a bit snappier. Related, on OSX the cursor crSizeNWSE doesn't exist and instead reverts to crSizeWE. I suggest using an ${ifdef darwin} and revert to the four directional arrow crSizeAll when sizing from the lower right corner in unit: ./mdi/source/sparta_basicresizeframe.pas Other than that, it looks good on both OSX and Windows. Let me know if you want my OSX patches. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Thu Jul 20 09:11:19 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 20 Jul 2017 03:11:19 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: New issue related to sparta on all platforms: https://bugs.freepascal.org/view.php?id=32170 Deleting TMainMenu crashes Lazarus. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Thu Jul 20 11:57:16 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 20 Jul 2017 12:57:16 +0300 Subject: [Lazarus] MenuItem's new methods Message-ID: Ondrej, thanks for adding this. Pls tell: is it possible to make MenuItems themes (application wide in all menus, or MainMenu)? this needs global OnDrawItem which will be used by LCL. Can you add it? -- Regards, AlexeyT From lazarus at kluug.net Thu Jul 20 12:02:09 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 20 Jul 2017 12:02:09 +0200 Subject: [Lazarus] MenuItem's new methods In-Reply-To: References: Message-ID: On 20.07.2017 11:57, Alexey via Lazarus wrote: > Pls tell: is it possible to make MenuItems themes (application wide in > all menus, or MainMenu)? this needs global OnDrawItem which will be > used by LCL. Can you add it? For this you have the methods in TPopupMenu/TMainMenu. You should be able to link your global events there. Ondrej From marcov at stack.nl Thu Jul 20 13:04:23 2017 From: marcov at stack.nl (Marco van de Voort) Date: Thu, 20 Jul 2017 13:04:23 +0200 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> Message-ID: <20170720110423.GA35557@stack.nl> On Thu, Jul 13, 2017 at 01:11:32AM +0100, Graeme Geldenhuys via Lazarus wrote: > [rant on] > > My issues with Delphi IDE in the last two weeks: > > - Error Insight (red squiggles for Unknown Identifiers) is horribly > broken. My code editor looks as if my 1 year old drew with a red > marker all over the screen! More sad news - the IDE Product Manager > of Delphi told me personally that the latest Delphi version is > better, but there are still many false positives. Oh dear. My experience is the other way. Delphi (XE10) here, updates it live, while lazarus needs a recompile. > - Delphi IDE is so SLOW to start up, and I'm running a beefy Intel i7 > with 32GB RAM. > - No editor option to switch off "cursor past end of line" feature. My biggest beef with Delphi is that it is confused by having ..\xxxx paths in the search paths. They are interpreted as relative to the local directory, not to the project. If you switch such projects with e.g. "recent files" strange things may happen, but if you navigate with to the .dproj with file->open project, then everything is ok (since that sets the current dir for the Delphi application apparently) This is an issue in D7, and still is in XE10 rainy city. From aaa5500 at ya.ru Thu Jul 20 13:07:37 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 20 Jul 2017 14:07:37 +0300 Subject: [Lazarus] MenuItem's new methods In-Reply-To: References: Message-ID: <42bcb9df-9d8c-753d-e691-42a112e1349b@ya.ru> > For this you have the methods in TPopupMenu/TMainMenu. You should be > able to link your global events there. Change of each PopupMenu +MainMenu is not nice: theming of all menus at once in nicer, global option. If app does theme for main menu, why not to change other popupmenus. -- Regards, Alexey From mailinglists at geldenhuys.co.uk Thu Jul 20 13:33:17 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 20 Jul 2017 12:33:17 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <20170720110423.GA35557@stack.nl> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> Message-ID: <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> On 2017-07-20 12:04, Marco van de Voort via Lazarus wrote: >> - Error Insight (red squiggles for Unknown Identifiers) is horribly >> broken. My code editor looks as if my 1 year old drew with a red ...snip... > > My experience is the other way. Delphi (XE10) here, updates it live, > while lazarus needs a recompile. I would rather take _accurate information_ that all the false positives that Delphi gives. > My biggest beef with Delphi is that it is confused by having ..\xxxx paths > in the search paths. They are interpreted as relative to the local Yeah, I noticed that one too. And more.... * Code navigation is disable when you are debugging!! WTF is the point of that! * Code navigation via keyboard shortcuts (eg: Alt+) sometimes take you to the strangest places in code - not where I was before. * Refactoring: renaming identifiers - eg: a class name, doesn't update the comment markers for classes - so they will still have the old name, but the actual class name is updated. Little inconsistencies. * Code Completion can't update changed parameters like Lazarus can. I didn't realize until now how often I rely on this when using Lazarus. * Class Completion on overridden methods generate "inherited;" instead of "inherited ;". So with that omission, I can't code navigate (eg: Ctrl+LClick) to the parent [inherited] method. * No support for global editor bookmarks. Ctrl+ only works for the current file. You can't have a bookmark in two or more files and think you can jump between them! Wow, with every day I'm using Delphi this list of annoyances or bugs are growing fast. And EMBT thinks they can still justify the HUGE price tag?? What are Delphi Developers actually paying for? They should vote with their wallet and stop upgrading until EMBT actually starts fixing things. So I'll reiterate.... Job well done to the FPC, Lazarus and MSEide teams! You guys go far beyond what a commercial company can produce. Regards, Graeme From lazarus at kluug.net Thu Jul 20 13:39:34 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 20 Jul 2017 13:39:34 +0200 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> Message-ID: <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> On 20.07.2017 13:33, Graeme Geldenhuys via Lazarus wrote: > And EMBT thinks they can still justify the HUGE price tag?? What are > Delphi Developers actually paying for? They should vote with their > wallet and stop upgrading until EMBT actually starts fixing things. > > So I'll reiterate.... Job well done to the FPC, Lazarus and MSEide > teams! You guys go far beyond what a commercial company can produce. IMO we should give the Lazarus foundation more importance/advertisement. I was already told by a 3rd party company that they ported their applications to Lazarus and would like to pay monthly for keeping the project going. Ondrej From michael at freepascal.org Thu Jul 20 14:13:47 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 20 Jul 2017 14:13:47 +0200 (CEST) Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> Message-ID: On Thu, 20 Jul 2017, Ondrej Pokorny via Lazarus wrote: > On 20.07.2017 13:33, Graeme Geldenhuys via Lazarus wrote: >> And EMBT thinks they can still justify the HUGE price tag?? What are >> Delphi Developers actually paying for? They should vote with their >> wallet and stop upgrading until EMBT actually starts fixing things. >> >> So I'll reiterate.... Job well done to the FPC, Lazarus and MSEide >> teams! You guys go far beyond what a commercial company can produce. > > IMO we should give the Lazarus foundation more importance/advertisement. I'm definitely open for suggestions on this. Michael. From mailinglists at geldenhuys.co.uk Thu Jul 20 14:29:43 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 20 Jul 2017 13:29:43 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> Message-ID: <3de283ed-0b50-f7d8-b957-6f3894b3ce01@geldenhuys.co.uk> On 2017-07-20 12:39, Ondrej Pokorny via Lazarus wrote: > IMO we should give the Lazarus foundation more importance/advertisement. Definitely! Regards, Graeme From mailinglists at geldenhuys.co.uk Thu Jul 20 14:43:42 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 20 Jul 2017 13:43:42 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> Message-ID: <7ae456ca-d549-50b1-9ff5-0718c68ceaf4@geldenhuys.co.uk> On 2017-07-20 12:33, Graeme Geldenhuys via Lazarus wrote: > And more.... ;-) [ I promise this will be the last] * With Delphi, "deprecated" is not allowed on Properties. * Delphi doesn't support user defined compiler hints and warnings like {$warning This is a user-defined warning} Regards, Graeme From aaa5500 at ya.ru Thu Jul 20 15:28:04 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 20 Jul 2017 16:28:04 +0300 Subject: [Lazarus] pmXor pen mode on Mac Message-ID: Dmitry, i searched for pmXor and i see it's not implemented on Mac too? And it's used in Grids, 3 matches. +Search for "pmXor" in "/home/user/lazarus/lcl" (7 matches in 4 files) : #7 : #2 <(162)>: pmXor = FPCanvas.pmXor; <(162)>: pmXor = FPCanvas.pmXor; : #3 <(3171)>: Canvas.Pen.Mode := pmXOR; <(3186)>: Canvas.Pen.Mode := pmXOR; <(10285)>: Canvas.Pen.Mode := pmXOR; : #1 : #1 : #1 <(1005)>: pmXor: cairo_set_operator(Widget, CAIRO_OPERATOR_XOR); : #1 : #1 <(221)>: {pmXor } R2_XORPEN, -- Regards, Alexey From pascaldragon at googlemail.com Thu Jul 20 15:41:21 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Thu, 20 Jul 2017 15:41:21 +0200 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> Message-ID: Am 20.07.2017 13:33 schrieb "Graeme Geldenhuys via Lazarus" < lazarus at lists.lazarus-ide.org>: > * Code navigation is disable when you are debugging!! WTF is the point > of that! Delphi had always been a fancy text editor when debugging and probably always will be :P Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Thu Jul 20 15:42:58 2017 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Thu, 20 Jul 2017 09:42:58 -0400 Subject: [Lazarus] pmXor pen mode on Mac In-Reply-To: References: Message-ID: On Thu, Jul 20, 2017 at 9:28 AM, Alexey via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Dmitry, i searched for pmXor and i see it's not implemented on Mac too? > No, it's not implemented for sure for either Cocoa or Carbon. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Thu Jul 20 15:47:38 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Thu, 20 Jul 2017 15:47:38 +0200 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <7ae456ca-d549-50b1-9ff5-0718c68ceaf4@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> <7ae456ca-d549-50b1-9ff5-0718c68ceaf4@geldenhuys.co.uk> Message-ID: Am 20.07.2017 14:44 schrieb "Graeme Geldenhuys via Lazarus" < lazarus at lists.lazarus-ide.org>: > > On 2017-07-20 12:33, Graeme Geldenhuys via Lazarus wrote: >> >> And more.... > > > ;-) > > [ I promise this will be the last] > > > * With Delphi, "deprecated" is not allowed on Properties. > > * Delphi doesn't support user defined compiler hints and warnings > like {$warning This is a user-defined warning} > The syntax in Delphi is "{$message [hint¦error¦warn¦fatal] 'text'}" which is also supported by FPC. See also: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirsmessagedirective_xml.html Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Jul 20 15:54:17 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 20 Jul 2017 14:54:17 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> Message-ID: On 2017-07-20 14:41, Sven Barth via Lazarus wrote: > Delphi had always been a fancy text editor when debugging and probably > always will be :P I'm just shocked at how behind Delphi has become. FPC and Lazarus are so far ahead in language features, target platforms, IDE features - they have simply made Delphi obsolete. EMBT keeps buying other companies or products and adding more junk into Delphi - instead of fixing what is already there (basic IDE and language features). They should take a page out of Canonical's playbook - remember the Ubuntu One Hundred Papercuts initiative. All FPC and Lazarus needs is better marketing for commercial entities. Also trying to include FPC and Lazarus as standard in the RPi Linux disto would also help kick-start its popularity. Regards, Graeme From mailinglists at geldenhuys.co.uk Thu Jul 20 15:56:26 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 20 Jul 2017 14:56:26 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> <7ae456ca-d549-50b1-9ff5-0718c68ceaf4@geldenhuys.co.uk> Message-ID: <6dc6c636-a47e-0944-46d7-33035e04ec56@geldenhuys.co.uk> On 2017-07-20 14:47, Sven Barth via Lazarus wrote: > The syntax in Delphi is "{$message [hint¦error¦warn¦fatal] 'text'}" which > is also supported by FPC. Thanks Sven - literally 2 minutes ago I got notified via Google+ about that directive. Regards, Graeme From petr at petrhlozek.cz Thu Jul 20 16:20:11 2017 From: petr at petrhlozek.cz (=?UTF-8?B?UGV0ciBIbG/FvmVr?=) Date: Thu, 20 Jul 2017 16:20:11 +0200 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> Message-ID: 2017-07-20 15:54 GMT+02:00 Graeme Geldenhuys via Lazarus : > I'm just shocked at how behind Delphi has become. FPC and Lazarus are so far > ahead in language features, target platforms, IDE features - they have > simply made Delphi obsolete. EMBT keeps buying other companies or products > and adding more junk into Delphi - instead of fixing what is already there > (basic IDE and language features). They should take a page out of > Canonical's playbook - remember the Ubuntu One Hundred Papercuts initiative. You are right! Right now I'm working on project with over 1M lines of source code and code completion is so slow! Even Ctrl+Click navigation doesn't work, it jumps always to nonsense place. If I try to write something, I still see blue circle indicating Delphi is thinking... . Horrible experience. Core i5 with 16GB RAM and SSD disk. Also tons of lines with red mark etc. BTW Yesterday created packages of fpc 3.0.2 and Lazarus 1.6.4 for Ubuntu 16.04 and 16.10. After 1.8 is released, I'll create packages as well. https://launchpad.net/~ok2cqr/+archive/ubuntu/lazarus Petr -- web: https://petrhlozek.cz email: petr at petrhlozek.cz From mailinglists at geldenhuys.co.uk Thu Jul 20 16:31:34 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 20 Jul 2017 15:31:34 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> Message-ID: On 2017-07-20 15:20, Petr Hložek via Lazarus wrote: > Even Ctrl+Click navigation > doesn't work, it jumps always to nonsense place. Yeah, I get that all the time. I'm now using GExpert's add-on for its "procedure list" and "grep search" features to get more accurate code navigation in Delphi. > Horrible experience. Core i5 with 16GB RAM and SSD disk. Also tons of > lines with red mark etc. I wonder if Lazarus IDE could use the Delphi dcc.exe command line compiler? I guess not because the compiler settings are so different, and Lazarus hides all those behind a GUI dialog. One might have better luck using MSEide with dcc.exe because MSEide allows for much more versatile compiler parameter configuration (nothing hidden behind a GUI dialog). Umm, maybe something to try over the weekend. Regards, Graeme From nc-gaertnma at netcologne.de Thu Jul 20 16:58:50 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 20 Jul 2017 16:58:50 +0200 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> Message-ID: <20170720165850.19cad22a@limapholos.matflo.wg> On Thu, 20 Jul 2017 15:31:34 +0100 Graeme Geldenhuys via Lazarus wrote: >[...] > I wonder if Lazarus IDE could use the Delphi dcc.exe command line > compiler? It can call it. For example as "execute before". When dcc uses the same format "filename(line,column) message" the IDE will jump to notes and errors. The FPC command line parameters are different. You have to pass the parameters by yourself. Some IDE macros might help, like the $Proj* macros. The IDE does not have a parser for the output. So it cannot fetch the defines needed for parsing. You can use the Tools / Codetools defines editor to set them. Quickfixes might not recognize the message. Mattias From juha.manninen62 at gmail.com Thu Jul 20 17:01:07 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 20 Jul 2017 18:01:07 +0300 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> Message-ID: On Thu, Jul 20, 2017 at 2:39 PM, Ondrej Pokorny via Lazarus wrote: > IMO we should give the Lazarus foundation more importance/advertisement. It should be the other way around. The foundation should advertise the project it is associated with. That is what foundations do with other projects. Sometimes advertising requires money and the donations become handy. So far the foundation has funded development of Pascal-Javascript converter. There is no effort for PR or public visibility. I did not get any answer from foundation members in Google+ forum about this issue. I still hope the PR work will come at some point. Juha From michael at freepascal.org Thu Jul 20 17:09:04 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 20 Jul 2017 17:09:04 +0200 (CEST) Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> Message-ID: On Thu, 20 Jul 2017, Juha Manninen via Lazarus wrote: > On Thu, Jul 20, 2017 at 2:39 PM, Ondrej Pokorny via Lazarus > wrote: >> IMO we should give the Lazarus foundation more importance/advertisement. > > It should be the other way around. The foundation should advertise the > project it is associated with. It works both ways, actually. > That is what foundations do with other projects. > Sometimes advertising requires money and the donations become handy. > So far the foundation has funded development of Pascal-Javascript converter. > There is no effort for PR or public visibility. > I did not get any answer from foundation members in Google+ forum > about this issue. Quite possible. I am not on the forum. > I still hope the PR work will come at some point. As said, I am open for suggestions. Michael. From juha.manninen62 at gmail.com Thu Jul 20 20:05:24 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 20 Jul 2017 21:05:24 +0300 Subject: [Lazarus] Jumping between files in debugger Message-ID: I simplifiled the code dealing with debugged file names in r55545. Originally a bug related to symlinks was fixed: https://bugs.freepascal.org/view.php?id=31577 but the fix was more complex than necessary. Now it is simpler. Please test everybody. Everything related to debugging should work as before. Martin, what do you say about the changes? I wanted to write this here to get more testers. I also noticed code that is never called on Linux. I added an exception for testing but reverted it soon because the code was called on Windows. Why only Windows, I have no idea. Juha From hnb.code at gmail.com Thu Jul 20 20:56:55 2017 From: hnb.code at gmail.com (Maciej Izak) Date: Thu, 20 Jul 2017 20:56:55 +0200 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: 2017-07-19 16:09 GMT+02:00 Anthony Walter via Lazarus < lazarus at lists.lazarus-ide.org>: > > Also, on windows the sparta form design on resize shows the color green in > any area that is freshly revealed. I assume that was left in there for > testing reasons and is not some strange unexpected behavior. > This one is a part of new non finished yet feature :). Thanks for many info - very valuable info. I will try to fix few problems in weekend. -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Thu Jul 20 23:51:23 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 20 Jul 2017 17:51:23 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Maciej, Thanks for the work on this. I fixed a few problems on OSX (I haven't send patches) and it's working great other than that TMainMenu. I will put together a few actually useful forms that can registered, just to demonstrate how and why anyone might use them. Maybe I'll sumbit them to bug tracker and they can be included in either packages or examples. Also, I further generalized a RegisterForm procedure and think it should be added to the IDEIntf. To that end I created this routine. procedure RegisterForm(const Package: string; FormClass: TCustomFormClass; const Category, Caption, Description, Units: string); Issue with patch: https://bugs.freepascal.org/view.php?id=32182 -------------- next part -------------- An HTML attachment was scrubbed... URL: From el.es.cr at gmail.com Fri Jul 21 10:25:35 2017 From: el.es.cr at gmail.com (el_es) Date: Fri, 21 Jul 2017 09:25:35 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <20170720110423.GA35557@stack.nl> <0c672721-80bf-eba6-289b-30adaf1a46a4@geldenhuys.co.uk> <746f20d9-c509-7624-d772-f1231b7c4bf6@kluug.net> Message-ID: On 20/07/17 16:09, Michael Van Canneyt via Lazarus wrote: > > > On Thu, 20 Jul 2017, Juha Manninen via Lazarus wrote: > >> On Thu, Jul 20, 2017 at 2:39 PM, Ondrej Pokorny via Lazarus >> wrote: >>> IMO we should give the Lazarus foundation more importance/advertisement. >> >> It should be the other way around. The foundation should advertise the >> project it is associated with. > > It works both ways, actually. > >> That is what foundations do with other projects. >> Sometimes advertising requires money and the donations become handy. >> So far the foundation has funded development of Pascal-Javascript converter. >> There is no effort for PR or public visibility. >> I did not get any answer from foundation members in Google+ forum >> about this issue. > > Quite possible. I am not on the forum. > >> I still hope the PR work will come at some point. > > As said, I am open for suggestions. > > Michael. At times I took to send the announcements of new versions of FPC and/or Lazarus to lwn.net a couple of times - maybe the Foundation could take to increase FPC's and Lazarus's visibility over there? Note there is a lot of bias there, towards mostly c-likes and their compilers (and java, perl, python, haskell, rust, and other obscure langi used by 2 people in the world, /s ) (after all, the staple of that site is still Linux Kernel and 'Desktop Systems' development) OTOH it is read by professionals - also ones who still may be thinking, that Pascal is stuck in the 90's - maybe it's time to start proving them wrong ? To some people out there, it would be like a Whole New World ... They could easily ignore me, puny human that I am (not even a subscriber, just enjoying reading LWN)... They shan't ignore you that easy, as you're a proper Foundation :) -L. From sysrpl at gmail.com Fri Jul 21 16:11:03 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 21 Jul 2017 10:11:03 -0400 Subject: [Lazarus] Class type to package name? Message-ID: I am moving this discussion to the lazarus list. Mattias, okay thanks for adding FindInstalledPackageWithUnit t PackageIntf. I'll check out the latest from svn and test. I am going to be creating a few more "interesting" forms as examples of reusable forms registered with the lazarus ide. After I make adjustments to the code in issue #32182, based on your edit to PackageIntf, what are the odds of including RegisterForm in ProjectIntf? I will follow up with a few custom forms. I'll record a brief video of them to summarize what they do/how they work. Hopefully if people here are receptive they might be included in either the components or examples folder with Lazarus. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Fri Jul 21 19:16:55 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 21 Jul 2017 19:16:55 +0200 (CEST) Subject: [Lazarus] TStringStream changes Message-ID: Hello, TStringStream now observes encoding, following the fix for: https://bugs.freepascal.org/view.php?id=30508 Basically, this is a Delphi compatibility fix. This may impact some programs which use encodings that deviate from the default system encoding. In that case, the solution is to cast your string to RawByteString in the constructor, or explicitly specify an encoding. If you want to avoid encoding problems, using a TBytesStream may be a better idea. Michael. From acardenas at bsd-peru.org Fri Jul 21 20:09:33 2017 From: acardenas at bsd-peru.org (=?UTF-8?Q?Alonso_C=C3=A1rdenas_M=C3=A1rquez?=) Date: Fri, 21 Jul 2017 13:09:33 -0500 Subject: [Lazarus] lazbuild and package output dirirectory In-Reply-To: References: Message-ID: 2017-07-19 18:12 GMT-05:00 Alonso Cárdenas Márquez : > Hi > > I'm maintainer of fpc and lazarus on FreeBSD and I have added some lazarus > apps to ports tree (peazip and transmision-remote-gui for example), but I'm > having some problems when an app needs some packages not compiled by > default with lazarus (editors/lazarus is compiled like BIGIDE on FreeBSD). > > Currently, I'm using lazbuild -d to compile lazarus apps. If I remove -d > parameter, lazbuild will compile missing package from lazarus source code > (source code is part of editor/lazarus port). > > The main problem is that outputdir of these packages always is created > into --lazarusdir. It break some ports rules because it'll create files out > of working directory. > > How can I define output directory of missing packages? I want that missing > package output directory will be create into current working directory and > it doesn't touch lazarusdir directory (similar way like when lazarusdir is > not writable. It create output directory to home directory). I was looking > into lazbuild source code to try add a new option but I read that touch > lazbuild is not a good idea. Maybe It could be defined into *.lpi file. Any > idea about it? > > Greetings > ACM > Forget it. I found the way to do that Greetings ACM -------------- next part -------------- An HTML attachment was scrubbed... URL: From fjf.vanleeuwen at quicknet.nl Sat Jul 22 19:00:08 2017 From: fjf.vanleeuwen at quicknet.nl (frans) Date: Sat, 22 Jul 2017 19:00:08 +0200 Subject: [Lazarus] Webbrowser using AxtiveXContainer: heap problem Message-ID: <92acc9f3-3637-4490-7b69-7e15ec978802@quicknet.nl> Hi. I'm testing the use of a webbrowser for my helppages, using the ActiveXContainer. The example of early binding I found on http://wiki.freepascal.org/LazActiveX. It works, but when I'm using -gh while compiling I get an error and a memory leak. Heap dump by heaptrc unit 1963 memory blocks allocated : 398794/402216 1959 memory blocks freed : 397666/401088 4 unfreed memory blocks : 1128 True heap size : 557056 True free heap : 555136 Should be : 555416 Call trace for block $0000000001585410 size 40 $00000001000111DB $0000000100017072 $000000010001717C $00007FFEA6D9A07D $00007FFEA6D09C58 $00007FFEA6D990FE $000000010018E1D3 Call trace for block $00000000014F9560 size 128 $0000000100018AB6 $00000001000111BB $0000000100016DE7 $0000000100017056 $000000010001717C $00007FFEA6D9A07D $00007FFEA6D09C58 Call trace for block $0000000001569670 size 176 $0000000100011102 $000000010000E247 $000000010003858A $000000010003B9AC $0000000100017027 $000000010001717C $00007FFEA6D9A07D Call trace for block $0000000001518320 size 784 $0000000100011102 $000000010000E247 $000000010018CDD2 line 3386 of shdocvw_1_1_tlb.pas $000000010002EDA7 line 45 of unit2.pas $0000000100020951 line 928 of include/customform.inc $000000010001EAE5 line 149 of include/customform.inc $00000001000259E7 line 3080 of include/customform.inc $F0F0F0F0F0F0F0F0 I cannot figure out where this problem can be solved. I've tried late binding (with VLC) and early binding (webrowser Internet Explorer), both have a memory leak. Ok, it's a small leak, but still a leak. Is this normal? Frans van Leeuwen M 06-51695390 --- Deze e-mail is gecontroleerd op virussen door AVG. http://www.avg.com From michael at freepascal.org Sun Jul 23 12:50:44 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Jul 2017 12:50:44 +0200 (CEST) Subject: [Lazarus] Breaking change Message-ID: Hello, I have fixed bug 28760: https://bugs.freepascal.org/view.php?id=28760 This will cause compilation of win32wsdialogs.pp to fail, in particular in class procedure TWin32WSOpenDialog.SetupVistaFileDialog(ADialog: IFileDialog; const AOpenDialog: TOpenDialog); search for: if InitialDir <> '' then begin if Succeeded(SHCreateItemFromParsingName(PWideChar(UTF8ToUTF16(InitialDir)), nil, IShellItem, DefaultFolderItem)) then ADialog.SetFolder(DefaultFolderItem); end; Directly passing an interface where (T)REFIID is expected, will no longer be possible. Michael. From listbox at martoks-place.de Sun Jul 23 13:55:54 2017 From: listbox at martoks-place.de (Martok) Date: Sun, 23 Jul 2017 13:55:54 +0200 Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: Hello, > I have fixed bug 28760: > > https://bugs.freepascal.org/view.php?id=28760 as the reporter: not really. The pointer-ness of REFIID is an artefact of the C-ABI. It is not meant to mean 'pass a pointer to a GUID-struct', but 'pass a GUID using byref'. We have constref for that. > Directly passing an interface where (T)REFIID is expected, will no longer be possible. It must be, if only for Delphi compat. Delphi import is (... const riid: TIID;...), but that only works because they never seem to pass structured types on the stack, regardless of size. Martok From michael at freepascal.org Sun Jul 23 14:24:58 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Jul 2017 14:24:58 +0200 (CEST) Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: On Sun, 23 Jul 2017, Martok via Lazarus wrote: > Hello, > >> I have fixed bug 28760: >> >> https://bugs.freepascal.org/view.php?id=28760 > as the reporter: not really. > > The pointer-ness of REFIID is an artefact of the C-ABI. It is not meant to mean > 'pass a pointer to a GUID-struct', but 'pass a GUID using byref'. We have > constref for that. See the link to the Windows MSDN. Michael. From listbox at martoks-place.de Sun Jul 23 15:00:15 2017 From: listbox at martoks-place.de (Martok) Date: Sun, 23 Jul 2017 15:00:15 +0200 Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: Am 23.07.2017 um 14:24 schrieb Michael Van Canneyt via Lazarus: >> The pointer-ness of REFIID is an artefact of the C-ABI. It is not meant to mean >> 'pass a pointer to a GUID-struct', but 'pass a GUID using byref'. We have >> constref for that. > > See the link to the Windows MSDN. Yes, so? REFIID is also the type of the first argument of QueryInterface. { IUnknown } function QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): Hresult; virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; But I see already it has been translated differently in every unit (mostly because MS made it uniform only after the headers were translated), so might as well use the new one to keep things interesting. Carry on. From michael at freepascal.org Sun Jul 23 15:19:53 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Jul 2017 15:19:53 +0200 (CEST) Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: On Sun, 23 Jul 2017, Martok via Lazarus wrote: > Am 23.07.2017 um 14:24 schrieb Michael Van Canneyt via Lazarus: >>> The pointer-ness of REFIID is an artefact of the C-ABI. It is not meant to mean >>> 'pass a pointer to a GUID-struct', but 'pass a GUID using byref'. We have >>> constref for that. >> >> See the link to the Windows MSDN. > Yes, so? Well, if they declare it as a pointer, why should I not do the same :) ? > > REFIID is also the type of the first argument of QueryInterface. > I know. > > { IUnknown } > function QueryInterface({$IFDEF > FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): Hresult; > virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; That is a historical monstrosity :) > > But I see already it has been translated differently in every unit (mostly > because MS made it uniform only after the headers were translated), so might as > well use the new one to keep things interesting. Carry on. I agree the matter is a bit dubious :/ But, before doing anything, I looked around. Saw some C# and VB import statements. Noticed even in Delphi it's not 100% clear (see winrt* units), and finally decided to do it like this to make people aware of the fact that if they used a refiid argument in the past, it can hardly have worked. The current definition makes it quite clear that it is in fact a pointer to a GUID. Michael. From listbox at martoks-place.de Sun Jul 23 15:53:10 2017 From: listbox at martoks-place.de (Martok) Date: Sun, 23 Jul 2017 15:53:10 +0200 Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: >> { IUnknown } >> function QueryInterface({$IFDEF >> FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): Hresult; >> virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; > > That is a historical monstrosity :) I a gree we can do away with the IFDEFS and just use constref. >> But I see already it has been translated differently in every unit (mostly >> because MS made it uniform only after the headers were translated), so might as >> well use the new one to keep things interesting. Carry on. > > I agree the matter is a bit dubious :/ I think it's really not. We can transparently use an interface name where a GUID is required for a reason, and that is part of why it's easier to write COM applications in Delphi than in MS compilers. Were your new definition applied globally and none of the APIs actually use the non-pointer type, we might as well get rid of that feature, as it'd be useless then. > The current definition makes it quite clear that it is in fact a pointer to a GUID. In MSDN hungarian notation terms, it is very obviously not: REFIID is notationally different from LPIID (or just plain *IID in argument lists). From michael at freepascal.org Sun Jul 23 16:46:00 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Jul 2017 16:46:00 +0200 (CEST) Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: On Sun, 23 Jul 2017, Martok via Lazarus wrote: > >>> { IUnknown } >>> function QueryInterface({$IFDEF >>> FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): Hresult; >>> virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; >> >> That is a historical monstrosity :) > I a gree we can do away with the IFDEFS and just use constref. > >>> But I see already it has been translated differently in every unit (mostly >>> because MS made it uniform only after the headers were translated), so might as >>> well use the new one to keep things interesting. Carry on. >> >> I agree the matter is a bit dubious :/ > I think it's really not. We can transparently use an interface name where a GUID > is required for a reason, and that is part of why it's easier to write COM > applications in Delphi than in MS compilers. > Were your new definition applied globally and none of the APIs actually use the > non-pointer type, we might as well get rid of that feature, as it'd be useless then. >> The current definition makes it quite clear that it is in fact a pointer to a GUID. > In MSDN hungarian notation terms, it is very obviously not: REFIID is > notationally different from LPIID (or just plain *IID in argument lists). Well, I prefer something less ambiguous, not relying on murky ABI agreements. So I acted accordingly. Michael. From lazarus at kluug.net Sun Jul 23 17:59:12 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 23 Jul 2017 17:59:12 +0200 Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: On 23.07.2017 12:50, Michael Van Canneyt via Lazarus wrote: > Directly passing an interface where (T)REFIID is expected, will no > longer be possible. What is the fix? "@GetTypeData(TypeInfo(IShellItem))^.Guid" ? Ondrej From michael at freepascal.org Sun Jul 23 18:11:04 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Jul 2017 18:11:04 +0200 (CEST) Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: On Sun, 23 Jul 2017, Ondrej Pokorny via Lazarus wrote: > On 23.07.2017 12:50, Michael Van Canneyt via Lazarus wrote: >> Directly passing an interface where (T)REFIID is expected, will no >> longer be possible. > > What is the fix? > > "@GetTypeData(TypeInfo(IShellItem))^.Guid" ? That is one possible fix, yes. Maybe we can add a leightweight function for this to the typinfo unit. Michael. From lazarus at kluug.net Sun Jul 23 18:26:55 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 23 Jul 2017 18:26:55 +0200 Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: <31ae40ac-d783-4bc3-4b7c-c9a1286f6297@kluug.net> On 23.07.2017 18:11, Michael Van Canneyt via Lazarus wrote: > That is one possible fix, yes. > > Maybe we can add a leightweight function for this to the typinfo unit. Actually it works well with a local variable. I fixed it in r55562. I hope it's fine so. Ondrej From pascaldragon at googlemail.com Sun Jul 23 22:01:17 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 23 Jul 2017 22:01:17 +0200 Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: <6958f77a-40f1-8bfc-46d6-d3c4340f8821@googlemail.com> On 23.07.2017 12:50, Michael Van Canneyt via Lazarus wrote: > Hello, > > I have fixed bug 28760: > > https://bugs.freepascal.org/view.php?id=28760 > > This will cause compilation of win32wsdialogs.pp to fail, in particular in > > class procedure TWin32WSOpenDialog.SetupVistaFileDialog(ADialog: > IFileDialog; const AOpenDialog: TOpenDialog); > > search for: > > if InitialDir <> '' then > begin > if > Succeeded(SHCreateItemFromParsingName(PWideChar(UTF8ToUTF16(InitialDir)), nil, > IShellItem, DefaultFolderItem)) then > ADialog.SetFolder(DefaultFolderItem); > end; > > Directly passing an interface where (T)REFIID is expected, will no > longer be possible. I don't think that it was necessary to change (T)REFIID to be a pointer and thus making COM interface usage unnecessarily more complicated in Object Pascal: - Microsoft implicitely defines a REFIID in guiddef.h to always be an "IN" parameter, by defining it as "const IID &" for C++ code, so it can never be written to anyway, thus a "constref" would have sufficed (a "const IID &" in C++ behaves the same as a "IID *" in C or a "constref x: IID" in FPC) - aggregates (which is what a TGUID is) are always passed as pointers for stdcall functions (basically all functions that are related to COM and thus to REFIID) and also the Win64 ABI anyway, so a mere "TIID" already behaved correctly for the Windows targets Regards, Sven From michael at freepascal.org Sun Jul 23 23:27:44 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Jul 2017 23:27:44 +0200 (CEST) Subject: [Lazarus] Breaking change In-Reply-To: <6958f77a-40f1-8bfc-46d6-d3c4340f8821@googlemail.com> References: <6958f77a-40f1-8bfc-46d6-d3c4340f8821@googlemail.com> Message-ID: On Sun, 23 Jul 2017, Sven Barth via Lazarus wrote: > On 23.07.2017 12:50, Michael Van Canneyt via Lazarus wrote: >> Hello, >> >> I have fixed bug 28760: >> >> https://bugs.freepascal.org/view.php?id=28760 >> >> This will cause compilation of win32wsdialogs.pp to fail, in particular in >> >> class procedure TWin32WSOpenDialog.SetupVistaFileDialog(ADialog: >> IFileDialog; const AOpenDialog: TOpenDialog); >> >> search for: >> >> if InitialDir <> '' then >> begin >> if >> Succeeded(SHCreateItemFromParsingName(PWideChar(UTF8ToUTF16(InitialDir)), nil, >> IShellItem, DefaultFolderItem)) then >> ADialog.SetFolder(DefaultFolderItem); >> end; >> >> Directly passing an interface where (T)REFIID is expected, will no >> longer be possible. > > I don't think that it was necessary to change (T)REFIID to be a pointer > and thus making COM interface usage unnecessarily more complicated in > Object Pascal: > - Microsoft implicitely defines a REFIID in guiddef.h to always be an > "IN" parameter, by defining it as "const IID &" for C++ code, so it can > never be written to anyway, thus a "constref" would have sufficed (a > "const IID &" in C++ behaves the same as a "IID *" in C or a "constref > x: IID" in FPC) > - aggregates (which is what a TGUID is) are always passed as pointers > for stdcall functions (basically all functions that are related to COM > and thus to REFIID) and also the Win64 ABI anyway, so a mere "TIID" > already behaved correctly for the Windows targets Being old school, I really don't like all this magic. But if you feel it necessary, you are of course free to change it back. Michael. From sysrpl at gmail.com Mon Jul 24 00:08:52 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 23 Jul 2017 18:08:52 -0400 Subject: [Lazarus] Please consider adding Application Explorer to lazarus components folder Message-ID: I think this tool should be added to the lazarus components folder. I've been trying to fix issues with the sparta docked form designer and fell back to debugging/testing using a tool I wrote some time ago. It has helped me understand the structure of the sparta designer a lot. It's helpful in many other areas as well. Here is a brief video with a property grid newly added: https://video.getlazarus.org/appexploregrid.mp4 And here is the original page for this tool with a better overview: https://www.getlazarus.org/apps/appexplore/ I've updated the tool and moved the sources to gthub. This tool is stable on all platforms and it's useful enough that I think it should be in included in the lazarus components folder. The source code is small. Request filed under #32191 https://bugs.freepascal.org/view.php?id=32191 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhkblaszyk at zeelandnet.nl Mon Jul 24 03:07:09 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Mon, 24 Jul 2017 03:07:09 +0200 Subject: [Lazarus] New tool sspell for pascal programmers Message-ID: <5d9d944a94b31b996e662a7c661bd19a@zeelandnet.nl> Hi all, I've just finished working on a tool called sspell (stands for source code spell checker) for a project of mine. This tool extracts text from comments and string literals in source code files and checks them for spelling. Very useful in my case when you have a lot of resourcestrings, comments or literals in your source code. Please note that I have written this tool only in a couple of hours and bugs may certainly be present. Also there are a number of features missing and improvements pending (some of them mentioned in the readme on the project page). However I would like to share the tool with anyone interested already at this early stage. All relevant files are present here: https://github.com/daar/sspell for anyone to review and comment If you find this tool interesting and would like to contribute, please either send me a patch or make a pull request. Remarks can be directed to this ML. Enjoy! Rgds, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at z505.com Mon Jul 24 04:39:55 2017 From: noreply at z505.com (noreply at z505.com) Date: Sun, 23 Jul 2017 21:39:55 -0500 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> Message-ID: <82af11deb8d1f44c73c03e8a2c861d91@z505.com> On 2017-07-12 19:11, Graeme Geldenhuys via Lazarus wrote: > Hi Guys, > > This is just to give everybody that works on FPC or Lazarus a pat on > the back. Seriously, you guys are doing an *excellent* job. Even > though I am sometimes a bit hard on you guys. > > Having moved back to Delphi (I'm using XE at the moment) for a > contracting job, I got to the realization how bad Delphi has become. > Compared to Lazarus IDE, Delphi IDE is a joke!! Except that firemonkey has wayyyy more complete of a component palette set for macOS cocoa... > > [rant on] > > My issues with Delphi IDE in the last two weeks: > [...] > - Delphi IDE is so SLOW to start up, and I'm running a beefy Intel i7 > with 32GB RAM. Agree, Delphi is very slow to load, and use, even on a modern 64 bit laptop Wirth's law applies, if you know it... As computers get faster, software gets more bloated and computers cannot keep up with the software bloat. From noreply at z505.com Mon Jul 24 04:51:59 2017 From: noreply at z505.com (noreply at z505.com) Date: Sun, 23 Jul 2017 21:51:59 -0500 Subject: [Lazarus] Video: Terrain Demo In-Reply-To: References: Message-ID: <2fa9bc3732411c7e82406c9b1d2f8a36@z505.com> On 2017-07-14 01:18, Anthony Walter via Lazarus wrote: > I've been working on actually finishing Bare Game version 2. This > evening I created another example program and thought some of you > might want to view it. > > It's a procedural terrain generation example. You can view a small > screen capture of it at this page: > > https://www.getlazarus.org/videos/bareterrain > -- Which graphics tools does it use as a basis? directx/opengl/other? From sysrpl at gmail.com Mon Jul 24 07:51:04 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 24 Jul 2017 01:51:04 -0400 Subject: [Lazarus] Video: Terrain Demo In-Reply-To: <2fa9bc3732411c7e82406c9b1d2f8a36@z505.com> References: <2fa9bc3732411c7e82406c9b1d2f8a36@z505.com> Message-ID: opengl es 2, where possible, then opengl 2.1 with some compatibility fixes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlnglsts at bgss.hu Mon Jul 24 08:43:20 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Mon, 24 Jul 2017 08:43:20 +0200 Subject: [Lazarus] Reporting engine - What it's state? In-Reply-To: References: <559EC1C4.80108@yahoo.com> Message-ID: Hi All, 2015. 07. 09. 21:45 keltezéssel, Michael Van Canneyt írta: > Just an opinion: > I am working with Graeme Geldenhuys to create a reporting engine from > scratch. > I think Lazreport's design contains some fundamental flaws, which can > only be remedied by re-implementing a reporting engine from scratch. Two years gone. Any news? I see "In progress" on the Foundation's page, but want to know more detailed informations. https://foundation.freepascal.org/projects/reporting-engine Gabor From michael at freepascal.org Mon Jul 24 08:54:57 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Jul 2017 08:54:57 +0200 (CEST) Subject: [Lazarus] Reporting engine - What it's state? In-Reply-To: References: <559EC1C4.80108@yahoo.com> Message-ID: On Mon, 24 Jul 2017, Gabor Boros via Lazarus wrote: > Hi All, > > 2015. 07. 09. 21:45 keltezéssel, Michael Van Canneyt írta: >> Just an opinion: >> I am working with Graeme Geldenhuys to create a reporting engine from >> scratch. >> I think Lazreport's design contains some fundamental flaws, which can >> only be remedied by re-implementing a reporting engine from scratch. > > Two years gone. Any news? I see "In progress" on the Foundation's page, > but want to know more detailed informations. > > https://foundation.freepascal.org/projects/reporting-engine It's ready and waiting for release. I'm waiting for 2 small fixes still: - Some strange error when exporting a custom element to PDF - Removing a dependency on freetype.dll on windows. Michael. From listbox at martoks-place.de Mon Jul 24 11:02:38 2017 From: listbox at martoks-place.de (Martok) Date: Mon, 24 Jul 2017 11:02:38 +0200 Subject: [Lazarus] Breaking change In-Reply-To: <6958f77a-40f1-8bfc-46d6-d3c4340f8821@googlemail.com> References: <6958f77a-40f1-8bfc-46d6-d3c4340f8821@googlemail.com> Message-ID: Am 23.07.2017 um 22:01 schrieb Sven Barth via Lazarus: > - aggregates (which is what a TGUID is) are always passed as pointers > for stdcall functions (basically all functions that are related to COM > and thus to REFIID) and also the Win64 ABI anyway, so a mere "TIID" > already behaved correctly for the Windows targets They weren't always, at least in this particular revision I reported the original bug against. Ended up having the GUID itself on the stack, not a reference - but only with const, and only in some functions. No specifier would have worked too, but I think constref is more descriptive. From aaa5500 at ya.ru Mon Jul 24 11:34:46 2017 From: aaa5500 at ya.ru (Alexey) Date: Mon, 24 Jul 2017 12:34:46 +0300 Subject: [Lazarus] New tool sspell for pascal programmers In-Reply-To: <5d9d944a94b31b996e662a7c661bd19a@zeelandnet.nl> References: <5d9d944a94b31b996e662a7c661bd19a@zeelandnet.nl> Message-ID: On 24.07.2017 04:07, Darius Blaszyk via Lazarus wrote: > This tool extracts text from comments and string literals in source > code files and checks them for spelling. Very useful It is already doable in CudaText editor: - install plugin SpellChecker [not ready for Win64] - open Pas file, call spell-checker plugin - it hilites only errs in comments/strings (and can call suggestion dlg to fix em). -- Regards, Alexey From nc-gaertnma at netcologne.de Mon Jul 24 11:37:47 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Jul 2017 11:37:47 +0200 Subject: [Lazarus] New tool sspell for pascal programmers In-Reply-To: References: <5d9d944a94b31b996e662a7c661bd19a@zeelandnet.nl> Message-ID: <20170724113747.5cae49d0@limapholos.matflo.wg> On Mon, 24 Jul 2017 12:34:46 +0300 Alexey via Lazarus wrote: > On 24.07.2017 04:07, Darius Blaszyk via Lazarus wrote: > > This tool extracts text from comments and string literals in source > > code files and checks them for spelling. Very useful > > It is already doable in CudaText editor: > > - install plugin SpellChecker [not ready for Win64] > > - open Pas file, call spell-checker plugin > > - it hilites only errs in comments/strings (and can call suggestion dlg > to fix em). How does it hilite? Within the source editor? Mattias From sysrpl at gmail.com Mon Jul 24 11:57:57 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 24 Jul 2017 05:57:57 -0400 Subject: [Lazarus] Sparta Form Designer patch Message-ID: Maceij, I put together a patch for the sparta docked form designer and attached it to this issue: https://bugs.freepascal.org/view.php?id=32194 This fixes the designer on gtk2, and probably qt as well. I made a few small changes, some of which are hacks, notably the fix for BorderStyle. I also removed the green color, which I assume was for testing. The real big issue left I can see is BorderIcons always resetting to [] on non windows platforms. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhkblaszyk at zeelandnet.nl Mon Jul 24 12:55:17 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Mon, 24 Jul 2017 12:55:17 +0200 Subject: [Lazarus] New tool sspell for pascal programmers In-Reply-To: References: <5d9d944a94b31b996e662a7c661bd19a@zeelandnet.nl> Message-ID: <18e394c3a7198e9f88512c1218d9546c@zeelandnet.nl> Alexey via Lazarus schreef op 24 jul '17: > On 24.07.2017 04:07, Darius Blaszyk via Lazarus wrote: > >> This tool extracts text from comments and string literals in source >> code files and checks them for spelling. Very useful > > It is already doable in CudaText editor: > > - install plugin SpellChecker [not ready for Win64] > > - open Pas file, call spell-checker plugin > > - it hilites only errs in comments/strings (and can call suggestion dlg > to fix em). Quite a lot of modern code editors have such a feature already, which is good. However, this means that one needs to manually point and click each highlighted error. Sspell will make it possible to interactively scan a file or even a complete folder recursively and fix errors as they are detected. Rgds, Darius From md at delfire.net Mon Jul 24 14:12:30 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Mon, 24 Jul 2017 09:12:30 -0300 Subject: [Lazarus] Please consider adding Application Explorer to lazarus components folder In-Reply-To: References: Message-ID: On Sun, Jul 23, 2017 at 7:08 PM, Anthony Walter via Lazarus wrote: > I think this tool should be added to the lazarus components folder. I've > been trying to fix issues with the sparta docked form designer and fell back > to debugging/testing using a tool I wrote some time ago. It has helped me > understand the structure of the sparta designer a lot. It's helpful in many > other areas as well. > > Here is a brief video with a property grid newly added: > > https://video.getlazarus.org/appexploregrid.mp4 > > And here is the original page for this tool with a better overview: > > https://www.getlazarus.org/apps/appexplore/ Very interesting! Thanks for share. Best regards, Marcos Douglas From lazarus at kluug.net Mon Jul 24 16:23:43 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 24 Jul 2017 16:23:43 +0200 Subject: [Lazarus] Please consider adding Application Explorer to lazarus components folder In-Reply-To: References: Message-ID: <9471820e-e939-2f23-6f06-b78318c95012@kluug.net> On 24.07.2017 0:08, Anthony Walter via Lazarus wrote: > I think this tool should be added to the lazarus components folder. Actually we are going the other way - decentralize components and packages. Such a tool should be added to the online package manager. Please contact Balasz (if he missed this messages). Ondrej From mailinglists at geldenhuys.co.uk Mon Jul 24 16:42:06 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 24 Jul 2017 15:42:06 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <82af11deb8d1f44c73c03e8a2c861d91@z505.com> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <82af11deb8d1f44c73c03e8a2c861d91@z505.com> Message-ID: On 2017-07-24 03:39, Lars via Lazarus wrote: > Wirth's law applies, if you know it... As computers get faster, software > gets more bloated and computers cannot keep up with the software bloat. Indeed, and it doesn't only seem to apply to Windows software. Linux and FreeBSD software are affected too. Just last week I tried FreeBSD's "native GUI desktop environment" called Lumina, which includes a file manager application. By pure chance I ran htop and noticed the Lumina file manager uses 500MB RAM. I promptly switched back to PCManFM (a generic GTK2 base app) which has exactly the same functionality, but uses only 45MB RAM. And then FreeBSD wants to make PCManFM obsolete - what the hell! 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 Mon Jul 24 17:47:51 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 24 Jul 2017 11:47:51 -0400 Subject: [Lazarus] Please consider adding Application Explorer to lazarus components folder In-Reply-To: <9471820e-e939-2f23-6f06-b78318c95012@kluug.net> References: <9471820e-e939-2f23-6f06-b78318c95012@kluug.net> Message-ID: Ondrej, Okay will do. This tool actually helped me fix the sparta docked form designer yesterday and I submitted a patch. Also, the online package manager ought to be integrated into lazarus, such that you can browse and install packages from within the IDE. and if that's the case maybe we could have a lazarus "what's new" page added to the IDE, kind of like visual studio, that notifies users about what's new/hot so that users might find new or interesting packages that would otherwise go unnoticed. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Mon Jul 24 18:23:37 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Jul 2017 18:23:37 +0200 Subject: [Lazarus] Please consider adding Application Explorer to lazarus components folder In-Reply-To: References: <9471820e-e939-2f23-6f06-b78318c95012@kluug.net> Message-ID: <20170724182337.3c6c8d82@limapholos.matflo.wg> On Mon, 24 Jul 2017 11:47:51 -0400 Anthony Walter via Lazarus wrote: > Ondrej, > > Okay will do. This tool actually helped me fix the sparta docked form > designer yesterday and I submitted a patch. > > Also, the online package manager ought to be integrated into lazarus, such > that you can browse and install packages from within the IDE. and if that's > the case maybe we could have a lazarus "what's new" page added to the IDE, > kind of like visual studio, that notifies users about what's new/hot so > that users might find new or interesting packages that would otherwise go > unnoticed. A package for that would be welcome. Mattias From hnb.code at gmail.com Tue Jul 25 00:34:19 2017 From: hnb.code at gmail.com (Maciej Izak) Date: Tue, 25 Jul 2017 00:34:19 +0200 Subject: [Lazarus] Sparta Form Designer patch In-Reply-To: References: Message-ID: 2017-07-24 11:57 GMT+02:00 Anthony Walter via Lazarus < lazarus at lists.lazarus-ide.org>: > I put together a patch for the sparta docked form designer and attached it > to this issue: > > https://bugs.freepascal.org/view.php?id=32194 > > This fixes the designer on gtk2, and probably qt as well. I made a few > small changes, some of which are hacks, notably the fix for BorderStyle. I > also removed the green color, which I assume was for testing. > > The real big issue left I can see is BorderIcons always resetting to [] on > non windows platforms. > Thanks for nice feedback and patch. The part of patch for showing forms on GTK2 was usable, but part for border style was incorrect (hopefully I fixed this problem together with BorderIcons in r55579). For default event please create new bug report (and for new bugs - will be easier to manage). Problem with a TMainMenu fixed in r55582. Please test and close #32194 if designed form is visible for GTK2. For other problems please create related bug reports :) -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From hnb.code at gmail.com Tue Jul 25 00:50:40 2017 From: hnb.code at gmail.com (Maciej Izak) Date: Tue, 25 Jul 2017 00:50:40 +0200 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: 2017-07-19 15:10 GMT+02:00 Juha Manninen via Lazarus < lazarus at lists.lazarus-ide.org>: > Sparta form designer is broken for both GTK2 and QT. > ... > With GTK2 the designer stays empty. The IDE still works otherwise. > With QT the IDE freezes. An empty editor shows an hourglass. The > Sparta should works now with GTK2 (tested with Debian 9) - Anthony did the trick and I have fixed other bugs. Now I need to hunt QT :P. New GTK2 test is welcome! :) -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Jul 25 01:32:03 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 24 Jul 2017 19:32:03 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Thanks, tests and working great on win, mac, and gtk2 linux. I suspect maybe it works on qt linux as well. BorderStyle and BorderIcons work as well. Good job and thank you :) Please set these issues to resolved and i will close: 032183 032171 032170 029615 Note: I will be filing two more issues that are effecting gtk2 at least: 1) Default event creation is not working and you cannot delete controls using the Delete keyboard key. I suspect these two issues are caused by the same problem so I will file as one issue. 2) TMainMenu can be removed, but it no longer shows menu items in the designer at the top of the form. This is because pFakeMenu is parented to pBG which is now set hide itself. Probably a better solution than hiding pBG (sorry about my fix) would be to ensure it's ALWAYS in behind in z-order of pClient. This is something I tried but could not get working. There was always some something triggering pBG to be back on top of pClient which I couldn't isolate. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Tue Jul 25 12:16:50 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 25 Jul 2017 13:16:50 +0300 Subject: [Lazarus] Gtk2 missed try-finally Message-ID: <7db79529-0d7e-0db8-7be8-378003c8f4c9@ya.ru> gtk2proc.inc, procedure DrawImageListIconOnWidget: it allocates Bitmap + DC. Pls add try-finally for Bitmap; and (not sure) try-finally for DC: finally ReleaseDC(HDC({%H-}PtrUInt(DestWidget)),DestDC); end; finally Bitmap.Free; end; -- Regards, Alexey From nc-gaertnma at netcologne.de Tue Jul 25 12:31:06 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 25 Jul 2017 12:31:06 +0200 Subject: [Lazarus] Gtk2 missed try-finally In-Reply-To: <7db79529-0d7e-0db8-7be8-378003c8f4c9@ya.ru> References: <7db79529-0d7e-0db8-7be8-378003c8f4c9@ya.ru> Message-ID: <20170725123106.2db463ae@limapholos.matflo.wg> On Tue, 25 Jul 2017 13:16:50 +0300 Alexey via Lazarus wrote: > gtk2proc.inc, procedure DrawImageListIconOnWidget: it allocates Bitmap + > DC. Pls add try-finally for Bitmap; and (not sure) try-finally for DC: How did you manage to create a mem leak there? > finally > ReleaseDC(HDC({%H-}PtrUInt(DestWidget)),DestDC); > end; > finally > Bitmap.Free; > end; Mattias From noreply at z505.com Tue Jul 25 14:01:35 2017 From: noreply at z505.com (noreply at z505.com) Date: Tue, 25 Jul 2017 07:01:35 -0500 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <82af11deb8d1f44c73c03e8a2c861d91@z505.com> Message-ID: <5c30237b7493eb5798227d49d7eb66f2@z505.com> On 2017-07-24 09:42, Graeme Geldenhuys via Lazarus wrote: > On 2017-07-24 03:39, Lars via Lazarus wrote: >> Wirth's law applies, if you know it... As computers get faster, >> software >> gets more bloated and computers cannot keep up with the software >> bloat. > > Indeed, and it doesn't only seem to apply to Windows software. Linux > and FreeBSD software are affected too. Just last week I tried > FreeBSD's "native GUI desktop environment" called Lumina, which > includes a file manager application. By pure chance I ran htop and > noticed the Lumina file manager uses 500MB RAM. Is it because of QT 5 ? It says on the internets that Lumina uses QT 5 Or, in Lazarus terms: To keep on topic ;-) do lazarus QT apps act much more slow or use up much more memory. I'm always interested in the actual culprit of the issue - it could even be a memory leak that just needs fixing! From hnb.code at gmail.com Tue Jul 25 14:02:05 2017 From: hnb.code at gmail.com (Maciej Izak) Date: Tue, 25 Jul 2017 14:02:05 +0200 Subject: [Lazarus] Please consider adding Application Explorer to lazarus components folder In-Reply-To: References: Message-ID: 2017-07-24 0:08 GMT+02:00 Anthony Walter via Lazarus < lazarus at lists.lazarus-ide.org>: > https://video.getlazarus.org/appexploregrid.mp4 > > Request filed under #32191 > > https://bugs.freepascal.org/view.php?id=32191 > The tool may be merged into current tool "Edit context help" (Ctrl + Shift + F1). "Edit context help" somehow has similar functionality for exploring "how IDE is constructed". We can add "Application explorer" to "Help" menu to invoke "Edit context help" with new functionalities. -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Tue Jul 25 14:40:33 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 25 Jul 2017 13:40:33 +0100 Subject: [Lazarus] Please consider adding Application Explorer to lazarus components folder In-Reply-To: References: Message-ID: <8a7ea4c4-ec21-2aa8-b9b1-10dfae72ff78@mfriebe.de> On 25/07/2017 13:02, Maciej Izak via Lazarus wrote: > 2017-07-24 0:08 GMT+02:00 Anthony Walter via Lazarus > >: > > https://video.getlazarus.org/appexploregrid.mp4 > > > Request filed under #32191 > > https://bugs.freepascal.org/view.php?id=32191 > > > > The tool may be merged into current tool "Edit context help" (Ctrl + > Shift + F1). "Edit context help" somehow has similar functionality for > exploring "how IDE is constructed". We can add "Application explorer" > to "Help" menu to invoke "Edit context help" with new functionalities. And replace/remove the ide inspector (view > ide internals) -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Tue Jul 25 16:35:50 2017 From: aaa5500 at ya.ru (Alexey) Date: Tue, 25 Jul 2017 17:35:50 +0300 Subject: [Lazarus] Gtk2 missed try-finally In-Reply-To: <20170725123106.2db463ae@limapholos.matflo.wg> References: <7db79529-0d7e-0db8-7be8-378003c8f4c9@ya.ru> <20170725123106.2db463ae@limapholos.matflo.wg> Message-ID: >How did you manage to create a mem leak there? If not using try-finally, and exception, Bitmap will not be freed. -- Regards, Alexey From sysrpl at gmail.com Tue Jul 25 16:44:58 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 25 Jul 2017 10:44:58 -0400 Subject: [Lazarus] Please consider adding Application Explorer to lazarus components folder In-Reply-To: <8a7ea4c4-ec21-2aa8-b9b1-10dfae72ff78@mfriebe.de> References: <8a7ea4c4-ec21-2aa8-b9b1-10dfae72ff78@mfriebe.de> Message-ID: Ah, I didn't know about "Edit context help". Here are a few things to of note. Application explorer is not directly tied to the Lazarus IDE. Meaning it can be deployed with applications written with Lazarus: http://video.getlazarus.org/appexploredoceditor.mp4 Also beyond the context help editor you can search for items, highlight them (by pressing the space bar), and view/edit properties and other diagnostic information (inheritance, componentstate ect). Maybe these features can be combined? Something to consider. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc at dommelstein.nl Tue Jul 25 20:30:25 2017 From: marc at dommelstein.nl (Marc Weustink) Date: Tue, 25 Jul 2017 20:30:25 +0200 Subject: [Lazarus] Gtk2 missed try-finally In-Reply-To: References: <7db79529-0d7e-0db8-7be8-378003c8f4c9@ya.ru> <20170725123106.2db463ae@limapholos.matflo.wg> Message-ID: <5CF3CDBD-19F4-4D43-A442-66C2E8DF0FAF@dommelstein.nl> How do you get an exception there ? Marc On July 25, 2017 4:35:50 PM GMT+02:00, Alexey via Lazarus wrote: > >>How did you manage to create a mem leak there? > >If not using try-finally, and exception, Bitmap will not be freed. > >-- >Regards, >Alexey > >-- >_______________________________________________ >Lazarus mailing list >Lazarus at lists.lazarus-ide.org >https://lists.lazarus-ide.org/listinfo/lazarus From juha.manninen62 at gmail.com Tue Jul 25 22:32:43 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 25 Jul 2017 23:32:43 +0300 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <5c30237b7493eb5798227d49d7eb66f2@z505.com> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <82af11deb8d1f44c73c03e8a2c861d91@z505.com> <5c30237b7493eb5798227d49d7eb66f2@z505.com> Message-ID: On Tue, Jul 25, 2017 at 3:01 PM, Lars via Lazarus wrote: > Is it because of QT 5 ? No. I have understood QT 5 is more modular, optimized and lighter than QT 4 was. Juha From juha.manninen62 at gmail.com Tue Jul 25 23:11:10 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 26 Jul 2017 00:11:10 +0300 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: A serious issue with QT: When opening an existing form with controls, the IDE still freezes. Memory overflow, core dump is created. A minor issue with QT: The designer tab is opened initially when the IDE is started. The editor tab should be opened. I remember a similar problem was fixed a long time ago but I am not sure. Juha From sysrpl at gmail.com Tue Jul 25 23:29:25 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 25 Jul 2017 17:29:25 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Juha, Thanks. I will install Qt and compile a second copy of lazarus to test this issue. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Jul 26 08:53:20 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 26 Jul 2017 02:53:20 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Juha, I just tested on Qt4 (I haven't tested Qt5 yet) and the sparta form designer is working great with the latest svn trunk, with one outstanding problem: TMainMenu is not working correctly with the Qt4 widget set. video In the video linked above the crash occurs when the TMenuMenu is selected and I press the delete key. Not the designer is glitched during the menu editing, adding extra space above the design time menus. That is probably related to the issue. I filed a bug for Qt TMainMenu crash: 32206 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Wed Jul 26 10:59:19 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 26 Jul 2017 09:59:19 +0100 Subject: [Lazarus] Congrats to the FPC/Lazarus projects - job well done! In-Reply-To: <5c30237b7493eb5798227d49d7eb66f2@z505.com> References: <2490eb55-993e-254a-e9cc-5abaef749d9f@geldenhuys.co.uk> <82af11deb8d1f44c73c03e8a2c861d91@z505.com> <5c30237b7493eb5798227d49d7eb66f2@z505.com> Message-ID: On 2017-07-25 13:01, Lars via Lazarus wrote: > Is it because of QT 5 ? > It says on the internets that Lumina uses QT 5 I don't actually know what GUI toolkit Lumina uses, but it might well be qt5. If that's the cause of the huge memory usage or not - I can't say. What I do know is that many developers these days don't pay much attention to many things, and write pretty sloppy code. A lot of it can be contributed to unrealistic deadlines in commercial environments where they think developers are robots, and we can just churn out code like a production line and at a constant rate. Then again, Lumina is not a commercial project, so shouldn't have the same pitfalls. 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 juha.manninen62 at gmail.com Wed Jul 26 13:00:55 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 26 Jul 2017 14:00:55 +0300 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: On Wed, Jul 26, 2017 at 9:53 AM, Anthony Walter via Lazarus wrote: > Juha, I just tested on Qt4 (I haven't tested Qt5 yet) and the sparta form > designer is working great with the latest svn trunk, ... Did you try opening an existing project with a form + some components on it? I works for me, too, when starting with an empty form. Even then double-click for default action does not work. Juha From sysrpl at gmail.com Wed Jul 26 14:19:32 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 26 Jul 2017 08:19:32 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: No I didn't try that, but I did right now. It locked up my linux. I couldn't even switch to another tty. I'll look into it and possibly file a bug. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Wed Jul 26 15:54:56 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 26 Jul 2017 16:54:56 +0300 Subject: [Lazarus] ComparePoints func Message-ID: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> I think LCL has many CompareNNNN funcs, but misses func for TPoint. Here it's comparing x/y screen coordinates function ComparePoints(P1, P2: TPoint): integer; begin if (P1.X=P2.X) and (P1.Y=P2.Y) then exit(0); if (P1.Y>P2.Y) then exit(1); if (P1.YP2.X) then exit(1) else exit(-1); end; -- Regards, Alexey From mailinglists at geldenhuys.co.uk Wed Jul 26 17:11:23 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 26 Jul 2017 16:11:23 +0100 Subject: [Lazarus] ComparePoints func In-Reply-To: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: On 2017-07-26 14:54, Alexey via Lazarus wrote: > I think LCL has many CompareNNNN funcs, but misses func for TPoint. Here > it's comparing x/y screen coordinates Why not extend TPoint with an IsEquals() method, so you can do something like var p1: TPoint; p2: TPoint; begin // ... populate p1 & p2 if p1.IsEquals(p2) then // do something. ComparePoints() returning a Integer is not a very friendly return type either, whereas Boolean makes more sense. 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 sandro.cumerlato at gmail.com Wed Jul 26 17:12:54 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Wed, 26 Jul 2017 17:12:54 +0200 Subject: [Lazarus] ComparePoints func In-Reply-To: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: What do you think about: function ComparePoints(P1, P2: TPoint): TPoint; begin Result.X := (P1.X - P2.X); Result.Y := (P1.Y - P2.Y); end; Best regards. Sandro Cumerlato On Jul 26, 2017 3:56 PM, "Alexey via Lazarus" wrote: I think LCL has many CompareNNNN funcs, but misses func for TPoint. Here it's comparing x/y screen coordinates function ComparePoints(P1, P2: TPoint): integer; begin if (P1.X=P2.X) and (P1.Y=P2.Y) then exit(0); if (P1.Y>P2.Y) then exit(1); if (P1.YP2.X) then exit(1) else exit(-1); end; -- 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 michael at freepascal.org Wed Jul 26 17:22:02 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 26 Jul 2017 17:22:02 +0200 (CEST) Subject: [Lazarus] ComparePoints func In-Reply-To: References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: On Wed, 26 Jul 2017, Graeme Geldenhuys via Lazarus wrote: > On 2017-07-26 14:54, Alexey via Lazarus wrote: >> I think LCL has many CompareNNNN funcs, but misses func for TPoint. Here >> it's comparing x/y screen coordinates > > Why not extend TPoint with an IsEquals() method, so you can do something > like > > > var > p1: TPoint; > p2: TPoint; > begin > // ... populate p1 & p2 > if p1.IsEquals(p2) then > // do something. > > > ComparePoints() returning a Integer is not a very friendly return type > either, whereas Boolean makes more sense. First start by defining what ComparePoints is supposed to measure or compare. If "equals" is needed, why not simply use p1=p2 ? Michael. From aaa5500 at ya.ru Wed Jul 26 18:27:21 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 26 Jul 2017 19:27:21 +0300 Subject: [Lazarus] ComparePoints func In-Reply-To: References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> On 26.07.2017 18:11, Graeme Geldenhuys via Lazarus wrote: > ComparePoints() returning a Integer is not a very friendly return type > either, Hm, in my app Int makes sense: i need to compare Points in binary search, and see: >, <, =. -- Regards, Alexey From michael at freepascal.org Wed Jul 26 18:30:58 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 26 Jul 2017 18:30:58 +0200 (CEST) Subject: [Lazarus] ComparePoints func In-Reply-To: <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> Message-ID: On Wed, 26 Jul 2017, Alexey via Lazarus wrote: > On 26.07.2017 18:11, Graeme Geldenhuys via Lazarus wrote: >> ComparePoints() returning a Integer is not a very friendly return type >> either, > > Hm, in my app Int makes sense: i need to compare Points in binary > search, and see: >, <, =. This compare is very specific to your application. I don't think it would be a good idea to generalize this. Michael. From sandro.cumerlato at gmail.com Wed Jul 26 18:48:43 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Wed, 26 Jul 2017 18:48:43 +0200 Subject: [Lazarus] ComparePoints func In-Reply-To: <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> Message-ID: IMHO you should consider 5 cases: P1 = P2 and the four quadrants https://en.m.wikipedia.org/wiki/Quadrant_(plane_geometry) - Quadrant I should correspond to > - Quadrant III should correspond to < - What about quadrants II and IV? You could compare your point to Y = -X line to reduce your study to 3 cases. Best regards Sandro Cumerlato On Jul 26, 2017 6:27 PM, "Alexey via Lazarus" wrote: On 26.07.2017 18:11, Graeme Geldenhuys via Lazarus wrote: > ComparePoints() returning a Integer is not a very friendly return type > either, > Hm, in my app Int makes sense: i need to compare Points in binary search, and see: >, <, =. -- 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 mailinglists at geldenhuys.co.uk Wed Jul 26 19:50:53 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 26 Jul 2017 18:50:53 +0100 Subject: [Lazarus] ComparePoints func In-Reply-To: References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: On 2017-07-26 16:22, Michael Van Canneyt via Lazarus wrote: > First start by defining what ComparePoints is supposed to measure or compare. If "compare" doesn't mean "equals", then a better name should be used, otherwise that too is up for incorrect interpretation. > If "equals" is needed, why not simply use p1=p2 ? If operator overload exists for the types then sure, but as you know I like OOP approaches to things. Also is TPoint a record or a object or a class? In fpGUI the equivalent of TPoint and TRect are object types and has many related methods defined inside them. I don't believe p1 = p2 is going to work with the object data type. https://github.com/graemeg/fpGUI/blob/develop/src/corelib/fpg_base.pas#L160..L191 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 Wed Jul 26 19:53:34 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 26 Jul 2017 18:53:34 +0100 Subject: [Lazarus] ComparePoints func In-Reply-To: <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> Message-ID: On 2017-07-26 17:27, Alexey via Lazarus wrote: > Hm, in my app Int makes sense: i need to compare Points in binary > search, and see: >, <, =. Ever heard of Manhatten Length? That would be a more logical approach. It is a commonly used length calculation for points. http://en.wikipedia.org/wiki/Taxicab_geometry The interface as in fpGUI's TfpgPoint: https://github.com/graemeg/fpGUI/blob/develop/src/corelib/fpg_base.pas#L164..L165 The implementations: https://github.com/graemeg/fpGUI/blob/develop/src/corelib/fpg_base.pas#L2021..L2029 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 Wed Jul 26 20:34:24 2017 From: aaa5500 at ya.ru (Alexey) Date: Wed, 26 Jul 2017 21:34:24 +0300 Subject: [Lazarus] ComparePoints func In-Reply-To: References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: >> First start by defining what ComparePoints is supposed to measure or >> compare. yes, of course: compare source editor x/y positions. Ie, it is CompareCoords. -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From reimgrab at web.de Wed Jul 26 20:54:14 2017 From: reimgrab at web.de (Reimar Grabowski) Date: Wed, 26 Jul 2017 20:54:14 +0200 Subject: [Lazarus] ComparePoints func In-Reply-To: References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> Message-ID: <20170726205414.63d27a82@darkbreed> On Wed, 26 Jul 2017 18:53:34 +0100 Graeme Geldenhuys via Lazarus wrote: > On 2017-07-26 17:27, Alexey via Lazarus wrote: > > Hm, in my app Int makes sense: i need to compare Points in binary > > search, and see: >, <, =. > > Ever heard of Manhatten Length? That would be a more logical approach. If a metric would be more logical (I don't know why exactly it should be but whatever) the euclidean metric would be even more logical, wouldn't it? > It is a commonly used length calculation for points. That sounds horrible. Is length really used like this? The length of two points??? Metrics are distance functions. > http://en.wikipedia.org/wiki/Taxicab_geometry Any 2 dimensional metric can be used. But it may totally not be the thing the TC needs as the metric conditions may not be desirable in his context. The point is (and Michael made it already) that there is no definition of how to compare points. You have quite a lot of options and the current problem determines which function to use. Therefore it makes no sense to introduce a general ComparePoints-function. R. From pascaldragon at googlemail.com Wed Jul 26 22:14:39 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Wed, 26 Jul 2017 22:14:39 +0200 Subject: [Lazarus] ComparePoints func In-Reply-To: References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: Am 26.07.2017 19:51 schrieb "Graeme Geldenhuys via Lazarus" < lazarus at lists.lazarus-ide.org>: >> If "equals" is needed, why not simply use p1=p2 ? > > > If operator overload exists for the types then sure, but as you know I like OOP approaches to things. > > Also is TPoint a record or a object or a class? It's an advanced record with methods and operator overloads: https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/inc/typshrdh.inc?revision=33062&view=markup > In fpGUI the equivalent of TPoint and TRect are object types and has many related methods defined inside them. I don't believe p1 = p2 is going to work with the object data type. For object types you'll need to declare global operator overloads to use e.g. the = operator (which have the disadvantage that they don't work with generics... at least not yet :/ ). Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Wed Jul 26 22:25:56 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 26 Jul 2017 21:25:56 +0100 Subject: [Lazarus] ComparePoints func In-Reply-To: References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: Hi Sven, Thanks for clarifying the TPoint type. I thought it was a record structure, but just wanted to make sure - as I mentioned, different frameworks or libraries might use different types. On 2017-07-26 21:14, Sven Barth via Lazarus wrote: > For object types you'll need to declare global operator overloads to use > e.g. the = operator Then it's also good that I don't like the = operator for objects and classes. As I mentioned earlier, I like the more OOP approach where methods of an object/class act on the data the type holds. So TPoint.Equals() makes much more sense to me that p1 = p2. Just my personal opinion I guess. ;-) 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 Wed Jul 26 23:01:59 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 26 Jul 2017 23:01:59 +0200 (CEST) Subject: [Lazarus] ComparePoints func In-Reply-To: References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> Message-ID: On Wed, 26 Jul 2017, Alexey via Lazarus wrote: >>> First start by defining what ComparePoints is supposed to measure or >>> compare. > > yes, of course: compare source editor x/y positions. Ie, it is > CompareCoords. In that case you need some enumerated. TRelativePosition = (rpEqual, rpNorth,rpEast,rpSouth,rpWest, rpNorthEast,rpSouthEast,rpSouthWest,rpNorhWest); +1, 0, -1 does not tell you enough. Michael. From michael at freepascal.org Wed Jul 26 23:02:53 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 26 Jul 2017 23:02:53 +0200 (CEST) Subject: [Lazarus] ComparePoints func In-Reply-To: <20170726205414.63d27a82@darkbreed> References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> <20170726205414.63d27a82@darkbreed> Message-ID: On Wed, 26 Jul 2017, Reimar Grabowski via Lazarus wrote: > On Wed, 26 Jul 2017 18:53:34 +0100 > Graeme Geldenhuys via Lazarus wrote: > >> On 2017-07-26 17:27, Alexey via Lazarus wrote: >> > Hm, in my app Int makes sense: i need to compare Points in binary >> > search, and see: >, <, =. >> >> Ever heard of Manhatten Length? That would be a more logical approach. > If a metric would be more logical (I don't know why exactly it should be but whatever) the euclidean metric would be even more logical, wouldn't it? > >> It is a commonly used length calculation for points. > That sounds horrible. > Is length really used like this? > The length of two points??? > Metrics are distance functions. > >> http://en.wikipedia.org/wiki/Taxicab_geometry > Any 2 dimensional metric can be used. > But it may totally not be the thing the TC needs as the metric conditions may not be desirable in his context. > > The point is (and Michael made it already) that there is no definition of how to compare points. You have quite a lot of options and the current problem determines which function to use. > Therefore it makes no sense to introduce a general ComparePoints-function. Exactly. Michael. From sysrpl at gmail.com Thu Jul 27 00:24:42 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 26 Jul 2017 18:24:42 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Please see issue #32209 for a working fix. Someone familiar with the LCL Qt widget implementation needs to look at this in more depth. https://bugs.freepascal.org/view.php?id=32209 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at z505.com Thu Jul 27 00:31:17 2017 From: noreply at z505.com (noreply at z505.com) Date: Wed, 26 Jul 2017 17:31:17 -0500 Subject: [Lazarus] Display multiple images Message-ID: <16bda11275dc7114de7797d872bec61c@z505.com> Is there any component to display multiple images, and, maybe scroll through them, left to right, or up and down? These methods might be the way: 1. do it manually with code. Put TImages in a tscrollbox, display them one by one 2. ListView? but size might be too small, just thumbnails, unless it is configurable 3. Some third party component that I don't know about 4. TImageList, connected somehow (TListView already mentioned) From aaa5500 at ya.ru Thu Jul 27 10:15:41 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 27 Jul 2017 11:15:41 +0300 Subject: [Lazarus] ComparePoints func In-Reply-To: <20170726205414.63d27a82@darkbreed> References: <416a225d-da1e-d3df-4b5c-4d63ab380cf3@ya.ru> <51444dae-fd47-48de-7ae7-ceb98b564249@ya.ru> <20170726205414.63d27a82@darkbreed> Message-ID: <35ac5fde-65c0-16c7-9210-6aba37f44a60@ya.ru> >Therefore it makes no sense to introduce a general ComparePoints-function. Yes, it is right, func not needed. And my case [compare source editor x/y coords] is rare. -- Regards, Alexey From aaa5500 at ya.ru Thu Jul 27 10:22:08 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 27 Jul 2017 11:22:08 +0300 Subject: [Lazarus] Display multiple images In-Reply-To: <16bda11275dc7114de7797d872bec61c@z505.com> References: <16bda11275dc7114de7797d872bec61c@z505.com> Message-ID: <98bddfef-d682-fd4b-d870-dbf4716442af@ya.ru> Old from me, 2008 year, Delphi only http://atviewer.sourceforge.net/atimagemap.htm Alex From noreply at z505.com Thu Jul 27 23:24:13 2017 From: noreply at z505.com (noreply at z505.com) Date: Thu, 27 Jul 2017 16:24:13 -0500 Subject: [Lazarus] Display multiple images In-Reply-To: <98bddfef-d682-fd4b-d870-dbf4716442af@ya.ru> References: <16bda11275dc7114de7797d872bec61c@z505.com> <98bddfef-d682-fd4b-d870-dbf4716442af@ya.ru> Message-ID: On 2017-07-27 03:22, Alexey via Lazarus wrote: > Old from me, 2008 year, Delphi only > http://atviewer.sourceforge.net/atimagemap.htm > > Alex That looks really neat ! Were there reasons you decided to not port to lazarus (too difficult).. As I could start a project attempting to convert it to Lazarus From aaa5500 at ya.ru Fri Jul 28 12:31:13 2017 From: aaa5500 at ya.ru (Alexey) Date: Fri, 28 Jul 2017 13:31:13 +0300 Subject: [Lazarus] LCL don't paint to canvas if a key is holded Message-ID: Problem: CudaText editor opens 400K file at the end, syntax parser is slow, I hold "d" char. expected: "d" or "d"*n chars appears from time to time. Eg each 1-2 seconds. Seen: "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" chars appears each 5-6 seconds. Not ok. Maybe LCL don't call Paint method during holding a key (if component paints slowly)? How to solve it? Or i must force repaint to canvas each 1-2 seconds (not all platforms support it, Mac don't). ps. Ubuntu x64 gtk2 -- Regards, Alexey From nc-gaertnma at netcologne.de Fri Jul 28 12:46:35 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 28 Jul 2017 12:46:35 +0200 Subject: [Lazarus] LCL don't paint to canvas if a key is holded In-Reply-To: References: Message-ID: <20170728124635.04aa15fc@limapholos.matflo.wg> On Fri, 28 Jul 2017 13:31:13 +0300 Alexey via Lazarus wrote: > Problem: CudaText editor opens 400K file at the end, syntax parser is > slow, I hold "d" char. expected: "d" or "d"*n chars appears from time to > time. Eg each 1-2 seconds. Seen: > "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" > chars appears each 5-6 seconds. Not ok. > > Maybe LCL don't call Paint method during holding a key (if component > paints slowly)? How to solve it? Or i must force repaint to canvas each > 1-2 seconds (not all platforms support it, Mac don't). A forced repaint will only decrease the responsiveness of your application even more. If the syntax parser is so slow, the first thing to do is to *not* call it after every key stroke. Call it on idle or in OnPaint. Mattias From donald at ziesig.org Fri Jul 28 20:00:34 2017 From: donald at ziesig.org (Donald Ziesig) Date: Fri, 28 Jul 2017 14:00:34 -0400 Subject: [Lazarus] TStatusBar initialization problem. Message-ID: <4a214231-5222-e2a6-bbcc-4bde21c8431d@ziesig.org> Hi Everyone! I am writing a new app that will use a StatusBar at the bottom of the main window (just like I have done many times in the past - with both Delphi and Lazarus). Strangely enough, even though I have nothing but the gui implemented (no app specific code, etc.), the StatusBar does NOT display until I manually resize the main window, at which time, it appears as appropriate with its two panels visible. To isolate the problem further, I temporarily set the color to blue to see if it were only panel contents that were not showing. In this test, the blue status bar again does not appear until the main form is manually resized. I have tried a number of hacks, such as programatically changing the Height and/or Width during 1) OnCreate, 2) OnShow, 3) OnPaint, 4) OnTimer (added a hack timer and tried resizing during the event). None of these worked :-(. I am running Lazarus 1.9 dated 2017-04-17 with high resolution (144 DPI), FPC 3.0.2 (I think I am running the qt toolset, but don't know how to determine that.) This mostly works well (I have a few minor problems with the internal sizing of some controls and control-editors). Does anyone have an idea for a work around, or suggestions as to where to find the code for TStatusBar? Thanks, Don Ziesig From l at c-m-w.me.uk Sat Jul 29 10:24:17 2017 From: l at c-m-w.me.uk (C Western) Date: Sat, 29 Jul 2017 09:24:17 +0100 Subject: [Lazarus] TStatusBar initialization problem. In-Reply-To: <4a214231-5222-e2a6-bbcc-4bde21c8431d@ziesig.org> References: <4a214231-5222-e2a6-bbcc-4bde21c8431d@ziesig.org> Message-ID: <2f9cb3ee-0649-2581-be9b-97dfe9e1827a@c-m-w.me.uk> On 28/07/17 19:00, Donald Ziesig via Lazarus wrote: > Hi Everyone! > > I am writing a new app that will use a StatusBar at the bottom of the > main window (just like I have done many times in the past - with both > Delphi and Lazarus). Strangely enough, even though I have nothing but > the gui implemented (no app specific code, etc.), the StatusBar does NOT > display until I manually resize the main window, at which time, it > appears as appropriate with its two panels visible. To isolate the > problem further, I temporarily set the color to blue to see if it were > only panel contents that were not showing. In this test, the blue > status bar again does not appear until the main form is manually resized. https://bugs.freepascal.org/view.php?id=31621 is similar. My issue seems related to changes to the form as it is being created; you don't say of you are doing something along these lines. Unfortunately the re-sizing code is sufficiently complicated I haven't been able to identify any solutions. Colin From pascaldragon at googlemail.com Sat Jul 29 12:19:59 2017 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 29 Jul 2017 12:19:59 +0200 Subject: [Lazarus] Breaking change In-Reply-To: References: Message-ID: Am 23.07.2017 12:50 schrieb "Michael Van Canneyt via Lazarus" < lazarus at lists.lazarus-ide.org>: > > Hello, > > I have fixed bug 28760: > > https://bugs.freepascal.org/view.php?id=28760 > > This will cause compilation of win32wsdialogs.pp to fail, in particular in > > class procedure TWin32WSOpenDialog.SetupVistaFileDialog(ADialog: IFileDialog; const AOpenDialog: TOpenDialog); > > search for: > > if InitialDir <> '' then > begin > if Succeeded(SHCreateItemFromParsingName(PWideChar(UTF8ToUTF16(InitialDir)), nil, IShellItem, DefaultFolderItem)) then > ADialog.SetFolder(DefaultFolderItem); > end; > > Directly passing an interface where (T)REFIID is expected, will no longer be possible. I reverted the changes by Michael and changed the parameters of those functions to constref instead. However that doesn't mean that there won't be breaking changes: there are some interfaces that take REFIID (or TGuid parameters that are generally used with interface IIDs) and those will need to be changed as well. Most will be interface which have implementations provided by e.g. Windows, but in some cases those might be implemented by users and thus will lead to compilation failures (but at least those will be easy to spot :) ). Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Sun Jul 30 00:50:18 2017 From: aaa5500 at ya.ru (Alexey) Date: Sun, 30 Jul 2017 01:50:18 +0300 Subject: [Lazarus] TCustomControl.Caption setter needs Invalidate Message-ID: <3c677730-31fb-b948-354f-09b5187155c7@ya.ru> TCustomControl.Caption setter (ie TControl.SetText) misses Invalidate call. So, my ATButtons (ATButton based on CustomControl) miss visual update, when user changes app i18n. -- Regards, Alexey From md at delfire.net Sun Jul 30 01:39:57 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Sat, 29 Jul 2017 20:39:57 -0300 Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more Message-ID: Hi, Nowadays, we have full Unicode support in FPC. So, my question is: The units bellow is still necessary to use XML with Lazarus or we can use just the original provided by FCL? laz2_DOM laz2_XMLRead laz2_XMLWrite laz2_XMLCfg laz2_XMLUtils laz_XMLStreaming See here http://wiki.lazarus.freepascal.org/XML_Tutorial Best regards, Marcos Douglas From md at delfire.net Sun Jul 30 01:42:36 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Sat, 29 Jul 2017 20:42:36 -0300 Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more In-Reply-To: References: Message-ID: On Sat, Jul 29, 2017 at 8:39 PM, Marcos Douglas B. Santos wrote: > Hi, > > Nowadays, we have full Unicode support in FPC. > So, my question is: The units bellow... below* Marcos Douglas From vojtech.cihak at atlas.cz Sun Jul 30 05:02:58 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sun, 30 Jul 2017 05:02:58 +0200 Subject: [Lazarus] =?utf-8?q?TCustomControl=2ECaption_setter_needs_Invalid?= =?utf-8?q?ate?= In-Reply-To: 0000000079a80000944c012b5032 References: 0000000079a80000944c012b5032 Message-ID: <20170730050258.F7C80225@atlas.cz> Hi,   you have to override one of these methods:   procedure RealSetText; override;  //this is done in TSpeedBtn or procedure TextChanged; override;  //this is what I do in some components of ECControl   and call Invalidate; (and inherited;) there.   V. ______________________________________________________________ > Od: Alexey via Lazarus > Komu: Lazarus mailing list > Datum: 30.07.2017 00:50 > Předmět: [Lazarus] TCustomControl.Caption setter needs Invalidate > TCustomControl.Caption setter (ie TControl.SetText) misses Invalidate call. So, my ATButtons (ATButton based on CustomControl) miss visual update, when user changes app i18n. -- 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 lazarus at kluug.net Sun Jul 30 07:52:06 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 30 Jul 2017 07:52:06 +0200 Subject: [Lazarus] TCustomControl.Caption setter needs Invalidate In-Reply-To: <3c677730-31fb-b948-354f-09b5187155c7@ya.ru> References: <3c677730-31fb-b948-354f-09b5187155c7@ya.ru> Message-ID: <0af41531-d5ce-d892-8740-94487f00ff0a@kluug.net> On 30.07.2017 0:50, Alexey via Lazarus wrote: > TCustomControl.Caption setter > (ie TControl.SetText) > misses Invalidate call. > So, my ATButtons (ATButton based on CustomControl) miss > visual update, when user changes app i18n. TCustomControl doesn't paint the caption so it doesn't need the Invalidate call. Ondrej From sysrpl at gmail.com Sun Jul 30 09:32:30 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 30 Jul 2017 03:32:30 -0400 Subject: [Lazarus] TCustomControl.Caption setter needs Invalidate In-Reply-To: <0af41531-d5ce-d892-8740-94487f00ff0a@kluug.net> References: <3c677730-31fb-b948-354f-09b5187155c7@ya.ru> <0af41531-d5ce-d892-8740-94487f00ff0a@kluug.net> Message-ID: While we're at it, why is THintWindow.Paint moved to public? Please fix back to protected. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sun Jul 30 10:00:33 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 30 Jul 2017 10:00:33 +0200 (CEST) Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more In-Reply-To: References: Message-ID: On Sat, 29 Jul 2017, Marcos Douglas B. Santos via Lazarus wrote: > Hi, > > Nowadays, we have full Unicode support in FPC. > So, my question is: The units bellow is still necessary to use XML > with Lazarus or we can use just the original provided by FCL? > > laz2_DOM > laz2_XMLRead > laz2_XMLWrite > laz2_XMLCfg > laz2_XMLUtils > laz_XMLStreaming The FPC units use UnicodeString (UTF16), the lazarus units use UTF8. If the end result is used excluively in UTF8 strings, the lazarus version may be faster as there will be less conversions. Michael. From michalis.kambi at gmail.com Sun Jul 30 10:29:08 2017 From: michalis.kambi at gmail.com (Michalis Kamburelis) Date: Sun, 30 Jul 2017 10:29:08 +0200 Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more In-Reply-To: References: Message-ID: 2017-07-30 10:00 GMT+02:00 Michael Van Canneyt via Lazarus : > > > On Sat, 29 Jul 2017, Marcos Douglas B. Santos via Lazarus wrote: > >> Hi, >> >> Nowadays, we have full Unicode support in FPC. >> So, my question is: The units bellow is still necessary to use XML >> with Lazarus or we can use just the original provided by FCL? >> >> laz2_DOM >> laz2_XMLRead >> laz2_XMLWrite >> laz2_XMLCfg >> laz2_XMLUtils >> laz_XMLStreaming > > > The FPC units use UnicodeString (UTF16), the lazarus units use UTF8. > If the end result is used excluively in UTF8 strings, the lazarus version > may be > faster as there will be less conversions. > I wonder if we can move the UTF8-based XML units to FPC, to be available in the main FPC distribution too? (Possibly renamed like Utf8_XMLXxx or such, instead of LazX_XMLXxx.) The reason I ask: This requirement (wanting to have XML units based on AnsiStrings, not WideStrings, because your data is almost always in UTF8 and you're fine storing it in AnsiString ) is not really specific to Lazarus, or applications build on top of Lazarus. E.g. in Castle Game Engine I would prefer using UTF8-based XML units too, I often read UTF8 XML files (like X3D, Collada 3D models). But I don't want the "core" CGE to depend on LCL (this makes the process of building and testing simpler -- you can use CGE components in Lazarus, but you can also use CGE with our own minimalistic window management without Lazarus). Regards, Michalis From lazarus at kluug.net Sun Jul 30 10:43:08 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 30 Jul 2017 10:43:08 +0200 Subject: [Lazarus] TCustomControl.Caption setter needs Invalidate In-Reply-To: References: <3c677730-31fb-b948-354f-09b5187155c7@ya.ru> <0af41531-d5ce-d892-8740-94487f00ff0a@kluug.net> Message-ID: <0778f38f-e3d4-aab6-b6c5-107318e23cf5@kluug.net> On 30.07.2017 9:32, Anthony Walter wrote: > While we're at it, why is THintWindow.Paint moved to public? Please > fix back to protected. Correct. Moved to protected. Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sun Jul 30 11:01:57 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 30 Jul 2017 11:01:57 +0200 (CEST) Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more In-Reply-To: References: Message-ID: On Sun, 30 Jul 2017, Michalis Kamburelis via Lazarus wrote: > 2017-07-30 10:00 GMT+02:00 Michael Van Canneyt via Lazarus > : >> >> >> On Sat, 29 Jul 2017, Marcos Douglas B. Santos via Lazarus wrote: >> >>> Hi, >>> >>> Nowadays, we have full Unicode support in FPC. >>> So, my question is: The units bellow is still necessary to use XML >>> with Lazarus or we can use just the original provided by FCL? >>> >>> laz2_DOM >>> laz2_XMLRead >>> laz2_XMLWrite >>> laz2_XMLCfg >>> laz2_XMLUtils >>> laz_XMLStreaming >> >> >> The FPC units use UnicodeString (UTF16), the lazarus units use UTF8. >> If the end result is used excluively in UTF8 strings, the lazarus version >> may be >> faster as there will be less conversions. >> > > I wonder if we can move the UTF8-based XML units to FPC, to be > available in the main FPC distribution too? (Possibly renamed like > Utf8_XMLXxx or such, instead of LazX_XMLXxx.) > > The reason I ask: > > This requirement (wanting to have XML units based on AnsiStrings, not > WideStrings, because your data is almost always in UTF8 and you're > fine storing it in AnsiString ) is not really specific to Lazarus, or > applications build on top of Lazarus. E.g. in Castle Game Engine I > would prefer using UTF8-based XML units too, I often read UTF8 XML > files (like X3D, Collada 3D models). But I don't want the "core" CGE > to depend on LCL (this makes the process of building and testing > simpler -- you can use CGE components in Lazarus, but you can also use > CGE with our own minimalistic window management without Lazarus). That is up to the Lazarus people. If they are fine with that: no problem for FPC. I do think that it probably uses some utility functions/units which then also need to be included in FPC. It also means there are 2 codebases. An alternative approach would be to do what we do in other units as well, use 1 codebase for 2 kinds of strings: unit dom; Type DOMString = UnicodeString; {$DEFINE USEUNICODESTRING} {$i DOMh.inc} and unit domutf8; Type DOMString = UTF8String; {$DEFINE USEUTF8STRING} {$i DOMh.inc} etc. Combined with some macro magic, I think this should be doable too. Michael. From juha.manninen62 at gmail.com Sun Jul 30 14:45:05 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 30 Jul 2017 15:45:05 +0300 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: On Thu, Jul 27, 2017 at 1:24 AM, Anthony Walter via Lazarus wrote: > Please see issue #32209 for a working fix. Someone familiar with the LCL Qt > widget implementation needs to look at this in more depth. The issue appears to be inherent to QT, not caused by LCL-QT code. I added a comment in the bug tracker issue. I copy it here to reach more people: I don't see any good reason for using PostMessage in Sparta form designer code. It only makes the code more difficult to read and more prone to widgetset specific problems, as we saw. The messages WM_SETNOFRAME = WM_USER; WM_BoundToDesignTabSheet = WM_USER + 1; and their handlers should be replaced with normal functions. Any possible recursion can be avoided by boolean flags. If the operation must be delayed, then OnIdle is the right way to go. Or, is there something I don't understand? Regards, Juha From md at delfire.net Sun Jul 30 15:45:13 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Sun, 30 Jul 2017 10:45:13 -0300 Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more In-Reply-To: References: Message-ID: On Sun, Jul 30, 2017 at 5:00 AM, Michael Van Canneyt via Lazarus wrote: > > The FPC units use UnicodeString (UTF16), the lazarus units use UTF8. > If the end result is used excluively in UTF8 strings, the lazarus version > may be > faster as there will be less conversions. Thank you. Marcos Douglas From md at delfire.net Sun Jul 30 15:51:03 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Sun, 30 Jul 2017 10:51:03 -0300 Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more In-Reply-To: References: Message-ID: On Sun, Jul 30, 2017 at 5:29 AM, Michalis Kamburelis via Lazarus wrote: > > I wonder if we can move the UTF8-based XML units to FPC, to be > available in the main FPC distribution too? (Possibly renamed like > Utf8_XMLXxx or such, instead of LazX_XMLXxx.) +1 However, a better name for the unit could be domutf8, using FPC naming pattern. Regards, Marcos Douglas From werner.pamler at freenet.de Sun Jul 30 17:06:51 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Sun, 30 Jul 2017 17:06:51 +0200 Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more In-Reply-To: References: Message-ID: <2bd9554f-1f22-8e3e-71ed-71eb62ffc97f@freenet.de> Am 30.07.2017 um 10:29 schrieb Michalis Kamburelis via Lazarus: > I often read UTF8 XML files (like X3D, Collada 3D models). But I don't > want the "core" CGE to depend on LCL The Lazarus xml procedures are in package LazUtils which is a prerequisite for, but not part of, LCL. So, you can use these procedures without adding a requirement for LCL, LazUtils is sufficient. From juha.manninen62 at gmail.com Sun Jul 30 17:34:02 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 30 Jul 2017 18:34:02 +0300 Subject: [Lazarus] FCL DOM [vs] laz2_DOM, and more In-Reply-To: <2bd9554f-1f22-8e3e-71ed-71eb62ffc97f@freenet.de> References: <2bd9554f-1f22-8e3e-71ed-71eb62ffc97f@freenet.de> Message-ID: On Sun, Jul 30, 2017 at 6:06 PM, Werner Pamler via Lazarus wrote: > The Lazarus xml procedures are in package LazUtils which is a prerequisite > for, but not part of, LCL. So, you can use these procedures without adding a > requirement for LCL, LazUtils is sufficient. Exactly. The earlier Lazarus Unicode support was specific to LCL which apparently still creates confusion. Now you can use LazUtils for a Lazarus project, or just copy 1 or 2 needed unit files from it to a non-Lazarus project. Juha From sysrpl at gmail.com Sun Jul 30 18:03:23 2017 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 30 Jul 2017 12:03:23 -0400 Subject: [Lazarus] Sparta Form Designer change In-Reply-To: References: Message-ID: Please check the issue in question. I just posted a threadless fix. -------------- next part -------------- An HTML attachment was scrubbed... URL: