From mlnglsts at bgss.hu Mon Jan 2 16:00:33 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Mon, 2 Jan 2017 16:00:33 +0100 Subject: [Lazarus] Qt5 - Size and permissions of the compiled bindings Message-ID: <83e56d79-0596-6a27-1e23-dc524314d799@bgss.hu> Hi All, I tried to compile the bindings with Debian Stretch. Success. But the size of libQt5Pas.so.1.2.6 is very big (86222128 bytes). I compiled a debug build? The permissions of the file is 755 (libQt4Pas have 644). The execute permission(s) just a mistake? Gabor From zeljko at holobit.net Mon Jan 2 17:10:04 2017 From: zeljko at holobit.net (zeljko) Date: Mon, 2 Jan 2017 17:10:04 +0100 Subject: [Lazarus] Qt5 - Size and permissions of the compiled bindings In-Reply-To: <83e56d79-0596-6a27-1e23-dc524314d799@bgss.hu> References: <83e56d79-0596-6a27-1e23-dc524314d799@bgss.hu> Message-ID: <2d39e551-c862-3ec7-6ad6-a50e9b9f6e8c@holobit.net> On 02.01.2017 16:00, Gabor Boros via Lazarus wrote: > Hi All, > > I tried to compile the bindings with Debian Stretch. Success. But the > size of libQt5Pas.so.1.2.6 is very big (86222128 bytes). I compiled a > debug build? The permissions of the file is 755 (libQt4Pas have 644). > The execute permission(s) just a mistake? Bindings are not yet finished. See .pro file in lcl/interfaces/qt5/cbindings and change there from debug to release mode. Don't know about permissions, not sure if .pro file is doing anything about permissions. zeljko From mlnglsts at bgss.hu Mon Jan 2 20:52:12 2017 From: mlnglsts at bgss.hu (Gabor Boros) Date: Mon, 2 Jan 2017 20:52:12 +0100 Subject: [Lazarus] Qt5 - Size and permissions of the compiled bindings In-Reply-To: <2d39e551-c862-3ec7-6ad6-a50e9b9f6e8c@holobit.net> References: <83e56d79-0596-6a27-1e23-dc524314d799@bgss.hu> <2d39e551-c862-3ec7-6ad6-a50e9b9f6e8c@holobit.net> Message-ID: 2017. 01. 02. 17:10 keltezéssel, zeljko írta: > Bindings are not yet finished. See .pro file in > lcl/interfaces/qt5/cbindings and change there from debug to release mode. Modified from CONFIG -= release CONFIG += debug to CONFIG += release CONFIG -= debug and the size of the compiled so file is 3202768 bytes, after install 2331624 bytes ("strip --strip-unneeded" called by make install). > Don't know about permissions, not sure if .pro file is doing anything > about permissions. make install set the permissions with "install -m 755 -p libQt5Pas.so.1.2.6 ...". The Makefile (generated by qmake) contains two lines about install/permissions: INSTALL_FILE = install -m 644 -p INSTALL_PROGRAM = install -m 755 -p So, the "make install" think the installed thing is a program and set the execute permissions. Gabor From ngbarbier at gmail.com Mon Jan 2 20:52:32 2017 From: ngbarbier at gmail.com (guy barbier) Date: Mon, 2 Jan 2017 20:52:32 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: Message-ID: why not use the TstringGrid component? 2016-12-29 19:02 GMT+01:00 Werner Pamler via Lazarus < lazarus at lists.lazarus-ide.org>: > Am 29.12.2016 um 16:59 schrieb Bart via Lazarus: > >> Hi, >> >> I am in need of a component/clas that can hold a 2 dimensional "table" >> of strings. >> The dimensions are unknown at designtime: I read the data from a HTML >> table. >> The HTML reader provides events that give me the data of each cell, >> and that tell me whenever a row is started or closed. >> >> The class should be able to: >> - access individual "cellls" (read/write) >> - add or insert a row (with an without data (TStrings and Array of >> String must be supprted as the datatype)). Note: adding a row must be >> possible when the dimensions of the table are yet unknown. >> - upon adding a row, it should be able to extend the dimensions of the >> table >> - the strings itself may contain LineEndings >> >> Not needed right now, but nice to have: >> - add or insert a column (with an without data) >> - upon adding a column, it should be able to extend the dimensions of the >> table >> - delete a row or column >> >> >> I have no need for saving the table to disk in any way. >> The program that uses this class should not need external libraries, >> since I cannot install those on the target computer I need my program >> on. >> >> I botched up some class that can do this (good enough for my purposes, >> but it's not nice code), but I was wondering if there already is some >> component that is more suitable (and well tested) for this. >> Using some sort of in memory dataset comes to mind, but I never use >> databases in my programs at all, so I'm a complete novice on that >> topic. >> > > fpspreadsheet? It even has a html reader, but might be an overkill though. > Internally it uses a TAVLTree for storing the cells. This tree is extremely > fast. Maybe you can build your class around it. > > Or the TVirtualGrid from grids.pas which is used internally by TCustomGrid > and its descendants? > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Mon Jan 2 22:33:29 2017 From: bartjunk64 at gmail.com (Bart) Date: Mon, 2 Jan 2017 22:33:29 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: Message-ID: On 1/2/17, guy barbier via Lazarus wrote: > why not use the TstringGrid component? Because I do not want it to depend on LCL (which I forgot to mention). Bart From mike.cornflake at gmail.com Tue Jan 3 01:46:03 2017 From: mike.cornflake at gmail.com (Michael Thompson) Date: Tue, 3 Jan 2017 08:46:03 +0800 Subject: [Lazarus] In search of a component for holding a table of strings Message-ID: > I am in need of a component/clas that can hold a > 2 dimensional "table" of strings. It has taken me a ridiculously long time to discover bufdataset, but right now I'm re-writing whole chunks of code to use these. Advantage for me: Filtering/Locate/Sort. For debug purposes, if you want to see the contents of the array, just plonk a DBGrid and point the bufdataset to that. Our wiki overcomplicates the control - it probably assumes you already know the basics. : Good simple start point code... http://forum.lazarus-ide.org/index.php?topic=31698.0 : Advanced topics, but only if needed... http://wiki.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC Cheers Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Tue Jan 3 14:53:36 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 3 Jan 2017 15:53:36 +0200 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> Message-ID: On Wed, Dec 28, 2016 at 12:49 AM, Marcus Sackrow via Lazarus wrote: > I implemented a basic support for Amiga systems Now I found your post here and read it properly. > Since 2010 I'm working on Lazarus/LCL MUI interface for Amiga Systems. At > the moment on github https://github.com/alb42/lazarus/tree/lazarus-morphos > some Results of this available at my Blog: > https://blog.alb42.de/category/fpc/lcl/ > > Is it possible to add this initial Amiga systems support? How about this MUI > LCL Interface? I applied the code implementing NoGUI support. http://bugs.freepascal.org/view.php?id=31186 Yes, the MUI stuff looks interesting. I think none of the current developers have time nor motivation to develop Amiga MUI bindings. It means you should get write access to the relevant directory in Lazarus sources and maintain the code yourself. Initial commit can be done by somebody, maybe me. This would kind of imply a commitment from your side to maintain it for some time to come. The term "mui" does not tell much to most people. MUI can also mean "Multilingual User Interface" by Microsoft. The bindings name should include "Amiga" I think. Juha From alb42 at web.de Tue Jan 3 19:59:57 2017 From: alb42 at web.de (Marcus Sackrow) Date: Tue, 3 Jan 2017 19:59:57 +0100 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> Message-ID: <5ef32dc1-7da1-0868-6d10-dc278479dccf@web.de> Hi Juha, Am 03.01.2017 um 14:53 schrieb Juha Manninen via Lazarus: >> Since 2010 I'm working on Lazarus/LCL MUI interface for Amiga Systems. At >> the moment on github https://github.com/alb42/lazarus/tree/lazarus-morphos >> some Results of this available at my Blog: >> https://blog.alb42.de/category/fpc/lcl/ >> >> Is it possible to add this initial Amiga systems support? How about this MUI >> LCL Interface? > I applied the code implementing NoGUI support. > http://bugs.freepascal.org/view.php?id=31186 Thanks for that, very nice, works fine so far, of course that was only the start. > Yes, the MUI stuff looks interesting. > I think none of the current developers have time nor motivation to > develop Amiga MUI bindings. It means you should get write access to > the relevant directory in Lazarus sources and maintain the code > yourself. I guess so. I have already an account (login: "marcus") on the svn.freepascal.org for the access to freepascal repository. I'm maintainer for Amiga, AmigaOS4, AROS and MorphOS (together with Karoly Balog) in FPC. > Initial commit can be done by somebody, maybe me. > This would kind of imply a commitment from your side to maintain it > for some time to come. Of course, thats the idea of it to maintain it (and if working on it for 10 years I will not stop next week :-P) But I need a little bit time to order everything and make a Patch File. (My Lazarus Sandbox is really old ;-)) > The term "mui" does not tell much to most people. MUI can also mean > "Multilingual User Interface" by Microsoft. The bindings name should > include "Amiga" I think. I do not agree on this point, several reasons: - MUI (Magic User Interface) is much older (1993) than the rather unknown "mui" in Windows - there will be no explicit "mui" Windows Widgetset in Lazarus, it's just a technique AmigaOS already have since 1992 as "locale" - MUI Widgetset is not only for Amiga but also for MorphOS (the original) and AROS (where it's named "Zune", which is not really better :-P) so an AmigaMUIor AmMUI would be more confusing. - for carbon and cocoa the Mac is also not added, even Carbon/Cocoa most have much other idea, (even QT I would think to QuickTime) - will be a tremendous work to change that (not possible to do per search/replace) Greetings, Marcus From ptrg at freemail.hu Thu Jan 5 10:18:06 2017 From: ptrg at freemail.hu (=?UTF-8?B?UMOpdGVyIEfDoWJvcg==?=) Date: Thu, 5 Jan 2017 10:18:06 +0100 Subject: [Lazarus] Lazarus Release 1.6.2 In-Reply-To: <20161115154206.25fd71bc@limapholos.matflo.wg> References: <20161115154206.25fd71bc@limapholos.matflo.wg> Message-ID: <67b97dbf-8688-193f-ceef-f460062fa403@freemail.hu> Hello! Today I was looking at sourceforge.net and I saw that the default download for debian based linuxes are 1.6.0 however 1.6.2 is out more than a month ago. I did not test other systems. Please fix if it is not by design. 2016-11-15 15:42 keltezéssel, Mattias Gaertner via Lazarus írta: > The Lazarus team is glad to announce the release of Lazarus 1.6.2. This > is a bugfix release. > > The release is available for download on SourceForge: > http://sourceforge.net/projects/lazarus/files/ > > Mattias > -- Péter Gábor ptrg at freemail.hu From mailinglists at geldenhuys.co.uk Thu Jan 5 10:37:33 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 5 Jan 2017 09:37:33 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: Message-ID: On 2016-12-29 15:59, Bart via Lazarus wrote: > I am in need of a component/clas that can hold a 2 dimensional "table" > of strings. Go back to the basics.... Simply use an array. ;-) Regards, Graeme From nc-gaertnma at netcologne.de Thu Jan 5 10:40:58 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 5 Jan 2017 10:40:58 +0100 Subject: [Lazarus] Lazarus Release 1.6.2 In-Reply-To: <67b97dbf-8688-193f-ceef-f460062fa403@freemail.hu> References: <20161115154206.25fd71bc@limapholos.matflo.wg> <67b97dbf-8688-193f-ceef-f460062fa403@freemail.hu> Message-ID: <20170105104058.2d68346a@limapholos.matflo.wg> On Thu, 5 Jan 2017 10:18:06 +0100 Péter Gábor via Lazarus wrote: > Hello! > > Today I was looking at sourceforge.net and I saw that the default > download for debian based linuxes are 1.6.0 however 1.6.2 is out more > than a month ago. > > I did not test other systems. > > Please fix if it is not by design. Thanks for the hint. Fixed. Mattias From mschnell at lumino.de Thu Jan 5 11:05:21 2017 From: mschnell at lumino.de (Michael Schnell) Date: Thu, 5 Jan 2017 11:05:21 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: Message-ID: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> On 05.01.2017 10:37, Graeme Geldenhuys via Lazarus wrote: > Simply use an array. ;-) A two dimensional dynamic array. If he wants "add" and "delete" etc functions, he can easily embed same in a class, plus using a two dimensional array default property for comfort. -Michael From marc at dommelstein.nl Thu Jan 5 13:43:15 2017 From: marc at dommelstein.nl (Marc Weustink) Date: Thu, 5 Jan 2017 13:43:15 +0100 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: <5ef32dc1-7da1-0868-6d10-dc278479dccf@web.de> References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> <5ef32dc1-7da1-0868-6d10-dc278479dccf@web.de> Message-ID: <9aa83624-aea3-2f1a-ecc4-dee063171e21@dommelstein.nl> Marcus Sackrow via Lazarus wrote: > Hi Juha, > > Am 03.01.2017 um 14:53 schrieb Juha Manninen via Lazarus: [snip] >> Yes, the MUI stuff looks interesting. >> I think none of the current developers have time nor motivation to >> develop Amiga MUI bindings. It means you should get write access to >> the relevant directory in Lazarus sources and maintain the code >> yourself. > > I guess so. I have already an account (login: "marcus") on the > svn.freepascal.org > for the access to freepascal repository. I'm maintainer for Amiga, > AmigaOS4, AROS and MorphOS (together with Karoly Balog) in FPC. That makes things easier. >> Initial commit can be done by somebody, maybe me. >> This would kind of imply a commitment from your side to maintain it >> for some time to come. > > Of course, thats the idea of it to maintain it (and if working on it for > 10 years I will not stop next week :-P) But I need a little bit time to > order everything and make a Patch File. (My Lazarus Sandbox is really > old ;-)) > >> The term "mui" does not tell much to most people. MUI can also mean >> "Multilingual User Interface" by Microsoft. The bindings name should >> include "Amiga" I think. > > I do not agree on this point, several reasons: > > - MUI (Magic User Interface) is much older (1993) than the rather > unknown "mui" in Windows > - there will be no explicit "mui" Windows Widgetset in Lazarus, it's > just a technique AmigaOS already have since 1992 as "locale" > - MUI Widgetset is not only for Amiga but also for MorphOS (the > original) and AROS (where it's named "Zune", which is not really better > :-P) so an AmigaMUIor AmMUI would be more confusing. > - for carbon and cocoa the Mac is also not added, even Carbon/Cocoa most > have much other idea, (even QT I would think to QuickTime) > - will be a tremendous work to change that (not possible to do per > search/replace) I agree on Marcus here. MUI is a "known" UI, so I see no reason to prefix. It is the same as other widgetsets. Marc From alb42 at web.de Thu Jan 5 14:59:08 2017 From: alb42 at web.de (Marcus Sackrow) Date: Thu, 5 Jan 2017 14:59:08 +0100 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> Message-ID: <5e0f42cd-64d6-3937-868f-063d693fcfd1@web.de> Hello, Am 03.01.2017 um 14:53 schrieb Juha Manninen via Lazarus: > Yes, the MUI stuff looks interesting. > > Initial commit can be done by somebody, maybe me. So here is it. I tried to send directly but the ML has a 100k Limit to I placed it on my Webpage: https://home.alb42.de/MUI-WidgetSet.patch.zip 184k packed, 1.2 MB unpacked. I tried to change not too much outside the mui widgetset folder. Open for discussion. Would be nice to get it added to lazarus. Thanks. Greetings, Marcus From bartjunk64 at gmail.com Thu Jan 5 16:35:02 2017 From: bartjunk64 at gmail.com (Bart) Date: Thu, 5 Jan 2017 16:35:02 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: On 1/5/17, Michael Schnell via Lazarus wrote: > A two dimensional dynamic array. > > If he wants "add" and "delete" etc functions, he can easily embed same > in a class, plus using a two dimensional array default property for comfort. Yes, that's what I ended up with. I constructed a TStringTable class that does all I need (and more): - insert, add, delete rows/cols - autogrow colcount (with insertrow) - exchange rows/cols - get/set rows/cols - property Cells[ACol, ARow]: string (read/write) It can be found here: http://svn.code.sf.net/p/flyingsheep/code/trunk/MijnLib/stringtable.pp Implementation can probably be faster (I use dumb for loops to move things around, where maybe I could have used move(), but failed and gave up). It does not scale very well (due to numerous setlength() calls), but filling a 1000x1000 TStringTable just cost me 76 ms. A 5000x5000 table however cost me 1248 ms. B.t.w. for testing purposes I tried to set up a 10000x10000 array of array of string, but the program died on me without a sign of a single exception. Bart From bartjunk64 at gmail.com Thu Jan 5 18:10:31 2017 From: bartjunk64 at gmail.com (Bart) Date: Thu, 5 Jan 2017 18:10:31 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: On 1/5/17, Bart wrote: > I constructed a TStringTable class that does all I need (and more): > - insert, add, delete rows/cols > - autogrow colcount (with insertrow) > - exchange rows/cols > - get/set rows/cols > - property Cells[ACol, ARow]: string (read/write) > > It can be found here: > http://svn.code.sf.net/p/flyingsheep/code/trunk/MijnLib/stringtable.pp Just implemented sorting. Bart From mschnell at lumino.de Fri Jan 6 10:55:30 2017 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 6 Jan 2017 10:55:30 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: <0b339916-c446-ee17-ec3e-fa66f24d5b2f@lumino.de> On 05.01.2017 18:10, Bart via Lazarus wrote: > > Just implemented sorting. Nice ! (Even if I don't see a straight forward understanding of two dimensional sorting). BTW.: Looking at the code I could imagine that auto-growing when using the Cell property to write an element might be appropriate. Read/Write form/to a file might be sensible. Here AFAIK, the fpc's TStringList does not yet feature setting the encoding, which Delphi does. -Michael From el.es.cr at gmail.com Fri Jan 6 11:19:33 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Fri, 6 Jan 2017 10:19:33 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: On 05/01/17 17:10, Bart via Lazarus wrote: > On 1/5/17, Bart wrote: > >> I constructed a TStringTable class that does all I need (and more): >> - insert, add, delete rows/cols >> - autogrow colcount (with insertrow) >> - exchange rows/cols >> - get/set rows/cols >> - property Cells[ACol, ARow]: string (read/write) >> >> It can be found here: >> http://svn.code.sf.net/p/flyingsheep/code/trunk/MijnLib/stringtable.pp > > Just implemented sorting. > > Bart > Hi Bart, just having a look at the declaration, haven't skimmed through code yet, do you also plan to add a TStringGrid-like interface for cols and rows http://lazarus-ccr.sourceforge.net/docs/lcl/grids/tcustomstringgrid.cols.html ? (i understand that not all TStrings does, will make sense in table row/col context... like we wouldn't want to let StringTable.Rows[rowindex].Strings[colindex].Delete to delete the entire column, or shift the data to close the gap...) I wonder why nobody thought of this kind of (non-visual) TStringGrid before ? :) I guess the TStringGrid has become very visually-centered and it's not possible to split the visual from non-visual there any more without serious work ;) Kind Regards el es From bartjunk64 at gmail.com Fri Jan 6 13:07:14 2017 From: bartjunk64 at gmail.com (Bart) Date: Fri, 6 Jan 2017 13:07:14 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: On 1/6/17, Lukasz Sokol via Lazarus wrote: > just having a look at the declaration, haven't skimmed through code yet, > > do you also plan to add a TStringGrid-like interface for cols and rows No, I wanted to keep it as simple as possible. Bart From bartjunk64 at gmail.com Fri Jan 6 13:40:01 2017 From: bartjunk64 at gmail.com (Bart) Date: Fri, 6 Jan 2017 13:40:01 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <0b339916-c446-ee17-ec3e-fa66f24d5b2f@lumino.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <0b339916-c446-ee17-ec3e-fa66f24d5b2f@lumino.de> Message-ID: On 1/6/17, Michael Schnell via Lazarus wrote: > Looking at the code I could imagine that auto-growing when using the > Cell property to write an element might be appropriate. I thought bout that, but rejected it. > Read/Write form/to a file might be sensible. Here AFAIK, the fpc's > TStringList does not yet feature setting the encoding, which Delphi does. And then we get the problem of the format of the file. We had similar discussion about TStringGrid (which supports .csv files), I think with BigChimp (Reinier). Any choice you make here is arbitrary. Options: - class helper - a system like TBufDataSet uses: implement SaveToStream and ReadFromStream that require a reader/write class - make a new unit that implements reader/writer procedures (StringTableExportToCSV(const Fn: String; ST: TStringTable) etc. My current usecase does not require this at all. I use it for string the contenst of a HTML table (copied from clipboard) and extract data from that. (Starts ranting) All this because the manufacturor of the pogram refuses to implement a simple function: give me a list of current medication in a simple plain text format. While the program (a web application) can show on the screen stuf like: metoprolol mga 100 mg 1 maal daags 1 tablet (oraal) clopidogrel 75 mg 1 maal daags 1 tablet (oraal) It is impossible to copy and paste this in any other program without much editing. E.gif you copy/paste 10 lines like this in MS Word (or Notepad for that matter), you end up with a document of 80 pages (!!!!!), mostly whitespace (LineEndings, space, non-breaking-space) and the text gets cluttered with opening and closing brackets and bullets. The web program also can show this information as a HTML table, but again copy/pasting this ruins your Word document. So that's where my program comes in. It can deal with the table and with the other (plain text) format, and it santizes the input. It will change "metoprolol mga 100 mg 1 maal daags 1 tablet (oraal)" into "metoprolol mga 100 mg 1 dd 1" It will also deal with the fact that MS Word has decided to treat LineEndings as New Paragraph. And all this is necessary so that I can copy/paste current medication into letter of referral or letter of discharge (instead of manually typing it, with the risk of potentially devestating typo's.. And each and every update of the webprogram they change something about the layout or separators they use, and I have to update my program again. Mind you FF is able to copy the table in plaintext format using Tabs as a separator, which would be easy, but IE (which is the only browser available to me on the system) cannot do so. Obviously my boss does not care, he does not have to use this program, only the doctors (12 of them) have. And needless to say that the ICT department has forbidden me to use this program, because "it is not a commercial progra, and therefore there is no offical support for it, and unsupported programs cannot be installed on our system". (Note: the ICT guys all use Chrome as their browser, because "IE sucks") Fortunately my program is standalone (try that with VB or VC), so I just put it somewhere on a share, and so far they have not noticed. Bart From el.es.cr at gmail.com Fri Jan 6 16:09:56 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Fri, 6 Jan 2017 15:09:56 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: On 06/01/17 12:07, Bart via Lazarus wrote: > On 1/6/17, Lukasz Sokol via Lazarus wrote: >> just having a look at the declaration, haven't skimmed through code yet, >> >> do you also plan to add a TStringGrid-like interface for cols and rows > > No, I wanted to keep it as simple as possible. > > Bart > OK I understand, you don't want to depend on TStrings ? Which actually, gives me a bit of an idea... -L. From bartjunk64 at gmail.com Fri Jan 6 16:20:44 2017 From: bartjunk64 at gmail.com (Bart) Date: Fri, 6 Jan 2017 16:20:44 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: On 1/6/17, Lukasz Sokol via Lazarus wrote: > OK I understand, you don't want to depend on TStrings ? That makes no sense to me, some methods take a TStrings as parameter... Maybe you meant TStringGrid instead? I did not want my code to depend on LCL. (It does depend on LazUtils though, but that can be stripped out easily for anyone who cares). Bart From noreply at z505.com Fri Jan 6 17:12:13 2017 From: noreply at z505.com (Lars) Date: Fri, 6 Jan 2017 09:12:13 -0700 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <0b339916-c446-ee17-ec3e-fa66f24d5b2f@lumino.de> Message-ID: <19a128a0cd9bd704e91ccb73f69ae07d.squirrel@gator3286.hostgator.com> On Fri, January 6, 2017 5:40 am, Bart via Lazarus wrote: > Mind you FF is able to copy the table in plaintext format using Tabs > as a separator, which would be easy, but IE (which is the only browser > available to me on the system) cannot do so. > > Obviously my boss does not care, he does not have to use this program, > only the doctors (12 of them) have. And needless to say that the ICT > department has forbidden me to use this program, because "it is not a > commercial progra, and therefore there is no offical support for it, and > unsupported programs cannot be installed on our system". (Note: the ICT > guys all use Chrome as their browser, because "IE sucks") Fortunately my > program is standalone (try that with VB or VC), so I just put it somewhere > on a share, and so far they have not noticed. > If you get into some tricky web browser issues you can also visit the DOM with internet explorer embedded browser control.. (or firefox embedded or chromium embedded). Then you can copy whatever html table you want into whatever format you want... just visit the table via the dom, or visit any of the html web page components and deal with it. But if fast html parser does the job... it's simpler. From mschnell at lumino.de Fri Jan 6 17:46:09 2017 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 6 Jan 2017 17:46:09 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> On 06.01.2017 16:20, Bart via Lazarus wrote: > That makes no sense to me, Instead of a two dimensional array of strings you could have use a single dimensional array of StringLists (a less symmetrical way, of course). -Michael From el.es.cr at gmail.com Fri Jan 6 18:33:46 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Fri, 6 Jan 2017 17:33:46 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> Message-ID: On 06/01/17 16:46, Michael Schnell via Lazarus wrote: > On 06.01.2017 16:20, Bart via Lazarus wrote: >> That makes no sense to me, > Instead of a two dimensional array of strings you could have use a single dimensional array of StringLists (a less symmetrical way, of course). > > -Michael Yeah basically access every row or col as a TStrings type (for easy .Delimited or .CommaText yield) -L. From bartjunk64 at gmail.com Fri Jan 6 18:35:39 2017 From: bartjunk64 at gmail.com (Bart) Date: Fri, 6 Jan 2017 18:35:39 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> Message-ID: On 1/6/17, Michael Schnell via Lazarus wrote: > Instead of a two dimensional array of strings you could have use a > single dimensional array of StringLists (a less symmetrical way, of > course). That was my frist try (see: http://svn.code.sf.net/p/flyingsheep/code/trunk/FarmedTools/tableemulator.pp), but then you run into troubles when a string contains a LineEnding... Bart From bartjunk64 at gmail.com Sat Jan 7 00:06:46 2017 From: bartjunk64 at gmail.com (Bart) Date: Sat, 7 Jan 2017 00:06:46 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <0b339916-c446-ee17-ec3e-fa66f24d5b2f@lumino.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <0b339916-c446-ee17-ec3e-fa66f24d5b2f@lumino.de> Message-ID: On 1/6/17, Michael Schnell via Lazarus wrote: >> Just implemented sorting. > Nice ! > (Even if I don't see a straight forward understanding of two dimensional > sorting). Imagine you wat the rows that have the largest values (this depends on the context) at the top, or likewise columns at the left? Sorting individual rows/cols o.t.o.h. makes no sense to me. Anyhow: implementing sorting was just an excercise to see if it would work. Bart From noreply at z505.com Sat Jan 7 20:09:03 2017 From: noreply at z505.com (Lars) Date: Sat, 7 Jan 2017 12:09:03 -0700 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> Message-ID: On Fri, January 6, 2017 10:35 am, Bart via Lazarus wrote: > On 1/6/17, Michael Schnell via Lazarus > wrote: > > >> Instead of a two dimensional array of strings you could have use a >> single dimensional array of StringLists (a less symmetrical way, of >> course). > > That was my frist try (see: > http://svn.code.sf.net/p/flyingsheep/code/trunk/FarmedTools/tableemulator. > pp), but then you run into troubles when a string contains a LineEnding... > Isn't there a way to change LineEnding to something like a dummy that never gets read... Or maybe I am confusing Delimiter for CSV values Should line ending be modifiable to anything someone wants? From bartjunk64 at gmail.com Sat Jan 7 22:49:04 2017 From: bartjunk64 at gmail.com (Bart) Date: Sat, 7 Jan 2017 22:49:04 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> Message-ID: On 1/7/17, Lars via Lazarus wrote: > Isn't there a way to change LineEnding to something like a dummy that > never gets read... Yes, just see the code I mentioned. I did not like it. I even contemplated string each string base64 encoded (guaranteed to have no line-endings) inside the TstringList. I think my current implementation is cleaner. As long as you do not plan on having a table > 1000x1000 it behaves quite nicely IMO. Bart From dhkblaszyk at zeelandnet.nl Sun Jan 8 02:21:29 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Sun, 08 Jan 2017 02:21:29 +0100 Subject: [Lazarus] i18n questions Message-ID: Hi, I have enabled i18n for my project and added the DefaultTranslator unit to the lpr file. Additionally I added a unit called ResourceStrings.pas to the project that centrally collects all the resourcestrings from my project code. However, when I compile, the strings from the LFM files are updated (now and then) in all .po files but the resourcestrings are not. I have enable the option "force update PO files on next compile" already a couple of times but nothing seems to work. Do I need to invoke a separate tool or script to merge the translation strings into my .po file? Or did I setup my project wrong? In general, should the "force update" setting not force an update of the .po file in any circumstance (compile/run/build or even save). I'm using Lazarus SVN and FPC 3.0.0. TIA! Regards, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Santhoff at web.de Sun Jan 8 10:43:49 2017 From: M.Santhoff at web.de (Marc Santhoff) Date: Sun, 08 Jan 2017 10:43:49 +0100 Subject: [Lazarus] OpenGL on FreeBSD Message-ID: <1483868629.6052.3.camel@puma.das.netz> Hi, when trying to compile the lazopenglcontext package it fails like this: " openglcontext.pas(54,4) Error: User defined: this LCL widgetset/OS is not yet supported " has anyone managed or at least tried to use OpenGL on FreeBSD/gtk2? And what do I have to do to make it running, looks like the first step is to define the combination of OS and widgetset and try if it works? TIA, Marc From joshyfun at gmail.com Sun Jan 8 11:15:43 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sun, 8 Jan 2017 11:15:43 +0100 Subject: [Lazarus] i18n questions In-Reply-To: References: Message-ID: El 08/01/2017 a las 2:21, Darius Blaszyk via Lazarus escribió: > Hi, > [...] > a separate tool or script to merge the translation strings into my .po > file? Or did I setup my project wrong? > > In general, should the "force update" setting not force an update of the > .po file in any circumstance (compile/run/build or even save). Hello, Same problem here, but I think I was able to "workaround" the problem, change one form that uses the resourcestrings unit, change also the resourcestrings unit and "build", not "compile", before save the units. The bug seems to be difficult to catch as it happens when it happens, without a clear way to reproduce it (that's the reason that I don't post a bug about it). -- From dhkblaszyk at zeelandnet.nl Sun Jan 8 12:05:43 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Sun, 08 Jan 2017 12:05:43 +0100 Subject: [Lazarus] i18n questions In-Reply-To: References: Message-ID: José Mejuto via Lazarus schreef op 8 jan '17: > El 08/01/2017 a las 2:21, Darius Blaszyk via Lazarus escribió: > >> Hi, > [...] > >> a separate tool or script to merge the translation strings into my .po >> file? Or did I setup my project wrong? >> >> In general, should the "force update" setting not force an update of the >> .po file in any circumstance (compile/run/build or even save). > > Hello, > > Same problem here, but I think I was able to "workaround" the problem, change one form that uses the resourcestrings unit, change also the resourcestrings unit and "build", not "compile", before save the units. > > The bug seems to be difficult to catch as it happens when it happens, without a clear way to reproduce it (that's the reason that I don't post a bug about it). Indeed, seems like a bug to me as well. However, as you explained I also figured out how to update the .po file with the LRS items (which works incidentally), but the resourcestrings do not appear in the .po at all, no matter what I try. Is there another known workaround by invoking commandline tools? TIA, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Sun Jan 8 12:22:55 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 8 Jan 2017 12:22:55 +0100 Subject: [Lazarus] i18n questions In-Reply-To: References: Message-ID: <20170108122255.0075f38f@limapholos.matflo.wg> On Sun, 08 Jan 2017 02:21:29 +0100 Darius Blaszyk via Lazarus wrote: > Hi, > > I have enabled i18n for my project and added the DefaultTranslator unit > to the lpr file. Additionally I added a unit called ResourceStrings.pas > to the project that centrally collects all the resourcestrings from my > project code. However, when I compile, the strings from the LFM files > are updated (now and then) in all .po files but the resourcestrings are > not. Is the unit resourcestrings shown in the project inspector? > I have enable the option "force update PO files on next compile" > already a couple of times but nothing seems to work. Do I need to invoke > a separate tool or script to merge the translation strings into my .po > file? No. When you compile the fpc 3.0+ compiler creates for each unit with resourcestrings a file unitname.rsj in the unit output directory. The IDE then checks for each unit of the PI the file dates of the .rsj and the project's .po file. If an .rsj file is newer the IDE regenerates the .po file. > Or did I setup my project wrong? > In general, should the "force update" setting not force an update of the > .po file in any circumstance (compile/run/build or even save). Since the process requires the compiler, it can only be updated after a compile/build. Mattias From nc-gaertnma at netcologne.de Sun Jan 8 12:31:01 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 8 Jan 2017 12:31:01 +0100 Subject: [Lazarus] OpenGL on FreeBSD In-Reply-To: <1483868629.6052.3.camel@puma.das.netz> References: <1483868629.6052.3.camel@puma.das.netz> Message-ID: <20170108123101.3b591160@limapholos.matflo.wg> On Sun, 08 Jan 2017 10:43:49 +0100 Marc Santhoff via Lazarus wrote: > Hi, > > when trying to compile the lazopenglcontext package it fails like this: > > " > openglcontext.pas(54,4) Error: User defined: this LCL widgetset/OS is not yet supported > " > > has anyone managed or at least tried to use OpenGL on FreeBSD/gtk2? Maybe you are the first. > And what do I have to do to make it running, looks like the first step > is to define the combination of OS and widgetset and try if it works? Yes. See unit openglcontext. At the moment it checks for Linux: {$IFDEF LCLGTK2} {$IFDEF Linux} ... You can try if the Linux implementation works on FreeBSD too: {$IFDEF LCLGTK2} {$IF defined(Linux) or defined(FreeBSD)} ... Mattias From M.Santhoff at web.de Sun Jan 8 12:51:32 2017 From: M.Santhoff at web.de (Marc Santhoff) Date: Sun, 08 Jan 2017 12:51:32 +0100 Subject: [Lazarus] OpenGL on FreeBSD In-Reply-To: <20170108123101.3b591160@limapholos.matflo.wg> References: <1483868629.6052.3.camel@puma.das.netz> <20170108123101.3b591160@limapholos.matflo.wg> Message-ID: <1483876292.7819.2.camel@puma.das.netz> On So, 2017-01-08 at 12:31 +0100, Mattias Gaertner via Lazarus wrote: > On Sun, 08 Jan 2017 10:43:49 +0100 > Marc Santhoff via Lazarus wrote: > > And what do I have to do to make it running, looks like the first step > > is to define the combination of OS and widgetset and try if it works? > > Yes. See unit openglcontext. > > At the moment it checks for Linux: > > {$IFDEF LCLGTK2} > {$IFDEF Linux} > ... > > You can try if the Linux implementation works on FreeBSD too: > > {$IFDEF LCLGTK2} > {$IF defined(Linux) or defined(FreeBSD)} > ... Will try. Thanks, Marc From M.Santhoff at web.de Sun Jan 8 13:15:24 2017 From: M.Santhoff at web.de (Marc Santhoff) Date: Sun, 08 Jan 2017 13:15:24 +0100 Subject: [Lazarus] OpenGL on FreeBSD In-Reply-To: <1483876292.7819.2.camel@puma.das.netz> References: <1483868629.6052.3.camel@puma.das.netz> <20170108123101.3b591160@limapholos.matflo.wg> <1483876292.7819.2.camel@puma.das.netz> Message-ID: <1483877724.7959.1.camel@puma.das.netz> On So, 2017-01-08 at 12:51 +0100, Marc Santhoff via Lazarus wrote: > On So, 2017-01-08 at 12:31 +0100, Mattias Gaertner via Lazarus wrote: > > On Sun, 08 Jan 2017 10:43:49 +0100 > > Marc Santhoff via Lazarus wrote: > > > > And what do I have to do to make it running, looks like the first step > > > is to define the combination of OS and widgetset and try if it works? > > > > Yes. See unit openglcontext. > > > > At the moment it checks for Linux: > > > > {$IFDEF LCLGTK2} > > {$IFDEF Linux} > > ... > > > > You can try if the Linux implementation works on FreeBSD too: > > > > {$IFDEF LCLGTK2} > > {$IF defined(Linux) or defined(FreeBSD)} > > ... > > Will try. Done, works using gtk2. At least for the fpvectorial example "fpv3dviewer". :) Marc From dhkblaszyk at zeelandnet.nl Sun Jan 8 13:24:01 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Sun, 08 Jan 2017 13:24:01 +0100 Subject: [Lazarus] i18n questions In-Reply-To: <20170108122255.0075f38f@limapholos.matflo.wg> References: <20170108122255.0075f38f@limapholos.matflo.wg> Message-ID: > Is the unit resourcestrings shown in the project inspector? Thanks Mattias! That solved the issue. I have DefaultTranslator in the .lpr and added ResourceStrings.pas to the PI and now after each compile the .po files are updated. Thanks, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhkblaszyk at zeelandnet.nl Sun Jan 8 13:24:01 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Sun, 08 Jan 2017 13:24:01 +0100 Subject: [Lazarus] i18n questions In-Reply-To: <20170108122255.0075f38f@limapholos.matflo.wg> References: <20170108122255.0075f38f@limapholos.matflo.wg> Message-ID: > Is the unit resourcestrings shown in the project inspector? Thanks Mattias! That solved the issue. I have DefaultTranslator in the .lpr and added ResourceStrings.pas to the PI and now after each compile the .po files are updated. Thanks, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshyfun at gmail.com Sun Jan 8 16:17:44 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sun, 8 Jan 2017 16:17:44 +0100 Subject: [Lazarus] Form.ActiveChanged vs Screen ActiveControlChanged Message-ID: Hello, In my code I'm overriding "Form.ActiveChanged" to catch when control focus changes and perform some global checks, it works fine except when focus is changed with mouse. As a test I've added a handler in Screen.ActiveControlChanged and in this case it works with both mouse and keyboard. Is this behaviour intented ? I'm testing in Windows 7 with SVN fpc and Lazarus. I do not know how Delphi works. Attached there is a small test program, change the TEdit focus using both mouse and keyboard (Tab) and see the differences. Saludos, José Mejuto -- -------------- next part -------------- A non-text attachment was scrubbed... Name: activechanged_test.zip Type: application/zip Size: 3494 bytes Desc: not available URL: From bartjunk64 at gmail.com Sun Jan 8 16:56:27 2017 From: bartjunk64 at gmail.com (Bart) Date: Sun, 8 Jan 2017 16:56:27 +0100 Subject: [Lazarus] Form.ActiveChanged vs Screen ActiveControlChanged In-Reply-To: References: Message-ID: On 1/8/17, José Mejuto via Lazarus wrote: > Hello, > > In my code I'm overriding "Form.ActiveChanged" to catch when control > focus changes and perform some global checks, it works fine except when > focus is changed with mouse. > > As a test I've added a handler in Screen.ActiveControlChanged and in > this case it works with both mouse and keyboard. > > Is this behaviour intented ? I'm testing in Windows 7 with SVN fpc and > Lazarus. I do not know how Delphi works. In D7 TForm.ActiveChanged is not fired if I change the focus with the mouse, but it is if I change focus with Tab. Bart From joshyfun at gmail.com Sun Jan 8 17:01:11 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sun, 8 Jan 2017 17:01:11 +0100 Subject: [Lazarus] Form.ActiveChanged vs Screen ActiveControlChanged In-Reply-To: References: Message-ID: <38bedfa0-6dba-8d22-aeaa-e6c04742ee76@gmail.com> El 08/01/2017 a las 16:56, Bart via Lazarus escribió: > On 1/8/17, José Mejuto via Lazarus wrote: [...] >> Is this behaviour intented ? I'm testing in Windows 7 with SVN fpc and >> Lazarus. I do not know how Delphi works. > > In D7 TForm.ActiveChanged is not fired if I change the focus with the > mouse, but it is if I change focus with Tab. > Hello, Thank you, so it is Delphi compatible and nothing to be changed. Thank you for your tests. -- From joshyfun at gmail.com Sun Jan 8 17:21:46 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sun, 8 Jan 2017 17:21:46 +0100 Subject: [Lazarus] Form.ActiveChanged vs Screen ActiveControlChanged In-Reply-To: References: Message-ID: <8ef95170-a10d-a4b4-c072-913ac423b87a@gmail.com> El 08/01/2017 a las 16:56, Bart via Lazarus escribió: > In D7 TForm.ActiveChanged is not fired if I change the focus with the > mouse, but it is if I change focus with Tab. Hello, Just for the record I get the same effect as Screen if I override: function SetFocusedControl(Control: TWinControl): Boolean; override; -- From flavio.etrusco at gmail.com Sun Jan 8 21:56:49 2017 From: flavio.etrusco at gmail.com (=?UTF-8?Q?Fl=C3=A1vio_Etrusco?=) Date: Sun, 8 Jan 2017 18:56:49 -0200 Subject: [Lazarus] Small patch for BreakpointDlg Message-ID: Hello, this patch adds an 'Add' button to toolbar in BreakpointDlg. Best regards, Flávio -------------- next part -------------- A non-text attachment was scrubbed... Name: breakpoingdlg-toolbar-add.patch Type: application/octet-stream Size: 5453 bytes Desc: not available URL: From el.es.cr at gmail.com Mon Jan 9 15:36:31 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Mon, 9 Jan 2017 14:36:31 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> Message-ID: On 07/01/17 21:49, Bart via Lazarus wrote: > I think my current implementation is cleaner. > As long as you do not plan on having a table > 1000x1000 it behaves > quite nicely IMO. > Right now i think, there is a shortage of standard non-visual classes that can handle first 2 degrees of separation of data into sections in a file - by section delimiter or by line-endings; Tables in other words. The only component that can handle entire file of comma- or otherwise- delimited data is a TStringGrid. But it is visual, and quite a lot of overkill for some cases - then everybody who reads a comma-separated (or even space-separated variable-length (variable decimal places?) sub-strings ends up not using a TStringList, but inventing iterating over sub-strings with a temporary TStringList every time... (who says you never want to use LCL Classes unit in a console program, really ?) While if the TStringTable was to expose every row (or col) in the table as another TStringList, as requested, interfacing with that (even loading directly into and from a TStringGrid when needed for display) would be so much easier. For such usage, it is rather assumed that NO substring can contain EOL of any kind, EOL is assumed to be meaning end of a string here. Not unlike TStringList assuming EOL to mean end of a string. YMMV but I hope some of this makes sense ;) > Bart > -L. From werner.pamler at freenet.de Mon Jan 9 16:28:03 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 9 Jan 2017 16:28:03 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: Am 05.01.2017 um 16:35 schrieb Bart via Lazarus: > filling a 1000x1000 TStringTable just cost me 76 ms. > A 5000x5000 table however cost me 1248 ms. Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec for 1000x1000 and 10.3 sec for 5000x5000. From juergen.hestermann at gmx.de Mon Jan 9 18:13:06 2017 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Mon, 9 Jan 2017 18:13:06 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: Am 2017-01-09 um 16:28 schrieb Werner Pamler via Lazarus: > Am 05.01.2017 um 16:35 schrieb Bart via Lazarus: > >> filling a 1000x1000 TStringTable just cost me 76 ms. >> A 5000x5000 table however cost me 1248 ms. > Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec for 1000x1000 and 10.3 sec for 5000x5000. Seems as expected: Using 25 million entries instead of 1 million entries makes a factor of 25 for the needed time. From bartjunk64 at gmail.com Mon Jan 9 22:17:05 2017 From: bartjunk64 at gmail.com (Bart) Date: Mon, 9 Jan 2017 22:17:05 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> Message-ID: On 1/9/17, Lukasz Sokol via Lazarus wrote: > For such usage, it is rather assumed that NO substring can contain EOL of > any kind, For the intende purpose of TStringTable, this is certainly NOT the case. > EOL is assumed to be meaning end of a string here. Not unlike TStringList > assuming EOL to mean end of a string. That makes no sense to me at all. Bart From bartjunk64 at gmail.com Mon Jan 9 22:18:26 2017 From: bartjunk64 at gmail.com (Bart) Date: Mon, 9 Jan 2017 22:18:26 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: On 1/9/17, Werner Pamler via Lazarus wrote: > Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec > for 1000x1000 and 10.3 sec for 5000x5000. My tests were all "in memory", no disk access whatsoever. Bart From werner.pamler at freenet.de Mon Jan 9 23:28:27 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 9 Jan 2017 23:28:27 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: >> Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec >> for 1000x1000 and 10.3 sec for 5000x5000. > My tests were all "in memory", no disk access whatsoever. > > Bart Mine as well. I would be tempted to implement such a table in fpspreadsheet, but its problem is that it occupies memory for empty cells while the AVLTree stores only existing cells (at the expense of the cell record which contains row and column indexes). From bartjunk64 at gmail.com Tue Jan 10 00:22:13 2017 From: bartjunk64 at gmail.com (Bart) Date: Tue, 10 Jan 2017 00:22:13 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: On 1/9/17, Werner Pamler via Lazarus wrote: > I would be tempted to implement such a table in fpspreadsheet, but its > problem is that it occupies memory for empty cells An empty cell occupies only a nil pointer. Mind you that when you do not know the dimensions of the table AND you have to increase ColCount several times whilst filling the table, then I suspect things will slow down significantly, because each increase of ColCount requires RowCount times a SetLength on each row (which means re-allocating the entire row). I think dealing with spreadsheets needs a component that scales well. I got an EOutOfMemory on a 10000x5000 table (for which I also had all strings in memory a second time though). Bart From bo.berglund at gmail.com Tue Jan 10 00:47:53 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 10 Jan 2017 00:47:53 +0100 Subject: [Lazarus] Error when building Lazarus 1.6.2 from sources on RPi3 Message-ID: I am trying to build an FPC 3.0.0 + Lazarus 1.6.2 environment on a new Rpi3 with the latest Raspbian PIXEL. I have come so far as to having compiled fpc 3.0.0 successfully and run its make install command to put the binaries in the expected places (all under /home/pi): Now when I try to build Lazarus 1.6.2 from SVN sources I get this: pi at rpi3-jessiepixel:~/dev/lazarus/1.6.2 $ time make bigide OPT=-dFPC_ARMHF FPC=/home/pi/bin/ppcarm make -C packager/registration make[1]: Entering directory '/home/pi/dev/lazarus/1.6.2/packager/registration' /bin/rm -f ../units/arm-linux/fcllaz.ppu /home/pi/bin/ppcarm -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu. -FE. -FU../units/arm-linux -dFPC_ARMHF -darm fcllaz.pas Free Pascal Compiler version 3.0.0 [2017/01/09] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Linux for ARMHF (3104) Compiling fcllaz.pas Fatal: (10022) Can't find unit system used by fcllaz Fatal: (1018) Compilation aborted Makefile:2702: recipe for target 'fcllaz.ppu' failed make[1]: *** [fcllaz.ppu] Error 1 make[1]: Leaving directory '/home/pi/dev/lazarus/1.6.2/packager/registration' Makefile:3050: recipe for target 'registration' failed make: *** [registration] Error 2 real 0m0.171s Why does it not find "unit system"? I have searched for all files with a name system.* from ~/ and all that are found (rather many) are located inside the fpc source tree. What could have happened here? Is there some extra option to add to the make command to tell it where the fpc sources are located? -- Bo Berglund Developer in Sweden From werner.pamler at freenet.de Tue Jan 10 01:07:55 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Tue, 10 Jan 2017 01:07:55 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> > An empty cell occupies only a nil pointer. It may sum up, though, if the table is large and sparsely populated. > Mind you that when you do not know the dimensions of the table AND you > have to increase ColCount several times whilst filling the table, then > I suspect things will slow down significantly, because each increase > of ColCount requires RowCount times a SetLength on each row (which > means re-allocating the entire row). Ah - that's the explanation: you did your test with a predimensioned table? Mine started with an empty table, and with every new cell the tree sorts the new cell to the correct location and rebalances itself. It would be interesting to compare with your table in the same way. > I think dealing with spreadsheets needs a component that scales well. > I got an EOutOfMemory on a 10000x5000 table (for which I also had all > strings in memory a second time though). I don't think so, usually spreadsheets are much smaller (or people are abusing spreadsheets as a poor-man's database). Max column count of LibreOffice, BTW, is 1024. From bartjunk64 at gmail.com Tue Jan 10 01:37:10 2017 From: bartjunk64 at gmail.com (Bart) Date: Tue, 10 Jan 2017 01:37:10 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> Message-ID: On 1/10/17, Werner Pamler via Lazarus wrote: > Ah - that's the explanation: you did your test with a predimensioned > table? Mine started with an empty table, and with every new cell the > tree sorts the new cell to the correct location and rebalances itself. > It would be interesting to compare with your table in the same way. I fill my table per row, that is I collect 1 row of data at the time (adding it to a tmp variable) then add the row to the table. Adding cell by cell would be even more inefficient (at least in the beginning), but at some point you won't need to increase rowcount anymore. But the GetCell/SetCell is not the most efficient way of adding data. My test scenario is: I create an array of array of string (Z) and fill that with strings in the form of 'ColX:RowY'. I then iterate the Z and do AddRow(Z[i]), this adds a row and copies the data from Z[i], using a simple for loop (maybe can be made more efficient). So there are only 2 operations, copying is probably faster then inserting into a Tree. The good point about this is that creating a row also initializes it's values, since a row is an array of string and SetLength sets all values to nil/0. Note: the creating and populating of Z takes up the most time (up to 10 seconds). Bart From gfindlay.linux at gmail.com Tue Jan 10 01:52:05 2017 From: gfindlay.linux at gmail.com (Gordon Findlay) Date: Tue, 10 Jan 2017 13:52:05 +1300 Subject: [Lazarus] Error when building Lazarus 1.6.2 from sources on RPi3 In-Reply-To: References: Message-ID: I've had that issue, with different units, under Linux several times. A make clean before make bigide has solved the problem. YMMV of course. On 10/01/2017 12:48 pm, "Bo Berglund via Lazarus" < lazarus at lists.lazarus-ide.org> wrote: I am trying to build an FPC 3.0.0 + Lazarus 1.6.2 environment on a new Rpi3 with the latest Raspbian PIXEL. I have come so far as to having compiled fpc 3.0.0 successfully and run its make install command to put the binaries in the expected places (all under /home/pi): Now when I try to build Lazarus 1.6.2 from SVN sources I get this: pi at rpi3-jessiepixel:~/dev/lazarus/1.6.2 $ time make bigide OPT=-dFPC_ARMHF FPC=/home/pi/bin/ppcarm make -C packager/registration make[1]: Entering directory '/home/pi/dev/lazarus/1.6.2/packager/registration' /bin/rm -f ../units/arm-linux/fcllaz.ppu /home/pi/bin/ppcarm -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu. -FE. -FU../units/arm-linux -dFPC_ARMHF -darm fcllaz.pas Free Pascal Compiler version 3.0.0 [2017/01/09] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Linux for ARMHF (3104) Compiling fcllaz.pas Fatal: (10022) Can't find unit system used by fcllaz Fatal: (1018) Compilation aborted Makefile:2702: recipe for target 'fcllaz.ppu' failed make[1]: *** [fcllaz.ppu] Error 1 make[1]: Leaving directory '/home/pi/dev/lazarus/1.6.2/packager/registration' Makefile:3050: recipe for target 'registration' failed make: *** [registration] Error 2 real 0m0.171s Why does it not find "unit system"? I have searched for all files with a name system.* from ~/ and all that are found (rather many) are located inside the fpc source tree. What could have happened here? Is there some extra option to add to the make command to tell it where the fpc sources are located? -- Bo Berglund Developer in Sweden -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Tue Jan 10 08:18:13 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 10 Jan 2017 08:18:13 +0100 Subject: [Lazarus] Error when building Lazarus 1.6.2 from sources on RPi3 References: Message-ID: <0d297c1512lov6476flt2jmervag8ospsa@4ax.com> On Tue, 10 Jan 2017 13:52:05 +1300, Gordon Findlay via Lazarus wrote: >I've had that issue, with different units, under Linux several times. A >make clean before make bigide has solved the problem. > Well, in my case there was nothing to clean out since the source tree for lazarus had never been compiled. I ran make clean anyway but the problem for make bigide remains. I suspect that while compiling lazarus it needs access to fpc sources as well and I don't know how to tell the system where they are. I have run make sourceinstall in the fpc source tree and it has deposited the sources inside ~/share, but where does one tell the system where it can find the sources? For example there is no fpc.cfg file anywhere on my system, should it not have appeared when fpc was built? -- Bo Berglund Developer in Sweden From el.es.cr at gmail.com Tue Jan 10 09:58:35 2017 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Tue, 10 Jan 2017 08:58:35 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <649f2a37-08c4-74a8-393a-718f9227e821@lumino.de> Message-ID: On 09/01/17 21:17, Bart via Lazarus wrote: > On 1/9/17, Lukasz Sokol via Lazarus wrote: > >> For such usage, it is rather assumed that NO substring can contain EOL of >> any kind, > > For the intende purpose of TStringTable, this is certainly NOT the case. I understand that :) and I respect that. > >> EOL is assumed to be meaning end of a string here. Not unlike TStringList >> assuming EOL to mean end of a string. > > That makes no sense to me at all. > Sorry should have reiterated EOL is an end of a SUBstring... :) > Bart > -L. From flavio.etrusco at gmail.com Tue Jan 10 10:53:42 2017 From: flavio.etrusco at gmail.com (=?UTF-8?Q?Fl=C3=A1vio_Etrusco?=) Date: Tue, 10 Jan 2017 07:53:42 -0200 Subject: [Lazarus] Small patch for BreakpointDlg In-Reply-To: References: Message-ID: FWIW added it to the bugtracker: http://bugs.freepascal.org/view.php?id=31209 BR On Sun, Jan 8, 2017 at 6:56 PM, Flávio Etrusco wrote: > Hello, > > this patch adds an 'Add' button to toolbar in BreakpointDlg. > > Best regards, > Flávio From mailinglists at geldenhuys.co.uk Tue Jan 10 11:06:58 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 10 Jan 2017 10:06:58 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: <1c161077-4559-c05a-aee0-cdb55974bb3c@geldenhuys.co.uk> On 2017-01-09 15:28, Werner Pamler via Lazarus wrote: >> > filling a 1000x1000 TStringTable just cost me 76 ms. >> > A 5000x5000 table however cost me 1248 ms. > > Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec > for 1000x1000 and 10.3 sec for 5000x5000. I know you guys are talking about non-gui structures, but just for comparison I included fpGUI's StringGrid results, which uses a custom internal storage mechanism. Creating (setting column count and row count) and populating (every cell has a value written to it) a 5,000 x 5,000 grid takes 1.815 seconds on my system. The same test with a 1,000 x 1,000 takes 0.118 seconds. The same test with 10,000 x 5,000 takes 4.514 seconds. Not to shabby for a GUI component. ;-) Now if any developers implements an application that actually displays that amount of data to the end-user without filtering, I'll be first in line to knock them over the head. :-P Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From nc-gaertnma at netcologne.de Tue Jan 10 11:14:51 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 10 Jan 2017 11:14:51 +0100 Subject: [Lazarus] Error when building Lazarus 1.6.2 from sources on RPi3 In-Reply-To: <0d297c1512lov6476flt2jmervag8ospsa@4ax.com> References: <0d297c1512lov6476flt2jmervag8ospsa@4ax.com> Message-ID: <20170110111451.6aaf9625@limapholos.matflo.wg> On Tue, 10 Jan 2017 08:18:13 +0100 Bo Berglund via Lazarus wrote: > On Tue, 10 Jan 2017 13:52:05 +1300, Gordon Findlay via Lazarus > wrote: >[...] > I suspect that while compiling lazarus it needs access to fpc sources > as well No. >[...] > For example there is no fpc.cfg file anywhere on my system, should it > not have appeared when fpc was built? No. You have to create it yourself. For example with the tool samplecfg. Mattias From juergen.hestermann at gmx.de Tue Jan 10 11:51:20 2017 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Tue, 10 Jan 2017 11:51:20 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <1c161077-4559-c05a-aee0-cdb55974bb3c@geldenhuys.co.uk> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <1c161077-4559-c05a-aee0-cdb55974bb3c@geldenhuys.co.uk> Message-ID: <8b5616ae-1427-b921-6a6c-e144194fd3f3@gmx.de> Am 2017-01-10 um 11:06 schrieb Graeme Geldenhuys via Lazarus: > Now if any developers implements an application that actually displays > that amount of data to the end-user without filtering, I'll be first in > line to knock them over the head. :-P I think this is easy with VirtualTreeView as it only display what fits on the window. Of course, you will not see all the millions of entries at the same time but putting it into a VirtualTree will allow you to scroll through them without delay. I use a VirtualTree for millions of entries and it works fine. You only need to make sure that displaying one entry does not require to go through all other entries (i.e. by calculating something that involves all entries). From mailinglists at geldenhuys.co.uk Tue Jan 10 12:03:37 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 10 Jan 2017 11:03:37 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <8b5616ae-1427-b921-6a6c-e144194fd3f3@gmx.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <1c161077-4559-c05a-aee0-cdb55974bb3c@geldenhuys.co.uk> <8b5616ae-1427-b921-6a6c-e144194fd3f3@gmx.de> Message-ID: <409a4d4b-757c-2085-e90d-a28f7e8a6af7@geldenhuys.co.uk> On 2017-01-10 10:51, Jürgen Hestermann via Lazarus wrote: > Of course, you will not see all the millions of entries at the same time but > putting it into a VirtualTree will allow you to scroll through them without delay. fpGUI's StringGrid doesn't have any delay on scrolling or jumping to the extreme limits of the data. The all appear instantly. My point was that NO application should display so much data to a end-user, as it is simply too much. A end-user always knows what they are looking for, more or less, (otherwise they wouldn't be in that screen). So present them with some filtering options first. Basic UI design principles... but this is another topic to discuss elsewhere. 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 werner.pamler at freenet.de Tue Jan 10 12:10:31 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Tue, 10 Jan 2017 12:10:31 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> Message-ID: <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> >> Mind you that when you do not know the dimensions of the table AND you >> have to increase ColCount several times whilst filling the table, then >> I suspect things will slow down significantly, because each increase >> of ColCount requires RowCount times a SetLength on each row (which >> means re-allocating the entire row). > Ah - that's the explanation: you did your test with a predimensioned > table? Mine started with an empty table, and with every new cell the > tree sorts the new cell to the correct location and rebalances itself. > It would be interesting to compare with your table in the same way. If the author if the AVLTree is reading this: Is there a way to add a group of nodes to the tree which are already ordered such that they will be adjacent? The normal "Add" method assumes that the node can be anywhere, and the tree has to find the correct location for the new node. I guess that such a "batch mode" could speed up loading the AVLTree. From mschnell at lumino.de Tue Jan 10 12:24:05 2017 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 10 Jan 2017 12:24:05 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> Message-ID: <3b05af25-f9ff-f3ec-3e9f-1f9cc0e7f31e@lumino.de> On 09.01.2017 23:28, Werner Pamler via Lazarus wrote: > I would be tempted to implement such a table in fpspreadsheet, but its > problem is that it occupies memory for empty cells while the AVLTree > stores only existing cells (at the expense of the cell record which > contains row and column indexes). What about a two dimensional array of integers pointing to a one dimensional array of strings, and doing some garbage collection cells are set to empty strings ? (Maybe even identical strings can be managed...) -Michael From juergen.hestermann at gmx.de Tue Jan 10 12:35:55 2017 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Tue, 10 Jan 2017 12:35:55 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <3b05af25-f9ff-f3ec-3e9f-1f9cc0e7f31e@lumino.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <3b05af25-f9ff-f3ec-3e9f-1f9cc0e7f31e@lumino.de> Message-ID: <3975ced6-9609-67b4-e67f-d109861b590e@gmx.de> Am 2017-01-10 um 12:24 schrieb Michael Schnell via Lazarus: > On 09.01.2017 23:28, Werner Pamler via Lazarus wrote: > What about a two dimensional array of integers pointing to a one dimensional array of strings, and doing some garbage collection cells are set to empty strings ? (Maybe even identical strings can be managed...) What's the difference between a 2 dimensional array of intergers and a 2 dimensional array of pointers (assuming that integers use the same space as a pointers)? Even worse, you would need additional dereferencing and also an additional integer for each string. From juergen.hestermann at gmx.de Tue Jan 10 13:10:48 2017 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Tue, 10 Jan 2017 13:10:48 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <409a4d4b-757c-2085-e90d-a28f7e8a6af7@geldenhuys.co.uk> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <1c161077-4559-c05a-aee0-cdb55974bb3c@geldenhuys.co.uk> <8b5616ae-1427-b921-6a6c-e144194fd3f3@gmx.de> <409a4d4b-757c-2085-e90d-a28f7e8a6af7@geldenhuys.co.uk> Message-ID: Am 2017-01-10 um 12:03 schrieb Graeme Geldenhuys via Lazarus: > My point was that NO application should display so much data to a > end-user, as it is simply too much. I disagree. I have written an (XTree-like) file manager that can log all directories and files into memory. Then there is a function to display all of them in a flat list. This could be up to millions if you log a large server share. But you can then display a sorted flat list where you find i.e. the newest (or largest) files on top and the oldest (or smallest) files at the end. Of course, you will seldom step through all of them from top to bottom. But you may jump to top (or bottom) and scroll a bit up or down. Or you can jump to a certain entry (by name search or something else) and then scroll around this entry. I can even permanently tag some of these so found entries at top or bottom or in between and then reduce the list to just these tagged files with one keystroke. I can also apply some more sophisticated functions like attribute change, delete, rename, etc. where I would not like to be resticted on the number of files in any way. IMO these are very common use cases and should be made available to the user. I hate all these limited (mostly web) applications that split such large lists into pages where I have to choose a new page first just to move down a bit. A rediculous restriction. > A end-user always knows what they > are looking for, more or less, (otherwise they wouldn't be in that > screen). I disagree again! In most cases I (and I think most users) only have a vague imagination of what I am looking for. I first need an overview to make further decisions (for example about a filter). > So present them with some filtering options first. Basic UI > design principles... but this is another topic to discuss elsewhere. Filtering: Yes. But it's not always the first step! Very often I first need an overview to decide which filters I want to use. To stay with my file manager example: I can set a filter to show all files with the current date (today). But then I will miss all files that have a date in the future (from which very many exists on many machines). When I have an overall list sorted by date I will see them immeditaly on top. Also, when files are misspelled (or not spelled the way you expect them) then they may strike you when shown in an overall list but not when you already filtered by the text you expected. From bartjunk64 at gmail.com Tue Jan 10 13:23:46 2017 From: bartjunk64 at gmail.com (Bart) Date: Tue, 10 Jan 2017 13:23:46 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> Message-ID: On 1/10/17, Werner Pamler via Lazarus wrote: > If the author if the AVLTree is reading this: Is there a way to add a > group of nodes to the tree which are already ordered such that they will > be adjacent? I think that may not be possible. Your data may be ordered already, but that does not guerantee that there is not already data inside the tree that must be ordered "inside" the group you add? Bart From mailinglists at geldenhuys.co.uk Tue Jan 10 13:35:05 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 10 Jan 2017 12:35:05 +0000 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <1c161077-4559-c05a-aee0-cdb55974bb3c@geldenhuys.co.uk> <8b5616ae-1427-b921-6a6c-e144194fd3f3@gmx.de> <409a4d4b-757c-2085-e90d-a28f7e8a6af7@geldenhuys.co.uk> Message-ID: <6b9c7daa-c496-41a2-9687-d28e0f3d10ce@geldenhuys.co.uk> On 2017-01-10 12:10, Jürgen Hestermann via Lazarus wrote: > I can also apply some more sophisticated functions like attribute change, delete, rename, etc. > where I would not like to be resticted on the number of files in any way. You don't need to see those items to apply those attributes. Specify some file criteria, specify the attribute changes and apply. The result can be a count of affected files. And if your application is well designed, you can undo that action too. > I hate all these limited (mostly web) applications that split such large lists into pages > where I have to choose a new page first just to move down a bit. > A rediculous restriction. Indeed, and that is not what I was suggesting. > > > A end-user always knows what they > > are looking for, more or less, (otherwise they wouldn't be in that > > screen). > > I disagree again! > In most cases I (and I think most users) only have a vague imagination of what I am looking for. > I first need an overview to make further decisions (for example about a filter). "vague" means you more or less know what you are looking for. My point exactly. NO end-user simply goes into an application screen and randomly browses 50 million data records (which will take years scanning visually), and then only comes up with an idea of what they want to do with that information. Instead they will go into a screen with the intend to find a subset of data - say all electricity suppliers for a region in a town. If they didn't have such an intent (no matter how big or small), they would not be using the application or be in that screen to start with. > Filtering: Yes. But it's not always the first step! So pulling in 50+ million records into a data grid over a internet connection (or worse, a dial-up connection) simply for the sake of it, then only filtering down the data.... all seems very inefficient. Put another way, lets populate a dropdown combobox with 50 million items and set the item display limit to 15 items. So if you open that, and move the scrollbar with the mouse only 1 pixel, you'll probably scroll the items by 100,000. Absolute pointless behaviour and design. I cannot see a single use case where that will be a good idea. If you have the time, read the book "About Face 3: The Essentials of Interaction Design". You might learn something. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From nc-gaertnma at netcologne.de Tue Jan 10 14:03:17 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 10 Jan 2017 14:03:17 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> Message-ID: <20170110140317.40d2c159@limapholos.matflo.wg> On Tue, 10 Jan 2017 12:10:31 +0100 Werner Pamler via Lazarus wrote: >[...] > If the author if the AVLTree is reading this: Is there a way to add a > group of nodes to the tree which are already ordered such that they will > be adjacent? > > The normal "Add" method assumes that the node can be > anywhere, and the tree has to find the correct location for the new > node. I guess that such a "batch mode" could speed up loading the AVLTree. Yes. There are two versions of this AVL trees: The FPC unit avltree and the LazUtils unit avglvltree. It is the same tree, but with different names to avoid conflicts. New features go to the lazutils version and are later merged to the FPC version. I added a function "AddAscendingSequence" to TAvgLvlTree for adding a sequence. Here is an example: var LastNode, Successor: TAvgLvlTreeNode; i: integer; begin LastNode:=nil; Successor:=nil; for i:=1 to 1000000 do LastNode:=Tree.AddAscendingSequence(TItem.Create(i),LastNode,Successor); end; In this example the number of compares are reduced from about 20 millions to 1 million. The time depends on your compare function. Usually compare functions are pretty quick, so in a simple example adding a sequence might be only twice as fast. Mattias From werner.pamler at freenet.de Tue Jan 10 14:01:51 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Tue, 10 Jan 2017 14:01:51 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> Message-ID: <92946fd1-3603-b36e-56f3-963e39e5d281@freenet.de> > I think that may not be possible. Your data may be ordered already, > but that does not guerantee that there is not already data inside the > tree that must be ordered "inside" the group you add? I am thinking of loading a spreadsheet from file. Initially the sheet (= tree) is empty. The cells in the standard spreadsheet files are arranged by rows, starting at the top; and within each row, the cells are ordered from left to right. So, the reader catches the cells in the correct order (the tree sorts the cells exactly in the same way). A standard "Add" of the tree calls "FindInsertPos" which seeks for the correct position of the new cell. But every time this search starts from the root which is unnecessary from my pov because the new cell should be at the end. There is no "Append" or "AddtoEnd" method. Maybe I should remember the node of the previously added cell, and when the next cell is to be added I should attach it as a right child of this node. Unfortunately I am not very experienced with this kind of trees. For example: Is it necessary to rebalance the AVLtree immediately after each insertion, or can I wait until all nodes exist? There is a "BalanceAfterInsert" method with the new node as a parameter - this indicates that balancing should occur immediately after insert. But this method is private and thus cannot be called from a derived tree implementing an "AddToEnd" method. From juergen.hestermann at gmx.de Tue Jan 10 14:07:57 2017 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Tue, 10 Jan 2017 14:07:57 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <6b9c7daa-c496-41a2-9687-d28e0f3d10ce@geldenhuys.co.uk> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <1c161077-4559-c05a-aee0-cdb55974bb3c@geldenhuys.co.uk> <8b5616ae-1427-b921-6a6c-e144194fd3f3@gmx.de> <409a4d4b-757c-2085-e90d-a28f7e8a6af7@geldenhuys.co.uk> <6b9c7daa-c496-41a2-9687-d28e0f3d10ce@geldenhuys.co.uk> Message-ID: <54411622-1df1-5495-9c0f-093bcd8436f0@gmx.de> Am 2017-01-10 um 13:35 schrieb Graeme Geldenhuys via Lazarus: >> I can also apply some more sophisticated functions like attribute change, delete, rename, etc. >> where I would not like to be resticted on the number of files in any way. > You don't need to see those items to apply those attributes. I prefer to see the items before I change them instead of blindly relying on a filter. A filter may include items I did not want to (filters can get complex). I need the abillity to have at least a quick glance over the list before I do the changes. >> Filtering: Yes. But it's not always the first step! > So pulling in 50+ million records into a data grid over a internet > connection (or worse, a dial-up connection) simply for the sake of it, > then only filtering down the data.... all seems very inefficient. Why pulling records over an internet connection? In this case the list needs to be hold on the server and the client just loads the next page if you scroll. But as said: There are use cases where you may want to start with a filter and there are others where it is not. Just let the user decide and do not force him to do it one way only. > Put another way, lets populate a dropdown combobox with 50 million items > and set the item display limit to 15 items. So if you open that, and > move the scrollbar with the mouse only 1 pixel, you'll probably scroll > the items by 100,000. Absolute pointless behaviour and design. I don't understand your example. When a subset of 15 items is displayed and you scroll down then only the next subset (again 15 items) needs to be displayed. Where is the problem? And when the slider is too sensitive for the large list then don't use it! Instead provide other ways to jump to specific entries. If I have a file list sorted by date I may jump to a specific date and then have the abilitiy to scroll around this date with the cursor keys or page up/down keys. Where is the problem? > I cannot see a single use case where that will be a good idea. I mentioned the case of the file manager. Just look at Xtree/Ztree. The concept exists since decades and I am missing it in many other applications. > If you have the time, read the book "About Face 3: The Essentials of > Interaction Design". You might learn something. These books are just opinions of other people. Nice to reed to get some ideas but they will never have the overall solution for all user interfaces. BTW: In the end there is not much difference between filtering and showing a flat list. You will never see all entries side by side in one window. In both cases a subset is displayed. When showing all entries you only see the first n records that fit on the window. After scrolling down, the next n records are shown. When jumping somewhere, still only n records need to be retrieved and shown. I don't see the problem with this. It's just like applying a new filter with each scroll event. When using a filter as the first step you get a list of all matching entries. But this list can get large too. You do not know before. Then you end up with the same problem: A large list of entries that needs to be displayed to the user. From nc-gaertnma at netcologne.de Tue Jan 10 14:34:53 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 10 Jan 2017 14:34:53 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> Message-ID: <20170110143453.31def331@limapholos.matflo.wg> On Tue, 10 Jan 2017 13:23:46 +0100 Bart via Lazarus wrote: > On 1/10/17, Werner Pamler via Lazarus wrote: > > > If the author if the AVLTree is reading this: Is there a way to add a > > group of nodes to the tree which are already ordered such that they will > > be adjacent? > > I think that may not be possible. Your data may be ordered already, > but that does not guerantee that there is not already data inside the > tree that must be ordered "inside" the group you add? Yes, the optimization only works if you insert a sequence between two nodes. The new AddAscendingSequence checks that. Mattias From nc-gaertnma at netcologne.de Tue Jan 10 15:06:48 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 10 Jan 2017 15:06:48 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <92946fd1-3603-b36e-56f3-963e39e5d281@freenet.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <92946fd1-3603-b36e-56f3-963e39e5d281@freenet.de> Message-ID: <20170110150648.03c875dd@limapholos.matflo.wg> On Tue, 10 Jan 2017 14:01:51 +0100 Werner Pamler via Lazarus wrote: >[...]A standard > "Add" of the tree calls "FindInsertPos" which seeks for the correct > position of the new cell. But every time this search starts from the > root which is unnecessary from my pov because the new cell should be at > the end. There is no "Append" or "AddtoEnd" method. An AddHighest can be added. Note that from a theoretical pov it still costs O(log n). > Maybe I should remember the node of the previously added cell, and when > the next cell is to be added I should attach it as a right child of this > node. That's what AddAscendingSequence does. > Unfortunately I am not very experienced with this kind of trees. For > example: Is it necessary to rebalance the AVLtree immediately after each > insertion, Yes, because the Balance factors are only valid for at most one error. > or can I wait until all nodes exist? There is a > "BalanceAfterInsert" method with the new node as a parameter - this > indicates that balancing should occur immediately after insert. But this > method is private and thus cannot be called from a derived tree > implementing an "AddToEnd" method. Well, theoretically you can create an optimized method that creates a fresh tree from a sorted list in O(n). In TAvgLvlTree the BalanceAfterInsert is protected. I will send a new version to FPC. Mattias From werner.pamler at freenet.de Tue Jan 10 15:24:54 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Tue, 10 Jan 2017 15:24:54 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <20170110140317.40d2c159@limapholos.matflo.wg> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <20170110140317.40d2c159@limapholos.matflo.wg> Message-ID: <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> > There are two versions of this AVL trees: The FPC unit avltree and the > LazUtils unit avglvltree. It is the same tree, but with different > names to avoid conflicts. Does this mean: I can directly replace the TAVLTree by the TAvgLvlTree and the TAVLTreeNode by the TAvgLvlTreeNode to use the LazUtils tree and everything works as before? No other changes? From nc-gaertnma at netcologne.de Tue Jan 10 15:35:58 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 10 Jan 2017 15:35:58 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <20170110140317.40d2c159@limapholos.matflo.wg> <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> Message-ID: <20170110153558.5c1e5c7d@limapholos.matflo.wg> On Tue, 10 Jan 2017 15:24:54 +0100 Werner Pamler via Lazarus wrote: > > There are two versions of this AVL trees: The FPC unit avltree and the > > LazUtils unit avglvltree. It is the same tree, but with different > > names to avoid conflicts. > > Does this mean: I can directly replace the TAVLTree by the TAvgLvlTree > and the TAVLTreeNode by the TAvgLvlTreeNode to use the LazUtils tree and > everything works as before? No other changes? Yes. Mattias From bo.berglund at gmail.com Tue Jan 10 17:23:19 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 10 Jan 2017 17:23:19 +0100 Subject: [Lazarus] Error when building Lazarus 1.6.2 from sources on RPi3 References: <0d297c1512lov6476flt2jmervag8ospsa@4ax.com> <20170110111451.6aaf9625@limapholos.matflo.wg> Message-ID: <8h2a7cp5j5strhrg3lgn8afgd0ctf8jkbm@4ax.com> On Tue, 10 Jan 2017 11:14:51 +0100, Mattias Gaertner via Lazarus wrote: >> For example there is no fpc.cfg file anywhere on my system, should it >> not have appeared when fpc was built? > >No. You have to create it yourself. For example with the tool samplecfg. Just to complete this thread: I used the tool samplecfg to make a new fpc.cfg and used it instead of my earlier one. Now the build system wors OK for Lazarus! Thanks. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Jan 10 17:34:29 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 10 Jan 2017 17:34:29 +0100 Subject: [Lazarus] Lazarus IDE not sizeable on Raspbian PIXEL Message-ID: I don't know if this is a known problem or if there are solutions to it, but here goes: I have just completed installing Lazarus 1.6.2 and FPC 3.0.0 on a pristine Raspbian PIXEL operating system running on an RPi3. When Lazarus starts up the first time the usual dialog about the fpc sources pops up but it auto-fills in correctly so I do not have to do anything. Then the main IDE is shown. Now the problem: The main IDE bar on top of the screen only reaches about 60% of the width of the screen and there is no way to resize it using the mouse. The other Lazarus windows are resizable in the normal way but not the main IDE bar. And the maximize button on this top window is also disabled (grayed out) and cannot be used. I suspect that this has something to do with the new window manager on Raspbian PIXEL, and since it has been out for half a year now I am hoping someone here has a solution to this problem... Is there some extra dependency I have to install into the operating system apart from the usual set I always install? These are the ones I always install before starting the FPC/Lazarus installation: libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev gir1.2-coglpango-1.0 libpangox-1.0-dev xorg-dev libgtk2.0-dev libpango1.0-dev Any ideas welcome! -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Wed Jan 11 11:23:23 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 11 Jan 2017 11:23:23 +0100 Subject: [Lazarus] IDE main window? References: <4df9eb1f-c128-a6f1-6317-7a98e0cb50a8@ziesig.org> Message-ID: On Sun, 4 Dec 2016 18:39:21 -0500, Donald Ziesig via Lazarus wrote: >Now that I have Lazarus 1.6.2 working :-D, I have a few questions: > >Is there any way to resize the IDE main window so that it extends the >full width of the display? Right now it only extends 2/3 of the way >across and I have to manually scroll the components to the right. >Earlier versions of lazarus allowed re-sizing to full width. > I have the exact same problem on a newly installed Lazarus 1.6.2 IDE. It is put on a Raspberry Pi3 running the latest Raspbian PIXEL, where the desktop has been changed to minimize window borders. So I thought it was due to an incompatibility with the new RPi desktop. I started a new thread here named "Lazarus IDE not sizeable on Raspbian PIXEL" since I had not seen this thread yet. Now it seems like the problem is not an RPi related one but a general Lazarus issue... Since this thread has failed to answer the original question of Donald Ziesig I would like to revive it so it will not be forgotten. It is extremely annoying that the main window on top cannot be resized, not to a wider size extending the width of the screen nor to a smaller size if need be. Why was this change done? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Wed Jan 11 11:25:22 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 11 Jan 2017 11:25:22 +0100 Subject: [Lazarus] Lazarus IDE not sizeable on Raspbian PIXEL References: Message-ID: On Tue, 10 Jan 2017 17:34:29 +0100, Bo Berglund via Lazarus wrote: >The main IDE bar on top of the screen only reaches about 60% of the >width of the screen and there is no way to resize it using the mouse. >The other Lazarus windows are resizable in the normal way but not the >main IDE bar. And the maximize button on this top window is also >disabled (grayed out) and cannot be used. > Found a thread from a month ago titled "IDE main window?" which deals with the exact same problem. So further discussion should go there. It seems like it is not related to the RPi after all, but a general Lazarus problem. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Wed Jan 11 12:14:00 2017 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 11 Jan 2017 12:14:00 +0100 Subject: [Lazarus] IDE main window? References: <4df9eb1f-c128-a6f1-6317-7a98e0cb50a8@ziesig.org> Message-ID: On Wed, 11 Jan 2017 11:23:23 +0100, Bo Berglund via Lazarus wrote: >It is extremely annoying that the main window on top cannot be >resized, not to a wider size extending the width of the screen nor to >a smaller size if need be. > >Why was this change done? I have now checked that this is indeed a 1.6.2 "non-feature" by installing Lazarus 1.6 too. This version allows for resizing the main window and does not show a disabled maximize icon... So again: Why? -- Bo Berglund Developer in Sweden From tony.whyman at mccallumwhyman.com Wed Jan 11 13:00:00 2017 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Wed, 11 Jan 2017 12:00:00 +0000 Subject: [Lazarus] Should Frames be transparent? Message-ID: <38e37a72-cc8c-85df-5ac5-c81265bad931@mccallumwhyman.com> I suppose that this could be one of those "is it a feature or is it a bug" type questions, but it is also a big difference in behaviour between Linux and Windows. I've realised that if you create a simple application with an image on a form and then partially or wholly overlay it with a frame or a even a radio group then: - On Linux: the frame and radio group are not transparent and obscure the image. - On Windows: the frame and radio group are transparent, have no background, and the image shows through. This applies to both IDE and a running program. In the windows version, I came readily make the frame opaque when the program runs by simply overriding its Paint method as follows: procedure TFrame1.Paint; begin EraseBackground(Canvas.handle); inherited Paint; end; So the reason for the transparency is also certainly that the frame's background is not being erased under Windows but is being erased under Linux. So bug or feature? From werner.pamler at freenet.de Wed Jan 11 13:16:34 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Wed, 11 Jan 2017 13:16:34 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <20170110153558.5c1e5c7d@limapholos.matflo.wg> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <20170110140317.40d2c159@limapholos.matflo.wg> <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> <20170110153558.5c1e5c7d@limapholos.matflo.wg> Message-ID: <2b644aa2-f576-43b7-4328-8d3d00a306ac@freenet.de> >>> There are two versions of this AVL trees: The FPC unit avltree and the >>> LazUtils unit avglvltree. It is the same tree, but with different >>> names to avoid conflicts. >> Does this mean: I can directly replace the TAVLTree by the TAvgLvlTree >> and the TAVLTreeNode by the TAvgLvlTreeNode to use the LazUtils tree and >> everything works as before? No other changes? > Yes. I am attaching my "benchmark" program. The stringtable implemented here is a quick copy & paste from fpspreadsheet code with minor modifications. Setting the define "AVL_TREE" in the project options activates the fpc AVLTree behind the table, while undefining it uses the LazUtils tree. When running the test you'll see that the LazUtils tree is almost a factor 2 slower than the fpc tree. (0.6 sec vs 0.36 sec for populating a 1000x1000 table, 16 sec vs 9.8 sec for a 5000x5000 table). Any idea why the Lazarus tree is slower although the tree code should be the same, Mattias? You'll see also that the new optimized AddAscendingSquence speeds things up considerably (4.6 sec vs 16 sec for 5000x5000). Since it calls the normal Add if the new node does not fit at its assumed position I suppose that nothing speaks against using this method as a general replacement of Add in fpspreadsheet. Werner -------------- next part -------------- A non-text attachment was scrubbed... Name: StringTable_TREE.zip Type: application/x-zip-compressed Size: 6523 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Wed Jan 11 14:00:42 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 11 Jan 2017 14:00:42 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <2b644aa2-f576-43b7-4328-8d3d00a306ac@freenet.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <20170110140317.40d2c159@limapholos.matflo.wg> <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> <20170110153558.5c1e5c7d@limapholos.matflo.wg> <2b644aa2-f576-43b7-4328-8d3d00a306ac@freenet.de> Message-ID: <20170111140042.1a317ac6@limapholos.matflo.wg> On Wed, 11 Jan 2017 13:16:34 +0100 Werner Pamler via Lazarus wrote: >[...] > When running the test you'll see that the LazUtils tree is almost a > factor 2 slower than the fpc tree. (0.6 sec vs 0.36 sec for populating a > 1000x1000 table, 16 sec vs 9.8 sec for a 5000x5000 table). Any idea why > the Lazarus tree is slower although the tree code should be the same, > Mattias? The FPC sources are compiled with -O2 and without any checks. And TAvgLvlTree had a further call when comparing. I inlined that now. Please test by compiling lazutils with -O2. In my tests TAvgLvlTree is a bit faster than the old TAVLTree. > You'll see also that the new optimized AddAscendingSquence speeds things > up considerably (4.6 sec vs 16 sec for 5000x5000). Why should someone consider an unrealistic test? > Since it calls the > normal Add if the new node does not fit at its assumed position I > suppose that nothing speaks against using this method as a general > replacement of Add in fpspreadsheet. Probably. Mattias From werner.pamler at freenet.de Wed Jan 11 15:43:53 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Wed, 11 Jan 2017 15:43:53 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <20170111140042.1a317ac6@limapholos.matflo.wg> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <20170110140317.40d2c159@limapholos.matflo.wg> <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> <20170110153558.5c1e5c7d@limapholos.matflo.wg> <2b644aa2-f576-43b7-4328-8d3d00a306ac@freenet.de> <20170111140042.1a317ac6@limapholos.matflo.wg> Message-ID: <02706d18-a25a-5de4-31e4-4a160adc74df@freenet.de> Am 11.01.2017 um 14:00 schrieb Mattias Gaertner via Lazarus: > The FPC sources are compiled with -O2 and without any checks. > And TAvgLvlTree had a further call when comparing. I inlined that now. > Please test by compiling lazutils with -O2. > In my tests TAvgLvlTree is a bit faster than the old TAVLTree. Right, I see this now too. >> You'll see also that the new optimized AddAscendingSquence speeds things >> up considerably (4.6 sec vs 16 sec for 5000x5000). > Why should someone consider an unrealistic test? What's wrong with it? Thank you for your changes! From nc-gaertnma at netcologne.de Wed Jan 11 15:58:28 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 11 Jan 2017 15:58:28 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <02706d18-a25a-5de4-31e4-4a160adc74df@freenet.de> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <20170110140317.40d2c159@limapholos.matflo.wg> <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> <20170110153558.5c1e5c7d@limapholos.matflo.wg> <2b644aa2-f576-43b7-4328-8d3d00a306ac@freenet.de> <20170111140042.1a317ac6@limapholos.matflo.wg> <02706d18-a25a-5de4-31e4-4a160adc74df@freenet.de> Message-ID: <20170111155828.14f71621@limapholos.matflo.wg> On Wed, 11 Jan 2017 15:43:53 +0100 Werner Pamler via Lazarus wrote: >[...] > >> You'll see also that the new optimized AddAscendingSquence speeds things > >> up considerably (4.6 sec vs 16 sec for 5000x5000). > > Why should someone consider an unrealistic test? > > What's wrong with it? AddAscendingSequence can be slower than a normal Add. You need to check common cases, not uncommon cases like generating a 5000x5000. Mattias From giuliano.colla at fastwebnet.it Wed Jan 11 18:43:53 2017 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Wed, 11 Jan 2017 18:43:53 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <0b339916-c446-ee17-ec3e-fa66f24d5b2f@lumino.de> Message-ID: Il 06/01/2017 13:40, Bart via Lazarus ha scritto: > And needless to say that the ICT department has forbidden me to use > this program, because "it is not a commercial progra, and therefore > there is no offical support for it, and unsupported programs cannot be > installed on our system". I think it would be useless to point out to your ICT department what happened to people using a supported commercial program lik Kylix (just to make an example), when Borland for its own stupid reasons decided to drop it! A better approach could be to set up (yourself, or your sister if you have one, or an aged grandmother, or a friendly neighbour) a small company selling FPC, Lazarus or any other GPL software you know you can handle (it's perfectly legal to sell it, if you follow the licence rules) and providing support. This would make both you and your ICT department happy, and maybe, instead of headaches you could even raise some extra money. ;-) Give it a thought. Giuliano From joshyfun at gmail.com Wed Jan 11 19:55:08 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Wed, 11 Jan 2017 19:55:08 +0100 Subject: [Lazarus] About TDateEdit Message-ID: <80b45d34-44a6-0e9c-8d50-16d31913068a@gmail.com> Hello, I have two questions about TDateEdit. 1) This control when created in the form the "Date" property is "NullDate", but as soon as I try to enter something (like a "1") and then erase it I can not recover the "NullDate" value (AKA zero). For my needs I subclassed it to check against "" on exit and set date to "NullDate" value. Is current behavior expected ? 2) When you do not write a complete date, so you write something like "1" and press tab, the control text property value is the "1" but "Date" property is updated to "01/01/2017" which IMHO is a bit counterintuitive. For my needs in my subclass, on exit I just set "Control.Date:=Control.Date" which forces a full date expansion in the text box. -- Saludos, José Mejuto From aaa5500 at ya.ru Thu Jan 12 09:33:17 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 12 Jan 2017 11:33:17 +0300 Subject: [Lazarus] About TDateEdit In-Reply-To: <80b45d34-44a6-0e9c-8d50-16d31913068a@gmail.com> References: <80b45d34-44a6-0e9c-8d50-16d31913068a@gmail.com> Message-ID: I posted the pch to Mantis, which addresses this issue. > to check against "" on exit and set date to "NullDate" value. Is > current behavior expected ? -- Regards, Alexey From mschnell at lumino.de Thu Jan 12 10:14:02 2017 From: mschnell at lumino.de (Michael Schnell) Date: Thu, 12 Jan 2017 10:14:02 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <20170111155828.14f71621@limapholos.matflo.wg> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <20170110140317.40d2c159@limapholos.matflo.wg> <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> <20170110153558.5c1e5c7d@limapholos.matflo.wg> <2b644aa2-f576-43b7-4328-8d3d00a306ac@freenet.de> <20170111140042.1a317ac6@limapholos.matflo.wg> <02706d18-a25a-5de4-31e4-4a160adc74df@freenet.de> <20170111155828.14f71621@limapholos.matflo.wg> Message-ID: <64658fb3-8667-7cc1-9bd6-0bc3845a5f60@lumino.de> On 11.01.2017 15:58, Mattias Gaertner via Lazarus wrote: > You need to check common cases, not uncommon IMHO it's very prone to error to deliberately define something as "common". Even if you do a decent statistic of usage cases, this can vary after some time. -Michael From werner.pamler at freenet.de Thu Jan 12 11:34:08 2017 From: werner.pamler at freenet.de (Werner Pamler) Date: Thu, 12 Jan 2017 11:34:08 +0100 Subject: [Lazarus] In search of a component for holding a table of strings In-Reply-To: <20170111155828.14f71621@limapholos.matflo.wg> References: <37152af9-1f03-70a3-ba35-9ae4b837abe9@lumino.de> <660df617-c8e4-cdab-a57f-67bd820cb317@freenet.de> <09b60e82-f7c3-2b8d-16b8-d3bb84d04ce6@freenet.de> <20170110140317.40d2c159@limapholos.matflo.wg> <8434a5ac-5a21-f7da-447c-b5c1c1bb7314@freenet.de> <20170110153558.5c1e5c7d@limapholos.matflo.wg> <2b644aa2-f576-43b7-4328-8d3d00a306ac@freenet.de> <20170111140042.1a317ac6@limapholos.matflo.wg> <02706d18-a25a-5de4-31e4-4a160adc74df@freenet.de> <20170111155828.14f71621@limapholos.matflo.wg> Message-ID: <93bd9af5-c2de-b845-0208-7daad075f748@freenet.de> Am 11.01.2017 um 15:58 schrieb Mattias Gaertner via Lazarus: > > AddAscendingSequence can be slower than a normal Add. > You need to check common cases, not uncommon cases like generating a > 5000x5000. I did not intend to write a general test which covers all "common" cases, but a test for the most relevant use case in my application in which users will notice the difference: reading a large file where nodes are in the correct order already. From mailinglists at geldenhuys.co.uk Thu Jan 12 15:44:05 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 12 Jan 2017 14:44:05 +0000 Subject: [Lazarus] cleaning out the "packagefiles.xml" file Message-ID: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> Hi, If I clean out the "packagefile.xml" file (aka the package registry) and manually remove all obsolete package entries..... if the remaining tags are not sequential, would that be an issue for Lazarus or lazbuild? Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From michael at freepascal.org Thu Jan 12 16:33:52 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 12 Jan 2017 16:33:52 +0100 (CET) Subject: [Lazarus] cleaning out the "packagefiles.xml" file In-Reply-To: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> References: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> Message-ID: On Thu, 12 Jan 2017, Graeme Geldenhuys via Lazarus wrote: > Hi, > > If I clean out the "packagefile.xml" file (aka the package registry) and > manually remove all obsolete package entries..... if the remaining > tags are not sequential, would that be an issue for Lazarus or > lazbuild? I think that would be an issue; I have always kept them sequential. Michael. From michael at freepascal.org Thu Jan 12 16:33:52 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 12 Jan 2017 16:33:52 +0100 (CET) Subject: [Lazarus] cleaning out the "packagefiles.xml" file In-Reply-To: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> References: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> Message-ID: On Thu, 12 Jan 2017, Graeme Geldenhuys via Lazarus wrote: > Hi, > > If I clean out the "packagefile.xml" file (aka the package registry) and > manually remove all obsolete package entries..... if the remaining > tags are not sequential, would that be an issue for Lazarus or > lazbuild? I think that would be an issue; I have always kept them sequential. Michael. From mailinglists at geldenhuys.co.uk Thu Jan 12 17:02:36 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 12 Jan 2017 16:02:36 +0000 Subject: [Lazarus] cleaning out the "packagefiles.xml" file In-Reply-To: References: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> Message-ID: On 2017-01-12 15:33, Michael Van Canneyt wrote: > I think that would be an issue; I have always kept them sequential. I've always done the same (keep them sequential), but there was an aweful lot of packages in that registry, so I took a chance... I didn't even update the Count attribute.... It seems lazbuild didn't give a hoot, and everything functioned as normal. Yeah! I was curious though and asked the question here, before I completed cannibalising the package registry file. :) So now we know, don't bother with sequential numbers... at least for now. But we don't know what the future holds. ;-) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From nc-gaertnma at netcologne.de Thu Jan 12 17:06:31 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 12 Jan 2017 17:06:31 +0100 Subject: [Lazarus] cleaning out the "packagefiles.xml" file In-Reply-To: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> References: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> Message-ID: <20170112170631.1246c103@limapholos.matflo.wg> On Thu, 12 Jan 2017 14:44:05 +0000 Graeme Geldenhuys via Lazarus wrote: > Hi, > > If I clean out the "packagefile.xml" file (aka the package registry) and > manually remove all obsolete package entries..... if the remaining > tags are not sequential, would that be an issue for Lazarus or > lazbuild? No problem. Mattias From mailinglists at geldenhuys.co.uk Thu Jan 12 17:09:44 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 12 Jan 2017 16:09:44 +0000 Subject: [Lazarus] cleaning out the "packagefiles.xml" file In-Reply-To: <20170112170631.1246c103@limapholos.matflo.wg> References: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> <20170112170631.1246c103@limapholos.matflo.wg> Message-ID: <1d6fbf6a-c5aa-99ed-1995-443b0183aadf@geldenhuys.co.uk> On 2017-01-12 16:06, Mattias Gaertner via Lazarus wrote: > No problem. Thanks for confirming that Mattias. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From michael at freepascal.org Thu Jan 12 17:24:08 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 12 Jan 2017 17:24:08 +0100 (CET) Subject: [Lazarus] cleaning out the "packagefiles.xml" file In-Reply-To: <20170112170631.1246c103@limapholos.matflo.wg> References: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> <20170112170631.1246c103@limapholos.matflo.wg> Message-ID: On Thu, 12 Jan 2017, Mattias Gaertner via Lazarus wrote: > On Thu, 12 Jan 2017 14:44:05 +0000 > Graeme Geldenhuys via Lazarus wrote: > >> Hi, >> >> If I clean out the "packagefile.xml" file (aka the package registry) and >> manually remove all obsolete package entries..... if the remaining >> tags are not sequential, would that be an issue for Lazarus or >> lazbuild? > > No problem. That is, assuming you have not touched the 'count' ? Michael. From mailinglists at geldenhuys.co.uk Thu Jan 12 17:33:37 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 12 Jan 2017 16:33:37 +0000 Subject: [Lazarus] cleaning out the "packagefiles.xml" file In-Reply-To: References: <1b82be43-bdbb-4ce8-4172-6704dbc11123@geldenhuys.co.uk> <20170112170631.1246c103@limapholos.matflo.wg> Message-ID: On 2017-01-12 16:24, Michael Van Canneyt via Lazarus wrote: > That is, assuming you have not touched the 'count' ? I didn't look at the lazbuild code, but that should be easy to work around (if not already done so). eg: Read the package registry xml file. Read the Count attribute value and compare that to the child count of UserPkgLinks. If they don't match, ignore the Count attribute and simply walk through all the children of UserPkgLinks. 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 alb42 at web.de Thu Jan 12 18:50:32 2017 From: alb42 at web.de (Marcus Sackrow) Date: Thu, 12 Jan 2017 18:50:32 +0100 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: <5e0f42cd-64d6-3937-868f-063d693fcfd1@web.de> References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> <5e0f42cd-64d6-3937-868f-063d693fcfd1@web.de> Message-ID: <7decee6d-a55d-cc5a-8c2f-ff0393de2eaf@web.de> Hi again, Am 05.01.2017 um 14:59 schrieb Marcus Sackrow via Lazarus: > Hello, > > Am 03.01.2017 um 14:53 schrieb Juha Manninen via Lazarus: >> Yes, the MUI stuff looks interesting. >> >> Initial commit can be done by somebody, maybe me. > > So here is it. > I tried to send directly but the ML has a 100k Limit to I placed it on > my Webpage: > > https://home.alb42.de/MUI-WidgetSet.patch.zip > > 184k packed, 1.2 MB unpacked. > I tried to change not too much outside the mui widgetset folder. > Open for discussion. Would be nice to get it added to lazarus. Some news about this? Everyone too busy? or there are some problems I could help on? Greetings, Marcus From joshyfun at gmail.com Thu Jan 12 19:17:04 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Thu, 12 Jan 2017 19:17:04 +0100 Subject: [Lazarus] About TDateEdit In-Reply-To: References: <80b45d34-44a6-0e9c-8d50-16d31913068a@gmail.com> Message-ID: <9d60293e-2f81-012f-804c-e95e428017dd@gmail.com> El 12/01/2017 a las 9:33, Alexey via Lazarus escribió: > I posted the pch to Mantis, which addresses this issue. > > >> to check against "" on exit and set date to "NullDate" value. Is >> current behavior expected ? > Hello, Thank you, but and the other one? No full date on exit ? Is it expected to work in this way or a patch should be submitted ? -- Saludos, José Mejuto From aaa5500 at ya.ru Thu Jan 12 20:58:28 2017 From: aaa5500 at ya.ru (Alexey) Date: Thu, 12 Jan 2017 22:58:28 +0300 Subject: [Lazarus] About TDateEdit In-Reply-To: <9d60293e-2f81-012f-804c-e95e428017dd@gmail.com> References: <80b45d34-44a6-0e9c-8d50-16d31913068a@gmail.com> <9d60293e-2f81-012f-804c-e95e428017dd@gmail.com> Message-ID: <2c649acb-34cd-fcbb-543e-5e514f81e233@ya.ru> Also posted the pch to the same Mantis. > and the other one? No full date on exit ? -- Regards, Alexey From dhkblaszyk at zeelandnet.nl Thu Jan 12 22:21:05 2017 From: dhkblaszyk at zeelandnet.nl (Darius Blaszyk) Date: Thu, 12 Jan 2017 22:21:05 +0100 Subject: [Lazarus] Translating at runtime Message-ID: Hi, I was wondering what the best way would be to translate and app at runtime. When I call SetDefaultLang from LCLTranslator after changing the language setting, the IDE is translated on the fly. However incomplete translations will overwrite only the translated strings from the .po file and leave other (earlier translated strings) intact. This will create a mixed language (other than the default) application. Is there a way to overwrite ALL strings in the application? It would be fine to overwrite non-translated strings with the default strings first for me. Regards, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Fri Jan 13 00:00:48 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 13 Jan 2017 01:00:48 +0200 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: <7decee6d-a55d-cc5a-8c2f-ff0393de2eaf@web.de> References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> <5e0f42cd-64d6-3937-868f-063d693fcfd1@web.de> <7decee6d-a55d-cc5a-8c2f-ff0393de2eaf@web.de> Message-ID: On Thu, Jan 12, 2017 at 7:50 PM, Marcus Sackrow via Lazarus wrote: > Some news about this? Everyone too busy? or there are some problems I could > help on? Oops, somehow I missed it again. I will look at the patch tomorrow. Juha From joshyfun at gmail.com Fri Jan 13 00:07:30 2017 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Fri, 13 Jan 2017 00:07:30 +0100 Subject: [Lazarus] About TDateEdit In-Reply-To: <2c649acb-34cd-fcbb-543e-5e514f81e233@ya.ru> References: <80b45d34-44a6-0e9c-8d50-16d31913068a@gmail.com> <9d60293e-2f81-012f-804c-e95e428017dd@gmail.com> <2c649acb-34cd-fcbb-543e-5e514f81e233@ya.ru> Message-ID: El 12/01/2017 a las 20:58, Alexey via Lazarus escribió: > Also posted the pch to the same Mantis. > >> and the other one? No full date on exit ? > Hello, Too fast :) Thank you. -- From michael at freepascal.org Fri Jan 13 23:36:31 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 13 Jan 2017 23:36:31 +0100 (CET) Subject: [Lazarus] Changes to fpWeb... Message-ID: Hello, I have committed a serious change to the way fpweb handles requests. Especially routing of requests was changed. The old Delphi style routing worked with Datamodules only. The pattern was strictly /modulename/actionname or through query variables: ?module=xyz&Action=nmo This old routing is still available by setting the LegacyRouting property of webhandler or webapplication (custweb) to true. (the new routing described below is then disabled) The new routing is more flexible in 3 ways. - It is no longer required to use datamodules, but this is still supported. There are now 4 methods that can be used to register a route: - Using a callback procedure TRouteCallback = Procedure(ARequest: TRequest; AResponse); - Using a callback event: TRouteEvent = Procedure(ARequest: TRequest; AResponse) of object; - Using an interface IRouteInterface = Interface ['{10115353-10BA-4B00-FDA5-80B69AC4CAD0}'] Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); end; Note that this is a CORBA interface, so no reference counting. (although a reference counting version could be added, if desired) - Using a router object: TRouteObject = Class(TObject,IRouteInterface) Public Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual; abstract; end; TRouteObjectClass = Class of TRouteObject; The object class needs to be registered. The router will instantiate the object and release it once the request was handled. - Using a datamodule, as it used to be. More methods can be added, if need be. All routes are registered using the HTTPRouter.RegisterRoute method. it is overloaded to accept any of the above parameters. - The router can now match more complex, parametrized routes. A route is determined by the path part of an URL; query parameters are not examined. /path1/path2/path3/path4 In these paths, parameters and wildcards are recognized: :param means that it will match any request with a single part in this location *param means that it will match any request with zero or more path parts in this location examples: /path1 /REST/:Resource/:ID /REST/:Resource /*/something /*path/somethiingelse /*path The parameters will be added to TRequest, they are available in the (new) RouteParams array property of TRequest. Paths are matched case sensitively by default, and the first matching pattern is used. The HTTP Modules are registered in the router using classname/* or defaultmodulename/* - A set of methods can be added to the route registration (default is to accept all methods). The router will match the request method. If the method does not match, it will raise an exception which will result in a 405 HTTP error. I have added a demo application. It behaves well, just as the testcases, but I would appreciate feedback if you have cases where your datamodules no longer behave as they used to (both with LegacyRouting=true or false) Some more improvements to fpweb are planned, but they will not be as invasive as this. Michael. From juha.manninen62 at gmail.com Sat Jan 14 00:55:54 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 14 Jan 2017 01:55:54 +0200 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> <5e0f42cd-64d6-3937-868f-063d693fcfd1@web.de> <7decee6d-a55d-cc5a-8c2f-ff0393de2eaf@web.de> Message-ID: Strange. All the new files in lcl/interfaces/mui directory have their contents duplicated, meaning that where the file should end, the same whole text comes a 2. time. This happens when I do the normal $ patch -p0 < ~/patch/MUI-WidgetSet.patch command. The same problem shows in Kompare (KDE's diff viewer). There the same file names show twice with identical contents. Yes, it looks like the patch file itself has them twice. That's why it is so big. How did you make it? Juha From alb42 at web.de Sat Jan 14 01:17:18 2017 From: alb42 at web.de (Marcus Sackrow) Date: Sat, 14 Jan 2017 01:17:18 +0100 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> <5e0f42cd-64d6-3937-868f-063d693fcfd1@web.de> <7decee6d-a55d-cc5a-8c2f-ff0393de2eaf@web.de> Message-ID: <7649f97f-554a-9913-9a15-f9628af889cd@web.de> Hi, Am 14.01.2017 um 00:55 schrieb Juha Manninen via Lazarus: > Strange. All the new files in lcl/interfaces/mui directory have their > contents duplicated, meaning that where the file should end, the same > whole text comes a 2. time. > This happens when I do the normal > $ patch -p0 < ~/patch/MUI-WidgetSet.patch > command. > The same problem shows in Kompare (KDE's diff viewer). There the same > file names show twice with identical contents. > Yes, it looks like the patch file itself has them twice. That's why it > is so big. How did you make it? Indeed, seems all files are double inside, sorry, I created it the same way as the other Amiga patch before, seems RabbidVCS has some bugs :-| Now I created it via console svn diff https://home.alb42.de/MUI_Widget.patch.zip looks good to me now, also much smaller Thanks Marcus From juha.manninen62 at gmail.com Sat Jan 14 11:03:07 2017 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 14 Jan 2017 12:03:07 +0200 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: <7649f97f-554a-9913-9a15-f9628af889cd@web.de> References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> <5e0f42cd-64d6-3937-868f-063d693fcfd1@web.de> <7decee6d-a55d-cc5a-8c2f-ff0393de2eaf@web.de> <7649f97f-554a-9913-9a15-f9628af889cd@web.de> Message-ID: On Sat, Jan 14, 2017 at 2:17 AM, Marcus Sackrow via Lazarus wrote: > https://home.alb42.de/MUI_Widget.patch.zip > > looks good to me now, also much smaller I applied it in r53941. Thanks. I could only test that it does not break compilation for other widgetsets. Amiga people, please test. Please communicate with Marc Weustink about commit access. I think you should get it ASAP. Juha From md at delfire.net Sat Jan 14 15:34:55 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Sat, 14 Jan 2017 12:34:55 -0200 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: References: Message-ID: On Fri, Jan 13, 2017 at 8:36 PM, Michael Van Canneyt via Lazarus wrote: > > Hello, > > I have committed a serious change to the way fpweb handles requests. > > Especially routing of requests was changed. > > [...] For me, this is great news. I'm feeling we've started to go ahead writing complex Web systems using Object Pascal. Thanks Michael and all those who have been contributing for these new features. Best regards, Marcos Douglas From michael at freepascal.org Sat Jan 14 16:48:54 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 14 Jan 2017 16:48:54 +0100 (CET) Subject: [Lazarus] Changes to fpWeb... In-Reply-To: References: Message-ID: On Sat, 14 Jan 2017, Marcos Douglas B. Santos via Lazarus wrote: > On Fri, Jan 13, 2017 at 8:36 PM, Michael Van Canneyt via Lazarus > wrote: >> >> Hello, >> >> I have committed a serious change to the way fpweb handles requests. >> >> Especially routing of requests was changed. >> >> [...] > > For me, this is great news. > I'm feeling we've started to go ahead writing complex Web systems > using Object Pascal. > Thanks Michael and all those who have been contributing for these new features. Well, after working some years in web environments, I felt I had enough experience to diverge from what Delphi originally did :) Now things become really simple: uses fpcgi, httpdefs, httproute; procedure DoHello(ARequest:TRequest; AResponse : TResponse); begin AResponse.Content:='

Hello,World!

' end; begin HTTPRouter.RegisterRoute('*', at DoHello); Application.Initialize; Application.Run; end. The only way to get it even more concise would be with anonymous functions. And by changing fpcgi to fpfastcgi or fphttpapp, you can switch between all kinds of web enabled application. Can't get more simple than that, I think. Michael. From alb42 at web.de Sat Jan 14 17:43:02 2017 From: alb42 at web.de (Marcus Sackrow) Date: Sat, 14 Jan 2017 17:43:02 +0100 Subject: [Lazarus] Initial NoGUI LCL support for Amiga Systems In-Reply-To: References: <9a538fbb-746e-bc0a-6064-f4515d95296f@web.de> <5e0f42cd-64d6-3937-868f-063d693fcfd1@web.de> <7decee6d-a55d-cc5a-8c2f-ff0393de2eaf@web.de> <7649f97f-554a-9913-9a15-f9628af889cd@web.de> Message-ID: Am 14.01.2017 um 11:03 schrieb Juha Manninen via Lazarus: > On Sat, Jan 14, 2017 at 2:17 AM, Marcus Sackrow via Lazarus > wrote: >> https://home.alb42.de/MUI_Widget.patch.zip >> >> looks good to me now, also much smaller > I applied it in r53941. Thanks. > I could only test that it does not break compilation for other widgetsets. > Amiga people, please test. Thanks, works so far. for everyone wants to test it, i386-aros: fpc 3.0.0 is fine, m68k-amiga, powerpc-morphos still fpc 3.1 needed, fpc 3.0.2 will have a bugfix for the problem (just merged to FPC fixed branch) > Please communicate with Marc Weustink about commit access. I think you > should get it ASAP. I wrote him an email. Thanks again for your help. Greetings, Marcus From pak.lebah at yahoo.com Sun Jan 15 02:32:13 2017 From: pak.lebah at yahoo.com (Mr Bee) Date: Sun, 15 Jan 2017 01:32:13 +0000 (UTC) Subject: [Lazarus] Bls: [fpc-pascal] Changes to fpWeb... In-Reply-To: References: Message-ID: <1040572901.3490842.1484443933378@mail.yahoo.com> Will this new fpWeb be included in the next FPC release? v.3.2? v.3.0.2? Thank you.  –Mr Bee Pada Sabtu, 14 Januari 2017 5:36, Michael Van Canneyt menulis: Hello, I have committed a serious change to the way fpweb handles requests. Especially routing of requests was changed. The old Delphi style routing worked with Datamodules only. The pattern was strictly /modulename/actionname or through query variables: ?module=xyz&Action=nmo This old routing is still available by setting the LegacyRouting property of webhandler or webapplication (custweb) to true. (the new routing described below is then disabled) The new routing is more flexible in 3 ways. - It is no longer required to use datamodules, but this is still supported.   There are now 4 methods that can be used to register a route:   - Using a callback procedure     TRouteCallback = Procedure(ARequest: TRequest; AResponse);   - Using a callback event:     TRouteEvent = Procedure(ARequest: TRequest; AResponse) of object;   - Using an interface     IRouteInterface = Interface ['{10115353-10BA-4B00-FDA5-80B69AC4CAD0}']       Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse);     end;     Note that this is a CORBA interface, so no reference counting.     (although a reference counting version could be added, if desired)   - Using a router object:     TRouteObject = Class(TObject,IRouteInterface)     Public       Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual; abstract;     end;     TRouteObjectClass = Class of TRouteObject;     The object class needs to be registered. The router will instantiate the     object and release it once the request was handled.   - Using a datamodule, as it used to be.   More methods can be added, if need be.   All routes are registered using the HTTPRouter.RegisterRoute method.   it is overloaded to accept any of the above parameters. - The router can now match more complex, parametrized routes.   A route is determined by the path part of an URL; query parameters are not examined.   /path1/path2/path3/path4   In these paths, parameters and wildcards are recognized:   :param means that it will match any request with a single part in this location   *param means that it will match any request with zero or more path parts in this location   examples:   /path1   /REST/:Resource/:ID   /REST/:Resource   /*/something   /*path/somethiingelse   /*path   The parameters will be added to TRequest, they are available in the (new) RouteParams array property of TRequest.   Paths are matched case sensitively by default, and the first matching pattern is used.   The HTTP Modules are registered in the router using classname/* or defaultmodulename/* - A set of methods can be added to the route registration (default is to  accept all methods).   The router will  match the request method. If the method does not match, it will raise an   exception which will result in a 405 HTTP error. I have added a demo application. It behaves well, just as the testcases, but I would appreciate feedback if you have cases where your datamodules no longer behave as they used to (both with LegacyRouting=true or false) Some more improvements to fpweb are planned, but they will not be as invasive as this. Michael. _______________________________________________ fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.vahi at softf1.com Sun Jan 15 15:30:44 2017 From: martin.vahi at softf1.com (Martin Vahi) Date: Sun, 15 Jan 2017 16:30:44 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: On 10/12/2016 09:10 PM, Adrian De Armas via Lazarus wrote: > Hello everyone, > I am a professor of "introduction to programming". Currently we are working > with matlab and c. > > Today I had a meeting about doing the module more interesting to the > students. Currently we teach algorithms making console applications and > usually I receive questions like "Why don't we do something more modern?". > > I recommended that we should use Pascal in General and Lazarus in > particular to teach how to create rich GUI Applications and to my surprise > the idea was well recieved. Now I have to make suggestions about how to > prepare the module starting from zero. Students do not know how to program > and I need to include subjects as: variable declaration, operations, if, > while, for, functions and procedure, arrays and multidimensional arrays. > > I would love to know what you think about making the transition from > console to GUI. > This is an exciting opportunity I'd love to make it right. > ... I haven't used Lazarus yet, I need to learn it, but during the development of my own JavaScript GUI library I have came to a conclusion that GUI-s are inherently something that require "dynamic programming" or the code gets really bloated. Another thing that I noticed, when developing my own GUI library, is that the simple "deck of cards" style of GUI models that web developers use, which essentially mimic ordinary, old-school, HTML-pages, where each screen state is a separate HTML-page, are useless in practice, because the number of cards in the deck of cards gets really huge really fast. At least that's the story with GUI-s that implement various forms. I suspect that Your best bet for a simple GUI is actually a 3D-game based on the http://castle-engine.sourceforge.net/ That should be fun, "modern", and actually MUCH-MUCH-MUCH-MUCH EASIER TO USE than anything that uses forms. My own summary for the case that uses forms, is: http://longterm.softf1.com/specifications/rastclsp_t1/ So, I really suggest that You avoid the typical blanks-and-buttons types of GUI-s like a plaque, when teaching beginners. Those are really hard even for me as a professional. Stick with the 3D-game-engine and game levels. If I were to teach beginners to program, then I would use Ruby, not Pascal, but the Castle 3D game engine is my first choice for anything 3D. Although, in the JavaScript and web browser world there is the "yet-another-VRML-ready-to-die-off" https://www.x3dom.org/ and the x3dom competitor, web browser version of OpenGL, WebGL, based game engines like http://babylonjs.com/ Any kind of client projects have to use the web browser, because almost everything else has various installation problems. I do not mean just the time that it takes to download and install, but literally PROBLEMS, crashing or lack of support at a given operating system and hardware configuration, etc. So, all in all, Lazarus seems nice, but the task that it seems to be designed to solve, the creation of 2D GUIs, seems too complex for beginners. You'll be probably much better of, if You stick to 3D in stead of 2D. The Castle 3D game engine has some very nice sample code, which might be used as a template. 3D graphics, on the other hand, is more tedious to do than 2D graphics, because there is more information that needs to be entered/decided, but once the statues are molded, a simple 3D game or a 2D-game with a running turtle on it, is much easier than anything with buttons and blanks. Besides, every blank needs input verification, id est the height of a pet can not be negative, the name of a dog can not be an empty string, etc. With a hope to be helpful, Martin.Vahi at softf1.com P.S. When talking about "more modern", then my current architecture is http://mmmvkos.softf1.com/k2sitsi_hallatav/wiki_supplements/diagramo/editor/viewDiagram.php?diagramId=46 and overall development process is described at http://intervaarium.softf1.com/lounge/work_process/en/ That is to say, the "most modern" might not be necessarily something very new. The question might rather be: why has industry used crap, when they knew better? From vojtech.cihak at atlas.cz Sun Jan 15 23:30:52 2017 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sun, 15 Jan 2017 23:30:52 +0100 Subject: [Lazarus] =?utf-8?q?Semicolon_checking?= Message-ID: <20170115233052.C2E5B0B5@atlas.cz> Hello, has Lazarus (CodeTools) or FPC some checking for empty commands? I accidentally did this stupid mistake:   if ... then   begin      ...   end else;   begin     ...     exit;   end;   Note the semicolon behind the "else". Semicolon as an empty command is sometimes useful (temporary solution).   Thanks, V. From martin.vahi at softf1.com Mon Jan 16 02:52:21 2017 From: martin.vahi at softf1.com (Martin Vahi) Date: Mon, 16 Jan 2017 03:52:21 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <2868b853-fdfa-8f53-fd11-1bf2131a56cf@softf1.com> Sorry for sending my previous letter about teaching Pascal to the mailing list. The letter was meant to be sent directly to the Adrian De Armas, not the mailing list. My mistake. From noreply at z505.com Mon Jan 16 08:13:07 2017 From: noreply at z505.com (Lars) Date: Mon, 16 Jan 2017 00:13:07 -0700 Subject: [Lazarus] Semicolon checking In-Reply-To: <20170115233052.C2E5B0B5@atlas.cz> References: <20170115233052.C2E5B0B5@atlas.cz> Message-ID: <651746fc498c8d7b85b64861e66380c7.squirrel@gator3286.hostgator.com> On Sun, January 15, 2017 3:30 pm, Vojtěch Čihák via Lazarus wrote: > Hello, has Lazarus (CodeTools) or FPC some checking for empty commands? I > accidentally did this stupid mistake:   > if ... then begin > >   end else; >   begin >     ... >     exit; >   end; >   Yikes! I think you just discovered a bug in the pascal language itself that was not thought of... as when using a text editor it's easy to leave a semi colon laying around by accident some times. I wonder if Oberon solves this issue, or semi-colon-less languages have any advantage. If you remove the begin from a language (Wirth did in his later languages) you get rid of some issues. From m.e.sanliturk at gmail.com Mon Jan 16 08:37:19 2017 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sun, 15 Jan 2017 23:37:19 -0800 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <2868b853-fdfa-8f53-fd11-1bf2131a56cf@softf1.com> References: <2868b853-fdfa-8f53-fd11-1bf2131a56cf@softf1.com> Message-ID: On Sun, Jan 15, 2017 at 5:52 PM, Martin Vahi via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Sorry for sending my previous letter about > teaching Pascal to the mailing list. > The letter was meant to be sent directly to > the Adrian De Armas, not the mailing list. > My mistake. > -- > _______________________________________________ > Please do not worry , because your message was a very useful contribution to the thread . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From markMLl.lazarus at telemetry.co.uk Mon Jan 16 09:27:25 2017 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 16 Jan 2017 08:27:25 +0000 Subject: [Lazarus] Semicolon checking In-Reply-To: <651746fc498c8d7b85b64861e66380c7.squirrel@gator3286.hostgator.com> References: <20170115233052.C2E5B0B5@atlas.cz> <651746fc498c8d7b85b64861e66380c7.squirrel@gator3286.hostgator.com> Message-ID: On 16/01/17 07:30, Lars via Lazarus wrote: > On Sun, January 15, 2017 3:30 pm, Vojtěch Čihák via Lazarus wrote:> Hello, has Lazarus (CodeTools) or FPC some checking for empty commands? I> accidentally did this stupid mistake: > if ... then begin>> end else;> begin> ...> exit;> end;> > Yikes! I think you just discovered a bug in the pascal language itselfthat was not thought of... as when using a text editor it's easy to leavea semi colon laying around by accident some times. > I wonder if Oberon solves this issue, or semi-colon-less languages haveany advantage. If you remove the begin from a language (Wirth did in hislater languages) you get rid of some issues.-- _______________________________________________Lazarus mailing listLazarus at lists.lazarus-ide.orghttp://lists.lazarus-ide.org/listinfo/lazarus It's one of a number of known nasties in the language definition. This is controversial, but Pascal was defined with ; being a /separator/ not a /terminator/, so strictly a semicolon is not needed before end else until etc. and in my experience only using it where necessary is a good habit to get into ( ;until was a syntax error in at least some versions of Turbo Pascal). One other thing that helps in a very small way is to use case-otherwise-end rather than case-else-end, since it reduces the number of ambiguities. Apart from that Wirth deserves no credit at all for leaving the dangling-else ambiguity in Pascal when it had been recognised and eliminated in ALGOL-68. I expect to get kicked for all of the above. They are my opinions only, and might not be aligned with e.g. the coding style expected in patches submitted to the FPC or Lazarus projects. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From mschnell at lumino.de Mon Jan 16 11:12:22 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 16 Jan 2017 11:12:22 +0100 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: References: Message-ID: On 14.01.2017 15:34, Marcos Douglas B. Santos via Lazarus wrote: > I'm feeling we've started to go ahead writing complex Web systems Does fpweb / weblaz already support status messages from the server to the client (or will it some day) to allow for "Rich Web Applications") ? > Thanks Michael and all those who have been contributing for these new features. +1 !!! -Michael From mschnell at lumino.de Mon Jan 16 11:19:41 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 16 Jan 2017 11:19:41 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: On 15.01.2017 15:30, Martin Vahi via Lazarus wrote: > have came to a conclusion > that GUI-s are inherently something that require > "dynamic programming" or the code gets really bloated. > The nice thing about Lazarus "RAD" paradigm is that this is completely hidden (in the library) from application programmer. So (s)he only needs to write the code that is obviously useful for the task at hand. So adding a GUI for the single purpose of debugging / visualizing the application code makes a lot of sense. -Michael From doug at moosemail.net Mon Jan 16 13:29:10 2017 From: doug at moosemail.net (DougC) Date: Mon, 16 Jan 2017 07:29:10 -0500 Subject: [Lazarus] Semicolon checking In-Reply-To: References: <20170115233052.C2E5B0B5@atlas.cz> <651746fc498c8d7b85b64861e66380c7.squirrel@gator3286.hostgator.com> Message-ID: <159a740aa50.e46e0c3499030.1232666091652001502@moosemail.net> I'm not going to kick you, Mark, as your comments are spot on. What I think wold be very helpful to the FPC community is a warning that is issued when a semi-colon is immediately followed by a "begin" as that is an unusual construct and, as shown in the example here, an indicator of a likely mistake. Doug C. ---- On Mon, 16 Jan 2017 03:27:25 -0500 Mark Morgan Lloyd via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- On 16/01/17 07:30, Lars via Lazarus wrote: > On Sun, January 15, 2017 3:30 pm, Vojtěch Čihák via Lazarus wrote:> Hello, has Lazarus (CodeTools) or FPC some checking for empty commands? I> accidentally did this stupid mistake: > if ... then begin>> end else;> begin> ...> exit;> end;> > Yikes! I think you just discovered a bug in the pascal language itselfthat was not thought of... as when using a text editor it's easy to leavea semi colon laying around by accident some times. > I wonder if Oberon solves this issue, or semi-colon-less languages haveany advantage. If you remove the begin from a language (Wirth did in hislater languages) you get rid of some issues.-- _______________________________________________Lazarus mailing listLazarus at lists.lazarus-ide.orghttp://lists.lazarus-ide.org/listinfo/lazarus It's one of a number of known nasties in the language definition. This is controversial, but Pascal was defined with ; being a /separator/ not a /terminator/, so strictly a semicolon is not needed before end else until etc. and in my experience only using it where necessary is a good habit to get into ( ;until was a syntax error in at least some versions of Turbo Pascal). One other thing that helps in a very small way is to use case-otherwise-end rather than case-else-end, since it reduces the number of ambiguities. Apart from that Wirth deserves no credit at all for leaving the dangling-else ambiguity in Pascal when it had been recognised and eliminated in ALGOL-68. I expect to get kicked for all of the above. They are my opinions only, and might not be aligned with e.g. the coding style expected in patches submitted to the FPC or Lazarus projects. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Mon Jan 16 14:28:54 2017 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 16 Jan 2017 13:28:54 +0000 Subject: [Lazarus] Semicolon checking In-Reply-To: <159a740aa50.e46e0c3499030.1232666091652001502@moosemail.net> References: <20170115233052.C2E5B0B5@atlas.cz> <651746fc498c8d7b85b64861e66380c7.squirrel@gator3286.hostgator.com> <159a740aa50.e46e0c3499030.1232666091652001502@moosemail.net> Message-ID: <4136f2ec-fc98-3917-229f-74e4f1dab47e@mfriebe.de> On 16/01/2017 12:29, DougC via Lazarus wrote: > I'm not going to kick you, Mark, as your comments are spot on. > > What I think wold be very helpful to the FPC community is a warning > that is issued when a semi-colon is immediately followed by a "begin" > as that is an unusual construct and, as shown in the example here, an > indicator of a likely mistake. > Well you can set the IDE to highlight such cases. (At least so long as the ; is on the same line, and right after the else) In Options / Editor / go to "user defined markup" (F1 should get the wiki help) Add a new term. Add the words then; then ; else; else ; and if you want with several spaces too. Then set the background color to a strong red. Et voila. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mse00000 at gmail.com Mon Jan 16 18:56:36 2017 From: mse00000 at gmail.com (Martin Schreiber) Date: Mon, 16 Jan 2017 18:56:36 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <201701161856.36805.mse00000@gmail.com> On Sunday 15 January 2017 15:30:44 Martin Vahi via Lazarus wrote: > > I haven't used Lazarus yet, I need to learn it, > but during the development of my own > JavaScript GUI library I have came to a conclusion > that GUI-s are inherently something that require > "dynamic programming" or the code gets really bloated. > That's the reason why systems like Lazarus, fpGUI and MSEide+MSEgui have been invented. ;-) You really should try them. Martin From dgaspary at gmail.com Mon Jan 16 20:19:22 2017 From: dgaspary at gmail.com (Daniel Gaspary) Date: Mon, 16 Jan 2017 17:19:22 -0200 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: References: Message-ID: On Mon, Jan 16, 2017 at 8:12 AM, Michael Schnell via Lazarus wrote: > Does fpweb / weblaz already support status messages from the server to the > client (or will it some day) to allow for "Rich Web Applications") ? I don't work very often with web, but I'm curious... Can you give examples of these messages? And who (nginx, apache..?) and how they are implemented? Thanks. From noreply at z505.com Mon Jan 16 21:12:05 2017 From: noreply at z505.com (Lars) Date: Mon, 16 Jan 2017 13:12:05 -0700 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: References: Message-ID: <7a45df7d8a7bebee7cd28b7876038e1c.squirrel@gator3286.hostgator.com> On Mon, January 16, 2017 12:19 pm, Daniel Gaspary via Lazarus wrote: > On Mon, Jan 16, 2017 at 8:12 AM, Michael Schnell via Lazarus > wrote: > >> Does fpweb / weblaz already support status messages from the server to >> the client (or will it some day) to allow for "Rich Web Applications") ? >> > > I don't work very often with web, but I'm curious... > > > Can you give examples of these messages? And who (nginx, apache..?) > and how they are implemented? > > Thanks. Indeed, does he mean javascript pop up messages, but initiated by the server? when is the message displayed and why would it be displayed? an ajax on the current web page loaded, but initiated by the server? From noreply at z505.com Mon Jan 16 21:18:31 2017 From: noreply at z505.com (Lars) Date: Mon, 16 Jan 2017 13:18:31 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <201701161856.36805.mse00000@gmail.com> References: <201701161856.36805.mse00000@gmail.com> Message-ID: <366a5e5457997e89cca72b6d5b95b20d.squirrel@gator3286.hostgator.com> > On Sunday 15 January 2017 15:30:44 Martin Vahi via Lazarus wrote: > >> >> I haven't used Lazarus yet, I need to learn it, >> but during the development of my own JavaScript GUI library I have came >> to a conclusion that GUI-s are inherently something that require "dynamic >> programming" or the code gets really bloated. >> GUI's require wrappers. Delphi 5 as an example, is a wrapper around the win32api All successful programming projects are just good wrappers. (everything is a wrapper) If you program GUI's yourself from scratch, you waste thousands (if not millions) of lines of code instead of having a tool that already wrapped it and abstracted it for you and put it in a reusable library (again a wrapper) From noreply at z505.com Mon Jan 16 21:24:14 2017 From: noreply at z505.com (Lars) Date: Mon, 16 Jan 2017 13:24:14 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <4e5bd36b7ce84d7640813f4e11e4d9f2.squirrel@gator3286.hostgator.com> On Mon, January 16, 2017 3:19 am, Michael Schnell via Lazarus wrote: > On 15.01.2017 15:30, Martin Vahi via Lazarus wrote: > >> have came to a conclusion that GUI-s are inherently something that >> require "dynamic programming" or the code gets really bloated. >> >> > The nice thing about Lazarus "RAD" paradigm is that this is completely > hidden (in the library) from application programmer. So (s)he only needs to > write the code that is obviously useful for the task at hand. Except when you find a bug in the lcl, and have to dig in to it.. In theory one could never look into the lcl or underlying api's in practice, sometimes there is an issue to be resolved... like when I fired up the macOS laptop and found that moving the mouse crashed the app, and Dmitry helped me figure out why ;-) Had too look into the macOS related lcl code From l.rame at griensu.com Mon Jan 16 21:59:49 2017 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Mon, 16 Jan 2017 17:59:49 -0300 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: <7a45df7d8a7bebee7cd28b7876038e1c.squirrel@gator3286.hostgator.com> References: <7a45df7d8a7bebee7cd28b7876038e1c.squirrel@gator3286.hostgator.com> Message-ID: <6dc0f4b9-6fac-fe5e-7284-c6a9a518fb1a@griensu.com> El 16/01/17 a las 17:12, Lars via Lazarus escribió: > On Mon, January 16, 2017 12:19 pm, Daniel Gaspary via Lazarus wrote: >> On Mon, Jan 16, 2017 at 8:12 AM, Michael Schnell via Lazarus >> wrote: >> >>> Does fpweb / weblaz already support status messages from the server to >>> the client (or will it some day) to allow for "Rich Web Applications") ? >>> >> I don't work very often with web, but I'm curious... >> >> >> Can you give examples of these messages? And who (nginx, apache..?) >> and how they are implemented? >> >> Thanks. > > Indeed, does he mean javascript pop up messages, but initiated by the > server? when is the message displayed and why would it be displayed? an > ajax on the current web page loaded, but initiated by the server? I think he is talking about WebSockets. The only framework I'm aware of implementing it is m0rm0t. Regards, -- Leonardo M. Ramé Medical IT - Griensu S.A. Av. Colón 636 - Piso 8 Of. A X5000EPT -- Córdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54 9 (011) 40871877 From noreply at z505.com Mon Jan 16 22:21:23 2017 From: noreply at z505.com (Lars) Date: Mon, 16 Jan 2017 14:21:23 -0700 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: <6dc0f4b9-6fac-fe5e-7284-c6a9a518fb1a@griensu.com> References: <7a45df7d8a7bebee7cd28b7876038e1c.squirrel@gator3286.hostgator.com> <6dc0f4b9-6fac-fe5e-7284-c6a9a518fb1a@griensu.com> Message-ID: <218305f481d34a23c7d9fbeb4c09bbb3.squirrel@gator3286.hostgator.com> On Mon, January 16, 2017 1:59 pm, Leonardo M. Ramé via Lazarus wrote: >> Indeed, does he mean javascript pop up messages, but initiated by the >> server? when is the message displayed and why would it be displayed? an >> ajax on the current web page loaded, but initiated by the server? > > I think he is talking about WebSockets. The only framework I'm aware of > implementing it is m0rm0t. What is the exact name of it... couldn't find it: https://www.google.com/search?q=m0rm0t+web+sockets maybe a spelling mistake or slightly different name? From mschnell at lumino.de Tue Jan 17 09:59:58 2017 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 17 Jan 2017 09:59:58 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <4e5bd36b7ce84d7640813f4e11e4d9f2.squirrel@gator3286.hostgator.com> References: <4e5bd36b7ce84d7640813f4e11e4d9f2.squirrel@gator3286.hostgator.com> Message-ID: <84939fc5-b0be-c399-32cc-f549b56cdcd4@lumino.de> On 16.01.2017 21:24, Lars via Lazarus wrote: > Except when you find a bug in the lcl, and have to dig in to it.. I don't suppose Lazrus is so bad that it can't be used for the simple programs the students will start with when learning programming :-):-):-). -Michael From mschnell at lumino.de Tue Jan 17 10:21:51 2017 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 17 Jan 2017 10:21:51 +0100 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: References: Message-ID: On 16.01.2017 20:19, Daniel Gaspary wrote: > Can you give examples of these messages? And who (nginx, apache..?) > and how they are implemented? > In fact I can't, either, that is why I ask. I do know that there are several frameworks that support this by running rather complex Java script on the Client. (For Pascal there once was EXTPascal, but AFAIK, the project has died. ) AFAIK there are several "standard" ways to use a HTTP connection via a HTTP server in reverse direction, including polling by Java script, holding a connection open for an extended amount of time and using an additional TCP/IP socket. (I seem to remember names like "Comet" or "WebSocket". "WebAssembler" might be a future extension to this, in future potentially allowing to run projects created from Pascal code directly in the browser.) It would be nice to have a package Lazarus that supports such things. -Michael From mailinglists at geldenhuys.co.uk Tue Jan 17 10:22:48 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 17 Jan 2017 09:22:48 +0000 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <366a5e5457997e89cca72b6d5b95b20d.squirrel@gator3286.hostgator.com> References: <201701161856.36805.mse00000@gmail.com> <366a5e5457997e89cca72b6d5b95b20d.squirrel@gator3286.hostgator.com> Message-ID: <0704e464-f166-146b-c58b-f6b29b09dda1@geldenhuys.co.uk> On 2017-01-16 20:18, Lars via Lazarus wrote: > GUI's require wrappers. No they don't. > Delphi 5 as an example, is a wrapper around the win32api Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a wrapper around Win32, Qt, Cocoa, Carbon and even fpGUI. But not all GUI toolkits are designed like than. For example, fpGUI is not a wrapper around any existing widgets on any platform. fpGUI implements its own widgets (gui controls) from scratch and talks directly to the underlying libraries (XLib & GDI) to notify the system about the top-level window and receiving OS events. All other behaviour (widget clipping, widget events, widget mouse events etc) are all implemented in fpGUI itself. The benefit of this design is that you are in full control of everything, have real single source across multiple systems, and fpGUI is very easy to port to new OSes. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From michael at freepascal.org Tue Jan 17 10:27:54 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 17 Jan 2017 10:27:54 +0100 (CET) Subject: [Lazarus] Changes to fpWeb... In-Reply-To: References: Message-ID: On Tue, 17 Jan 2017, Michael Schnell via Lazarus wrote: > On 16.01.2017 20:19, Daniel Gaspary wrote: > >> Can you give examples of these messages? And who (nginx, apache..?) >> and how they are implemented? >> > > In fact I can't, either, that is why I ask. > > I do know that there are several frameworks that support this by running > rather complex Java script on the Client. (For Pascal there once was > EXTPascal, but AFAIK, the project has died. ) > > AFAIK there are several "standard" ways to use a HTTP connection via a > HTTP server in reverse direction, including polling by Java script, > holding a connection open for an extended amount of time and using an > additional TCP/IP socket. (I seem to remember names like "Comet" or > "WebSocket". "WebAssembler" might be a future extension to this, in > future potentially allowing to run projects created from Pascal code > directly in the browser.) > > It would be nice to have a package Lazarus that supports such things. There is. Look for bauglirwebsocket. It implements the websocket protocol. Michael. From mschnell at lumino.de Tue Jan 17 10:29:43 2017 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 17 Jan 2017 10:29:43 +0100 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: <6dc0f4b9-6fac-fe5e-7284-c6a9a518fb1a@griensu.com> References: <7a45df7d8a7bebee7cd28b7876038e1c.squirrel@gator3286.hostgator.com> <6dc0f4b9-6fac-fe5e-7284-c6a9a518fb1a@griensu.com> Message-ID: <85b831b5-bb1b-ac74-07df-9bbb44cfaf84@lumino.de> On 16.01.2017 21:59, Leonardo M. Ramé via Lazarus wrote: > The only framework I'm aware of implementing it is m0rm0t. What do you mean by "The only" ? The only at all (I suppose that there are several of those) or the only that explicitly supports pascal / fpc / Lazarus. (I don't know any at all). -Michael From mschnell at lumino.de Tue Jan 17 10:32:09 2017 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 17 Jan 2017 10:32:09 +0100 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: <218305f481d34a23c7d9fbeb4c09bbb3.squirrel@gator3286.hostgator.com> References: <7a45df7d8a7bebee7cd28b7876038e1c.squirrel@gator3286.hostgator.com> <6dc0f4b9-6fac-fe5e-7284-c6a9a518fb1a@griensu.com> <218305f481d34a23c7d9fbeb4c09bbb3.squirrel@gator3286.hostgator.com> Message-ID: <359a2601-adfa-60ed-bcad-76be88df2a4d@lumino.de> On 16.01.2017 22:21, Lars via Lazarus wrote: > What is the exact name of it... couldn't find it: http://blog.synopse.info/category/Open-Source-Projects/mORMot-Framework -Michael From mschnell at lumino.de Tue Jan 17 10:48:55 2017 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 17 Jan 2017 10:48:55 +0100 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: References: Message-ID: <9e8cdfce-9e0b-914b-3eb2-896475ff788e@lumino.de> On 17.01.2017 10:27, Michael Van Canneyt wrote: > > There is. Look for bauglirwebsocket. It implements the websocket > protocol. That is good to know ! Thanks, -Michael From mschnell at lumino.de Tue Jan 17 10:54:40 2017 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 17 Jan 2017 10:54:40 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <0704e464-f166-146b-c58b-f6b29b09dda1@geldenhuys.co.uk> References: <201701161856.36805.mse00000@gmail.com> <366a5e5457997e89cca72b6d5b95b20d.squirrel@gator3286.hostgator.com> <0704e464-f166-146b-c58b-f6b29b09dda1@geldenhuys.co.uk> Message-ID: <7486769c-1a24-85b9-61cd-3531abd31adb@lumino.de> On 17.01.2017 10:22, Graeme Geldenhuys via Lazarus wrote: > > Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a > wrapper around Win32, Qt, Cocoa, Carbon and even fpGUI. And for ease of use as well Delphi as Lazarus come with an IDE that is a combination of source code editor, debugger, compiler controller and *GUI Designer*. Making the use of a simple GUI extremely easy (introducing and suggesting the (dreaded) RAD paradigm. -Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at z505.com Tue Jan 17 19:11:35 2017 From: noreply at z505.com (Lars) Date: Tue, 17 Jan 2017 11:11:35 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <0704e464-f166-146b-c58b-f6b29b09dda1@geldenhuys.co.uk> References: <201701161856.36805.mse00000@gmail.com> <366a5e5457997e89cca72b6d5b95b20d.squirrel@gator3286.hostgator.com> <0704e464-f166-146b-c58b-f6b29b09dda1@geldenhuys.co.uk> Message-ID: <6178d077d11388de0fce040466a5334b.squirrel@gator3286.hostgator.com> On Tue, January 17, 2017 2:22 am, Graeme Geldenhuys via Lazarus wrote: > On 2017-01-16 20:18, Lars via Lazarus wrote: > >> GUI's require wrappers. >> > > No they don't. > Sane GUI programming requires wrappers... Insane programmers will program a GUI without a wrapper... ;-) > >> Delphi 5 as an example, is a wrapper around the win32api >> > > Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a > wrapper around Win32, Qt, Cocoa, Carbon and even fpGUI. But not all GUI > toolkits are designed like than. > > For example, fpGUI is not a wrapper around any existing widgets on any > platform. fpGUI implements its own widgets (gui controls) from scratch and > talks directly to the underlying libraries (XLib & GDI) to notify the > system about the top-level window and receiving OS events. fpGUI is, in every way possible, a wrapper. It wrapps low level x11/win32 calls into a usable frameworks called fpGUI Object orientation is often a wrapper around system calls, fpGUI is object oriented and makes low level calls so someone can use fpGUI as a wrapper around these obnoxious insane low level calls that no one wants to use directly. From wkitty42 at windstream.net Tue Jan 17 21:01:34 2017 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Tue, 17 Jan 2017 15:01:34 -0500 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <6178d077d11388de0fce040466a5334b.squirrel@gator3286.hostgator.com> References: <201701161856.36805.mse00000@gmail.com> <366a5e5457997e89cca72b6d5b95b20d.squirrel@gator3286.hostgator.com> <0704e464-f166-146b-c58b-f6b29b09dda1@geldenhuys.co.uk> <6178d077d11388de0fce040466a5334b.squirrel@gator3286.hostgator.com> Message-ID: <41c96241-b42a-f0fc-ee5f-cfcbf83f1a0e@windstream.net> On 01/17/2017 01:11 PM, Lars via Lazarus wrote: > fpGUI is, in every way possible, a wrapper. > > It wrapps low level x11/win32 calls into a usable frameworks called fpGUI > > Object orientation is often a wrapper around system calls, fpGUI is object > oriented and makes low level calls so someone can use fpGUI as a wrapper > around these obnoxious insane low level calls that no one wants to use > directly. oh good grief, man... i think you're being much too pedantic, here... if we take your definition then all non-GUI programs are also nothing more than wrappers around BIOS and OS calls... the main point, however, that was trying to be made is to cut the bloat by using your own libraries... like fpGUI... then you have only your bugs to worry about and not those of some library 5 levels down in the dll hell that you don't even know is in play and leaving a huge security hole open in your apps... sometimes too much is too much ;) -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From pak.lebah at yahoo.com Wed Jan 18 05:48:44 2017 From: pak.lebah at yahoo.com (Mr Bee) Date: Wed, 18 Jan 2017 04:48:44 +0000 (UTC) Subject: [Lazarus] Bls: [fpc-pascal] Changes to fpWeb... In-Reply-To: References: Message-ID: <656226309.5485775.1484714924143@mail.yahoo.com> This is really a great news. Thank you, Michael and all other contributors for the great work.  It would only need more complete documentation with adequate demo and code samples. Regards,  –Mr Bee Pada Sabtu, 14 Januari 2017 5:36, Michael Van Canneyt menulis: Hello, I have committed a serious change to the way fpweb handles requests. Especially routing of requests was changed. The old Delphi style routing worked with Datamodules only. The pattern was strictly /modulename/actionname or through query variables: ?module=xyz&Action=nmo This old routing is still available by setting the LegacyRouting property of webhandler or webapplication (custweb) to true. (the new routing described below is then disabled) The new routing is more flexible in 3 ways. - It is no longer required to use datamodules, but this is still supported.   There are now 4 methods that can be used to register a route:   - Using a callback procedure     TRouteCallback = Procedure(ARequest: TRequest; AResponse);   - Using a callback event:     TRouteEvent = Procedure(ARequest: TRequest; AResponse) of object;   - Using an interface     IRouteInterface = Interface ['{10115353-10BA-4B00-FDA5-80B69AC4CAD0}']       Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse);     end;     Note that this is a CORBA interface, so no reference counting.     (although a reference counting version could be added, if desired)   - Using a router object:     TRouteObject = Class(TObject,IRouteInterface)     Public       Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual; abstract;     end;     TRouteObjectClass = Class of TRouteObject;     The object class needs to be registered. The router will instantiate the     object and release it once the request was handled.   - Using a datamodule, as it used to be.   More methods can be added, if need be.   All routes are registered using the HTTPRouter.RegisterRoute method.   it is overloaded to accept any of the above parameters. - The router can now match more complex, parametrized routes.   A route is determined by the path part of an URL; query parameters are not examined.   /path1/path2/path3/path4   In these paths, parameters and wildcards are recognized:   :param means that it will match any request with a single part in this location   *param means that it will match any request with zero or more path parts in this location   examples:   /path1   /REST/:Resource/:ID   /REST/:Resource   /*/something   /*path/somethiingelse   /*path   The parameters will be added to TRequest, they are available in the (new) RouteParams array property of TRequest.   Paths are matched case sensitively by default, and the first matching pattern is used.   The HTTP Modules are registered in the router using classname/* or defaultmodulename/* - A set of methods can be added to the route registration (default is to  accept all methods).   The router will  match the request method. If the method does not match, it will raise an   exception which will result in a 405 HTTP error. I have added a demo application. It behaves well, just as the testcases, but I would appreciate feedback if you have cases where your datamodules no longer behave as they used to (both with LegacyRouting=true or false) Some more improvements to fpweb are planned, but they will not be as invasive as this. Michael. _______________________________________________ fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Wed Jan 18 10:25:47 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 18 Jan 2017 09:25:47 +0000 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <6178d077d11388de0fce040466a5334b.squirrel@gator3286.hostgator.com> References: <201701161856.36805.mse00000@gmail.com> <366a5e5457997e89cca72b6d5b95b20d.squirrel@gator3286.hostgator.com> <0704e464-f166-146b-c58b-f6b29b09dda1@geldenhuys.co.uk> <6178d077d11388de0fce040466a5334b.squirrel@gator3286.hostgator.com> Message-ID: <0b0029c1-f5f5-7685-7e5a-e63c79e4303f@geldenhuys.co.uk> On 2017-01-17 18:11, Lars via Lazarus wrote: > fpGUI is, in every way possible, a wrapper. In that case even the Writeln() call is a wrapper function (for a low level system call). So as you can see, your quest not to use wrappers is getting a bit ridiculous. Object Pascal is a high level language to make programming easier and faster. There is nothing wrong with that. If you want no wrappers and low level, then program everything in Assembly. Good luck with that! ;-) ps: I don't consider a unit that implements a Object Pascal interface to a C/C++ DLL or SO library a wrapper. How else are you supposed to use that shared library (written in another language)? Reimplementing everything from scratch is not a good use of my time. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Wed Jan 18 10:27:10 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 18 Jan 2017 09:27:10 +0000 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <41c96241-b42a-f0fc-ee5f-cfcbf83f1a0e@windstream.net> References: <201701161856.36805.mse00000@gmail.com> <366a5e5457997e89cca72b6d5b95b20d.squirrel@gator3286.hostgator.com> <0704e464-f166-146b-c58b-f6b29b09dda1@geldenhuys.co.uk> <6178d077d11388de0fce040466a5334b.squirrel@gator3286.hostgator.com> <41c96241-b42a-f0fc-ee5f-cfcbf83f1a0e@windstream.net> Message-ID: <058a63fa-603f-71dc-f64b-02ab7cb49432@geldenhuys.co.uk> On 2017-01-17 20:01, wkitty42--- via Lazarus wrote: > sometimes too much is too much ;) +1 :) Regards, Graeme From l.rame at griensu.com Wed Jan 18 13:26:21 2017 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Wed, 18 Jan 2017 09:26:21 -0300 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: <85b831b5-bb1b-ac74-07df-9bbb44cfaf84@lumino.de> References: <7a45df7d8a7bebee7cd28b7876038e1c.squirrel@gator3286.hostgator.com> <6dc0f4b9-6fac-fe5e-7284-c6a9a518fb1a@griensu.com> <85b831b5-bb1b-ac74-07df-9bbb44cfaf84@lumino.de> Message-ID: <7849733d-66e5-3dfe-bcd3-ec213e25dc4b@griensu.com> El 17/01/17 a las 06:29, Michael Schnell via Lazarus escribió: > On 16.01.2017 21:59, Leonardo M. Ramé via Lazarus wrote: >> The only framework I'm aware of implementing it is m0rm0t. > What do you mean by "The only" ? The only at all (I suppose that > there are several of those) or the only that explicitly supports > pascal / fpc / Lazarus. (I don't know any at all). > > -Michael I mean the only for Lazarus/FPC. -- Leonardo M. Ramé Medical IT - Griensu S.A. Av. Colón 636 - Piso 8 Of. A X5000EPT -- Córdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54 9 (011) 40871877 From l.rame at griensu.com Wed Jan 18 13:27:25 2017 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Wed, 18 Jan 2017 09:27:25 -0300 Subject: [Lazarus] Changes to fpWeb... In-Reply-To: <9e8cdfce-9e0b-914b-3eb2-896475ff788e@lumino.de> References: <9e8cdfce-9e0b-914b-3eb2-896475ff788e@lumino.de> Message-ID: <168a9d1e-e076-3535-29a6-e95976ba6203@griensu.com> El 17/01/17 a las 06:48, Michael Schnell via Lazarus escribió: > On 17.01.2017 10:27, Michael Van Canneyt wrote: >> >> There is. Look for bauglirwebsocket. It implements the websocket >> protocol. > That is good to know ! > Thanks, > -Michael > Nice!, thanks. -- Leonardo M. Ramé Medical IT - Griensu S.A. Av. Colón 636 - Piso 8 Of. A X5000EPT -- Córdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54 9 (011) 40871877 From freepascal at ypa-software.de Thu Jan 19 13:55:04 2017 From: freepascal at ypa-software.de (Michael Fuchs) Date: Thu, 19 Jan 2017 13:55:04 +0100 Subject: [Lazarus] Show a window under GTK2 in front without stealing the focus Message-ID: <54cd55bd-d68f-b577-8de1-49be6bcad13c@ypa-software.de> Hello, I try to use a notify-like window in one of my applications. That means that a window should be shown on top of all windows, but did not steal the focus from other running applications. Under windows this works with ShowWindow(MyForm.Handle, SW_SHOWNOACTIVATE); But how can I do this under GTK2? Thx for help Michael From zeljko at holobit.net Thu Jan 19 15:04:06 2017 From: zeljko at holobit.net (zeljko) Date: Thu, 19 Jan 2017 15:04:06 +0100 Subject: [Lazarus] Show a window under GTK2 in front without stealing the focus In-Reply-To: <54cd55bd-d68f-b577-8de1-49be6bcad13c@ypa-software.de> References: <54cd55bd-d68f-b577-8de1-49be6bcad13c@ypa-software.de> Message-ID: On 19.01.2017 13:55, Michael Fuchs via Lazarus wrote: > Hello, > > I try to use a notify-like window in one of my applications. > That means that a window should be shown on top of all windows, but did > not steal the focus from other running applications. > > Under windows this works with > > ShowWindow(MyForm.Handle, SW_SHOWNOACTIVATE); > > But how can I do this under GTK2? Don't know now exactly, but gtk_window_set_focus_on_map(Window, False) maybe could help. Have you looked into gtk2winapi ? eg Qt have such flag and it can show window without activating. zeljko From zeljko at holobit.net Thu Jan 19 15:04:06 2017 From: zeljko at holobit.net (zeljko) Date: Thu, 19 Jan 2017 15:04:06 +0100 Subject: [Lazarus] Show a window under GTK2 in front without stealing the focus In-Reply-To: <54cd55bd-d68f-b577-8de1-49be6bcad13c@ypa-software.de> References: <54cd55bd-d68f-b577-8de1-49be6bcad13c@ypa-software.de> Message-ID: On 19.01.2017 13:55, Michael Fuchs via Lazarus wrote: > Hello, > > I try to use a notify-like window in one of my applications. > That means that a window should be shown on top of all windows, but did > not steal the focus from other running applications. > > Under windows this works with > > ShowWindow(MyForm.Handle, SW_SHOWNOACTIVATE); > > But how can I do this under GTK2? Don't know now exactly, but gtk_window_set_focus_on_map(Window, False) maybe could help. Have you looked into gtk2winapi ? eg Qt have such flag and it can show window without activating. zeljko From luca at wetron.es Tue Jan 24 17:50:50 2017 From: luca at wetron.es (Luca Olivetti) Date: Tue, 24 Jan 2017 17:50:50 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session Message-ID: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> Hello, I'm trying to debug a strange thing I saw in production (the main symptom, but not the only one, is a TSynEdit in a tab in a TPageControl that goes completely blank, no text, no scrollbars, no nothing, I suspect I'm clobbering some memory but I'm not sure). So I setup a windows 7 virtual machine in a server to leave my program running under the debugger until it "breaks". I was accessing the server though rdp and, as soon as I close the session, the program gives the "Invalid format string" exception in DateTimeToStr, if I click "continue" the exception is triggered again in the next call, and again, and again. Now I'm using vnc to access the server, but I'm wondering what could be causing that exception. Could be windows broadcasting a message when the rdp session terminates, a message that TApplication mishandles? Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Tue Jan 24 18:59:28 2017 From: luca at wetron.es (Luca Olivetti) Date: Tue, 24 Jan 2017 18:59:28 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> Message-ID: <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> El 24/01/17 a les 17:50, Luca Olivetti via Lazarus ha escrit: > Hello, > > I'm trying to debug a strange thing I saw in production (the main > symptom, but not the only one, is a TSynEdit in a tab in a TPageControl > that goes completely blank, no text, no scrollbars, no nothing, I > suspect I'm clobbering some memory but I'm not sure). > So I setup a windows 7 virtual machine in a server to leave my program > running under the debugger until it "breaks". > I was accessing the server though rdp and, as soon as I close the > session, the program gives the "Invalid format string" exception in > DateTimeToStr, if I click "continue" the exception is triggered again in > the next call, and again, and again. > > Now I'm using vnc to access the server, but I'm wondering what could be > causing that exception. Could be windows broadcasting a message when the > rdp session terminates, a message that TApplication mishandles? > Forgot to say, lazarus 1.6.2, fpc 2.6.4, win32 Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From nc-gaertnma at netcologne.de Tue Jan 24 19:05:39 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 24 Jan 2017 19:05:39 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> Message-ID: <20170124190539.49078abb@limapholos.matflo.wg> On Tue, 24 Jan 2017 18:59:28 +0100 Luca Olivetti via Lazarus wrote: > El 24/01/17 a les 17:50, Luca Olivetti via Lazarus ha escrit: > > Hello, > > > > I'm trying to debug a strange thing I saw in production (the main > > symptom, but not the only one, is a TSynEdit in a tab in a TPageControl > > that goes completely blank, no text, no scrollbars, no nothing, I > > suspect I'm clobbering some memory but I'm not sure). > > So I setup a windows 7 virtual machine in a server to leave my program > > running under the debugger until it "breaks". Please provide a stacktrace. >[...] > Forgot to say, lazarus 1.6.2, fpc 2.6.4, win32 Good to know. Mattias From luca at wetron.es Tue Jan 24 19:24:35 2017 From: luca at wetron.es (Luca Olivetti) Date: Tue, 24 Jan 2017 19:24:35 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <20170124190539.49078abb@limapholos.matflo.wg> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> <20170124190539.49078abb@limapholos.matflo.wg> Message-ID: <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> El 24/01/17 a les 19:05, Mattias Gaertner via Lazarus ha escrit: > On Tue, 24 Jan 2017 18:59:28 +0100 > Luca Olivetti via Lazarus wrote: > >> El 24/01/17 a les 17:50, Luca Olivetti via Lazarus ha escrit: >>> Hello, >>> >>> I'm trying to debug a strange thing I saw in production (the main >>> symptom, but not the only one, is a TSynEdit in a tab in a TPageControl >>> that goes completely blank, no text, no scrollbars, no nothing, I >>> suspect I'm clobbering some memory but I'm not sure). >>> So I setup a windows 7 virtual machine in a server to leave my program >>> running under the debugger until it "breaks". > > Please provide a stacktrace. I didn't manage to provoke (yet) the symptoms as above, but this is the call stack when I connect (or disconnect) via rdp #0 fpc_raiseexception at :0 #1 SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN at :0 #2 SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN at :0 #3 SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME$TFORMATSETTINGS at :0 #4 SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME at :0 #5 SYSUTILS_DATETIMETOSTR$TDATETIME$$ANSISTRING at :0 #6 TLOGGER__INTERNALLOG(0x1eab2390 '127.0.0.1:57233 Nueva conexi'#195#179'n desde 127.0.0.1:57233', ) at D:\boda_t10_l1_pc\comun\utils.pas:149 #7 TLOGGER__LOG(0x1eab2390 '127.0.0.1:57233 Nueva conexi'#195#179'n desde 127.0.0.1:57233', ) at D:\boda_t10_l1_pc\comun\utils.pas:190 #8 TMAINFRM__FTPLOG(0x1eab2390 '127.0.0.1:57233 Nueva conexi'#195#179'n desde 127.0.0.1:57233', ) at main.pas:352 #9 TFTPKESERVER__SYNCLOG() at D:\boda_t10_l1_pc\comun\ftpkeserver.pas:458 #10 CLASSES_CHECKSYNCHRONIZE$LONGINT$$BOOLEAN at :0 #11 TWINDOWPROCHELPER__DOWINDOWPROC() at .\win32\win32callback.inc:1960 #12 WINDOWPROC(787992, 0, 0, 0) at .\win32\win32callback.inc:2601 #13 USER32!IsWindowVisible at :0 #14 ?? at :0 #15 USER32!IsWindowVisible at :0 #16 TWINDOWPROCHELPER__DOWINDOWPROC() at .\win32\win32callback.inc:2571 #17 USER32!IsWindowVisible at :0 #18 ?? at :0 Line 1960 of win32callback.inc is the CheckSynchronize in case Msg of WM_NULL: if (Window = Win32WidgetSet.AppHandle) then begin CheckSynchronize; TWin32Widgetset(Widgetset).CheckPipeEvents; end; (of TWindowProcHelper.DoWindowProc) > >> [...] >> Forgot to say, lazarus 1.6.2, fpc 2.6.4, win32 > > Good to know. > > Mattias > -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Tue Jan 24 19:34:48 2017 From: luca at wetron.es (Luca Olivetti) Date: Tue, 24 Jan 2017 19:34:48 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> <20170124190539.49078abb@limapholos.matflo.wg> <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> Message-ID: <6f6900ed-7ea4-b0d8-bb23-ec9b524eafb5@wetron.es> El 24/01/17 a les 19:24, Luca Olivetti via Lazarus ha escrit: > El 24/01/17 a les 19:05, Mattias Gaertner via Lazarus ha escrit: >> On Tue, 24 Jan 2017 18:59:28 +0100 >> Luca Olivetti via Lazarus wrote: >> >>> El 24/01/17 a les 17:50, Luca Olivetti via Lazarus ha escrit: >>>> Hello, >>>> >>>> I'm trying to debug a strange thing I saw in production (the main >>>> symptom, but not the only one, is a TSynEdit in a tab in a TPageControl >>>> that goes completely blank, no text, no scrollbars, no nothing, I >>>> suspect I'm clobbering some memory but I'm not sure). >>>> So I setup a windows 7 virtual machine in a server to leave my program >>>> running under the debugger until it "breaks". >> >> Please provide a stacktrace. > > > I didn't manage to provoke (yet) the symptoms as above, but this is the > call stack when I connect (or disconnect) via rdp > > > #0 fpc_raiseexception at :0 > #1 > SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN > at :0 > #2 > SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN > at :0 > #3 > SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME$TFORMATSETTINGS at > :0 > #4 SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME at :0 > #5 SYSUTILS_DATETIMETOSTR$TDATETIME$$ANSISTRING at :0 > #6 TLOGGER__INTERNALLOG(0x1eab2390 '127.0.0.1:57233 Nueva > conexi'#195#179'n desde 127.0.0.1:57233', ) at > D:\boda_t10_l1_pc\comun\utils.pas:149 > #7 TLOGGER__LOG(0x1eab2390 '127.0.0.1:57233 Nueva conexi'#195#179'n > desde 127.0.0.1:57233', ) at > D:\boda_t10_l1_pc\comun\utils.pas:190 > #8 TMAINFRM__FTPLOG(0x1eab2390 '127.0.0.1:57233 Nueva conexi'#195#179'n > desde 127.0.0.1:57233', ) at main.pas:352 > #9 TFTPKESERVER__SYNCLOG() at > D:\boda_t10_l1_pc\comun\ftpkeserver.pas:458 > #10 CLASSES_CHECKSYNCHRONIZE$LONGINT$$BOOLEAN at :0 > #11 TWINDOWPROCHELPER__DOWINDOWPROC() at > .\win32\win32callback.inc:1960 > #12 WINDOWPROC(787992, 0, 0, 0) at .\win32\win32callback.inc:2601 > #13 USER32!IsWindowVisible at :0 > #14 ?? at :0 > #15 USER32!IsWindowVisible at :0 > #16 TWINDOWPROCHELPER__DOWINDOWPROC() at > .\win32\win32callback.inc:2571 > #17 USER32!IsWindowVisible at :0 > #18 ?? at :0 > > Line 1960 of win32callback.inc is the CheckSynchronize in > > case Msg of > WM_NULL: > if (Window = Win32WidgetSet.AppHandle) then > begin > CheckSynchronize; > TWin32Widgetset(Widgetset).CheckPipeEvents; > end; > > (of TWindowProcHelper.DoWindowProc) Btw, if I then "reset the debugger" and try to start the program again, I get a lazarus exception "illegal character in format string". If I click Ok (ignore), the program doesn't run and the same message appears again when I press play another time, if I click cancel (kill lazarus), then I get a "read error, access violation, access violation" dialog box. I saw this from time to time since I switched to lazarus 1.6.2 but I didn't worry too much about it. > >> >>> [...] >>> Forgot to say, lazarus 1.6.2, fpc 2.6.4, win32 >> >> Good to know. >> >> Mattias >> > > -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From nc-gaertnma at netcologne.de Tue Jan 24 22:34:00 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 24 Jan 2017 22:34:00 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> <20170124190539.49078abb@limapholos.matflo.wg> <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> Message-ID: <20170124223400.35b36f14@limapholos.matflo.wg> On Tue, 24 Jan 2017 19:24:35 +0100 Luca Olivetti via Lazarus wrote: >[...] > #0 fpc_raiseexception at :0 > #1 > SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN > at :0 > #2 > SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN > at :0 > #3 > SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME$TFORMATSETTINGS > at :0 > #4 SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME at :0 > #5 SYSUTILS_DATETIMETOSTR$TDATETIME$$ANSISTRING at :0 > #6 TLOGGER__INTERNALLOG(0x1eab2390 '127.0.0.1:57233 Nueva > conexi'#195#179'n desde 127.0.0.1:57233', ) at > D:\boda_t10_l1_pc\comun\utils.pas:149 > #7 TLOGGER__LOG(0x1eab2390 '127.0.0.1:57233 Nueva conexi'#195#179'n > desde 127.0.0.1:57233', ) at > D:\boda_t10_l1_pc\comun\utils.pas:190 Start searching for the bug in TLOGGER.LOG. Mattias From luca at wetron.es Tue Jan 24 23:55:01 2017 From: luca at wetron.es (Luca Olivetti) Date: Tue, 24 Jan 2017 23:55:01 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <20170124223400.35b36f14@limapholos.matflo.wg> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> <20170124190539.49078abb@limapholos.matflo.wg> <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> <20170124223400.35b36f14@limapholos.matflo.wg> Message-ID: <238609dc-0768-2290-1255-d9d03fd0bd82@wetron.es> El 24/01/17 a les 22:34, Mattias Gaertner via Lazarus ha escrit: > On Tue, 24 Jan 2017 19:24:35 +0100 > Luca Olivetti via Lazarus wrote: > >> [...] >> #0 fpc_raiseexception at :0 >> #1 >> SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN >> at :0 >> #2 >> SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN >> at :0 >> #3 >> SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME$TFORMATSETTINGS >> at :0 >> #4 SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME at :0 >> #5 SYSUTILS_DATETIMETOSTR$TDATETIME$$ANSISTRING at :0 >> #6 TLOGGER__INTERNALLOG(0x1eab2390 '127.0.0.1:57233 Nueva >> conexi'#195#179'n desde 127.0.0.1:57233', ) at >> D:\boda_t10_l1_pc\comun\utils.pas:149 >> #7 TLOGGER__LOG(0x1eab2390 '127.0.0.1:57233 Nueva conexi'#195#179'n >> desde 127.0.0.1:57233', ) at >> D:\boda_t10_l1_pc\comun\utils.pas:190 > > Start searching for the bug in TLOGGER.LOG. I don't see it (FMemo is a TSynEdit, anyway it bombs in the call to DateTimeToStr). Besides, I don't see the relation with opening or closing an RDP connection to the virtual machine (there should be plenty of calls to CheckSynchronize at any other time and they don't trigger this bug) procedure TLogger.Log(const m: string); begin if m=FLastMsg then begin Repeated(false); end else begin Repeated(true); FLastMsg:=m; InternalLog(m); <---took this branch end; end; procedure TLogger.InternalLog(const m: string); var final:boolean; begin //check if at the end of the log final:=FMemo.topline>FMemo.Lines.Count-FMemo.LinesInWindow; FMemo.lines.BeginUpdate; if FMemo.lines.count>5000 then FMemo.lines.delete(0); Fmemo.lines.add(DateTimeToStr(now)+' '+m); <---exception triggered here FMemo.lines.EndUpdate; //if we wer at the end scroll to keep the new line visible if final then FMemo.TopLine:=FMemo.Lines.Count-FMemo.LinesInWindow+1; FLogFile.Log(m); end; procedure TLogger.Repeated(clear:boolean); begin if not clear then FLastMsgCount:=FLastMsgCount+1; if (clear and (FLastMsgCount>0)) or (not clear and (FLastMsgCount mod 100 = 0)) then InternalLog(format('last message repeated %d times', [FLastMsgCount])); if clear then FLastMsgCount:=0; end; Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Wed Jan 25 09:06:49 2017 From: luca at wetron.es (Luca Olivetti) Date: Wed, 25 Jan 2017 09:06:49 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <20170124223400.35b36f14@limapholos.matflo.wg> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> <20170124190539.49078abb@limapholos.matflo.wg> <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> <20170124223400.35b36f14@limapholos.matflo.wg> Message-ID: <091736c2-59bf-528b-f2fc-ab5ea42a4372@wetron.es> El 24/01/17 a les 22:34, Mattias Gaertner via Lazarus ha escrit: > On Tue, 24 Jan 2017 19:24:35 +0100 > Luca Olivetti via Lazarus wrote: > >> [...] >> #0 fpc_raiseexception at :0 >> #1 >> SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN >> at :0 >> #2 >> SYSUTILS_DATETIMETOSTRING$crc782201FE_STOREFORMAT$ANSISTRING$LONGINT$BOOLEAN >> at :0 >> #3 >> SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME$TFORMATSETTINGS >> at :0 >> #4 SYSUTILS_DATETIMETOSTRING$ANSISTRING$ANSISTRING$TDATETIME at :0 >> #5 SYSUTILS_DATETIMETOSTR$TDATETIME$$ANSISTRING at :0 >> #6 TLOGGER__INTERNALLOG(0x1eab2390 '127.0.0.1:57233 Nueva >> conexi'#195#179'n desde 127.0.0.1:57233', ) at >> D:\boda_t10_l1_pc\comun\utils.pas:149 >> #7 TLOGGER__LOG(0x1eab2390 '127.0.0.1:57233 Nueva conexi'#195#179'n >> desde 127.0.0.1:57233', ) at >> D:\boda_t10_l1_pc\comun\utils.pas:190 > > Start searching for the bug in TLOGGER.LOG. Armed with a debug version of the rtl I get a different error (sigsev) and a different stack trace: #0 ResumeThread at :0 #1 WideCharToMultiByte at :0 #2 WIN32UNICODE2ANSIMOVE(0x1a5f794 'ene', 0xfe97bd8 'ene', 65001) at D:\fpc-2.6.4\rtl\win\syswin.inc:547 #3 GETLOCALESTR(3082, 68, 0x1f69e0 'ene', 0xfe97bd8 'ene') at winlazutf8.inc:361 #4 GETLOCALEFORMATSETTINGSUTF8(3082, {CURRENCYFORMAT = 3, NEGCURRFORMAT = 8, THOUSANDSEPARATOR = 46 '.', DECIMALSEPARATOR = 44 ',', CURRENCYDECIMALS = 2, DATESEPARATOR = 47 '/', TIMESEPARATOR = 58 ':', LISTSEPARATOR = 59 ';', CURRENCYSTRING = 0x1f6b10 #128, SHORTDATEFORMAT = 0x1feca8 'dd/MM/yyyy', LONGDATEFORMAT = 0x1eea18 'dddd, dd'' de ''MMMM'' de ''yyyy', TIMEAMSTRING = 0x0, TIMEPMSTRING = 0x0, SHORTTIMEFORMAT = 0x1fecc8 'h:nn', LONGTIMEFORMAT = 0x1fece8 'h:nn:ss', SHORTMONTHNAMES = {0x1f69e0 'ene', 0x1f69f0 'feb', 0x1f6a00 'mar', 0x1f6a10 'abr', 0x1f6a20 'may', 0x1f6a30 'jun', 0x1f6a40 'jul', 0x1f6a50 'ago', 0x1f6a60 'sep', 0x1f6a70 'oct', 0x1f6a80 'nov', 0x1f6a90 'dic'}, LONGMONTHNAMES = {0x1fea48 'enero', 0x1fea68 'febrero', 0x1fea88 'marzo', 0x1feaa8 'abril', 0x1feac8 'mayo', 0x1feae8 'junio', 0x1feb08 'julio', 0x1feb28 'agosto', 0x1feb48 'septiembre', 0x1feb68 'octubre', 0x1feb88 'noviembre', 0x1feba8 'diciembre'}, SHORTDAYNAMES = {0x1f6aa0 'dom', 0x1f6ab0 'lun', 0x1f6ac0 'mar', 0x1f6ad0 'mi'#233, 0x1f6ae0 'jue', 0x1f6af0 'vie', 0x1f6b00 's'#225'b'}, LONGDAYNAMES = {0x1febc8 'domingo', 0x1febe8 'lunes', 0x1fec08 'martes', 0x1fec28 'mi'#233'rcoles', 0x1fec48 'jueves', 0x1fec68 'viernes', 0x1fec88 's'#225'bado'}, TWODIGITYEARCENTURYWINDOW = 50}) at winlazutf8.inc:436 #5 GETFORMATSETTINGSUTF8 at winlazutf8.inc:474 #6 TAPPLICATION__INTFSETTINGSCHANGE() at .\include\application.inc:1997 #7 TWINDOWPROCHELPER__DOWINDOWPROC() at .\win32\win32callback.inc:2307 #8 WINDOWPROC(155124590, 26, 24, 27655548) at .\win32\win32callback.inc:2601 #9 CUSTOMFORMWNDPROC(155124590, 26, 24, 27655548) at .\win32\win32wsforms.pp:382 #10 USER32!IsWindowVisible at :0 #11 ?? at :0 #12 ?? at :0 #13 ?? at :0 #14 ?? at :0 #15 USER32!SetThreadDesktop at :0 #16 USER32!GetSystemMenu at :0 #17 ?? at :0 Now, #3 is this function in winlazutf8.inc function GetLocaleStr(aLocaleID, aLCType: Longint; const Def: string): String; var L: Integer; Buf: array[0..255] of WideChar; begin L := GetLocaleInfoW(aLocaleID, aLCType, Buf, SizeOf(Buf)); if L > 0 then begin Result:=''; {$IF FPC_FULLVERSION >= 30000} widestringmanager.Wide2AnsiMoveProc(PWideChar(@Buf[0]),Result,CP_UTF8,L-1); {$ELSE} widestringmanager.Wide2AnsiMoveProc(PWideChar(@Buf[0]),Result,CP_UTF8); {$ENDIF} end else Result := Def; end; and since this is fpc2.6.4 the call is the second one: widestringmanager.Wide2AnsiMoveProc(PWideChar(@Buf[0]),Result,CP_UTF8); which jumps at #2 to procedure Win32Unicode2AnsiMove(source:punicodechar;var dest:ansistring;len:SizeInt); Uh? The third parameter is supposed to be the length, not the codepage. If I change that to widestringmanager.Wide2AnsiMoveProc(PWideChar(@Buf[0]),Result,L-1) the error disappears. Reported as http://bugs.freepascal.org/view.php?id=31272 Now, back to my original problem....(TPageControl components randomly disappearing) Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Wed Jan 25 09:09:47 2017 From: luca at wetron.es (Luca Olivetti) Date: Wed, 25 Jan 2017 09:09:47 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <091736c2-59bf-528b-f2fc-ab5ea42a4372@wetron.es> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> <20170124190539.49078abb@limapholos.matflo.wg> <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> <20170124223400.35b36f14@limapholos.matflo.wg> <091736c2-59bf-528b-f2fc-ab5ea42a4372@wetron.es> Message-ID: El 25/01/17 a les 09:06, Luca Olivetti via Lazarus ha escrit: > > the error disappears. > Reported as http://bugs.freepascal.org/view.php?id=31272 > > > Now, back to my original problem....(TPageControl components randomly > disappearing) > http://bugs.freepascal.org/view.php?id=31272 Or maybe this is it: if the production system triggers an WM_SETTINGCHANGE message it could be overwriting some memory pertaining to that TPageControl (long shot, I know, but...) Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Wed Jan 25 09:23:53 2017 From: luca at wetron.es (Luca Olivetti) Date: Wed, 25 Jan 2017 09:23:53 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> <20170124190539.49078abb@limapholos.matflo.wg> <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> <20170124223400.35b36f14@limapholos.matflo.wg> <091736c2-59bf-528b-f2fc-ab5ea42a4372@wetron.es> Message-ID: <26e56bb5-0cf4-fa9b-7412-ab9615bd44b2@wetron.es> El 25/01/17 a les 09:09, Luca Olivetti via Lazarus ha escrit: > El 25/01/17 a les 09:06, Luca Olivetti via Lazarus ha escrit: > >> >> the error disappears. >> Reported as http://bugs.freepascal.org/view.php?id=31272 >> >> >> Now, back to my original problem....(TPageControl components randomly >> disappearing) > >> http://bugs.freepascal.org/view.php?id=31272 > > Or maybe this is it: if the production system triggers an > WM_SETTINGCHANGE message it could be overwriting some memory pertaining > to that TPageControl (long shot, I know, but...) Another question is, shouldn't GetFormatSettingsUTF8 get called at application startup and not only in case of an WM_SETTINGCHANGE message? Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Wed Jan 25 09:35:52 2017 From: luca at wetron.es (Luca Olivetti) Date: Wed, 25 Jan 2017 09:35:52 +0100 Subject: [Lazarus] DateTimeToStr gives an invalid format string error when closing an rdp session In-Reply-To: <26e56bb5-0cf4-fa9b-7412-ab9615bd44b2@wetron.es> References: <39592465-7ffa-30c3-4492-2526621708ae@wetron.es> <5db3ba0e-73bd-050c-b4d8-dd854ce17c9f@wetron.es> <20170124190539.49078abb@limapholos.matflo.wg> <720fe3be-6c4c-cb66-47dd-9254aa3183ec@wetron.es> <20170124223400.35b36f14@limapholos.matflo.wg> <091736c2-59bf-528b-f2fc-ab5ea42a4372@wetron.es> <26e56bb5-0cf4-fa9b-7412-ab9615bd44b2@wetron.es> Message-ID: El 25/01/17 a les 09:23, Luca Olivetti via Lazarus ha escrit: > El 25/01/17 a les 09:09, Luca Olivetti via Lazarus ha escrit: >> El 25/01/17 a les 09:06, Luca Olivetti via Lazarus ha escrit: >> >>> >>> the error disappears. >>> Reported as http://bugs.freepascal.org/view.php?id=31272 >>> >>> >>> Now, back to my original problem....(TPageControl components randomly >>> disappearing) >> >>> http://bugs.freepascal.org/view.php?id=31272 >> >> Or maybe this is it: if the production system triggers an >> WM_SETTINGCHANGE message it could be overwriting some memory pertaining >> to that TPageControl (long shot, I know, but...) > > Another question is, shouldn't GetFormatSettingsUTF8 get called at > application startup and not only in case of an WM_SETTINGCHANGE message? Added a note to the bug report: my patch fixes the sigsev but the returned strings are *not* in utf8. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From emurashie at proengineered.com Wed Jan 25 11:40:28 2017 From: emurashie at proengineered.com (Ed Murashie) Date: Wed, 25 Jan 2017 02:40:28 -0800 Subject: [Lazarus] Running an app on boot Message-ID: <000101d276f7$72b35240$5819f6c0$@proengineered.com> I wrote a simple Lazarus program that displays a window and a button and did the same thing using Glade which also uses Gtk+. I am using a Beaglebone Black with the latest stock Debian Jessie image which start a LxQt desktop program after it boots up. When I run my program in the LxQt window or in a terminal window, it runs fine. Now I want my Lazarus or Glade/Gtk program to run when I boot and not see the LxQt desktop program. I have tried using the Crontab with @reboot command method and the create a .service and use systemctl to register and start it. No matter what I try I get " Gtk-WARNING **: cannot open display: ". This also happen on a Beaglebone Green and happens when I use Wheezy or Jessie. What am I doing wrong and how can I fix it? Thanks, Newbie Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Wed Jan 25 12:28:21 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 25 Jan 2017 11:28:21 +0000 Subject: [Lazarus] Format code on Save Message-ID: Hi, As the subject lines says. If you set up the Jedi Code Formatting options, is there a way to tell Lazarus to automatically format the unit when you Ctrl+S (Save)? Eclipse IDE does that (and much more fine grained if needed) with Java code, at it is actually super useful, and always results in neatly laid out code. So I was wondering if Lazarus IDE could do something similar with JCF, or would that require patches to accomplish? 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 zeljko at holobit.net Wed Jan 25 14:09:52 2017 From: zeljko at holobit.net (zeljko) Date: Wed, 25 Jan 2017 14:09:52 +0100 Subject: [Lazarus] Running an app on boot In-Reply-To: <000101d276f7$72b35240$5819f6c0$@proengineered.com> References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> Message-ID: On 01/25/2017 11:40 AM, Ed Murashie via Lazarus wrote: > I wrote a simple Lazarus program that displays a window and a button and > did the same thing using Glade which also uses Gtk+. > > I am using a Beaglebone Black with the latest stock Debian Jessie image > which start a LxQt desktop program after it boots up. > > When I run my program in the LxQt window or in a terminal window, it > runs fine. > > Now I want my Lazarus or Glade/Gtk program to run when I boot and not > see the LxQt desktop program. > > I have tried using the Crontab with @reboot command method and the > create a .service and use systemctl to register and start it. > > No matter what I try I get “ Gtk-WARNING **: cannot open display: “. > This also happen on a Beaglebone Green and happens when I use Wheezy or > Jessie. > > > > What am I doing wrong and how can I fix it? You cannot run an X11 application without running X11 server. That's wrong. If you need headless server gui app then you can use xfvb for such purpose , or normally run X11 wm and then run your app there. zeljko From nc-gaertnma at netcologne.de Wed Jan 25 14:15:42 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 25 Jan 2017 14:15:42 +0100 Subject: [Lazarus] Format code on Save In-Reply-To: References: Message-ID: <20170125141542.53444415@limapholos.matflo.wg> On Wed, 25 Jan 2017 11:28:21 +0000 Graeme Geldenhuys via Lazarus wrote: > Hi, > > As the subject lines says. If you set up the Jedi Code Formatting > options, is there a way to tell Lazarus to automatically format the unit > when you Ctrl+S (Save)? Eclipse IDE does that (and much more fine > grained if needed) with Java code, at it is actually super useful, and > always results in neatly laid out code. So I was wondering if Lazarus > IDE could do something similar with JCF, or would that require patches > to accomplish? There is only an event before saving all yet. I can add an event called before saving a source editor file. Would that help you? Does the JCF formatter work with bookmarks, folds and breakpoints? Mattias From mailinglists at geldenhuys.co.uk Wed Jan 25 14:25:56 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 25 Jan 2017 13:25:56 +0000 Subject: [Lazarus] Format code on Save In-Reply-To: <20170125141542.53444415@limapholos.matflo.wg> References: <20170125141542.53444415@limapholos.matflo.wg> Message-ID: <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> On 2017-01-25 13:15, Mattias Gaertner via Lazarus wrote: > I can add an event called before saving a source editor file. > Would that help you? I think a "after save" event is needed instead? Does JCF format code directly from memory (SynEdit's buffer), or does it read and format a file from disk. If the latter, then I guess a "after save" event would indeed be helpful. > Does the JCF formatter work with bookmarks, folds and breakpoints? The JCF I'm using is pretty old. I'll have to double check the state of the JCF included with Lazarus, but I'm pretty sure its much newer than the one I use. Would bookmarks, code-folding etc matter.... if JCF reads files from disk? 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 list2010 at BrenemanLabs.com Wed Jan 25 14:26:13 2017 From: list2010 at BrenemanLabs.com (Paul Breneman) Date: Wed, 25 Jan 2017 08:26:13 -0500 Subject: [Lazarus] Running an app on boot In-Reply-To: References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> Message-ID: On 01/25/2017 08:09 AM, zeljko via Lazarus wrote: > On 01/25/2017 11:40 AM, Ed Murashie via Lazarus wrote: >> I wrote a simple Lazarus program that displays a window and a button and >> did the same thing using Glade which also uses Gtk+. >> >> I am using a Beaglebone Black with the latest stock Debian Jessie image >> which start a LxQt desktop program after it boots up. >> >> When I run my program in the LxQt window or in a terminal window, it >> runs fine. >> >> Now I want my Lazarus or Glade/Gtk program to run when I boot and not >> see the LxQt desktop program. >> >> I have tried using the Crontab with @reboot command method and the >> create a .service and use systemctl to register and start it. >> >> No matter what I try I get “ Gtk-WARNING **: cannot open display: “. >> This also happen on a Beaglebone Green and happens when I use Wheezy or >> Jessie. >> >> >> >> What am I doing wrong and how can I fix it? > > You cannot run an X11 application without running X11 server. That's > wrong. If you need headless server gui app then you can use xfvb for > such purpose , or normally run X11 wm and then run your app there. Or switch to a Raspberry Pi and use https://Ultibo.org ? Maybe Ultibo can be ported later to Beaglebone? Regards, Paul www.ControlPascal.com From nc-gaertnma at netcologne.de Wed Jan 25 15:15:10 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 25 Jan 2017 15:15:10 +0100 Subject: [Lazarus] Format code on Save In-Reply-To: <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> References: <20170125141542.53444415@limapholos.matflo.wg> <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> Message-ID: <20170125151510.1d772bd6@limapholos.matflo.wg> On Wed, 25 Jan 2017 13:25:56 +0000 Graeme Geldenhuys via Lazarus wrote: > On 2017-01-25 13:15, Mattias Gaertner via Lazarus wrote: > > I can add an event called before saving a source editor file. > > Would that help you? > > I think a "after save" event is needed instead? Does JCF format code > directly from memory (SynEdit's buffer), or does it read and format a > file from disk. If the latter, then I guess a "after save" event would > indeed be helpful. I just took a quick look at the JCF plugin source: It works on the current source editor and uses ReplaceLines, so it keeps all marks and adds one undo step. Nice. An 'after save' could be added, but that would mean save, execute jcf, load - loosing the undo stack and possibly moving marks. >[...] Mattias From mailinglists at geldenhuys.co.uk Wed Jan 25 15:15:38 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 25 Jan 2017 14:15:38 +0000 Subject: [Lazarus] Running an app on boot In-Reply-To: References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> Message-ID: <5135f208-f5c8-da33-6d44-2f6ec9f7ce7e@geldenhuys.co.uk> On 2017-01-25 13:26, Paul Breneman via Lazarus wrote: > Or switch to a Raspberry Pi and use https://Ultibo.org ? And then you can also use fpGUI Toolkit to keep things small and “lite” (no large 3rd party libraries required or there dependencies. eg: GTK, Qt etc). Regards, Graeme From mailinglists at geldenhuys.co.uk Wed Jan 25 15:23:09 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 25 Jan 2017 14:23:09 +0000 Subject: [Lazarus] Format code on Save In-Reply-To: <20170125151510.1d772bd6@limapholos.matflo.wg> References: <20170125141542.53444415@limapholos.matflo.wg> <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> <20170125151510.1d772bd6@limapholos.matflo.wg> Message-ID: <25855cc8-df38-1933-a647-acbba1cbc06d@geldenhuys.co.uk> On 2017-01-25 14:15, Mattias Gaertner via Lazarus wrote: > on the current source editor and uses ReplaceLines, so it keeps all > marks and adds one undo step. Nice. That is much better indeed. So a 'before save' would then be the useful one. > An 'after save' could be added, but that would mean save, execute jcf, > load - loosing the undo stack and possibly moving marks. No, no, it seems that would not be needed after all. Many thanks for looking at the code to actually see what jcf does. 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 svaa at ciberpiula.net Wed Jan 25 16:28:47 2017 From: svaa at ciberpiula.net (Santiago A.) Date: Wed, 25 Jan 2017 16:28:47 +0100 Subject: [Lazarus] Running an app on boot In-Reply-To: <5135f208-f5c8-da33-6d44-2f6ec9f7ce7e@geldenhuys.co.uk> References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> <5135f208-f5c8-da33-6d44-2f6ec9f7ce7e@geldenhuys.co.uk> Message-ID: <41395b8a-f2fb-a0e3-c8df-450e0a8890cb@ciberpiula.net> El 25/01/2017 a las 15:15, Graeme Geldenhuys via Lazarus escribió: > On 2017-01-25 13:26, Paul Breneman via Lazarus wrote: >> Or switch to a Raspberry Pi and use https://Ultibo.org ? > And then you can also use fpGUI Toolkit to keep things small and > “lite” (no large 3rd party libraries required or there dependencies. eg: > GTK, Qt etc). > > Regards, > Graeme > > fpgui needs a "graphic environment", Windows or X (or Mac?) . Doesn't it? -- Saludos Santiago A. From mailinglists at geldenhuys.co.uk Wed Jan 25 16:35:55 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 25 Jan 2017 15:35:55 +0000 Subject: [Lazarus] Running an app on boot In-Reply-To: <41395b8a-f2fb-a0e3-c8df-450e0a8890cb@ciberpiula.net> References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> <5135f208-f5c8-da33-6d44-2f6ec9f7ce7e@geldenhuys.co.uk> <41395b8a-f2fb-a0e3-c8df-450e0a8890cb@ciberpiula.net> Message-ID: On 2017-01-25 15:28, Santiago A. via Lazarus wrote: > fpgui needs a "graphic environment", Windows or X (or Mac?) . Doesn't it? There is a port to Ultibo that doesn't require X11 or GDI. Take a look at the section “Ultibo with fpGUI support” on http://fpgui.sourceforge.net/community.shtml 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 M.Santhoff at web.de Wed Jan 25 19:46:28 2017 From: M.Santhoff at web.de (Marc Santhoff) Date: Wed, 25 Jan 2017 19:46:28 +0100 Subject: [Lazarus] Running an app on boot In-Reply-To: <000101d276f7$72b35240$5819f6c0$@proengineered.com> References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> Message-ID: <1485369988.9303.12.camel@puma.das.netz> On Mi, 2017-01-25 at 02:40 -0800, Ed Murashie via Lazarus wrote: > I wrote a simple Lazarus program that displays a window and a button and did > the same thing using Glade which also uses Gtk+. > > I am using a Beaglebone Black with the latest stock Debian Jessie image > which start a LxQt desktop program after it boots up. > > When I run my program in the LxQt window or in a terminal window, it runs > fine. > > Now I want my Lazarus or Glade/Gtk program to run when I boot and not see > the LxQt desktop program. > > I have tried using the Crontab with @reboot command method and the create a > .service and use systemctl to register and start it. > > No matter what I try I get " Gtk-WARNING **: cannot open display: ". This > also happen on a Beaglebone Green and happens when I use Wheezy or Jessie. That depends on what you want to achive. Ich you want to make a POS like device that is only showing your program and no window manager menu, task launchers or the like you could do: Edit the file ".xinitrc" in the standard users home directory. There is one line starting with a programm name only, should be sth. like "lxqt" in your case. Replace that line with the name of your programm to run. Disable any unwanted background programs by commenting them out with a '#' in front or deleteing that line(s). Before that you should prepare your program to run full screen by setting the size of the main screen to exactly matching the dipslay size, e.g. for a vga display you use 640 for the width and 480 for the hight. You could additionally block each movement of the main window. That way you have a one program only device. If you end it, X, the gui system, is shut down. There may be other things to watch and handle, maybe you need to make the cursor invisible or force the main window to stay on top. Or you may want to add a "shutdown -ph" or similar directly after your program in ".xinitrc" so the os of the device shuts down if the user end your program. HTH, Marc From M.Santhoff at web.de Wed Jan 25 19:48:31 2017 From: M.Santhoff at web.de (Marc Santhoff) Date: Wed, 25 Jan 2017 19:48:31 +0100 Subject: [Lazarus] Running an app on boot In-Reply-To: References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> Message-ID: <1485370111.9303.14.camel@puma.das.netz> On Mi, 2017-01-25 at 08:26 -0500, Paul Breneman via Lazarus wrote: > On 01/25/2017 08:09 AM, zeljko via Lazarus wrote: > > You cannot run an X11 application without running X11 server. That's > > wrong. If you need headless server gui app then you can use xfvb for > > such purpose , or normally run X11 wm and then run your app there. > > Or switch to a Raspberry Pi and use https://Ultibo.org ? Maybe Ultibo > can be ported later to Beaglebone? I don't understand. Does Ultibo drive screens, does it have gui capabilities? The web site has many words but not so many explanations I get... Regards, Marc From noreply at z505.com Wed Jan 25 20:48:07 2017 From: noreply at z505.com (Lars) Date: Wed, 25 Jan 2017 12:48:07 -0700 Subject: [Lazarus] Running an app on boot In-Reply-To: References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> Message-ID: On Wed, January 25, 2017 6:26 am, Paul Breneman via Lazarus wrote: > > Or switch to a Raspberry Pi and use https://Ultibo.org ? Maybe Ultibo > can be ported later to Beaglebone? > Beaglebone is more "open" hardware than pi but I guess that's another topic. The price of pi certainly is attractive compared to beagle bone From hfiandor at ceniai.inf.cu Thu Jan 26 14:19:50 2017 From: hfiandor at ceniai.inf.cu (hfiandor) Date: Thu, 26 Jan 2017 08:19:50 -0500 Subject: [Lazarus] app for Ruffini method Message-ID: Dear members: I am interested in an app for solve de Ruffini´method for polynomials, and I want to know if somebody have intended it previously. Thanks in advance Ing. Héctor F. Fiandor Rosario -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Fri Jan 27 15:37:08 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 27 Jan 2017 15:37:08 +0100 Subject: [Lazarus] Format code on Save In-Reply-To: <25855cc8-df38-1933-a647-acbba1cbc06d@geldenhuys.co.uk> References: <20170125141542.53444415@limapholos.matflo.wg> <6fdc092c-baa9-53e0-37dc-0cbe56038323@geldenhuys.co.uk> <20170125151510.1d772bd6@limapholos.matflo.wg> <25855cc8-df38-1933-a647-acbba1cbc06d@geldenhuys.co.uk> Message-ID: <20170127153708.1c9b8caf@limapholos.matflo.wg> On Wed, 25 Jan 2017 14:23:09 +0000 Graeme Geldenhuys via Lazarus wrote: > On 2017-01-25 14:15, Mattias Gaertner via Lazarus wrote: > > on the current source editor and uses ReplaceLines, so it keeps all > > marks and adds one undo step. Nice. > > That is much better indeed. So a 'before save' would then be the useful one. I added the event. uses LazIDEIntf LazarusIDE.AddHandlerOnSaveEditorFile(@YourEvent); Mattias From md at delfire.net Fri Jan 27 16:23:36 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Fri, 27 Jan 2017 13:23:36 -0200 Subject: [Lazarus] I can't save any file using IDE (Windows) Message-ID: Hi, I updated my IDE, revision 54011, and now I can't save any file. To reproduce this bug just: 1. open IDE 2. save project1 3. save unit1 If you try to compile, you'll see that unit1 is missing (not saved). Lazarus 1.7 r54011M FPC 3.0.1 i386-win32-win32/win64 Someone could help? Best regards, Marcos Douglas From nc-gaertnma at netcologne.de Fri Jan 27 16:56:13 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 27 Jan 2017 16:56:13 +0100 Subject: [Lazarus] I can't save any file using IDE (Windows) In-Reply-To: References: Message-ID: <20170127165613.7ce30aff@limapholos.matflo.wg> On Fri, 27 Jan 2017 13:23:36 -0200 "Marcos Douglas B. Santos via Lazarus" wrote: > Hi, > > I updated my IDE, revision 54011, and now I can't save any file. > To reproduce this bug just: > 1. open IDE > 2. save project1 > 3. save unit1 > > If you try to compile, you'll see that unit1 is missing (not saved). > > Lazarus 1.7 r54011M FPC 3.0.1 i386-win32-win32/win64 > > > Someone could help? Sorry. My fault Fixed. Mattias From md at delfire.net Fri Jan 27 17:47:02 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Fri, 27 Jan 2017 14:47:02 -0200 Subject: [Lazarus] I can't save any file using IDE (Windows) In-Reply-To: <20170127165613.7ce30aff@limapholos.matflo.wg> References: <20170127165613.7ce30aff@limapholos.matflo.wg> Message-ID: On Fri, Jan 27, 2017 at 1:56 PM, Mattias Gaertner via Lazarus < lazarus at lists.lazarus-ide.org> wrote: >> >> Someone could help? > > Sorry. My fault Fixed. Was fast, thank you! But now I have a strange error. Please, see the image below. I didn't change my compiler or paths and I can garantee that my fpc.cfg exists in the same directory that fpc.exe. [image: Inline image 1] Marcos Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23596 bytes Desc: not available URL: From md at delfire.net Fri Jan 27 19:08:48 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Fri, 27 Jan 2017 16:08:48 -0200 Subject: [Lazarus] I can't save any file using IDE (Windows) In-Reply-To: References: <20170127165613.7ce30aff@limapholos.matflo.wg> Message-ID: On Fri, Jan 27, 2017 at 2:47 PM, Marcos Douglas B. Santos wrote: > > > But now I have a strange error. Please, see the image below. > I didn't change my compiler or paths and I can garantee that my fpc.cfg exists in the same directory that fpc.exe. I reseted my environmentoptions.xml and now it works. Marcos Douglas From md at delfire.net Fri Jan 27 20:19:39 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Fri, 27 Jan 2017 17:19:39 -0200 Subject: [Lazarus] Saving namespace files on WinXP Message-ID: I don't know if Lazarus won't support WinXP in the near future, but I would like to notify a bug: If you try to save a file that has a "namespace" like "foo.bar.unit1.pas" the IDE won't put the file extension. Is this a known bug? Marcos Douglas From nc-gaertnma at netcologne.de Fri Jan 27 21:44:31 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 27 Jan 2017 21:44:31 +0100 Subject: [Lazarus] Saving namespace files on WinXP In-Reply-To: References: Message-ID: <20170127214431.6454b742@limapholos.matflo.wg> On Fri, 27 Jan 2017 17:19:39 -0200 "Marcos Douglas B. Santos via Lazarus" wrote: > I don't know if Lazarus won't support WinXP in the near future, but I > would like to notify a bug: > If you try to save a file that has a "namespace" like > "foo.bar.unit1.pas" the IDE won't put the file extension. What do you mean with "put the file extension"? Mattias From bartjunk64 at gmail.com Fri Jan 27 23:42:22 2017 From: bartjunk64 at gmail.com (Bart) Date: Fri, 27 Jan 2017 23:42:22 +0100 Subject: [Lazarus] Saving namespace files on WinXP In-Reply-To: References: Message-ID: On 1/27/17, Marcos Douglas B. Santos via Lazarus wrote: > If you try to save a file that has a "namespace" like > "foo.bar.unit1.pas" the IDE won't put the file extension. > > Is this a known bug? IIRC there is a difference between XP and newer Windows wrt to handling of default extension in savedialog. Bart From bartjunk64 at gmail.com Sat Jan 28 00:02:22 2017 From: bartjunk64 at gmail.com (Bart) Date: Sat, 28 Jan 2017 00:02:22 +0100 Subject: [Lazarus] Saving namespace files on WinXP In-Reply-To: References: Message-ID: On 1/27/17, Bart wrote: > IIRC there is a difference between XP and newer Windows wrt to > handling of default extension in savedialog. On Win7 in File Save As dialog: type foo -> filename = foo.pas (or foo.pp) type foo.bar -> filename = foo.bar.pas type foo.doc -> filename = foo.doc type foo.txt -> filename = foo.txt It seems like Windows checks if the extension is a registered type, and if so does not apply the default extension. If I run a sample program with a TSaveDialog it's the same. If I run this in XP-compatibility mode the behaviour is different: if the filename has an extension then then default extension is never applied, so: foo -> foo.pas foo.bar -> foo.bar foo.doc -> foo.doc Bart From md at delfire.net Sat Jan 28 13:40:02 2017 From: md at delfire.net (Marcos Douglas B. Santos) Date: Sat, 28 Jan 2017 10:40:02 -0200 Subject: [Lazarus] Saving namespace files on WinXP In-Reply-To: <20170127214431.6454b742@limapholos.matflo.wg> References: <20170127214431.6454b742@limapholos.matflo.wg> Message-ID: On Fri, Jan 27, 2017 at 6:44 PM, Mattias Gaertner via Lazarus wrote: >> I don't know if Lazarus won't support WinXP in the near future, but I >> would like to notify a bug: >> If you try to save a file that has a "namespace" like >> "foo.bar.unit1.pas" the IDE won't put the file extension. > > What do you mean with "put the file extension"? Sorry. I meant the file is saved without the ".pas" extension. Marcos Douglas From fjf.vanleeuwen at quicknet.nl Sat Jan 28 20:55:23 2017 From: fjf.vanleeuwen at quicknet.nl (frans) Date: Sat, 28 Jan 2017 20:55:23 +0100 Subject: [Lazarus] TIniPropStorage on Datamodule doesn't read and write ini file Message-ID: Hi. I'm using Lazarus 1.6.2 with FPC 3.0.0. I use TIniPropStorage on a Form module and reading the value from and writing the value to the ini file works fine. Now I've tried to place the TIniPropStorage component on a Datamodule. The component itself works, it shows me the default value. But reading and writing the ini file is not happening, there is no file. But there are also no errors. Is this a bug? Am I forgetting something? -- mvg Frans van Leeuwen M 06-51695390 From noreply at z505.com Sun Jan 29 09:45:08 2017 From: noreply at z505.com (Lars) Date: Sun, 29 Jan 2017 01:45:08 -0700 Subject: [Lazarus] Saving namespace files on WinXP In-Reply-To: References: Message-ID: <3181f601cca48c61969f158d484c640f.squirrel@gator3286.hostgator.com> > On 1/27/17, Marcos Douglas B. Santos via Lazarus > wrote: > > > If you try to save a file that has a "namespace" like > "foo.bar.unit1.pas" the IDE won't put the file extension. > > > Is this a known bug? > But why save an fpc unit with dots in it, does this file syntax even get accepted as a unit? Delphi has this: https://sergworks.wordpress.com/2011/08/09/dotted-unit-names-in-delphi/ So it would conflict/confuse with that feature? Can you even compile an fpc unit that has dots in it? Did fpc ever implement the delphi dotted namespace system? (sorry, I tend to avoid new features and stick with the old, so I have no clue) From noreply at z505.com Sun Jan 29 09:48:09 2017 From: noreply at z505.com (Lars) Date: Sun, 29 Jan 2017 01:48:09 -0700 Subject: [Lazarus] Saving namespace files on WinXP In-Reply-To: <3181f601cca48c61969f158d484c640f.squirrel@gator3286.hostgator.com> References: <3181f601cca48c61969f158d484c640f.squirrel@gator3286.hostgator.com> Message-ID: I previously wrote: > > ...fpc unit with dots in it, does this file syntax even get > accepted as a unit? > > Delphi has this: > https://sergworks.wordpress.com/2011/08/09/dotted-unit-names-in-delphi/ Answer here: http://wiki.freepascal.org/FPC_New_Features_3.0#Delphi-like_namespaces_units From michael at freepascal.org Sun Jan 29 11:57:34 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 29 Jan 2017 11:57:34 +0100 (CET) Subject: [Lazarus] TIniPropStorage on Datamodule doesn't read and write ini file In-Reply-To: References: Message-ID: On Sat, 28 Jan 2017, frans via Lazarus wrote: > Hi. > > I'm using Lazarus 1.6.2 with FPC 3.0.0. I use TIniPropStorage on a Form > module and reading the value from and writing the value to the ini file > works fine. Now I've tried to place the TIniPropStorage component on a > Datamodule. The component itself works, it shows me the default value. > But reading and writing the ini file is not happening, there is no file. > But there are also no errors. > Is this a bug? Am I forgetting something? Using TIniPropStorage on a datamodule is not supported out of the box. You can use it, but you'll have to call the necessary methods for saving and restoring the state yourself. Michael. From noreply at z505.com Mon Jan 30 05:39:06 2017 From: noreply at z505.com (Lars) Date: Sun, 29 Jan 2017 21:39:06 -0700 Subject: [Lazarus] SVG Editor or Viewer Message-ID: <4dfed1c3c2745e6bf465f44baa1c870f.squirrel@gator3286.hostgator.com> Does anyone know of any Lazarus projects or code that views SVG files... I remember there was some graphics editing program written in lazarus (multiple images not just svg format) and I think it was closed source. Or any delphi svg editors (that could potentially be converted to lazarus)? Or mseide (unlikely, and that would be off topic) Thanks From sandro.cumerlato at gmail.com Mon Jan 30 07:37:19 2017 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Mon, 30 Jan 2017 07:37:19 +0100 Subject: [Lazarus] SVG Editor or Viewer In-Reply-To: <4dfed1c3c2745e6bf465f44baa1c870f.squirrel@gator3286.hostgator.com> References: <4dfed1c3c2745e6bf465f44baa1c870f.squirrel@gator3286.hostgator.com> Message-ID: Hello Lars, I think you are talking about LazPaint: https://github.com/bgrabitmap Pure Lazarus/FPC code FPVectorial (under development) can read/write SVG files. If you only need a viewer and can rely on external libraries then take a look at Cairo+LibRsvg: https://github.com/DJMaster/cairo-fpc https://github.com/DJMaster/librsvg-fpc Best regards, Sandro Cumerlato On 30 Jan 2017 05:39, "Lars via Lazarus" wrote: > Does anyone know of any Lazarus projects or code that views SVG files... > > I remember there was some graphics editing program written in lazarus > (multiple images not just svg format) and I think it was closed source. > > Or any delphi svg editors (that could potentially be converted to lazarus)? > > Or mseide (unlikely, and that would be off topic) > > Thanks > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at z505.com Mon Jan 30 09:21:54 2017 From: noreply at z505.com (Lars) Date: Mon, 30 Jan 2017 01:21:54 -0700 Subject: [Lazarus] SVG Editor or Viewer In-Reply-To: References: <4dfed1c3c2745e6bf465f44baa1c870f.squirrel@gator3286.hostgator.com> Message-ID: <1c8e4e459e35ca5d494475e5c51a1040.squirrel@gator3286.hostgator.com> On Sun, January 29, 2017 11:37 pm, Sandro Cumerlato wrote: > Hello Lars, > I think you are talking about LazPaint: https://github.com/bgrabitmap > > This is a great program, loads up super fast. Just what I needed. I did try this before AFAIR but forgot. But it won't open SVG images... yet Google says it can deal with SVG related tasks... So I don't get it. It has some support for svg related, but won't open svg files itself? From adrian at vtim.de Mon Jan 30 09:28:04 2017 From: adrian at vtim.de (Adrian Veith) Date: Mon, 30 Jan 2017 09:28:04 +0100 Subject: [Lazarus] SVG Editor or Viewer In-Reply-To: <4dfed1c3c2745e6bf465f44baa1c870f.squirrel@gator3286.hostgator.com> References: <4dfed1c3c2745e6bf465f44baa1c870f.squirrel@gator3286.hostgator.com> Message-ID: <32c4a12b-d646-2193-0758-6c5e18fe5199@vtim.de> Hi, there is the Anti Grain Geometry for Pascal - in the examples there is a smal svgtest - maybe this helps. https://github.com/CWBudde/AggPasMod Adrian. Am 30.01.2017 um 05:39 schrieb Lars via Lazarus: > Does anyone know of any Lazarus projects or code that views SVG files... > > I remember there was some graphics editing program written in lazarus > (multiple images not just svg format) and I think it was closed source. > > Or any delphi svg editors (that could potentially be converted to lazarus)? > > Or mseide (unlikely, and that would be off topic) > > Thanks From mailinglists at geldenhuys.co.uk Mon Jan 30 09:44:08 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 30 Jan 2017 08:44:08 +0000 Subject: [Lazarus] SVG Editor or Viewer In-Reply-To: <4dfed1c3c2745e6bf465f44baa1c870f.squirrel@gator3286.hostgator.com> References: <4dfed1c3c2745e6bf465f44baa1c870f.squirrel@gator3286.hostgator.com> Message-ID: On 2017-01-30 04:39, Lars via Lazarus wrote: > Does anyone know of any Lazarus projects or code that views SVG files... As Adrian mentioned, AggPas (native Pascal port of Anti-Grain Geometry) supports SVG and an example is included. fpGUI's repository includes the most up to date (features and bug fixes) implementation of AggPas (that I know of). Lazarus also includes a copy, but it is older that the fpGUI one. And as Adrian mentioned, there is a heavily refactored one called AggPasMod, but I have no idea in what state it is or what bug fixes it had applied to it. AggPas included with fpGUI gets used daily, so I know it works. 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 Mon Jan 30 12:09:19 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 30 Jan 2017 11:09:19 +0000 Subject: [Lazarus] Feature Request: more intelligent code completion Message-ID: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> Hi, I've using the Eclipse IDE for a while now, and the developer is really spoilt with intelligent code/class completion. I'm wondering if Lazarus IDE could benefit of some of those features too. For example - improved (more intelligent) code completion. I have this code: ====================================== procedure TBuildDelphiProjects.DoRun; var lProjDirName: string; lDefFile: string; // global defaults INI file lFullProjFile: string; begin CaseSensitiveOptions:=True; if HasOption('h','help') then WriteHelp(0) else if not HasOption('p','project') then WriteHelp(1) else begin FVerbose := HasOption('V','verbose'); BuildProject.Verbose := FVerbose; // <-- I just typed this. ====================================== Now the BuildProject class doesn't have a Verbose property. The TBuildDelphiProjects class does have a FVerbose field of type boolean. So the data type of FVerbose is known, so to deduce what the missing property "Verbose"'s data type should be is known (or should be known). Now if I press Ctrl+Shift+C to code/class complete, Lazarus generates the following, which has no relevance to what I typed! It doesn't even solve the compiler error problem. =================================== procedure TBuildDelphiProjects.DoRun; var lProjDirName: string; lDefFile: string; // global defaults INI file lFullProjFile: string; Verbose: Boolean; // <---- Lazarus inserted this??? begin CaseSensitiveOptions:=True; if HasOption('h','help') then WriteHelp(0) else if not HasOption('p','project') then WriteHelp(1) else begin FVerbose := HasOption('V','verbose'); BuildProject.Verbose := FVerbose; =================================== It would have been a lot more logical, and to actually generate compilable code, if Lazarus prompted me (user configurable) to say that it wants to implement the missing property "Verbose" for the object BuildProject (of type TBuildProject). The property simply needs to ask what visibility do I want the Verbose property... Public of Published (as TBuildProject is defined in another unit)? Lazarus (v1.3 and v1.7) generated the same code as show above, and neither is compilable afterwards! So I don't know what Lazarus was trying to achieve by introducing that local Verbose: boolean variable. This is the compiler output I get when I try to compile my project before and after the code/class completion was triggered. builddelphiprojects.lpr(79,18) Error: identifier idents no member "Verbose" After using Eclipse for some time now, such shortcuts for the developer is a massive time saver. It also works fantastically well if you do Test Driven Development. I'm sure Lazarus IDE could benefit from such code completion improvements too. I can file this as a feature request on Mantis if need be. 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 mschnell at lumino.de Mon Jan 30 12:11:23 2017 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 30 Jan 2017 12:11:23 +0100 Subject: [Lazarus] Running an app on boot In-Reply-To: <000101d276f7$72b35240$5819f6c0$@proengineered.com> References: <000101d276f7$72b35240$5819f6c0$@proengineered.com> Message-ID: On 25.01.2017 11:40, Ed Murashie via Lazarus wrote: > No matter what I try I get “ Gtk-WARNING **: cannot open display: “. > This also happen on a Beaglebone > > What am I doing wrong and how can I fix it? > Do you *want* a GUI ? -Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Mon Jan 30 12:37:16 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 30 Jan 2017 12:37:16 +0100 (CET) Subject: [Lazarus] Feature Request: more intelligent code completion In-Reply-To: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> References: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> Message-ID: On Mon, 30 Jan 2017, Graeme Geldenhuys via Lazarus wrote: > Hi, > > I've using the Eclipse IDE for a while now, and the developer is really > spoilt with intelligent code/class completion. I'm wondering if Lazarus > IDE could benefit of some of those features too. > > For example - improved (more intelligent) code completion. > > I have this code: > > ====================================== > procedure TBuildDelphiProjects.DoRun; > var > lProjDirName: string; > lDefFile: string; // global defaults INI file > lFullProjFile: string; > begin > CaseSensitiveOptions:=True; > > if HasOption('h','help') then > WriteHelp(0) > else if not HasOption('p','project') then > WriteHelp(1) > else > begin > FVerbose := HasOption('V','verbose'); > BuildProject.Verbose := FVerbose; // <-- I just typed this. > ====================================== > > > Now the BuildProject class doesn't have a Verbose property. The > TBuildDelphiProjects class does have a FVerbose field of type boolean. > So the data type of FVerbose is known, so to deduce what the missing > property "Verbose"'s data type should be is known (or should be known). I'm not sure that I want the IDE to modify another class than the one I am working in at the moment, when I press "code completion" ? Michael. From michael at freepascal.org Mon Jan 30 12:37:16 2017 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 30 Jan 2017 12:37:16 +0100 (CET) Subject: [Lazarus] Feature Request: more intelligent code completion In-Reply-To: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> References: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> Message-ID: On Mon, 30 Jan 2017, Graeme Geldenhuys via Lazarus wrote: > Hi, > > I've using the Eclipse IDE for a while now, and the developer is really > spoilt with intelligent code/class completion. I'm wondering if Lazarus > IDE could benefit of some of those features too. > > For example - improved (more intelligent) code completion. > > I have this code: > > ====================================== > procedure TBuildDelphiProjects.DoRun; > var > lProjDirName: string; > lDefFile: string; // global defaults INI file > lFullProjFile: string; > begin > CaseSensitiveOptions:=True; > > if HasOption('h','help') then > WriteHelp(0) > else if not HasOption('p','project') then > WriteHelp(1) > else > begin > FVerbose := HasOption('V','verbose'); > BuildProject.Verbose := FVerbose; // <-- I just typed this. > ====================================== > > > Now the BuildProject class doesn't have a Verbose property. The > TBuildDelphiProjects class does have a FVerbose field of type boolean. > So the data type of FVerbose is known, so to deduce what the missing > property "Verbose"'s data type should be is known (or should be known). I'm not sure that I want the IDE to modify another class than the one I am working in at the moment, when I press "code completion" ? Michael. From nc-gaertnma at netcologne.de Mon Jan 30 12:47:52 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 30 Jan 2017 12:47:52 +0100 Subject: [Lazarus] Feature Request: more intelligent code completion In-Reply-To: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> References: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> Message-ID: <20170130124752.39b13a46@limapholos.matflo.wg> On Mon, 30 Jan 2017 11:09:19 +0000 Graeme Geldenhuys via Lazarus wrote: >[...] > Now the BuildProject class doesn't have a Verbose property. The > TBuildDelphiProjects class does have a FVerbose field of type boolean. > So the data type of FVerbose is known, so to deduce what the missing > property "Verbose"'s data type should be is known (or should be known). It did correctly deduce the datatype Boolean, did it not? The only missing thing is to place it at the right place, somewhere in TBuildDelphiProjects or its ancestors. Since this is not yet implemented you have to do that manually. >[...] > It would have been a lot more logical, and to actually generate > compilable code, if Lazarus prompted me (user configurable) to say that > it wants to implement the missing property "Verbose" for the object > BuildProject (of type TBuildProject). There are currently two code completions: the interactive Ctrl+Shift+X and the non interactive Ctrl+Shift+C. In this case you almost always wants the interactive version. And this dialog needs to be extended with options for what to create (in which class, a var or a property, what kind of property). >[...] > Lazarus (v1.3 and v1.7) generated the same code as show above, and > neither is compilable afterwards! So I don't know what Lazarus was > trying to achieve by introducing that local Verbose: boolean variable. It is a half implemented feature. >[...] > I can file this as a feature request on Mantis if need be. Yes, please. Mattias From nc-gaertnma at netcologne.de Mon Jan 30 12:48:48 2017 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 30 Jan 2017 12:48:48 +0100 Subject: [Lazarus] Feature Request: more intelligent code completion In-Reply-To: References: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> Message-ID: <20170130124848.72b590a1@limapholos.matflo.wg> On Mon, 30 Jan 2017 12:37:16 +0100 (CET) Michael Van Canneyt via Lazarus wrote: >[...] > > Now the BuildProject class doesn't have a Verbose property. The > > TBuildDelphiProjects class does have a FVerbose field of type boolean. > > So the data type of FVerbose is known, so to deduce what the missing > > property "Verbose"'s data type should be is known (or should be known). > > I'm not sure that I want the IDE to modify another class than the one I am > working in at the moment, when I press "code completion" ? +1 Only the interactive code completion should do that. Mattias From mailinglists at geldenhuys.co.uk Mon Jan 30 12:57:13 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 30 Jan 2017 11:57:13 +0000 Subject: [Lazarus] Feature Request: more intelligent code completion In-Reply-To: References: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> Message-ID: <3316c608-39a9-671c-7fb7-057befb046ab@geldenhuys.co.uk> On 2017-01-30 11:37, Michael Van Canneyt wrote: > I'm not sure that I want the IDE to modify another class than the one I am > working in at the moment, when I press "code completion" ? Well, then maybe introduce another action - an intermediate step that the developer must confirm. Again, Eclipse does this very nicely. It gives a error icon in the gutter (the icon can change to a hint icon for other functionality like possible refactoring suggestions etc). If you click the icon, it presents a list of actions (a keyboard shortcut will show that list as well, so you are not forced to use the mouse). Then simply pick the "Create property in class XYZ..." option. Eclipse goes even further and shows you another window next to the popup window of how the generated code snippet will look like - but this is obviously not needed for Lazarus IDE. I know Eclipse has a massive developer team (compared to Lazarus), and Lazarus can't compete with the amount of features Eclipse has. But allowing Lazarus to generate code that is not even compilable is not acceptable - its a big let down. And as I mentioned, this feature is a massive advantage in Test Driven Development, where you often write the API (method) calls first, then implement them afterwards to resolve the compilation error. 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 Mon Jan 30 13:08:59 2017 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 30 Jan 2017 12:08:59 +0000 Subject: [Lazarus] Feature Request: more intelligent code completion In-Reply-To: <20170130124752.39b13a46@limapholos.matflo.wg> References: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> <20170130124752.39b13a46@limapholos.matflo.wg> Message-ID: On 2017-01-30 11:47, Mattias Gaertner via Lazarus wrote: > > It did correctly deduce the datatype Boolean, did it not? Yes it did. > The only missing thing is to place it at the right place, Indeed. The code I wrote was "BuildProject.Verbose := ...", so it should query the data type of the BuildProject object, and make the class completion suggestion for that class. > There are currently two code completions: the interactive Ctrl+Shift+X > and the non interactive Ctrl+Shift+C. > In this case you almost always wants the interactive version. Ah, so we learn something new. I didn't know about the interactive one. I also see Lazarus v1.3 didn't have that functionality - I guess I need to update that development VM with a newer Lazarus. > And this dialog needs to be extended with options for what to create > (in which class, a var or a property, what kind of property). Yes. I just tried the interactive code completion now - just to see what it does. It created a public variable bit in the wrong class. It didn't use the BuildProject object, but rather the class I was in. So in this case the generated code also didn't make any sense of leave code that is actually compilable. > It is a half implemented feature. Indeed, it seems the functionality is almost there. >> I can file this as a feature request on Mantis if need be. > > Yes, please. Reported as.... http://mantis.freepascal.org/view.php?id=31299 Thanks Mattias. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From lazarus at kluug.net Mon Jan 30 18:05:52 2017 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 30 Jan 2017 18:05:52 +0100 Subject: [Lazarus] Feature Request: more intelligent code completion In-Reply-To: References: <2b8bdd8d-92fd-eec4-91d3-2b33fd32ad24@geldenhuys.co.uk> <20170130124752.39b13a46@limapholos.matflo.wg> Message-ID: Ctrl+Shift+X is a new feature for upcoming 1.8: http://wiki.freepascal.org/Lazarus_1.8.0_release_notes It cannot create properties - neither in the current class nor in a different class. It's a rather easy feature to add because CodeTools already have everything that is needed for it. The "most complex" thing is the dialog - the user needs to choose Getters/Setters and maybe also the ancestor class where to put the property. A handy feature indeed. Ondrej