From michael at freepascal.org Sun Sep 1 11:31:17 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 1 Sep 2019 11:31:17 +0200 (CEST) Subject: [Lazarus] [fpc-pascal] Tests results of several pascal based JSON parsers In-Reply-To: References: Message-ID: On Sat, 31 Aug 2019, Anthony Walter via lazarus wrote: > Michael, > > > Real world examples of never used JSON fields: > > Calling most web REST methods which return JSON as a web result where the > caller is only interested in success or failure with a message. > Acting as a RESTful service where many JSON request bodies use optional > values that are meant to be skipped. > Retrieving settings where and option is never used, yet stored, such as a > dockable or floating pallet position that is always left closed. In my experience these are a minority of the scenarios. They look to me also as the scenarios where speed is largely irrelevant since the structures will be small. Most of the time I see code getting a result of a REST server and displaying the result in a grid or inserting in a database. In these scenarios, all values are always evaluated. lazy evaluation will not give you performance improvements in such scenarios. So use cases clearly vary, and as usual you should pick the technology that is best suited for the job at hand. For me the result of the whole discussion is that we've managed to establish that fpjson is functioning correct (it triggered the discussion in the first place), and I did some long-due speed improvements on fpjson. The speed difference between a stream or string as a JSON source has also been eliminated. All in all a positive result. Michael. From fpc at pascalprogramming.org Sun Sep 1 17:37:48 2019 From: fpc at pascalprogramming.org (Marco van de Voort) Date: Sun, 1 Sep 2019 17:37:48 +0200 Subject: [Lazarus] Tests results of several pascal based JSON parsers In-Reply-To: References: Message-ID: <63275e6a-47ea-2300-fc8a-197650fdd185@pascalprogramming.org> Op 2019-08-30 om 10:18 schreef Anthony Walter via lazarus: > I've posted a new page that tests the speed and correctness of several > pascal based JSON parsers. > > https://www.getlazarus.org/json/tests/ > > In full disclosure I am the author of the new open source JsonTools > library, and even though my parser seems to a big improvement over the > other alternatives, my tests were not biased. > > If anyone would like help in replication the tests, let me know and > I'll see what I can do. > > Also, to be thorough, you should read through both the article I > posted at the top this message, and my original page > which has been updated with more > information. Both pages took some time to write, and I promise if you > read through them some of your questions will be answered without > having to ask others for help or insight. > I only looked superficially, but I miss a test on a large files, only files of a few kb repeated 100000 times. The large file case is a good test for scaling of internal datastructures. From serbod at gmail.com Mon Sep 2 10:03:54 2019 From: serbod at gmail.com (Sergey Bodrov) Date: Mon, 2 Sep 2019 11:03:54 +0300 Subject: [Lazarus] Tests results of several pascal based JSON parsers In-Reply-To: References: Message-ID: пт, 30 авг. 2019 г. в 11:18, Anthony Walter via lazarus < lazarus at lists.lazarus-ide.org>: > I've posted a new page that tests the speed and correctness of several > pascal based JSON parsers. > > Thanks for testing! My JsonStorage seems to be outsider. =) Actually, my work requires more effective serializers, such as Protobuffers, ASN.1 or Thrift. But I shoose Bencode, it simple and almost human-readable text, but fast and compact as binary. Most serialization protocols use same data structures - numbers, literals, lists and records. Pascal type Variant suitable for any data, except records (dictionary, name-value pairs). So, if we add records to Variant, it will become serializable/deserializabe to many protocols. Also, it can be used to store publushed properties and used to transfer data between different objects/classes/records, that supports RTTI. Even without RTTI, Variants can be used to store name-value pairs as name-indexed array, it very handy, and present in many modern programming languages. "Variant record" can be static, initialized once, like VarArrayCreate(), don't allow appending new name-values. -- *Bodrov Sergey* software development, IT consulting http://www.serbod.com *Phone (Belarus):* +375(25)794-21-58 *Skype:* sergey.bodrov1 *e-mail:* serbod at gmail.com, oxotnuk at yandex.ru -------------- next part -------------- An HTML attachment was scrubbed... URL: From luizamericop at gmail.com Mon Sep 2 18:24:32 2019 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Mon, 2 Sep 2019 13:24:32 -0300 Subject: [Lazarus] Tests results of several pascal based JSON parsers In-Reply-To: <63275e6a-47ea-2300-fc8a-197650fdd185@pascalprogramming.org> References: <63275e6a-47ea-2300-fc8a-197650fdd185@pascalprogramming.org> Message-ID: Em dom, 1 de set de 2019 às 12:37, Marco van de Voort via lazarus < lazarus at lists.lazarus-ide.org> escreveu: > > I only looked superficially, but I miss a test on a large files, only > files of a few kb repeated 100000 times. > > The large file case is a good test for scaling of internal datastructures. > > Here you can find some real use json for testing, including a big one (1.6MB) Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From luizamericop at gmail.com Mon Sep 2 18:24:53 2019 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Mon, 2 Sep 2019 13:24:53 -0300 Subject: [Lazarus] Tests results of several pascal based JSON parsers In-Reply-To: References: <63275e6a-47ea-2300-fc8a-197650fdd185@pascalprogramming.org> Message-ID: Em seg, 2 de set de 2019 às 13:24, Luiz Americo Pereira Camara < luizamericop at gmail.com> escreveu: > > > Em dom, 1 de set de 2019 às 12:37, Marco van de Voort via lazarus < > lazarus at lists.lazarus-ide.org> escreveu: > >> >> I only looked superficially, but I miss a test on a large files, only >> files of a few kb repeated 100000 times. >> >> The large file case is a good test for scaling of internal datastructures. >> >> > Here you can find some real use json for testing, including a big one > (1.6MB) > > https://github.com/RichardHightower/json-parsers-benchmark/tree/master/data > Luiz > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Wed Sep 4 13:32:03 2019 From: aaa5500 at ya.ru (Alexey Tor.) Date: Wed, 4 Sep 2019 14:32:03 +0300 Subject: [Lazarus] IDE: on deleting build-modes, I got change in .lpr file Message-ID: I deleted 2 build modes, and diff shows that also the .lpr file was changed. Space was deleted near the :=. --- a/app/cudatext.lpr +++ b/app/cudatext.lpr @@ -28,7 +28,7 @@ begin    if Screen.MonitorCount>1 then      Application.MainFormOnTaskBar:= True;    {$IFEND} -  Application.Title:= 'CudaText'; +  Application.Title:='CudaText';    Application.Scaled:= false;    RequireDerivedFormResource:= True;    Application.Initialize; -- Regards, Alexey From badsectoracula at gmail.com Wed Sep 4 14:01:37 2019 From: badsectoracula at gmail.com (Kostas Michalopoulos) Date: Wed, 4 Sep 2019 14:01:37 +0200 Subject: [Lazarus] Cross-platform project. Font sizes not the same.... In-Reply-To: References: <9opole53vth2s7iidcb3jel06erh2iul01@4ax.com> Message-ID: I *highly* recommend to avoid changing font sizes, users select themes because they want applications to use them, so it is better to stick with their choices and use autosizing (the default setting for most controls), the align property and the anchor editor. Here is an old (but still valid) video i made ~6 years ago where i quickly show the anchor editor in practice: https://www.youtube.com/watch?v=neigk9Pt21o Using the anchor editor you can create UIs that dynamically adjust position and size based on the user settings and allow the user to resize windows. Generally speaking try to design UIs that use as little fixed positioning as possible. Fixed positioning (that is, dragging and dropping a control on the form and manually adjusting its position and size there with the mouse) is fine for simple applications that will only work on Windows or macOS that traditionally has kept font sizes the same over the years (though even then on Windows you can use different fonts and some people do), but on Linux you simply cannot rely on anything to be constant and fixed positioning can only be used as a starting point for your layout (ie. place the controls manually in a fixed position+size and then open the anchor editor and start stitching them together one by one - this is basically what i do in the video above). Kostas On Thu, Aug 22, 2019 at 10:50 AM Bo Berglund via lazarus wrote: > > On Tue, 20 Aug 2019 23:47:39 +0200, Bo Berglund via lazarus > wrote: > > >I can go into the font property of affected controls and change the > >font size to make it look better, but there are so many... > > In fact there are not that many controls so I tried to do the > following on Windows: > > procedure TfrmMain.SetFontSize(S: integer); > begin > // Set font size on load. > btnDec60.Font.Size := S; > btnDec30.Font.Size := S; > btnDec10.Font.Size := S; > btnDec1.Font.Size := S; > btnInc1.Font.Size := S; > btnInc10.Font.Size := S; > btnInc30.Font.Size := S; > btnInc60.Font.Size := S; > btnCutStart.Font.Size := S; > btnCutEnd.Font.Size := S; > btnAddCut.Font.Size := S; > btnJump.Font.Size := S; > btnShiftAudio.Font.Size := S; > speDelay.Font.Size := S; > stxCutStart.Font.Size := S; > stxCutEnd.Font.Size := S; > stxCutTime.Font.Size := S; > stxClipCnt.Font.Size := S; > gbxCut.Font.Size := S; > ckbLogin.Font.Size := S; > end; > > procedure TfrmMain.FormShow(Sender: TObject); > begin > SetFontSize(9); > end; > > This works just fine on Windows so I went to my RPi4 and opened the > project there and added these two procedures also to that instance of > the project, thinking it would at laset fix the font size temporarily. > But when I run this I get an exception! > > --------------------------------------------------------------------- > Debugger Exception Notification > Project VideoPlayer raised exception class 'EReadError' with message: > Invalid value for property > At address C4920 > > [] Ignore this exception type [Break] [Continue] > --------------------------------------------------------------------- > > If I check the Ignore checkbox and contine I get another error: > > --------------------------------------------------------- > Error reading frmMain.OnShow: Invalid value for property > Press OK to ignore and risk data corruption > Press Abort to kill the program > [Abort] [OK] > --------------------------------------------------------- > > Strangely it did not manage to handle the integer value for font size > so I redefined the SetFontSize procedure to be declared as follows: > > procedure TfrmMain.SetFontSize(S: shortint); > > With this in place the form in Linux became the same as on Windows > size-wise regarding texts. > > Maybe a difference between the operating systems, I think Raspbian is > still a 32 bit system whereas Lazarus on Window 7 x64 is a 64 bit > program on a 64 bit OS. > > -- > Bo Berglund > Developer in Sweden > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus From lazarus at kluug.net Wed Sep 4 20:02:28 2019 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 4 Sep 2019 20:02:28 +0200 Subject: [Lazarus] LazDataDesktop: transaction handling Message-ID: <8be786e8-1933-f65e-3b6a-1cb1f9e33939@kluug.net> Hello (Michael)! I started to use LazDataDesktop because PgAdmin4 is horrible. I have a problem with transactions with Postgres connection (well I tested only Postgres connection). I found out that when using the SQL editor, I can type "COMMIT" and "ROLLBACK" - so far so good. (Well I would like to have a tool button for these commands but OK for now - I may add them in the future.) The real problem: I cannot apply edited data from the DB grid. I keep getting this error: I have clicked on the tick button - it got disabled. I have also clicked on the button next to refresh - well I don't know that the button does because it has no hint and caption, but I clicked on it nevertheless :) : But still I get the error above and the data is not written. How can I commit the changes made in the data grid? Thanks Ondrej -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: lmoehodfcphgdjdf.png Type: image/png Size: 6084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cejbjkbmhimcgopc.png Type: image/png Size: 3887 bytes Desc: not available URL: From lacak at zoznam.sk Thu Sep 5 07:21:15 2019 From: lacak at zoznam.sk (LacaK) Date: Thu, 5 Sep 2019 07:21:15 +0200 Subject: [Lazarus] LazDataDesktop: transaction handling In-Reply-To: <8be786e8-1933-f65e-3b6a-1cb1f9e33939@kluug.net> References: <8be786e8-1933-f65e-3b6a-1cb1f9e33939@kluug.net> Message-ID: <66812528-5122-393e-3229-985e0710ba31@zoznam.sk> If data of underlaying TSQLQuery are presented and edited only thorought this DBGrid then I would add to TSQLQuery option "sqoAutoApplyUpdates". (I am not familiar with architecture of LazDataDesktop) Which causes that on every Post/Delete updates are applied to database. There will remain option to commit or rollback changes. L. Dňa 4.9.2019 o 20:02 Ondrej Pokorny via lazarus napísal(a): > > Hello (Michael)! > > I started to use LazDataDesktop because PgAdmin4 is horrible. > > I have a problem with transactions with Postgres connection (well I > tested only Postgres connection). > > I found out that when using the SQL editor, I can type "COMMIT" and > "ROLLBACK" - so far so good. (Well I would like to have a tool button > for these commands but OK for now - I may add them in the future.) > > The real problem: I cannot apply edited data from the DB grid. I keep > getting this error: > > I have clicked on the tick button - it got disabled. I have also > clicked on the button next to refresh - well I don't know that the > button does because it has no hint and caption, but I clicked on it > nevertheless :) : > > But still I get the error above and the data is not written. > > How can I commit the changes made in the data grid? > > Thanks > Ondrej > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: lmoehodfcphgdjdf.png Type: image/png Size: 6084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cejbjkbmhimcgopc.png Type: image/png Size: 3887 bytes Desc: not available URL: From michael at freepascal.org Thu Sep 5 08:20:36 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 5 Sep 2019 08:20:36 +0200 (CEST) Subject: [Lazarus] LazDataDesktop: transaction handling In-Reply-To: <66812528-5122-393e-3229-985e0710ba31@zoznam.sk> References: <8be786e8-1933-f65e-3b6a-1cb1f9e33939@kluug.net> <66812528-5122-393e-3229-985e0710ba31@zoznam.sk> Message-ID: On Thu, 5 Sep 2019, LacaK via lazarus wrote: > If data of underlaying TSQLQuery are presented and edited only thorought this > DBGrid then I would add to TSQLQuery option "sqoAutoApplyUpdates". > (I am not familiar with architecture of LazDataDesktop) > Which causes that on every Post/Delete updates are applied to database. > There will remain option to commit or rollback changes. The grid was never meant to be editable. I simply forgot to disable that. (I myself never ever edit in a grid, it didn't appear in my head that someone would do this) But I will : a) Add the sqoAutoApplyUpdates option. b) Add buttons for more explicit transaction control. Michael. From lazarus at kluug.net Thu Sep 5 08:56:20 2019 From: lazarus at kluug.net (Ondrej Pokorny) Date: Thu, 5 Sep 2019 08:56:20 +0200 Subject: [Lazarus] LazDataDesktop: transaction handling In-Reply-To: References: <8be786e8-1933-f65e-3b6a-1cb1f9e33939@kluug.net> <66812528-5122-393e-3229-985e0710ba31@zoznam.sk> Message-ID: On 05.09.2019 8:20, Michael Van Canneyt via lazarus wrote: > The grid was never meant to be editable. I simply forgot to disable that. > (I myself never ever edit in a grid, it didn't appear in my head that > someone would do this) > > But I will : > a) Add the sqoAutoApplyUpdates option. > b) Add buttons for more explicit transaction control. Thank you Michael. I assume I can help you with that. I can also help with the editable grid. Editing could be enabled only if the table has a primary key or a unique index, for example. I sometimes need to edit raw data when something went wrong during the development/debugging. (And I tend to be lazy to type an UPDATE statement manually although LazDataDesktop offers a template for it :) ) Ondrej From pascal at riekenberg.eu Fri Sep 6 08:05:57 2019 From: pascal at riekenberg.eu (Pascal Riekenberg) Date: Fri, 6 Sep 2019 08:05:57 +0200 (CEST) Subject: [Lazarus] Merge request Message-ID: <205280374.149811.1567749957172@ox.hosteurope.de> Hello, i've added a merge request to the wiki https://wiki.freepascal.org/Lazarus_2.0_fixes_branch#Submitted_by_developer_.2F_committer_and_waiting_for_testing_.28do_not_commit_yet.29 . Is this a proper way to request merges? Pascal -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Fri Sep 6 09:12:53 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 6 Sep 2019 09:12:53 +0200 (CEST) Subject: [Lazarus] Merge request In-Reply-To: <205280374.149811.1567749957172@ox.hosteurope.de> References: <205280374.149811.1567749957172@ox.hosteurope.de> Message-ID: On Fri, 6 Sep 2019, Pascal Riekenberg via lazarus wrote: > Hello, > > i've added a merge request to the wiki https://wiki.freepascal.org/Lazarus_2.0_fixes_branch#Submitted_by_developer_.2F_committer_and_waiting_for_testing_.28do_not_commit_yet.29 . > Is this a proper way to request merges? I would say it is a bit unusual. The bugtracker seems the correct way to me... Michael. From pascal at riekenberg.eu Fri Sep 6 09:57:10 2019 From: pascal at riekenberg.eu (Pascal Riekenberg) Date: Fri, 6 Sep 2019 09:57:10 +0200 (CEST) Subject: [Lazarus] Merge request In-Reply-To: References: <205280374.149811.1567749957172@ox.hosteurope.de> Message-ID: <1689219761.151011.1567756631140@ox.hosteurope.de> You mean i should open a new issue for the merge request? The requested merge is linked to an issue http://bugs.freepascal.org/view.php?id=0035240 already. Pascal > Michael Van Canneyt via lazarus hat am 6. September 2019 um 09:12 geschrieben: > > > > > On Fri, 6 Sep 2019, Pascal Riekenberg via lazarus wrote: > > > > Hello, > > > > i've added a merge request to the wiki https://wiki.freepascal.org/Lazarus_2.0_fixes_branch#Submitted_by_developer_.2F_committer_and_waiting_for_testing_.28do_not_commit_yet.29 . > > Is this a proper way to request merges? > > > > > I would say it is a bit unusual. The bugtracker seems the correct way to > me... > > Michael. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org mailto: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 Fri Sep 6 10:19:34 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 6 Sep 2019 10:19:34 +0200 (CEST) Subject: [Lazarus] Merge request In-Reply-To: <1689219761.151011.1567756631140@ox.hosteurope.de> References: <205280374.149811.1567749957172@ox.hosteurope.de> <1689219761.151011.1567756631140@ox.hosteurope.de> Message-ID: On Fri, 6 Sep 2019, Pascal Riekenberg via lazarus wrote: > You mean i should open a new issue for the merge request? > The requested merge is linked to an issue http://bugs.freepascal.org/view.php?id=0035240 already. Well, I think the lazarus team should answer this. I don't know how they work in such cases, but the wiki hardly seems a correct place to me for merge requests. Michael. From nc-gaertnma at netcologne.de Fri Sep 6 10:48:19 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 6 Sep 2019 10:48:19 +0200 Subject: [Lazarus] Merge request In-Reply-To: <205280374.149811.1567749957172@ox.hosteurope.de> References: <205280374.149811.1567749957172@ox.hosteurope.de> Message-ID: <20190906104819.5e89dee9@limapholos.matflo.wg> On Fri, 6 Sep 2019 08:05:57 +0200 (CEST) Pascal Riekenberg via lazarus wrote: > Hello, > > i've added a merge request to the wiki > https://wiki.freepascal.org/Lazarus_2.0_fixes_branch#Submitted_by_developer_.2F_committer_and_waiting_for_testing_.28do_not_commit_yet.29 . > Is this a proper way to request merges? Yes. Mattias From lazarus at mfriebe.de Fri Sep 6 12:24:59 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 6 Sep 2019 12:24:59 +0200 Subject: [Lazarus] Merge request In-Reply-To: <20190906104819.5e89dee9@limapholos.matflo.wg> References: <205280374.149811.1567749957172@ox.hosteurope.de> <20190906104819.5e89dee9@limapholos.matflo.wg> Message-ID: <12d09c47-f3ba-8181-b248-ba664a435535@mfriebe.de> On 06/09/2019 10:48, Mattias Gaertner via lazarus wrote: > On Fri, 6 Sep 2019 08:05:57 +0200 (CEST) > Pascal Riekenberg via lazarus wrote: > >> Hello, >> >> i've added a merge request to the wiki >> https://wiki.freepascal.org/Lazarus_2.0_fixes_branch#Submitted_by_developer_.2F_committer_and_waiting_for_testing_.28do_not_commit_yet.29 . >> Is this a proper way to request merges? > Yes. > > Mattias Actually the "submitted by developer" section is meant to be used by team members (usually, but not always the committer of the revision) only. That means the responsible member has signed the patch off. We used to have a "submitted by other" section. But putting something in there, did still mean you needed to catch the developers (who committed) eye, and have him sign off on it. Otherwise it would sit there forever. I moved them accordingly. But that means that you will need to ask the committer of that patch. From pascal at riekenberg.eu Fri Sep 6 12:33:13 2019 From: pascal at riekenberg.eu (Pascal Riekenberg) Date: Fri, 6 Sep 2019 12:33:13 +0200 (CEST) Subject: [Lazarus] Merge request In-Reply-To: <12d09c47-f3ba-8181-b248-ba664a435535@mfriebe.de> References: <205280374.149811.1567749957172@ox.hosteurope.de> <20190906104819.5e89dee9@limapholos.matflo.wg> <12d09c47-f3ba-8181-b248-ba664a435535@mfriebe.de> Message-ID: <64419471.153685.1567765994164@ox.hosteurope.de> What about reopening the original issue and request a merge? Pascal > Martin Frb via lazarus hat am 6. September 2019 um 12:24 geschrieben: > > > On 06/09/2019 10:48, Mattias Gaertner via lazarus wrote: > > On Fri, 6 Sep 2019 08:05:57 +0200 (CEST) > > Pascal Riekenberg via lazarus wrote: > > > >> Hello, > >> > >> i've added a merge request to the wiki > >> https://wiki.freepascal.org/Lazarus_2.0_fixes_branch#Submitted_by_developer_.2F_committer_and_waiting_for_testing_.28do_not_commit_yet.29 . > >> Is this a proper way to request merges? > > Yes. > > > > Mattias > Actually the "submitted by developer" section is meant to be used by > team members (usually, but not always the committer of the revision) only. > That means the responsible member has signed the patch off. > > > We used to have a "submitted by other" section. > But putting something in there, did still mean you needed to catch the > developers (who committed) eye, and have him sign off on it. Otherwise > it would sit there forever. > > I moved them accordingly. But that means that you will need to ask the > committer of that patch. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus From lazarus at mfriebe.de Fri Sep 6 18:17:21 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 6 Sep 2019 18:17:21 +0200 Subject: [Lazarus] Merge request (Attn Juha) In-Reply-To: <64419471.153685.1567765994164@ox.hosteurope.de> References: <205280374.149811.1567749957172@ox.hosteurope.de> <20190906104819.5e89dee9@limapholos.matflo.wg> <12d09c47-f3ba-8181-b248-ba664a435535@mfriebe.de> <64419471.153685.1567765994164@ox.hosteurope.de> Message-ID: Hi Juha, can you have a quick look if this commit of yours can be merged to 2.0 branch? r60719 IDE: Call DoCallBuildingFinishedHandler after ToolState is reset. Issue #0035240 On 06/09/2019 12:33, Pascal Riekenberg via lazarus wrote: > What about reopening the original issue and request a merge? Probably fine too. I would first put in here on the mail list. With a subject that catches the eye of the person responsible. That is often faster. I done that myself with fpc issues on the fpc list. ---------- I  had not actually looked at the issues. One was a fix to my report. I remember having tested the result myself. So I moved that to "confirmed". The other issue still needs to be looked at. The issue was assigned to Juha, so lets ping him. As a general note, it is a fixes branch. The issue reads like a feature / extension of existing abilities. Then again that does not need to be 100% strict. I.e. being IDE core code (not affecting user apps) and having been in trunk for a while suggest a very low risk. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Sat Sep 7 13:03:10 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 7 Sep 2019 14:03:10 +0300 Subject: [Lazarus] gtk2: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak Message-ID: New build of Lazarus (trunk) gives errors with CudaText gtk2 build. How to fix that? user at PC:~/cuda/cuda/app$ ./cudatext Gtk-Message: 14:01:37.977: Failed to load module "overlay-scrollbar" Gtk-Message: 14:01:37.987: Failed to load module "canberra-gtk-module" GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. -- Regards, Alexey From alexander.hofmann at new-h.de Wed Sep 11 09:46:00 2019 From: alexander.hofmann at new-h.de (Alexander Hofmann) Date: Wed, 11 Sep 2019 09:46:00 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? Message-ID: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> Hi all, I am currently wondering how to interpret the ModalResult of TTaskDialog if the Button "Close" was clicked. "Close" returns "mrAll" in windows and "mrAbort" in Linux (GTK2) - is that intended? I somehow expected mrClose. In the code of TTaskDialog, for ButtonIDs < 100, the ModalResult is directly translated from the ButtonID, so maybe it is intended? (taskdialog.inc, Lines 98 and following:) |*function *TCustomTaskDialog.ButtonIDToModalResult(*const *AButtonID: Integer ): TModalResult; *begin if *AButtonID<100 *then *Result := AButtonID <----- HERE *else if *(AButtonID-100 ModalResult" or alike. You can test by dropping a TTaskDialog on a form and using the following code at a TButton: |*procedure *TForm1.Button1Click(Sender: TObject); *begin *TaskDialog1.CommonButtons:=[tcbOk,tcbYes,tcbNo,tcbCancel,tcbRetry,tcbClose]; *if *TaskDialog1.Execute *then begin case *TaskDialog1.ModalResult *of *mrOK: Memo1.Lines.Add('mrOK'); mrCancel: Memo1.Lines.Add('mrCancel'); mrAbort: Memo1.Lines.Add('mrAbort'); mrRetry: Memo1.Lines.Add('mrRetry'); mrIgnore: Memo1.Lines.Add('mrIgnore'); mrYes: Memo1.Lines.Add('mrYes'); mrNo: Memo1.Lines.Add('mrNo'); mrAll: Memo1.Lines.Add('mrAll'); mrNoToAll: Memo1.Lines.Add('mrNoToAll'); mrYesToAll: Memo1.Lines.Add('mrYesToAll'); mrClose: Memo1.Lines.Add('mrClose'); *else *Memo1.Lines.Add(Format('Unknown: %d', [TaskDialog1.ModalResult])); *end*; *end*; *end*;| Thank you and with best wishes, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Wed Sep 11 13:41:23 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 11 Sep 2019 13:41:23 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? In-Reply-To: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> Message-ID: On Wed, Sep 11, 2019 at 9:46 AM Alexander Hofmann via lazarus wrote: > I am currently wondering how to interpret the ModalResult of TTaskDialog if the Button "Close" was clicked. "Close" returns "mrAll" in windows and "mrAbort" in Linux (GTK2) - is that intended? I somehow expected mrClose. In the code of TTaskDialog, for ButtonIDs < 100, the ModalResult is directly translated from the ButtonID, so maybe it is intended? (taskdialog.inc, Lines 98 and following:) Pressing Alt+F4 border icon gives mrAll, it should give mrCancel (pnButton=IDCANCEL according to https://docs.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-taskdialog). Pressing a button called Close should give mrClose IMO. The other CommonButtons modalresults seem fine. Tested on Win10. -- Bart From bartjunk64 at gmail.com Wed Sep 11 13:53:27 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 11 Sep 2019 13:53:27 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? In-Reply-To: References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> Message-ID: Pressing the Close button sets ButtonID correctly to 8, which is IDCLOSE (see LCLType unit), but mrClose equals to 11, so there it goes wrong. -- Bart From bartjunk64 at gmail.com Wed Sep 11 14:24:49 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 11 Sep 2019 14:24:49 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? In-Reply-To: References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> Message-ID: On Wed, Sep 11, 2019 at 1:53 PM Bart wrote: Possible fix: function TCustomTaskDialog.ButtonIDToModalResult(const AButtonID: Integer ): TModalResult; begin if AButtonID<100 then begin case AButtonID of IDOK: Result := mrOK; IDCANCEL: Result := mrCancel; IDABORT: Result := mrAbort; IDRETRY: Result := mrRetry; IDIGNORE: Result := mrIgnore; IDYES: Result := mrYes; IDNO: Result := mrNo; IDCLOSE: Result := mrClose; else Result := AButtonID end; end else if (AButtonID-100 References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> Message-ID: <2c796121-3634-952a-f10a-fe70e3c99da2@new-h.de> Am 11.09.19 um 14:24 schrieb Bart via lazarus: > On Wed, Sep 11, 2019 at 1:53 PM Bart wrote: > > Possible fix: Ok, so it's more like a bug than intended behavior. I'll see if I can test the fix on Win and Lin maybe this afternoon. I didn't check - but are the definitions of IDCLOSE different for Windows and Linux? Thanks, Alex From bartjunk64 at gmail.com Wed Sep 11 19:01:14 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 11 Sep 2019 19:01:14 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? In-Reply-To: <2c796121-3634-952a-f10a-fe70e3c99da2@new-h.de> References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> <2c796121-3634-952a-f10a-fe70e3c99da2@new-h.de> Message-ID: On Wed, Sep 11, 2019 at 3:07 PM Alexander Hofmann via lazarus wrote: > I didn't check - but are the definitions of IDCLOSE different for Windows > and Linux? No, they are (unconditionally) defined in LCLType. -- Bart From alexander.hofmann at new-h.de Wed Sep 11 21:30:47 2019 From: alexander.hofmann at new-h.de (Alexander Hofmann) Date: Wed, 11 Sep 2019 21:30:47 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? In-Reply-To: References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> <2c796121-3634-952a-f10a-fe70e3c99da2@new-h.de> Message-ID: <6e7ac516-1929-c3bc-7bed-7c527e428126@new-h.de> Hi, so - your patch indeed fixes it for Windows (where the native common controls dialog is used for Win 10). But - there's more logic behind it I think. For Linux (and Probably other platforms, too), independent of the widget set, in LCLTaskDialog.pas there's   TCommonButton = (     cbOK, cbYes, cbNo, cbCancel, cbRetry, cbClose);   and const   TD_BTNMOD: array[TCommonButton] of Integer = (     mrOk, mrYes, mrNo, mrCancel, mrRetry, mrAbort);  TD_BTNMOD is used exactly once again, where it serves to pass the ModalResult to the Button. So the "Close" button really gets assigned with "mrAbort" in Linux, where in Windows, the difference in idClose and mrClose is the culprit? Also, LCLTaskDialog seems to execute the native Windows Dialog independently of the selected Widgetset; though I don't think Qt or GTK is widely used on Windows anyway? I won't dig further on the latter, but should I file a bug about the Close/Abort thing? All the best, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 195 bytes Desc: OpenPGP digital signature URL: From bartjunk64 at gmail.com Wed Sep 11 22:39:33 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 11 Sep 2019 22:39:33 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? In-Reply-To: <6e7ac516-1929-c3bc-7bed-7c527e428126@new-h.de> References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> <2c796121-3634-952a-f10a-fe70e3c99da2@new-h.de> <6e7ac516-1929-c3bc-7bed-7c527e428126@new-h.de> Message-ID: On Wed, Sep 11, 2019 at 9:31 PM Alexander Hofmann via lazarus wrote: > I won't dig further on the latter, but should I file a bug about the Close/Abort thing? Yes, please do. -- Bart From bartjunk64 at gmail.com Thu Sep 12 18:40:16 2019 From: bartjunk64 at gmail.com (Bart) Date: Thu, 12 Sep 2019 18:40:16 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? In-Reply-To: References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> <2c796121-3634-952a-f10a-fe70e3c99da2@new-h.de> <6e7ac516-1929-c3bc-7bed-7c527e428126@new-h.de> Message-ID: On Wed, Sep 11, 2019 at 10:39 PM Bart wrote: > > I won't dig further on the latter, but should I file a bug about the Close/Abort thing? > > Yes, please do. Posted bugreport with possible patch: https://bugs.freepascal.org/view.php?id=36069 Maybe Zeljko or Juha can review the patch (I know next to nothing about TTaskDialog, other than the simulated one looks really ugly on Windows). -- Bart From mailinglists at geldenhuys.co.uk Thu Sep 12 20:01:21 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 12 Sep 2019 19:01:21 +0100 Subject: [Lazarus] Best examples of cross platform visual file or folder search application? In-Reply-To: References: Message-ID: <25502ea5-a752-48f3-087f-2cc07f5bcaac@geldenhuys.co.uk> On 22/08/2019 3:20 am, Anthony Walter via lazarus wrote: > Can anyone tell me if there are any popular minimal programs which allow > users to search for files or folders on their computer using wildcard I can think of a few, though the SearchRec is not hard to use at all, so is very easy to knock up exactly what you need. Anyway, take a look at these: * DoubleCmd (Double Commander) project * See the "Iterator Pattern" article I wrote. You can very quickly adapt the regex iterator by feeding it SearchRec results and then filter out the output. * In the fpGUI "core" code there is a cross-platform file searching class with filtering support. It is used to feed results into fpGUI's File Open/Save dialog. I'm sure there are many more such examples. 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 bartjunk64 at gmail.com Thu Sep 12 21:54:39 2019 From: bartjunk64 at gmail.com (Bart) Date: Thu, 12 Sep 2019 21:54:39 +0200 Subject: [Lazarus] Best examples of cross platform visual file or folder search application? In-Reply-To: <25502ea5-a752-48f3-087f-2cc07f5bcaac@geldenhuys.co.uk> References: <25502ea5-a752-48f3-087f-2cc07f5bcaac@geldenhuys.co.uk> Message-ID: On Thu, Sep 12, 2019 at 8:01 PM Graeme Geldenhuys via lazarus wrote: > > On 22/08/2019 3:20 am, Anthony Walter via lazarus wrote: > > Can anyone tell me if there are any popular minimal programs which allow > > users to search for files or folders on their computer using wildcard > http://svn.code.sf.net/p/flyingsheep/code/trunk/MijnLib/enumdirs.pas -- Bart From sysrpl at gmail.com Fri Sep 13 04:49:32 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 12 Sep 2019 22:49:32 -0400 Subject: [Lazarus] Best examples of cross platform visual file or folder search application? In-Reply-To: <25502ea5-a752-48f3-087f-2cc07f5bcaac@geldenhuys.co.uk> References: <25502ea5-a752-48f3-087f-2cc07f5bcaac@geldenhuys.co.uk> Message-ID: Thank you for the replies. I think what I was getting at is not the code related to such a program, but the user interface design and popularity of such a program. I think most of you remember Microsoft implemented a file search into XP featuring an animate dog and a small form: https://i.stack.imgur.com/vZbcr.jpg But since Vista it's been replaced with a simplified edit box and many search options are either hidden or harder to use. I've already written a working cross platform search program (image of it below), but don't understand why I can find this type of user interface design in any current desktop OS or in the form of a tiny popular 3rd party program. Is it that users don't want a file / folder search form, or that at some point an OS dropped this kind of functionality and everyone else followed suite by copying them and removing file / folder search forms? Do you people prefer no file / folder search forms in your desktop OS? https://cache.getlazarus.org/images/filesearch.png -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Fri Sep 13 16:12:38 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 13 Sep 2019 17:12:38 +0300 Subject: [Lazarus] Win8/Win10 taskbar button is not focused on CudaText start Message-ID: I'm not sure it is Laz issue, seem it is- please see the report and GIF animation: https://github.com/Alexey-T/CudaText/issues/2183 -- Regards, Alexey From aaa5500 at ya.ru Fri Sep 13 16:17:30 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 13 Sep 2019 17:17:30 +0300 Subject: [Lazarus] gtk2: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak In-Reply-To: References: Message-ID: <4ee9991b-0ac4-ed01-0d65-6e2202cdc864@ya.ru> It is fixed; thanks. > New build of Lazarus (trunk) gives errors with CudaText gtk2 build. > How to fix that? -- Regards, Alexey From lazarus at mfriebe.de Fri Sep 13 17:45:36 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 13 Sep 2019 17:45:36 +0200 Subject: [Lazarus] gtk2: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak In-Reply-To: <4ee9991b-0ac4-ed01-0d65-6e2202cdc864@ya.ru> References: <4ee9991b-0ac4-ed01-0d65-6e2202cdc864@ya.ru> Message-ID: On 13/09/2019 16:17, AlexeyT via lazarus wrote: > It is fixed; thanks. >> New build of Lazarus (trunk) gives errors with CudaText gtk2 build. >> How to fix that? > If you mean it now longer *prints* the message then yes. (This has been converted to a compile time warning, if you compile the LCL/interfaces.) If you mean the leak itself (if indeed that exists/existed), then not necessarily. Unless there are more fixes, that I am not aware off. From lazarus at mfriebe.de Fri Sep 13 17:47:42 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 13 Sep 2019 17:47:42 +0200 Subject: [Lazarus] gtk2: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak In-Reply-To: References: <4ee9991b-0ac4-ed01-0d65-6e2202cdc864@ya.ru> Message-ID: <0b220a55-0dff-2b4a-12b1-2ee7586c95d3@mfriebe.de> On 13/09/2019 17:45, Martin Frb via lazarus wrote: > On 13/09/2019 16:17, AlexeyT via lazarus wrote: >> It is fixed; thanks. >>> New build of Lazarus (trunk) gives errors with CudaText gtk2 build. >>> How to fix that? >> > If you mean it now longer *prints* now => no Now I have No idea where the w came from From genericptr at gmail.com Fri Sep 13 17:56:37 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Fri, 13 Sep 2019 11:56:37 -0400 Subject: [Lazarus] Code explorer implementation Message-ID: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> I want to make a tool that can analyze source files for functions/classes etc... that can be used for auto complete in 3rd party editors. I see Lazarus already has such a “Code Explorer” feature and I wonder how it gets this information and if I could scavenge it from the project. Does anyone have any ideas on this, where to look in the Lazarus sources, etc...? I think it may be possible to use .ppu files also but I’m not sure if the information is as complete as what Lazarus has. Regards, Ryan Joseph From michael at freepascal.org Fri Sep 13 18:19:30 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 13 Sep 2019 18:19:30 +0200 (CEST) Subject: [Lazarus] Code explorer implementation In-Reply-To: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> References: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> Message-ID: On Fri, 13 Sep 2019, Ryan Joseph via lazarus wrote: > I want to make a tool that can analyze source files for functions/classes > etc... that can be used for auto complete in 3rd party editors. I see > Lazarus already has such a “Code Explorer” feature and I wonder how it > gets this information and if I could scavenge it from the project. Does > anyone have any ideas on this, where to look in the Lazarus sources, > etc...? I think it may be possible to use .ppu files also but I’m not > sure if the information is as complete as what Lazarus has. No the ppu will not be as complete. You can also try the fcl-passrc sources. It is standalone by design, and can give you all info that lazarus gives you. It's used for the pas2js compiler, so you can be sure the info is very complete. Michael. From mailinglists at geldenhuys.co.uk Fri Sep 13 19:10:04 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 13 Sep 2019 18:10:04 +0100 Subject: [Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus? In-Reply-To: <1fd8met7tsefaitilprcv2h2tfi6l2nk2e@4ax.com> References: <1fd8met7tsefaitilprcv2h2tfi6l2nk2e@4ax.com> Message-ID: <83d763b6-533c-dc68-20d8-7dd8d7360bd0@geldenhuys.co.uk> On 26/08/2019 8:53 pm, Bo Berglund via lazarus wrote: > I am confused about the SQLDB component tab in the IDE since it lists > many connection components for MySql (7 in fact). Which one do I use? If you want to hide all complexity of database components, maybe take a look at tiOPF. It abstracts away all database components and allows you to freely switch between backend databases and database components simply with a compiler define change and recompile. You can even switch from a client/server application to a n-tier application - again just with a compiler define changes and recompile. Not a single line of code needs to change. As a bonus, your application works 100% with objects instead of database tables and fields - thus making unit testing so much easier. tiOPF homepage: http://tiopf.sourceforge.net tiOPF help on FPC wiki: https://wiki.lazarus.freepascal.org/tiOPF 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 Fri Sep 13 19:10:57 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 13 Sep 2019 18:10:57 +0100 Subject: [Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus? In-Reply-To: References: <1fd8met7tsefaitilprcv2h2tfi6l2nk2e@4ax.com> Message-ID: On 26/08/2019 10:39 pm, Michael Van Canneyt via lazarus wrote: > MariaDB/MySQLDB are the probably the worst choices you can make. > Postgres, Firebird, SQLIte: all better choices, depending on your use case. +1000 Regards, Graeme From mailinglists at geldenhuys.co.uk Fri Sep 13 19:15:28 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 13 Sep 2019 18:15:28 +0100 Subject: [Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus? In-Reply-To: References: <1fd8met7tsefaitilprcv2h2tfi6l2nk2e@4ax.com> Message-ID: On 27/08/2019 3:22 pm, AB via lazarus wrote: > There is nothing wrong with using mysql or mariadb for websites, it > is not an accident that they are popular. I beg to differ - it is terrible! https://forum.lazarus.freepascal.org/index.php/topic,20826.0.html Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From aaa5500 at ya.ru Sat Sep 14 13:37:11 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 14 Sep 2019 14:37:11 +0300 Subject: [Lazarus] LCL Controls.pp needs 'inline' Message-ID: <33a2164b-aa3e-0a05-4cc8-a8ad7689aa5a@ya.ru> Hi; these are one liners. procedure AdjustBorderSpace(var RemainingClientRect, CurBorderSpace: TRect;   const Space: TRect); begin AdjustBorderSpace(RemainingClientRect,CurBorderSpace,Space.Left,Space.Top,                     Space.Right,Space.Bottom); end; procedure ChangeBiDiModeAlignment(var Alignment: TAlignment); begin   case Alignment of     taLeftJustify: Alignment := taRightJustify;     taRightJustify: Alignment := taLeftJustify;   end; end; function GetModalResultStr(ModalResult: TModalResult): ShortString; begin   Result := UITypes.ModalResultStr[ModalResult]; end; function SendAppMessage(Msg: Cardinal; WParam: WParam; LParam: LParam): Longint; begin   Result:=LCLProc.SendApplicationMessage(Msg,WParam,LParam); end; procedure MoveWindowOrg(dc: hdc; X, Y: Integer); begin   MoveWindowOrgEx(DC,X,Y); end; function FindDragTarget(const Position: TPoint; AllowDisabled: Boolean): TControl; begin   Result := FindControlAtPosition(Position, AllowDisabled); end; function CursorToIdent(Cursor: Longint; var Ident: string): Boolean; begin   Result := IntToIdent(Cursor, Ident, CursorIdents); end; function IdentToCursor(const Ident: string; var Cursor: Longint): Boolean; begin   Result := IdentToInt(Ident, Cursor, CursorIdents); end; -- Regards, Alexey From genericptr at gmail.com Sat Sep 14 19:07:07 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Sat, 14 Sep 2019 13:07:07 -0400 Subject: [Lazarus] Code explorer implementation In-Reply-To: References: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> Message-ID: <767E6AC5-2D66-4F7E-A223-AF364FCB097B@gmail.com> > On Sep 13, 2019, at 12:19 PM, Michael Van Canneyt via lazarus wrote: > > You can also try the fcl-passrc sources. It is standalone by design, and can give you all info that lazarus gives you. Thanks Michael this looks like exactly what I want. How well do they keep up with new syntax etc…? I was thinking of making my own parser before but I didn’t want to keep up with changing syntax and things breaking. Regards, Ryan Joseph From genericptr at gmail.com Sat Sep 14 19:58:26 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Sat, 14 Sep 2019 13:58:26 -0400 Subject: [Lazarus] Code explorer implementation In-Reply-To: References: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> Message-ID: A follow up. I built the parsepp.pp program and used it to parse a file. Everything seems to work except it tries to follow include macros (that would be nice to turn off since it requires compiler flags to work properly) and += operators are causing errors. Why doesn’t it know c style operators? EParserError: Identifier expected at token "=" in file /Users/ryanjoseph/Desktop/parser_test.pas at line 5 column 6 program test; begin i += 1; end. Regards, Ryan Joseph From michael at freepascal.org Sat Sep 14 20:07:15 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 14 Sep 2019 20:07:15 +0200 (CEST) Subject: [Lazarus] Code explorer implementation In-Reply-To: References: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> Message-ID: On Sat, 14 Sep 2019, Ryan Joseph via lazarus wrote: > A follow up. I built the parsepp.pp program and used it to parse a file. > Everything seems to work except it tries to follow include macros (that > would be nice to turn off since it requires compiler flags to work > properly) and += operators are causing errors. Why doesn’t it know c > style operators? It mimics FPC in behaviour. By default, FPC also does not allow C style operators. You need to provide the -Sc command-line flag to the parser or set the appropriate flag manually on the parser object. Normally this should do it: parsepp -Sc yourfile. the parser understands all directives and compiler flags that FPC itself understands. So you can just do parsepp -Sc yourfile. -Fi../your/include/dir Michael. From michael at freepascal.org Sat Sep 14 20:08:10 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 14 Sep 2019 20:08:10 +0200 (CEST) Subject: [Lazarus] Code explorer implementation In-Reply-To: <767E6AC5-2D66-4F7E-A223-AF364FCB097B@gmail.com> References: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> <767E6AC5-2D66-4F7E-A223-AF364FCB097B@gmail.com> Message-ID: On Sat, 14 Sep 2019, Ryan Joseph via lazarus wrote: > > >> On Sep 13, 2019, at 12:19 PM, Michael Van Canneyt via lazarus wrote: >> >> You can also try the fcl-passrc sources. It is standalone by design, and can give you all info that lazarus gives you. > > Thanks Michael this looks like exactly what I want. How well do they keep up with new syntax etc…? It is fully equivalent to FPC, it currently allows even more: anonymous functions are supported. Michael. From genericptr at gmail.com Sat Sep 14 20:18:41 2019 From: genericptr at gmail.com (Ryan Joseph) Date: Sat, 14 Sep 2019 14:18:41 -0400 Subject: [Lazarus] Code explorer implementation In-Reply-To: References: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> Message-ID: <10634052-91BB-40C5-AEAE-75CEB2CEEAEA@gmail.com> > On Sep 14, 2019, at 2:07 PM, Michael Van Canneyt via lazarus wrote: > > By default, FPC also does not allow C style operators. > > You need to provide the -Sc command-line flag to the parser or set the appropriate flag manually on the parser object. I tried using -Mobjfpc because I know c style operators are a mode switch but that didn’t work. I guess modes are not supported in the parser and we need to use all the various -S flags? Regards, Ryan Joseph From michael at freepascal.org Sat Sep 14 20:27:39 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 14 Sep 2019 20:27:39 +0200 (CEST) Subject: [Lazarus] Code explorer implementation In-Reply-To: <10634052-91BB-40C5-AEAE-75CEB2CEEAEA@gmail.com> References: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> <10634052-91BB-40C5-AEAE-75CEB2CEEAEA@gmail.com> Message-ID: On Sat, 14 Sep 2019, Ryan Joseph via lazarus wrote: > > >> On Sep 14, 2019, at 2:07 PM, Michael Van Canneyt via lazarus wrote: >> >> By default, FPC also does not allow C style operators. >> >> You need to provide the -Sc command-line flag to the parser or set the appropriate flag manually on the parser object. > > I tried using -Mobjfpc because I know c style operators are a mode switch but that didn’t work. > I guess modes are not supported in the parser and we need to use all the various -S flags? Modes & modeswitches are supported, but -Mobjfpc does not switch on C style operators. You need -Sc, just as in FPC, the -M command-line switch is not supported by the ParseSource() routine, it has only a limited set of options implemented. if you need/want more control, you can just create the scanner and parser, and set any flag you want: the ParseSource is a simple routine that will set up the parser/scanner with some very basic options. Michael. From pascaldragon at googlemail.com Sun Sep 15 04:03:23 2019 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 15 Sep 2019 04:03:23 +0200 Subject: [Lazarus] Code explorer implementation In-Reply-To: <10634052-91BB-40C5-AEAE-75CEB2CEEAEA@gmail.com> References: <223828B7-5E31-436F-8312-57AA2C951C9F@gmail.com> <10634052-91BB-40C5-AEAE-75CEB2CEEAEA@gmail.com> Message-ID: Ryan Joseph via lazarus schrieb am Sa., 14. Sep. 2019, 20:18: > > > > On Sep 14, 2019, at 2:07 PM, Michael Van Canneyt via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > > > > By default, FPC also does not allow C style operators. > > > > You need to provide the -Sc command-line flag to the parser or set the > appropriate flag manually on the parser object. > > I tried using -Mobjfpc because I know c style operators are a mode switch > but that didn’t work. I guess modes are not supported in the parser and we > need to use all the various -S flags? > As I already wrote some time ago C-style operators are *not* enabled by default in any of the modes. Also they aren't a modeswitch either. They are simply switched on inside the default fpc.cfg using the -Sc option. Thus, as Michael wrote, you need to pass that parameter as well or explicitly set the corresponding flag of the parser object. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hryk_fujimaki at yahoo.com Mon Sep 16 02:29:58 2019 From: hryk_fujimaki at yahoo.com (Haruyuki Fujimaki) Date: Mon, 16 Sep 2019 00:29:58 +0000 (UTC) Subject: [Lazarus] Too large height of TEdit and TSpinEdit in xfce References: <1814641829.5140624.1568593798476.ref@mail.yahoo.com> Message-ID: <1814641829.5140624.1568593798476@mail.yahoo.com> Hello everyone, I am maintaining my softwares in xfce desktop system (Linux Lite).The height of TEdit and TSpinEdit controls becomes awkwardly too large as shown in attached screenshot.By setting AutoSize := False, I can modify the height, but it is laborious for a big project and downward arrow of TSpinEdit is hidden.Does anyone know how to solve this problem? Haruyuki Fujimaki -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Too_large_heght_in_xfce.png Type: image/png Size: 6392 bytes Desc: not available URL: From bo.berglund at gmail.com Mon Sep 16 08:19:40 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 16 Sep 2019 08:19:40 +0200 Subject: [Lazarus] Too large height of TEdit and TSpinEdit in xfce References: <1814641829.5140624.1568593798476.ref@mail.yahoo.com> <1814641829.5140624.1568593798476@mail.yahoo.com> Message-ID: On Mon, 16 Sep 2019 00:29:58 +0000 (UTC), Haruyuki Fujimaki via lazarus wrote: >Hello everyone, >I am maintaining my softwares in xfce desktop system (Linux Lite). >The height of TEdit and TSpinEdit controls becomes awkwardly too >large as shown in attached screenshot. >By setting AutoSize := False, I can modify the height, but it is >laborious for a big project and downward arrow of TSpinEdit is >hidden.Does anyone know how to solve this problem? >Haruyuki Fujimaki I recently had a similar problem with a cross-platform application when I built it on Linux (Raspbian). In my case the controls became too small, but I think the problem is the same as yours. My sources are first developed on Windows and stored in subversion. When I retrieved them in Raspbian and opened Lazarus there to build the Linux version the user entry boxes for data were all too small. What happened was that the font of these controls had gotten a different size when the project was opened in Lazarus on Linux! In my case the control types affected were buttons, spinedits, statictexts, groupboxes, checkboxes and labels. So I had to add a procedure to set the font size of them all, which is called from the Form.OnShow event. I only had to change the size by one point to make the form look OK again. Here is my function: procedure TfrmMain.SetFontSize(S: shortint); begin // Set font size on load. btnDec60.Font.Size := S; btnDec30.Font.Size := S; btnDec10.Font.Size := S; btnDec1.Font.Size := S; btnInc1.Font.Size := S; btnInc10.Font.Size := S; btnInc30.Font.Size := S; btnInc60.Font.Size := S; btnCutStart.Font.Size := S; btnCutEnd.Font.Size := S; btnAddCut.Font.Size := S; btnJump.Font.Size := S; btnShiftAudio.Font.Size := S; speDelay.Font.Size := S; stxCutStart.Font.Size := S; stxCutEnd.Font.Size := S; stxCutTime.Font.Size := S; stxClipCnt.Font.Size := S; gbxCut.Font.Size := S; ckbLogin.Font.Size := S; lblTotal.Font.Size := S; end; And it is called from here: procedure TfrmMain.FormShow(Sender: TObject); begin SetFontSize(9); end; I do not understand why the size clearly stated in the sources as 9 are changed by Lazarus when the project loads on a different operating system, but that is in any case what happens. I am using Lazarus 2.0.4 and fpc 3.0.4 on Windows and Raspbian. -- Bo Berglund Developer in Sweden From coppolastudio at gmail.com Mon Sep 16 09:24:40 2019 From: coppolastudio at gmail.com (Salvatore Coppola) Date: Mon, 16 Sep 2019 09:24:40 +0200 Subject: [Lazarus] Too large height of TEdit and TSpinEdit in xfce In-Reply-To: References: <1814641829.5140624.1568593798476.ref@mail.yahoo.com> <1814641829.5140624.1568593798476@mail.yahoo.com> Message-ID: <0404951f-745f-4a12-a26e-c2a457b54294@gmail.com> Ok it is a workaround but why not call your function only one time at start for instance in main form create? Regard Salvatore Il giorno 16 Set 2019, 08:20, alle ore 08:20, Bo Berglund via lazarus ha scritto: >On Mon, 16 Sep 2019 00:29:58 +0000 (UTC), Haruyuki Fujimaki via >lazarus wrote: > >>Hello everyone, >>I am maintaining my softwares in xfce desktop system (Linux Lite). >>The height of TEdit and TSpinEdit controls becomes awkwardly too >>large as shown in attached screenshot. >>By setting AutoSize := False, I can modify the height, but it is >>laborious for a big project and downward arrow of TSpinEdit is >>hidden.Does anyone know how to solve this problem? >>Haruyuki Fujimaki > >I recently had a similar problem with a cross-platform application >when I built it on Linux (Raspbian). >In my case the controls became too small, but I think the problem is >the same as yours. > >My sources are first developed on Windows and stored in subversion. >When I retrieved them in Raspbian and opened Lazarus there to build >the Linux version the user entry boxes for data were all too small. > >What happened was that the font of these controls had gotten a >different size when the project was opened in Lazarus on Linux! > >In my case the control types affected were buttons, spinedits, >statictexts, groupboxes, checkboxes and labels. > >So I had to add a procedure to set the font size of them all, which is >called from the Form.OnShow event. I only had to change the size by >one point to make the form look OK again. > >Here is my function: > >procedure TfrmMain.SetFontSize(S: shortint); >begin > // Set font size on load. > btnDec60.Font.Size := S; > btnDec30.Font.Size := S; > btnDec10.Font.Size := S; > btnDec1.Font.Size := S; > btnInc1.Font.Size := S; > btnInc10.Font.Size := S; > btnInc30.Font.Size := S; > btnInc60.Font.Size := S; > btnCutStart.Font.Size := S; > btnCutEnd.Font.Size := S; > btnAddCut.Font.Size := S; > btnJump.Font.Size := S; > btnShiftAudio.Font.Size := S; > speDelay.Font.Size := S; > stxCutStart.Font.Size := S; > stxCutEnd.Font.Size := S; > stxCutTime.Font.Size := S; > stxClipCnt.Font.Size := S; > gbxCut.Font.Size := S; > ckbLogin.Font.Size := S; > lblTotal.Font.Size := S; >end; > > >And it is called from here: > >procedure TfrmMain.FormShow(Sender: TObject); >begin > SetFontSize(9); >end; > >I do not understand why the size clearly stated in the sources as 9 >are changed by Lazarus when the project loads on a different operating >system, but that is in any case what happens. > >I am using Lazarus 2.0.4 and fpc 3.0.4 on Windows and Raspbian. > > >-- >Bo Berglund >Developer in Sweden > >-- >_______________________________________________ >lazarus mailing list >lazarus at lists.lazarus-ide.org >https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Mon Sep 16 10:22:01 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 16 Sep 2019 10:22:01 +0200 Subject: [Lazarus] Too large height of TEdit and TSpinEdit in xfce References: <1814641829.5140624.1568593798476.ref@mail.yahoo.com> <1814641829.5140624.1568593798476@mail.yahoo.com> <0404951f-745f-4a12-a26e-c2a457b54294@gmail.com> Message-ID: On Mon, 16 Sep 2019 09:24:40 +0200, Salvatore Coppola via lazarus wrote: >Ok it is a workaround but why not call your function only one time at start for instance in main form create? Yes, a typical workaround... I am so used to using OnShow since my form always is only shown once and never hidden afterwards. But you are right that it should rather be in OnCreate! -- Bo Berglund Developer in Sweden From alexander.hofmann at new-h.de Mon Sep 16 11:56:39 2019 From: alexander.hofmann at new-h.de (Alexander Hofmann) Date: Mon, 16 Sep 2019 11:56:39 +0200 Subject: [Lazarus] TTaskDialog - correct ModalResult for "Close"? In-Reply-To: References: <62ac76f3-1039-03d2-68e7-1f0e0dd9de40@new-h.de> <2c796121-3634-952a-f10a-fe70e3c99da2@new-h.de> <6e7ac516-1929-c3bc-7bed-7c527e428126@new-h.de> Message-ID: Am 12.09.19 um 18:40 schrieb Bart via lazarus: > > Posted bugreport with possible patch: > https://bugs.freepascal.org/view.php?id=36069 > Maybe Zeljko or Juha can review the patch (I know next to nothing > about TTaskDialog, other than the simulated one looks really ugly on > Windows). > Thanks, I was away of any computer until now... From lazarus at mfriebe.de Tue Sep 17 22:27:13 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 17 Sep 2019 22:27:13 +0200 Subject: [Lazarus] Lazarus 2.0.2 EditorMacroScript error on first startup RPi4B In-Reply-To: References: <60daec04-75c3-12fe-f08b-515bddf120a4@mfriebe.de> <6ef11cc4-dbc7-84a6-a2b4-0a04470c36a8@mfriebe.de> <2bc39306-bd66-be25-2df4-a5433f559087@mfriebe.de> Message-ID: Can you please retest with Revision: 61896 Date: 17 September 2019 22:21:38 EditorMacroScript: Use "internal" (none-native) calling for object methods Making sure you remove your editormacroscript.xml file, or re-request the self-test from the options page, please. On 19/08/2019 07:08, Bo Berglund via lazarus wrote: > On Mon, 19 Aug 2019 00:46:18 +0200, Martin Frb via lazarus > wrote: > >> Also on either system. After the error happens once, that is stored in >> the config. Unless you remove your config each time that you install, >> you should never see the error again. >> To verify that, you can (after the error) check the XML file. That xml >> file should stay there forever. > I always make a separate config dir for each installation so a new > install starts out with an empty config. I use the --pcp= flag in the > start command on Linux to specify this dir. > On Windows the installer fixes this during install when I check the > "separate installation" flag. > > From lazarus at mfriebe.de Tue Sep 17 22:32:53 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 17 Sep 2019 22:32:53 +0200 Subject: [Lazarus] Need testers for Pascal-Editor-Macros (latest trunk) Message-ID: Anyone using lazarus svn trunk and   https://wiki.lazarus.freepascal.org/Editor_Macros_PascalScript Please re-test all your macros, and report any breakage. (Or hopefully the absence thereof) *** Backup (in your primary config path): EditorMacros.xml  (this contains your macros, in the worst case....) *** I made some big changes in Revision: 61896 Date: 17 September 2019 22:21:38 EditorMacroScript: Use "internal" (none-native) calling for object methods Hoping this will keep them working with the calling convention change in fpc trunk for i386 linux.... Thanks for any feedback. From serbod at gmail.com Wed Sep 18 15:23:50 2019 From: serbod at gmail.com (Sergey Bodrov) Date: Wed, 18 Sep 2019 16:23:50 +0300 Subject: [Lazarus] Need testers for Pascal-Editor-Macros (latest trunk) In-Reply-To: References: Message-ID: I find some bugs in EditorMacros, and report to Mantis. There can be lot more bugs, but them hides in very bad sources style and formatting. For example, spaces between function name and parameters: inc (i); Please, do proper formatting. Bad formatting makes debugger crazy (with wrong breakpoints ans steps) and makes code structure difficult to read by eyes. вт, 17 сент. 2019 г. в 23:33, Martin Frb via lazarus < lazarus at lists.lazarus-ide.org>: > Anyone using lazarus svn trunk and > https://wiki.lazarus.freepascal.org/Editor_Macros_PascalScript > > Please re-test all your macros, and report any breakage. (Or hopefully > the absence thereof) > > *** Backup (in your primary config path): EditorMacros.xml (this > contains your macros, in the worst case....) *** > > > I made some big changes in > Revision: 61896 > Date: 17 September 2019 22:21:38 > EditorMacroScript: Use "internal" (none-native) calling for object methods > > Hoping this will keep them working with the calling convention change in > fpc trunk for i386 linux.... > > Thanks for any feedback. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -- *Bodrov Sergey* software development, IT consulting http://www.serbod.com *Phone (Belarus):* +375(25)794-21-58 *Skype:* sergey.bodrov1 *e-mail:* serbod at gmail.com, oxotnuk at yandex.ru -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Wed Sep 18 17:19:55 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 18 Sep 2019 17:19:55 +0200 Subject: [Lazarus] Need testers for Pascal-Editor-Macros (latest trunk) In-Reply-To: References: Message-ID: On 18/09/2019 15:23, Sergey Bodrov via lazarus wrote: > I find some bugs in EditorMacros, and report to Mantis. Thanks, I will look at the reports. > > There can be lot more bugs, but them hides in very bad sources style > and formatting. > For example, spaces between function name and parameters: inc (i); In which package, please? > > Please, do proper formatting. Bad formatting makes debugger crazy > (with wrong breakpoints ans steps) Only line breaks should affect the debugger (space/tab should not, if it does an example would be welcome). From tc at epidata.info Wed Sep 18 21:01:19 2019 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Wed, 18 Sep 2019 21:01:19 +0200 Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows Message-ID: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> Is it a bug that FileExistsUTF8(...) reports true/false differently for folders in Unix and Windows. On a unix platform (Mac/Linux tested) FileExistsUTF8() will return true to both folders and files On windows platform FileExistsUTF8 will return true on files, but false on folders. Best regards Torsten. From bartjunk64 at gmail.com Wed Sep 18 23:23:28 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 18 Sep 2019 23:23:28 +0200 Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows In-Reply-To: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> References: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> Message-ID: On Wed, Sep 18, 2019 at 9:01 PM Torsten Bonde Christiansen via lazarus wrote: > Is it a bug that FileExistsUTF8(...) reports true/false differently for > folders in Unix and Windows. Thet are just wrappers for fpc's FileExists() nowadays. -- Bart From tc at epidata.info Wed Sep 18 23:26:49 2019 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Wed, 18 Sep 2019 23:26:49 +0200 Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows In-Reply-To: References: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> Message-ID: On 18/09/2019 23.23, Bart via lazarus wrote: > On Wed, Sep 18, 2019 at 9:01 PM Torsten Bonde Christiansen via lazarus > wrote: > >> Is it a bug that FileExistsUTF8(...) reports true/false differently for >> folders in Unix and Windows. > Thet are just wrappers for fpc's FileExists() nowadays. > > No entirely though. The Unix version is mostly a wrapper, yes - but the Windows version do some additional filtering: function FileExistsUTF8(const Filename: string): boolean; var   Attr: Longint; begin   Attr := FileGetAttrUTF8(FileName);   if Attr <> -1 then     Result:= (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0   else     Result:=False; end; Hence my question.... -Torsten. From bartjunk64 at gmail.com Wed Sep 18 23:48:17 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 18 Sep 2019 23:48:17 +0200 Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows In-Reply-To: References: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> Message-ID: On Wed, Sep 18, 2019 at 11:26 PM Torsten Bonde Christiansen via lazarus wrote: > No entirely though. The Unix version is mostly a wrapper, yes - but the > Windows version do some additional filtering: > > function FileExistsUTF8(const Filename: string): boolean; > var > Attr: Longint; > begin > Attr := FileGetAttrUTF8(FileName); > if Attr <> -1 then > Result:= (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0 > else > Result:=False; > end; Not anymore in trunk: function FileExistsUTF8(const Filename: string): boolean; begin Result := SysUtils.FileExists(Filename); end; This will return False for directories. (The test for (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0 is done by fpc now). On *nix everything is a file, so folders are reported to be files as well AFAIK. -- Bart -- Bart From michael at freepascal.org Thu Sep 19 00:02:19 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 19 Sep 2019 00:02:19 +0200 (CEST) Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows In-Reply-To: References: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> Message-ID: On Wed, 18 Sep 2019, Bart via lazarus wrote: > On Wed, Sep 18, 2019 at 11:26 PM Torsten Bonde Christiansen via > lazarus wrote: > >> No entirely though. The Unix version is mostly a wrapper, yes - but the >> Windows version do some additional filtering: >> >> function FileExistsUTF8(const Filename: string): boolean; >> var >> Attr: Longint; >> begin >> Attr := FileGetAttrUTF8(FileName); >> if Attr <> -1 then >> Result:= (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0 >> else >> Result:=False; >> end; > > Not anymore in trunk: > > function FileExistsUTF8(const Filename: string): boolean; > begin > Result := SysUtils.FileExists(Filename); > end; > > This will return False for directories. > (The test for (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0 is done by fpc now). > > On *nix everything is a file, so folders are reported to be files as well AFAIK. SysUtils.FileExists also returns false for directories, to match windows behavour. Michael. From serbod at gmail.com Thu Sep 19 09:25:00 2019 From: serbod at gmail.com (Sergey Bodrov) Date: Thu, 19 Sep 2019 10:25:00 +0300 Subject: [Lazarus] Need testers for Pascal-Editor-Macros (latest trunk) In-Reply-To: References: Message-ID: > > > There can be lot more bugs, but them hides in very bad sources style > > and formatting. > > For example, spaces between function name and parameters: inc (i); > In which package, please? > Where TIdeMacroEventReader defined. > > Please, do proper formatting. Bad formatting makes debugger crazy > > (with wrong breakpoints ans steps) > Only line breaks should affect the debugger (space/tab should not, if it > does an example would be welcome). > Example: if a < b then Delete(a); // When debugging step-by-step with F8, that line will be skipped in one step, and it remains unclear, that Delete(a) executed. if a < b then Delete(a); // When condition is true, debugger step on line with Delete(a) and it can be skipped with F8 or visited with F7. And breakpoint can be set on desired condition branch. Spaces between function name and parameter make function be like a variable. I personally always add empty parenthesis to every procedure, function and method, even if they don't have parameters. It helps distinguish, when indentifier can be stepped in (with F7) or skipped (with F8) and inspected by watch. -- *Bodrov Sergey* software development, IT consulting http://www.serbod.com *Phone (Belarus):* +375(25)794-21-58 *Skype:* sergey.bodrov1 *e-mail:* serbod at gmail.com, oxotnuk at yandex.ru -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Thu Sep 19 11:17:10 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Thu, 19 Sep 2019 11:17:10 +0200 Subject: [Lazarus] Need testers for Pascal-Editor-Macros (latest trunk) In-Reply-To: References: Message-ID: <6ade364d-1c6d-92fc-414f-c5e53fdbc264@mfriebe.de> On 19/09/2019 09:25, Sergey Bodrov via lazarus wrote: > > Only line breaks should affect the debugger (space/tab should not, > if it > does an example would be welcome). > > Example: > if a < b then Delete(a); > // When debugging step-by-step with F8, that line will be skipped in > one step, and it remains unclear, that Delete(a) executed. Ok, so linebreaks. Just wanted to be sure there was not something about the debugger that I was not aware of. Not sure how much of that I will change. The downside is, that it produces extra commits in an "svn blame". > Spaces between function name and parameter make function be like a > variable. I personally always add empty parenthesis to every > procedure, function and method, even if they don't have parameters. It > helps distinguish, when indentifier can be stepped in (with F7) or > skipped (with F8) and inspected by watch. I see, but that's not gonna change for this unit. ------------------------------------ Your question from the bugtracker: https://bugs.freepascal.org/view.php?id=36083#c118112 I try to keep general discussions of the bug tracker. Also the above could go on the bugtracker as a feature request => But then it was a different issue, from the reported bug. Discussing it as part of the bug, will distract from the core of the issue. It may be that I am overlooking something, and it is indeed relevant for reproducing the issue, in which case it would belong, but for now lets take it here. So far I still need a way to reproduce the bug. > Is there a way to visually separate Editor Macro window tabs to > 'macros' and 'scripts'? Currently there is no visual indicator to show if a macro would work without PascalScript. Except of course if you uninstall PascalScript, in which case scripts would be shown as having an error (red dot with exclamation mark: https://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Macros#Display ). There is also no plan to indicate this. (So that is open to discussion). The reason is that a "recorded macro", is a script too (well as a script it gets enclosing begin/end). For PascalScript ecChar() and ecDelecte are defined as functions. So the "recorded macro" is proper Pascal. Implementing a check would not be complicated. The PascalScript-macro-class could just call the inherited class to check if it can be parsed as "recorded". Adding a visual indicator, would need to be an icon. For once a macro (either) is defined, normally both types can be used in the same way. Having separate list, would make it harder to find the correct one. Personally I ever think, that adding an indicator icon would might be contra productive. People would wonder what the icon means. Normally there should not be a need to distinguish, if you have PascalScript macros, then PascalScript works on your system. There is no reason why it should stop working (Except for updates like the one I just did). So you never need to know. You can use either type of macro. If they do stop working, then there is an indicator. Of course the same indicator is used if your EditorMacro.xml becomes corrupted. Recorded macros that can not be read, get the same indicator. If you uninstall PascalScript then the IDE does not know what a script macro is. So at that point it could no longer show an indicator icon. At that point, a script macro is just a broken recorded macro. Even if PascalScript is installed, how do you know the difference between "ecLeft;" "thrash ecLeft;" and "if a then ecLeft" vs "ifa then ecLeft". At what point does it become a Pascal-script? > Macro - plain text, sequence of editor action names. Can be recorded > from user actions and edited in simple text editor, with trivial > validation. Maybe, there can be some action to run desired script > Script - Pascal script, edited in main editor, with sintax checking, > autocompletions, hints and other features. There can be function, that > run desired macro. Scripts disabled if PasScript not available. Both can be edited in the IDE. Codetools (auto complete) is very limited, as it does not know the macro is not part of your project sourced. And also does not know the "ecLeft" or "Caller". But when you save a macro, you should get an error with line number. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Fri Sep 20 20:56:31 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 20 Sep 2019 20:56:31 +0200 Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows In-Reply-To: References: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> Message-ID: <20190920205631.196c33e4@limapholos.matflo.wg> On Thu, 19 Sep 2019 00:02:19 +0200 (CEST) Michael Van Canneyt via lazarus wrote: > On Wed, 18 Sep 2019, Bart via lazarus wrote: > > > On Wed, Sep 18, 2019 at 11:26 PM Torsten Bonde Christiansen via > > lazarus wrote: > > > >> No entirely though. The Unix version is mostly a wrapper, yes - > >> but the Windows version do some additional filtering: > >> > >> function FileExistsUTF8(const Filename: string): boolean; > >> var > >> Attr: Longint; > >> begin > >> Attr := FileGetAttrUTF8(FileName); > >> if Attr <> -1 then > >> Result:= (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0 > >> else > >> Result:=False; > >> end; > > > > Not anymore in trunk: > > > > function FileExistsUTF8(const Filename: string): boolean; > > begin > > Result := SysUtils.FileExists(Filename); > > end; > > > > This will return False for directories. > > (The test for (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0 is done by > > fpc now). > > > > On *nix everything is a file, so folders are reported to be files > > as well AFAIK. > > SysUtils.FileExists also returns false for directories, to match > windows behavour. I added an incompatibility note: https://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes#LazUtils_Changes Mattias From juha.manninen62 at gmail.com Fri Sep 20 22:29:33 2019 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 20 Sep 2019 23:29:33 +0300 Subject: [Lazarus] Merge request (Attn Juha) In-Reply-To: References: <205280374.149811.1567749957172@ox.hosteurope.de> <20190906104819.5e89dee9@limapholos.matflo.wg> <12d09c47-f3ba-8181-b248-ba664a435535@mfriebe.de> <64419471.153685.1567765994164@ox.hosteurope.de> Message-ID: On Fri, Sep 6, 2019 at 7:17 PM Martin Frb via lazarus wrote: > Hi Juha, > can you have a quick look if this commit of yours can be merged to 2.0 branch? > r60719 IDE: Call DoCallBuildingFinishedHandler after ToolState is reset. Issue #0035240 > > On 06/09/2019 12:33, Pascal Riekenberg via lazarus wrote: > > What about reopening the original issue and request a merge? > > Probably fine too. > > I would first put in here on the mail list. With a subject that catches the eye of the person responsible. That is often faster. I done that myself with fpc issues on the fpc list. > > ---------- > I had not actually looked at the issues. One was a fix to my report. I remember having tested the result myself. So I moved that to "confirmed". > > The other issue still needs to be looked at. The issue was assigned to Juha, so lets ping him. > > As a general note, it is a fixes branch. The issue reads like a feature / extension of existing abilities. > Then again that does not need to be 100% strict. I.e. being IDE core code (not affecting user apps) and having been in trunk for a while suggest a very low risk. Yes, the "Call DoCallBuildingFinishedHandler after ToolState is reset" issue was reopened and marked for merging. It is a bug fix because the handler was clearly called in a wrong place. Sorry for a 2 weeks delay in my reply. I didn't read this list for a while. I hope I will have more time for Lazarus issues during the coming winter. Regards, Juha From lazarus at mfriebe.de Fri Sep 20 23:02:01 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 20 Sep 2019 23:02:01 +0200 Subject: [Lazarus] Merge request (Attn Juha) In-Reply-To: References: <205280374.149811.1567749957172@ox.hosteurope.de> <20190906104819.5e89dee9@limapholos.matflo.wg> <12d09c47-f3ba-8181-b248-ba664a435535@mfriebe.de> <64419471.153685.1567765994164@ox.hosteurope.de> Message-ID: On 20/09/2019 22:29, Juha Manninen via lazarus wrote: > I hope I will have more time for Lazarus issues during the > coming winter. > That relates to the winter in the northern hemisphere, or the (more distant) winter in the southern hemisphere? SCNR... ;) From michael at freepascal.org Sat Sep 21 15:22:54 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 21 Sep 2019 15:22:54 +0200 (CEST) Subject: [Lazarus] It's alive ! Message-ID: Hello, Finally, the moment has come: https://www.youtube.com/watch?v=xos2MnVxe-c Following up on a bounty offered, Dmitry Boyarintsev has accomplished milestone one in the implementation of FPC's webassembly backend. And: It's alive ! :-) The first result can be seen here: https://www.freepascal.org/~michael/lyff/ Conway's game of life written using FPC: - FPC itself for the WebAssembly Backend library. - pas2js for the necessary Javascript front end and GUI code. Although I can't imagine why you would want to, you can also load the webassembly from plain Javascript: https://www.freepascal.org/~michael/lyff/lyffjs.html Whoever thought Pascal is dead, should now think otherwise. It's very much alive ! Enjoy, Michael. PS. More info about the webassembly efforts will be assembled here: https://wiki.freepascal.org/WebAssembly It's a bit cursory at the moment, but will be improved as things evolve - once it's alive, it tries to stay alive ;) From bartjunk64 at gmail.com Sat Sep 21 18:24:28 2019 From: bartjunk64 at gmail.com (Bart) Date: Sat, 21 Sep 2019 18:24:28 +0200 Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows In-Reply-To: <20190920205631.196c33e4@limapholos.matflo.wg> References: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> <20190920205631.196c33e4@limapholos.matflo.wg> Message-ID: On Fri, Sep 20, 2019 at 8:56 PM Mattias Gaertner via lazarus wrote: Old Windows version: > > >> function FileExistsUTF8(const Filename: string): boolean; > > >> var > > >> Attr: Longint; > > >> begin > > >> Attr := FileGetAttrUTF8(FileName); > > >> if Attr <> -1 then > > >> Result:= (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0 > > >> else > > >> Result:=False; > > >> end; > > > > I added an incompatibility note: > https://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes#LazUtils_Changes I think that is incorrect. As you can see above the old version also returned FALSE for directories (it used the same logic as the Windows implementation of FileExists). The reason the implementation has changed is that since LCL is UTF8 the automatic conversion fpc does is now lossless, which it wasn't before 3.0. -- Bart From coppolastudio at gmail.com Sat Sep 21 18:26:17 2019 From: coppolastudio at gmail.com (Salvatore Coppola) Date: Sat, 21 Sep 2019 18:26:17 +0200 Subject: [Lazarus] It's alive ! In-Reply-To: References: Message-ID: <3f939245-a882-478a-a106-fb58a7621c83@gmail.com> Yes, it's alive thanks to you and other like you (FPC and Lazarus developers) , but a big % of people have hard prejudices on Pascal so i'm starting my son (14 yeah old) on this beautiful world because at school is planned C++ with DevC++,  which future to expect? Salvatore ⁣Ottieni BlueMail per Android ​ Il giorno 21 Set 2019, 15:23, alle ore 15:23, Michael Van Canneyt via lazarus ha scritto: > >Hello, > >Finally, the moment has come: > >https://www.youtube.com/watch?v=xos2MnVxe-c > >Following up on a bounty offered, Dmitry Boyarintsev has accomplished >milestone one >in the implementation of FPC's webassembly backend. > >And: It's alive ! :-) > >The first result can be seen here: > >https://www.freepascal.org/~michael/lyff/ > >Conway's game of life written using FPC: > >- FPC itself for the WebAssembly Backend library. >- pas2js for the necessary Javascript front end and GUI code. > >Although I can't imagine why you would want to, you can also load the >webassembly from plain Javascript: > >https://www.freepascal.org/~michael/lyff/lyffjs.html > >Whoever thought Pascal is dead, should now think otherwise. >It's very much alive ! > >Enjoy, > >Michael. > >PS. More info about the webassembly efforts will be assembled here: >https://wiki.freepascal.org/WebAssembly >It's a bit cursory at the moment, but will be improved as things evolve >- >once it's alive, it tries to stay alive ;) >-- >_______________________________________________ >lazarus mailing list >lazarus at lists.lazarus-ide.org >https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Sat Sep 21 19:15:41 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 21 Sep 2019 19:15:41 +0200 Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows In-Reply-To: References: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> <20190920205631.196c33e4@limapholos.matflo.wg> Message-ID: <20190921191541.4c6e3698@limapholos.matflo.wg> On Sat, 21 Sep 2019 18:24:28 +0200 Bart via lazarus wrote: >[...] > > I added an incompatibility note: > > https://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes#LazUtils_Changes > > I think that is incorrect. > As you can see above the old version also returned FALSE for > directories (it used the same logic as the Windows implementation of > FileExists). > > The reason the implementation has changed is that since LCL is UTF8 > the automatic conversion fpc does is now lossless, which it wasn't > before 3.0. You are right. So the change is actually: FileExistsUT8 no longer supports fpc 2.6.4. Right? Mattias From nc-gaertnma at netcologne.de Sat Sep 21 19:48:39 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 21 Sep 2019 19:48:39 +0200 Subject: [Lazarus] [fpc-pascal] It's alive ! In-Reply-To: References: Message-ID: <20190921194839.2ce0e144@limapholos.matflo.wg> On Sat, 21 Sep 2019 15:22:54 +0200 (CEST) Michael Van Canneyt wrote: >[...] > The first result can be seen here: > > https://www.freepascal.org/~michael/lyff/ > > Conway's game of life written using FPC: > > - FPC itself for the WebAssembly Backend library. > - pas2js for the necessary Javascript front end and GUI code. Amazing! I hope to see it soon in trunk. Mattias From bartjunk64 at gmail.com Sun Sep 22 00:20:35 2019 From: bartjunk64 at gmail.com (Bart) Date: Sun, 22 Sep 2019 00:20:35 +0200 Subject: [Lazarus] FileExistsUTF8() difference between Unix/Windows In-Reply-To: <20190921191541.4c6e3698@limapholos.matflo.wg> References: <2a1f7de1-e4c7-be62-9803-0717a8e593d2@epidata.info> <20190920205631.196c33e4@limapholos.matflo.wg> <20190921191541.4c6e3698@limapholos.matflo.wg> Message-ID: On Sat, Sep 21, 2019 at 7:15 PM Mattias Gaertner via lazarus wrote: > You are right. So the change is actually: FileExistsUT8 no longer > supports fpc 2.6.4. Right? I don't think Lazarus supports 2.6.4 anymore. "Officially" we support current stable and the previous stable version of fpc, so that would be 3.0.4 and 3.0.2 ATM. (Maybe even 3.0.0) I _think_ that if you define DisableUtf8RTL then unicode isn't supported in these routines anymore. I never tested that. Having that define is like fighting the system, not using it. IIRC it was debated in https://bugs.freepascal.org/view.php?id=35512 -- Bart From Jean.Suzineau at wanadoo.fr Sun Sep 22 02:27:59 2019 From: Jean.Suzineau at wanadoo.fr (Jean SUZINEAU) Date: Sun, 22 Sep 2019 02:27:59 +0200 Subject: [Lazarus] [Pas2js] It's alive ! In-Reply-To: References: Message-ID: <1d7468d4-eaf1-aa0b-d538-0e4be9f705da@wanadoo.fr> Wonderful ! From MSchnell at lumino.de Tue Sep 24 13:39:28 2019 From: MSchnell at lumino.de (Michael Schnell) Date: Tue, 24 Sep 2019 11:39:28 +0000 Subject: [Lazarus] It's alive ! In-Reply-To: References: Message-ID: Wonderful !!! -Michael From d.oertel at uib.de Tue Sep 24 18:50:58 2019 From: d.oertel at uib.de (detlef oertel) Date: Tue, 24 Sep 2019 18:50:58 +0200 Subject: [Lazarus] How to handle webservice gzip streams Message-ID: <36b4294a-3d3f-7be5-1327-5d52fe20f165@uib.de> Hello, I have to 'speak' with a web service that only handles gzip compression. The zstream TCompressionStream only does deflate. Any hints according to zlib derivates to use windowbits = 15+16 do not work with zstream or paszlib because this part of zlib is not implemented here. It seems that there is a solution with indy using the http component and TIdCompressorZLib as compressor. But I just switched from Indy to synapse because indy has no openssl 1.1 support, which is needed to support actual Linux distributions. The only ways I see at the moment seems to be ugly: Using the external zlib runtime libraries or creating for every request a temporary file in order to use the zstream Tgzfilestream. Is there no gzip stream library for lazarus ? detlef oertel -- From hryk_fujimaki at yahoo.com Tue Sep 24 20:00:14 2019 From: hryk_fujimaki at yahoo.com (Haruyuki Fujimaki) Date: Tue, 24 Sep 2019 18:00:14 +0000 (UTC) Subject: [Lazarus] Too large height of TEdit and TSpinEdit in xfce References: <1078875781.8209771.1569348014300.ref@mail.yahoo.com> Message-ID: <1078875781.8209771.1569348014300@mail.yahoo.com> Dear Mr. Berglund and Coppola, Thank you for your response.It seems that we have to set those heights manually, unfortunately. Fujimaki On Monday, September 16, 2019, 10:22:37 AM GMT+2, Bo Berglund via lazarus wrote: On Mon, 16 Sep 2019 09:24:40 +0200, Salvatore Coppola via lazarus wrote: >Ok it is a workaround but why not call your function only one time at start for instance in main form create? Yes, a typical workaround... I am so used to using OnShow since my form always is only shown once and never hidden afterwards. But you are right that it should rather be in OnCreate! -- Bo Berglund Developer in Sweden -- _______________________________________________ lazarus mailing list lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From zbynek.fiala at gmail.com Tue Sep 24 20:18:15 2019 From: zbynek.fiala at gmail.com (=?UTF-8?Q?Zbyn=c4=9bk_Fiala?=) Date: Tue, 24 Sep 2019 20:18:15 +0200 Subject: [Lazarus] How to handle webservice gzip streams In-Reply-To: <36b4294a-3d3f-7be5-1327-5d52fe20f165@uib.de> References: <36b4294a-3d3f-7be5-1327-5d52fe20f165@uib.de> Message-ID: <07bac3bb-6293-5caa-079a-9defc41924ba@gmail.com> Hello, I used this unit in my project. unit zuncomprfp; { uncompr.c -- decompress a memory buffer Copyright (C) 1995-1998 Jean-loup Gailly. Pascal tranlastion Copyright (C) 1998 by Jacques Nomssi Nzali For conditions of distribution and use, see copyright notice in readme.txt } source: https://github.com/zbyna/Media-Stub-Kodi-Creator/blob/master/zuncomprfp.pas                   Zbyna Dne 24.9.2019 v 18:50 detlef oertel via lazarus napsal(a): > Hello, > > I have to 'speak' with a web service that only handles gzip compression. > The zstream TCompressionStream only does deflate. > Any hints according to zlib derivates to use windowbits = 15+16 > do not work with zstream or paszlib because this part of zlib is not implemented here. > It seems that there is a solution with indy using the http component and TIdCompressorZLib as compressor. > But I just switched from Indy to synapse because indy has no openssl 1.1 support, which is needed to support > actual Linux distributions. > > The only ways I see at the moment seems to be ugly: > Using the external zlib runtime libraries or > creating for every request a temporary file in order to use the zstream Tgzfilestream. > > Is there no gzip stream library for lazarus ? > > detlef oertel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Sep 25 07:32:35 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 25 Sep 2019 01:32:35 -0400 Subject: [Lazarus] Feedback requested: File Search, a visual file search utility Message-ID: If anyone is interested I've posted another hopefully useful program along with the source. https://www.getlazarus.org/apps/filesearch/ The File Search utility is a stand alone tool for Mac, Windows, and Linux to search for files using a variety of criteria including containing text, file size, and file dates. The full source code is available on github and it has no dependencies other than the LCL, so anyone should be able to compile with a default installation of Lazarus. I believe the program is bug free and pretty much feature complete per my original idea. If anyone would like to leave a comment of make a suggestion I'd open to your ideas. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Wed Sep 25 19:38:07 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 25 Sep 2019 19:38:07 +0200 Subject: [Lazarus] Feedback requested: File Search, a visual file search utility In-Reply-To: References: Message-ID: On Wed, Sep 25, 2019 at 7:33 AM Anthony Walter via lazarus wrote: > The File Search utility is a stand alone tool for Mac, Windows, and Linux to search for files using a variety of criteria including containing text, file size, > and file dates. First of all: NICE! You asked foor feedback. You search the entire folder for each pattern in a loop (e.g. 10 patterns, 10 times a FindFirst/FindNext loop).. Then you see if a given match already is in the list (with IndexOf, whic will be slow if you have lots of items). An alternative would be to use a TMaskList and use it's MatchesMaks method (and search the folder with AllFilesMaks). This way you can be sure no double entries will be found. If the count of patterns is 1, then an optimization could be to not use a TMaskList but let the OS do the filtering with FindFirst/FindNext. Using a TMaskList offers you the possibility to let the user decide wether the patterns are case-sensitive. AFAICS, then as it is now, patterns are case-sensitive on *nix systems. This makes finding e.g. all JPEG's a bit awkward on those platforms (you would have to specify each and every possible mix of uppercase and lowercase spelling of '*.jpg;*.jpeg'). I recently adapted TShellTreeView/TShellTreeView to do it like that. (Previously it used a TAvlTree for this purpos, which is faster when searching than a TStringList) -- Bart From bartjunk64 at gmail.com Wed Sep 25 19:40:06 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 25 Sep 2019 19:40:06 +0200 Subject: [Lazarus] Feedback requested: File Search, a visual file search utility In-Reply-To: References: Message-ID: On Wed, Sep 25, 2019 at 7:38 PM Bart wrote: > An alternative would be to use a TMaskList and use it's MatchesMaks > method (and search the folder with AllFilesMaks). As you can see, my fingers struggle with the keyboard ;-) Everywhere it says *maks, you should read *mask. -- Bart From sysrpl at gmail.com Wed Sep 25 19:50:30 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 25 Sep 2019 13:50:30 -0400 Subject: [Lazarus] Feedback requested: File Search, a visual file search utility In-Reply-To: References: Message-ID: Thanks. I'll look into TMaskList. I assume you mean this bit of code? https://github.com/alrieckert/lazarus/blob/master/components/lazutils/masks.pas I am not sure how much this slows things down, and the checking if a file has already been added only happen on per directory basis, meaning the list is emptied with each folder and the search if already exists is reset to zero each time search enters a new folder. I will look into this though. Thank you for your feedback. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dezlov at gmail.com Wed Sep 25 20:59:29 2019 From: dezlov at gmail.com (Denis Kozlov) Date: Wed, 25 Sep 2019 19:59:29 +0100 Subject: [Lazarus] Feedback requested: File Search, a visual file search utility In-Reply-To: References: Message-ID: Hi Anthony, It looks great! If you were looking for new features, please consider the following features: 1. Show the snippets from the file where the content was found, with some context lines around the matches. 2. Allow specifying regular expressions for content search (optionally). These are killer features that any file content search app must have in my opinion. You can see an example implementation in AstroGrep (Windows only): http://astrogrep.sourceforge.net/screenshots/ Denis On 25/09/2019 06:32, Anthony Walter via lazarus wrote: > If anyone is interested I've posted another hopefully useful program > along with the source. > > https://www.getlazarus.org/apps/filesearch/ > > The File Search utility is a stand alone tool for Mac, Windows, and > Linux to search for files using a variety of criteria including > containing text, file size, and file dates. The full source code is > available on github and it has no dependencies other than the LCL, so > anyone should be able to compile with a default installation of Lazarus. > > I believe the program is bug free and pretty much feature complete per > my original idea. If anyone would like to leave a comment of make a > suggestion I'd open to your ideas. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Wed Sep 25 22:48:01 2019 From: bartjunk64 at gmail.com (Bart) Date: Wed, 25 Sep 2019 22:48:01 +0200 Subject: [Lazarus] Feedback requested: File Search, a visual file search utility In-Reply-To: References: Message-ID: On Wed, Sep 25, 2019 at 7:51 PM Anthony Walter via lazarus wrote: > Thanks. I'll look into TMaskList. I assume you mean this bit of code? > > https://github.com/alrieckert/lazarus/blob/master/components/lazutils/masks.pas Yes, it's in the masks unit. Bart From bo.berglund at gmail.com Thu Sep 26 17:12:25 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 26 Sep 2019 17:12:25 +0200 Subject: [Lazarus] Environment monitoring software on Linux? Message-ID: I am looking for some advice on how best to approach my project... I have to create monitoring control software that will run on a Linux computer (Raspberry Pi) and will be responsible for controlling a few measure systems to take readings at regular intervals and saving/forwarding the results. The system will be unattended, probably housed in a box of some kind outdoors. THere will be an Internet connection through a mobile broadband router in the system. I have developed instrumentation control software that works to interface with the instrumentation to run the measurements and collect the data afterwards. This is all written in ObjectPascal in Lazarus IDE. Control of the equipment is done via GPIO connected relays (for power switching and battery control) and RS232 for instrument data interfacing. I have simplified the software by using the ser2net service on the RPi to be able to use TCP/IP socket connections for "everything" related to system control and data handling. Now I am at the point where I should create the scheduler running on Linux. About 10-12 years ago I had a similar task and then I was using Delphi and I created a Windows service that would handle the scheduling. But I do not want to mess with Windows anymore so I need to figure out a way to have similar functionality on Linux, i.e. something that will run whenever the computer is started and could check if one or several tasks are due for execution and if so run them. Is cron the best way or is there some similar function like the Windows services one can easily create? If so is there some sample code in FreePascal for implementing a service? Any advice welcome. -- Bo Berglund Developer in Sweden From wkitty42 at windstream.net Thu Sep 26 19:00:59 2019 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Thu, 26 Sep 2019 13:00:59 -0400 Subject: [Lazarus] Environment monitoring software on Linux? In-Reply-To: References: Message-ID: On 9/26/19 11:12 AM, Bo Berglund via lazarus wrote: > Is cron the best way or is there some similar function like the > Windows services one can easily create? generally speaking, cron is the equivalent of the winwhatever scheduler... > If so is there some sample > code in FreePascal for implementing a service? why? when you deploy your project, include the needed steps to add the polling schedule to the existing cron on the linux system... either that or just build a scheduler into (or wrap one around) your project that polls at regular intervals... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* From sysrpl at gmail.com Thu Sep 26 19:06:37 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Thu, 26 Sep 2019 13:06:37 -0400 Subject: [Lazarus] Environment monitoring software on Linux? In-Reply-To: References: Message-ID: >From what you describe it would seem a simple script or program invoked through cron would be the best way to tackle this problem. Another option is the watch command, which can execute a program every x intervals. And of course if you want to kick off a process when run, you can add a script to init.d or ~.profile. Finally, you also have the option of using ssh and tmux. Tmux allows programs to run between logins, that is connecting and disconnecting to your linux system you can check on a long running program or even an pseudo tty using tmux. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Thu Sep 26 23:16:03 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 26 Sep 2019 23:16:03 +0200 Subject: [Lazarus] Environment monitoring software on Linux? References: Message-ID: On Thu, 26 Sep 2019 13:00:59 -0400, wkitty42--- via lazarus wrote: >On 9/26/19 11:12 AM, Bo Berglund via lazarus wrote: >> Is cron the best way or is there some similar function like the >> Windows services one can easily create? > >generally speaking, cron is the equivalent of the winwhatever scheduler... > >> If so is there some sample >> code in FreePascal for implementing a service? > >why? when you deploy your project, include the needed steps to add the polling >schedule to the existing cron on the linux system... > >either that or just build a scheduler into (or wrap one around) your project >that polls at regular intervals... > OK, using cron to start the scheduler program is probably the best way on Linux. Once a minute with a quick check for queued tasks and then exit. I have one problem though, every time the scheduler starts (via cron) it will check if there is a task ready to start at that time. If there is it will engage with the hardware and set it in motion, wait for the measurement to end and then retrieve the data and finish. If the measure process takes longer than until the next cron invocation due to some extra delays in that particular process, then I don't want the new instance of the scheduler to start another task. The reason is that the hardware is occupied. Instead I want the new instance to just exit or else go into some wait loop until the first instance quits. I don't like the use of lock files in order to control this since if the process crashes it will leave behind the lock file and the system blocks. So is there some way to let an fpc process determine if there is another instance of itself running? In Windows I used something called Mutex, which was managed by Windows and so could not be left behind... -- Bo Berglund Developer in Sweden From bartjunk64 at gmail.com Thu Sep 26 23:25:45 2019 From: bartjunk64 at gmail.com (Bart) Date: Thu, 26 Sep 2019 23:25:45 +0200 Subject: [Lazarus] Environment monitoring software on Linux? In-Reply-To: References: Message-ID: On Thu, Sep 26, 2019 at 11:16 PM Bo Berglund via lazarus wrote: > If the measure process takes longer than until the next cron > invocation due to some extra delays in that particular process, then I > don't want the new instance of the scheduler to start another task. > The reason is that the hardware is occupied. > > Instead I want the new instance to just exit or else go into some wait > loop until the first instance quits. UniqueInstance? https://wiki.freepascal.org/UniqueInstance -- Bart From bo.berglund at gmail.com Thu Sep 26 23:50:41 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 26 Sep 2019 23:50:41 +0200 Subject: [Lazarus] Environment monitoring software on Linux? References: Message-ID: <1ebqoed1g3p0r5a3t9vdq7qlaipdgcjgb1@4ax.com> On Thu, 26 Sep 2019 23:25:45 +0200, Bart via lazarus wrote: >On Thu, Sep 26, 2019 at 11:16 PM Bo Berglund via lazarus > wrote: > >> If the measure process takes longer than until the next cron >> invocation due to some extra delays in that particular process, then I >> don't want the new instance of the scheduler to start another task. >> The reason is that the hardware is occupied. >> >> Instead I want the new instance to just exit or else go into some wait >> loop until the first instance quits. > >UniqueInstance? >https://wiki.freepascal.org/UniqueInstance Hi Bart, thanks, this seems like a good solution! I have now tested it on a GUI app by putting it into the lpr file at the very beginning: uses .... uniqueinstanceraw; {$R *.res} begin if InstanceRunning('myidentifier') then exit; Application.Initialize; Worked straight out of the box! Now I just have to check that it works also for a console program, which means I have to create two terminals and start it in one and then try to start also in the other. -- Bo Berglund Developer in Sweden From aaa5500 at ya.ru Fri Sep 27 15:46:41 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 27 Sep 2019 16:46:41 +0300 Subject: [Lazarus] Qt4 crash in CudaText Message-ID: I just tested CudaText Linux x64 qt4 build: it now crashes on showing Command Palette dialog. Crash inside ATListbox.pas in Paint handler, in some Qt painting code. (I tried to change ATListbox.DoubleBuffered, no help.) -- Regards, Alexey From zeljko at holobit.net Fri Sep 27 16:44:49 2019 From: zeljko at holobit.net (zeljko) Date: Fri, 27 Sep 2019 16:44:49 +0200 Subject: [Lazarus] Qt4 crash in CudaText In-Reply-To: References: Message-ID: <125e1d45-1eb3-479b-9009-d7e04615fabf@holobit.net> On 09/27/2019 03:46 PM, AlexeyT via lazarus wrote: > I just tested CudaText Linux x64 qt4 build: it now crashes on showing > Command Palette dialog. Crash inside ATListbox.pas in Paint handler, in > some Qt painting code. (I tried to change ATListbox.DoubleBuffered, no > help.) Please send gdb stacktrace. zeljko From aaa5500 at ya.ru Fri Sep 27 18:57:02 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 27 Sep 2019 19:57:02 +0300 Subject: [Lazarus] Qt4 crash in CudaText In-Reply-To: <125e1d45-1eb3-479b-9009-d7e04615fabf@holobit.net> References: <125e1d45-1eb3-479b-9009-d7e04615fabf@holobit.net> Message-ID: <9dca91ae-d763-9318-4ca6-9692edba6139@ya.ru> Stack trace. #0 QTransform::type() const at :0 #1 ?? at :0 #2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags) at :0 #3 QPainter_drawImage2 at :0 #4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffffffb2e4, 0x18bd8a0, 0x7fffffffb2f4, 0x0, 0x7fffffffb2d4, 0) at qt/qtobjects.pas:3568 #5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990 #6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787 #7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at include/winapi.inc:1025 #8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122 #9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541 #10 PAINTWINDOW(0x7fffd6eae8f0, 140736908144000) at include/customcontrol.inc:118 #11 PAINTHANDLER(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/wincontrol.inc:4856 #12 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/wincontrol.inc:6828 #13 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/customcontrol.inc:98 #14 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0 #15 ?? at :0 #16 ?? at :0 #17 ?? at :0 #18 ?? at :0 #19 .Ld255 at :0 #20 ?? at :0 #21 ?? at :0 #22 ?? at :0 #23 ?? at :0 #24 ?? at :0 Alex From zeljko at holobit.net Fri Sep 27 19:28:28 2019 From: zeljko at holobit.net (zeljko) Date: Fri, 27 Sep 2019 19:28:28 +0200 Subject: [Lazarus] Qt4 crash in CudaText In-Reply-To: <9dca91ae-d763-9318-4ca6-9692edba6139@ya.ru> References: <125e1d45-1eb3-479b-9009-d7e04615fabf@holobit.net> <9dca91ae-d763-9318-4ca6-9692edba6139@ya.ru> Message-ID: <39545b51-2dbd-c401-cb67-be20baa1bb35@holobit.net> On 09/27/2019 06:57 PM, AlexeyT via lazarus wrote: > Stack trace. > > #0 QTransform::type() const at :0 > > #1 ?? at :0 > #2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, > QFlags) at :0 This is crash in Qt library. > #3 QPainter_drawImage2 at :0 > #4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffffffb2e4, 0x18bd8a0, 0x7fffffffb2f4, > 0x0, 0x7fffffffb2d4, 0) at qt/qtobjects.pas:3568 At line 3568 we are trying to draw image which is converted from QImageFormat_RGB32 format to QImageFormat_ARGB32. That conversion is needed to fix few issues we had in past with various qt versions on linux and windows. See issues #11713 and #25590 for details. Quick check if that works is to change line (above line 3568 in qtobjects.pas) if (not EqualRect(LocalRect, sourceRect^) or (Mask = nil)) and (QImage_format(Image) = QImageFormat_RGB32) then ... to if (not EqualRect(LocalRect, sourceRect^) then .... and give feedback. As I can see from stack trace your LocalRect and SourceRect are equal , so it will not convert your image to QImageFormat_ARGB32 , but it will directly draw it in line 3611 (qtobjects.pas). Just change that, rebuild your project and test. zeljko > #5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, > 140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990 > #6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, > 140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787 > #7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, > 438, 256, 13369376) at include/winapi.inc:1025 > #8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = > 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR > = {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, > BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = > 256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122 > #9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541 > #10 PAINTWINDOW(0x7fffd6eae8f0, 140736908144000) at > include/customcontrol.inc:118 > #11 PAINTHANDLER(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = > 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at > include/wincontrol.inc:4856 > #12 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = > 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at > include/wincontrol.inc:6828 > #13 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = > 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at > include/customcontrol.inc:98 > #14 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0 > #15 ?? at :0 > #16 ?? at :0 > #17 ?? at :0 > #18 ?? at :0 > #19 .Ld255 at :0 > #20 ?? at :0 > #21 ?? at :0 > #22 ?? at :0 > #23 ?? at :0 > #24 ?? at :0 > > > Alex > From aaa5500 at ya.ru Fri Sep 27 19:40:17 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 27 Sep 2019 20:40:17 +0300 Subject: [Lazarus] Qt4 crash in CudaText In-Reply-To: <39545b51-2dbd-c401-cb67-be20baa1bb35@holobit.net> References: <125e1d45-1eb3-479b-9009-d7e04615fabf@holobit.net> <9dca91ae-d763-9318-4ca6-9692edba6139@ya.ru> <39545b51-2dbd-c401-cb67-be20baa1bb35@holobit.net> Message-ID: <0ddb4cec-3ea4-6c5d-17bd-34101587635b@ya.ru> >>    if (not EqualRect(LocalRect, sourceRect^) then Changed this; still crash. call stack is similar: #0 QTransform::type() const at :0 #1 ?? at :0 #2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags) at :0 #3 QPainter_drawImage2 at :0 #4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffffffb2f4, 0x184edd0, 0x7fffffffb304, 0x0, 0x7fffffffb2e4, 0) at qt/qtobjects.pas:3612 #5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990 #6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787 #7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at include/winapi.inc:1025 #8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122 #9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541 From sysrpl at gmail.com Sat Sep 28 02:06:35 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 27 Sep 2019 20:06:35 -0400 Subject: [Lazarus] Feedback requested: File Search, a visual file search utility In-Reply-To: References: Message-ID: Bart, Thanks for suggesting TMaskList. I added it in and it works much better than the normal FindFirst pattern matching. It also allowed me to remove the duplicate checking. Regarding TShellView, you might want to look at my Shell Control library. It is explorer for Windows, as well as a few other controls including a shell path with breadcrumb drop down menus, and a shell bubble type control for listing common folders. The source code is Windows only, but it's now available for free: https://www.codebot.org/shell/ https://www.codebot.org/delphi/?doc=9613 and sources: https://gitlab.com/sysrpl/codebot.shell Feel free to modify the sources to work under Lazarus. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko at holobit.net Sat Sep 28 09:12:03 2019 From: zeljko at holobit.net (zeljko) Date: Sat, 28 Sep 2019 09:12:03 +0200 Subject: [Lazarus] Qt4 crash in CudaText In-Reply-To: <0ddb4cec-3ea4-6c5d-17bd-34101587635b@ya.ru> References: <125e1d45-1eb3-479b-9009-d7e04615fabf@holobit.net> <9dca91ae-d763-9318-4ca6-9692edba6139@ya.ru> <39545b51-2dbd-c401-cb67-be20baa1bb35@holobit.net> <0ddb4cec-3ea4-6c5d-17bd-34101587635b@ya.ru> Message-ID: On 09/27/2019 07:40 PM, AlexeyT wrote: > >>    if (not EqualRect(LocalRect, sourceRect^) then > > Changed this; still crash. call stack is similar: In that case it looks like a bug in Qt library (QPainter::drawImage is called after our libQt4Pas inside Qt lib). What is your qt4 library version ? > > #0 QTransform::type() const at :0 > #1 ?? at :0 > #2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, > QFlags) at :0 > #3 QPainter_drawImage2 at :0 > #4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffffffb2f4, 0x184edd0, 0x7fffffffb304, > 0x0, 0x7fffffffb2e4, 0) at qt/qtobjects.pas:3612 > #5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, > 140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990 > #6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, > 140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787 > #7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, > 438, 256, 13369376) at include/winapi.inc:1025 > #8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = > 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR > = {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, > BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = > 256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122 > #9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541 > > From aaa5500 at ya.ru Sat Sep 28 09:54:37 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 28 Sep 2019 10:54:37 +0300 Subject: [Lazarus] Qt4 crash in CudaText In-Reply-To: References: <125e1d45-1eb3-479b-9009-d7e04615fabf@holobit.net> <9dca91ae-d763-9318-4ca6-9692edba6139@ya.ru> <39545b51-2dbd-c401-cb67-be20baa1bb35@holobit.net> <0ddb4cec-3ea4-6c5d-17bd-34101587635b@ya.ru> Message-ID: <78c30cdb-742d-287a-f977-adf2ced1eb32@ya.ru> Qt4 version. user at PC:~$ dpkg-query -s qtchooser Package: qtchooser Status: install ok installed Priority: optional Section: libdevel Installed-Size: 127 Maintainer: Ubuntu Developers Architecture: amd64 Multi-Arch: foreign Version: 66-1 Replaces: libqt5core5a (<< 5.5.1+dfsg-17~), libqtcore4 (<< 4:4.8.7+dfsg-7~), qtchooser-bin (<< 64-ga1b6736-2~) Depends: libc6 (>= 2.14), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2) Breaks: libqt5core5a (<< 5.5.1+dfsg-17~), libqtcore4 (<< 4:4.8.7+dfsg-7~), qtbase5-dev-tools (<< 5.9.2+dfsg-3~), qtchooser-bin (<< 64-ga1b6736-2~), qttools5-dev-tools (<< 5.9.2-2~) From zeljko at holobit.net Sat Sep 28 12:06:12 2019 From: zeljko at holobit.net (zeljko) Date: Sat, 28 Sep 2019 12:06:12 +0200 Subject: [Lazarus] Qt4 crash in CudaText In-Reply-To: <78c30cdb-742d-287a-f977-adf2ced1eb32@ya.ru> References: <125e1d45-1eb3-479b-9009-d7e04615fabf@holobit.net> <9dca91ae-d763-9318-4ca6-9692edba6139@ya.ru> <39545b51-2dbd-c401-cb67-be20baa1bb35@holobit.net> <0ddb4cec-3ea4-6c5d-17bd-34101587635b@ya.ru> <78c30cdb-742d-287a-f977-adf2ced1eb32@ya.ru> Message-ID: <87cc18b2-c97b-e4ba-124c-48526ede8073@holobit.net> On 09/28/2019 09:54 AM, AlexeyT wrote: > Qt4 version. Ok, as I can see it's 4.8.7, so last Qt4 release and it's ok. Please open an issue about it, in this case I must install your components and see what's going on inside your atlistbox.pas , and what kind of image is that. zeljko