From aaa5500 at ya.ru Sat Sep 1 12:49:41 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 1 Sep 2018 13:49:41 +0300 Subject: [Lazarus] IDE icon "defaults", old icon "browse" Message-ID: <89f93600-0b21-38ce-6fba-2833804a3244@ya.ru> new icon "defaults", pls use it also in: - Obj Inspector - 2 "use default...." buttons - Messages window - "lazarus default" button For the icon "browse" we can use it in many Options items: I filtered by "..." and found many buttons. E.g. "FPDoc" page has such icon on a button. -- Regards, Alexey From juha.manninen62 at gmail.com Sat Sep 1 22:46:31 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 1 Sep 2018 23:46:31 +0300 Subject: [Lazarus] IDE icon "defaults", old icon "browse" In-Reply-To: <89f93600-0b21-38ce-6fba-2833804a3244@ya.ru> References: <89f93600-0b21-38ce-6fba-2833804a3244@ya.ru> Message-ID: On Sat, Sep 1, 2018 at 1:49 PM AlexeyT via Lazarus wrote: > new icon "defaults", pls use it also in: > - Obj Inspector - 2 "use default...." buttons > - Messages window - "lazarus default" button Done in r58812 Juha From aaa5500 at ya.ru Sat Sep 1 23:01:13 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sun, 2 Sep 2018 00:01:13 +0300 Subject: [Lazarus] IDE icon "defaults", old icon "browse" In-Reply-To: References: <89f93600-0b21-38ce-6fba-2833804a3244@ya.ru> Message-ID: Now fpc 3.0.4 shows ide compile err. "Operator + is not overloaded for const string".   lisTheFileIsNotALazarusProjectCreateANewProjectForThi =     +'The file "%s" is not a Lazarus project.'     +'%sCreate a new project for this "%s"?'; From juha.manninen62 at gmail.com Sat Sep 1 23:23:16 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 2 Sep 2018 00:23:16 +0300 Subject: [Lazarus] IDE icon "defaults", old icon "browse" In-Reply-To: References: <89f93600-0b21-38ce-6fba-2833804a3244@ya.ru> Message-ID: On Sun, Sep 2, 2018 at 12:05 AM AlexeyT via Lazarus wrote: > Now fpc 3.0.4 shows ide compile err. Yes sorry. Fixed in r58814. Juha From aaa5500 at ya.ru Sat Sep 1 23:29:31 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sun, 2 Sep 2018 00:29:31 +0300 Subject: [Lazarus] IDE options - unneeded button Message-ID: <6c97dbee-baf6-d1e6-6c38-a4de7f8091e5@ya.ru> Editor- Display- Options- button "use syntax highlight" on the left top corner. IMO not needed at all, just use hilite always. -- Regards, Alexey From aaa5500 at ya.ru Sat Sep 1 23:34:56 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sun, 2 Sep 2018 00:34:56 +0300 Subject: [Lazarus] IDE options - Colors need new layout Message-ID: Editor- Display- Colors. with Synedit area. why bad? bottom part with 4 checkbuttons is nasty. how to redo? a) split "Priorities" controls (4 big listboxes with SpinEdits) to new sub-tab, under Colors. b) split "Colors" part too? not sure. I don't see logic in this page. c) replace 1st two checkbuttons to 2 radio buttons. (use global settings/ use local settings). -- Regards, Alexey From lazarus at mfriebe.de Sun Sep 2 01:43:59 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 2 Sep 2018 01:43:59 +0200 Subject: [Lazarus] IDE options - Colors need new layout In-Reply-To: References: Message-ID: <27317e98-8270-abd9-0acd-2d03e0fcc376@mfriebe.de> On 01/09/2018 23:34, AlexeyT via Lazarus wrote: > Editor- Display- Colors. with Synedit area. Not that easily done.... > > why bad? bottom part with 4 checkbuttons is nasty. > > how to redo? > > a) split "Priorities" controls (4 big listboxes with SpinEdits) to new > sub-tab, under Colors. The point is that if you change priorities, this usually happens together with changing colors. E.g, if I set something to a higher prior and enable alpha (so lower prior can still be seen), then I would want to do that in one move. Also If I set a color, that was previously unset (eg add a frame color to "current line", then I need to set the prior at that time (in fact enabling the color will add it into the prior list). If this goes into a separate tab, then this becomes much more work. Currently selections in the prior boxes are synced with selection in the tree, which helps, that would be lost if it went to 2 tabs. Also in a separate tab, you would still want the preview edit for priorities too. You might save the element tree, though it may be helpful to have it for priorities too. Then the separate page's only diff is the absence of 2 toolbuttons. (priorities also exist in local and global) > > b) split "Colors" part too? not sure. I don't see logic in this page. Not sure what you mean. But yes, the help needs updating http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options_HighlightColors and F1 should get you to this page, instead of the general opitons. > > c) replace 1st two checkbuttons to 2 radio buttons. (use global > settings/ use local settings). > I am not sure, that might take more space. (vertical). And anyway, this may work for the "use" part, but to me seems odd to the "edit" part. Eg choosing "global" means the color for an element will be taken from the global default. But you also changed will edit the global default (affecting colors for all languages that can be highlighted). The other option here would be, that if (maybe with radio btn) you choose global, then you can not directly edit the colors (because on the very top, you selected pascal, but if you use global instead of pascal, then you need to select global at the very top, instead of pascal) But this less convenient. (even though it makes it clearer what colors you are editing) Another options would be real tabs (needing 2 pairs of them). Again that takes a lot more space, and other elements (preview / tree) need to shrink. From marcov at stack.nl Sun Sep 2 18:58:21 2018 From: marcov at stack.nl (Marco van de Voort) Date: Sun, 2 Sep 2018 18:58:21 +0200 Subject: [Lazarus] Building help files: the nitty-gritty In-Reply-To: References: <20180818163115.GA78798@stack.nl> <20180818171017.GA87912@stack.nl> Message-ID: <20180902165821.GA51959@stack.nl> On Thu, Aug 30, 2018 at 08:38:13PM +0200, Kostas Michalopoulos via Lazarus wrote: > FWIW your post made me realize i have a few uncommitted changes (including > a very important one - outlines > https://coinsh.red/p/2018-08-30_20_27_48-Help_-_Welcome.png) for LazHelp > :-P. I'm not working on it much though, it is mainly on life support with > the rare addition of new stuff (mainly needed because i made it a target > for a document preparation system i work on and needed some features from > it). I only work on the non visual (CHM reader/writer) parts. Recently there were some new bugreports from people that use chmcmd with Sphinx (a tool like fpdoc for .NET). From michael at freepascal.org Sun Sep 2 19:28:33 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 2 Sep 2018 19:28:33 +0200 (CEST) Subject: [Lazarus] Building help files: the nitty-gritty In-Reply-To: <20180902165821.GA51959@stack.nl> References: <20180818163115.GA78798@stack.nl> <20180818171017.GA87912@stack.nl> <20180902165821.GA51959@stack.nl> Message-ID: On Sun, 2 Sep 2018, Marco van de Voort via Lazarus wrote: > On Thu, Aug 30, 2018 at 08:38:13PM +0200, Kostas Michalopoulos via Lazarus wrote: >> FWIW your post made me realize i have a few uncommitted changes (including >> a very important one - outlines >> https://coinsh.red/p/2018-08-30_20_27_48-Help_-_Welcome.png) for LazHelp >> :-P. I'm not working on it much though, it is mainly on life support with >> the rare addition of new stuff (mainly needed because i made it a target >> for a document preparation system i work on and needed some features from >> it). > > I only work on the non visual (CHM reader/writer) parts. > > Recently there were some new bugreports from people that use chmcmd with > Sphinx (a tool like fpdoc for .NET). Sphinx is Python, not .NET. I tried for 2 days to get read-the-docs (a web front-end for sphinx) to work. Never again ! The python dependencies are a complete disaster. Almost as bad as npm... Michael. From sysrpl at gmail.com Tue Sep 4 21:12:02 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 4 Sep 2018 15:12:02 -0400 Subject: [Lazarus] Fun little project to inspire you guys Message-ID: I had a party this past weekend and put together some hardware and software to impress the guests. I thought you guys might find it interesting so I'm posting on the lazarus mailing lists. Here is the application: http://pixels.splashdown.space Here is a video showcasing the real life effects. https://www.youtube.com/watch?v=ywTkITAGnGE The application in the first link is a live controller of the lights in my house. Live as in anything you do in it changes the lighting in my house right now. Any changes you make I can see here. The web application, served by my pi, also returns the neopixels live data being processed so you can see the effects on your end. I will be posting a guide plus all the source code soon. I need time to put it together. Also, I might hook up a web can so you guys can also see the real life lights change in my house as you edit or alter settings. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Sep 5 08:34:29 2018 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 5 Sep 2018 02:34:29 -0400 Subject: [Lazarus] Fun little project to inspire you guys In-Reply-To: References: Message-ID: Here is a FYI follow up. You can watch a live view of my lights here: https://www.twitch.tv/sysrpl Any changes you make at http://pixels.splashdown.space should be viewable on the twitch stream above. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Wed Sep 5 12:37:37 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Wed, 05 Sep 2018 12:37:37 +0200 Subject: [Lazarus] =?utf-8?q?Is_FPC-Pascal_list_down=3F?= Message-ID: <20180905123737.08700150@atlas.cz> Hi,   FPC-Pascal list is probably down. Last message in my box is "[fpc-pascal] with in classes/records" by Sven from yesterday 14:15. The two replies by Ryan Joseph + my new topic didn't appear in my box although they are listed in http://lists.freepascal.org/pipermail/fpc-pascal/2018-September/thread.html    Thanks, Vojtěch. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rudhaiku at gmail.com Wed Sep 5 20:38:10 2018 From: rudhaiku at gmail.com (Rudolf Cornelissen) Date: Wed, 5 Sep 2018 20:38:10 +0200 Subject: [Lazarus] MDI problem and fix for Windows with Qt4/Qt5 Message-ID: Hi all, This is my first post here, I hope my input is considered helpfull. Anyhow, I am busy converting a Delphi MDI application (which I develop as a daytime job) to Lazarus using Qt/Qt5. Compared to Win32 Widgeset indeed Qt has much more stuff in place. A problem I encountered is a mouse offset between mouseposition in the MDI child window 'onscreen' and the position as handled internally in LCL when a button in pressed. The effect is that for instance if I have a button onscreen, and I hover over it, the color correctly changes hinting me that I can press that button. When I do however, the button is not activated unless I hover my mouse 'titlebar height' above the button. There is a simple fix possible for this my modifying the file 'qtwidgets.pas' in both Qt and Qt5 LCL/interfaces folders. When I modify routine 'TQtMainWindow.OffsetMousePos' in the below way MDI works fully correctly concerning the mouse positions here (windows7 tested): procedure TQtMainWindow.OffsetMousePos(APoint: PQtPoint); var MyWidget : QWidgetH; MyStyle : QStyleH; MyTitleBarHeight : Integer; begin inherited OffsetMousePos(APoint); if IsMdiChild and not IsMaximized then begin //correct windowed Y-pos //dec(APoint^.Y, GetSystemMetrics(SM_CYCAPTION)); //windows only MyWidget := GetWidget; MyStyle := QWidget_style(MyWidget); MyTitleBarHeight := QStyle_pixelMetric(MyStyle ,QStylePM_TitleBarHeight, nil, MyWidget); dec(APoint^.Y, MyTitleBarHeight); //correct windowed X-pos dec(APoint^.X, (self.getFrameSize.Width - self.getClientBounds.Size.Width) div 2); end; end; Can someone validate I am not doing something stupid here and update the sources if not? That would save me some work manually modifying these routines over here.. Thanks for taking the time to look at this.. Kind regards, Rudolf. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko at holobit.net Thu Sep 6 08:28:50 2018 From: zeljko at holobit.net (zeljko) Date: Thu, 6 Sep 2018 08:28:50 +0200 Subject: [Lazarus] MDI problem and fix for Windows with Qt4/Qt5 In-Reply-To: References: Message-ID: <039a7071-b4b5-77e9-726d-67aa9c60e119@holobit.net> On 09/05/2018 08:38 PM, Rudolf Cornelissen via Lazarus wrote: > Hi all, > > This is my first post here, I hope my input is considered helpfull. > > Anyhow, I am busy converting a Delphi MDI application (which I develop > as a daytime job) to Lazarus using Qt/Qt5. > Compared to Win32 Widgeset indeed Qt has much more stuff in place. > > A problem I encountered is a mouse offset between mouseposition in the > MDI child window 'onscreen' and the position as handled internally in > LCL when a button in pressed. > > The effect is that for instance if I have a button onscreen, and I hover > over it, the color correctly changes hinting me that I can press that > button. When I do however, the button is not activated unless I hover my > mouse 'titlebar height' above the button. > > There is a simple fix possible for this my modifying the file > 'qtwidgets.pas' in both Qt and Qt5 LCL/interfaces folders. > > When I modify routine 'TQtMainWindow.OffsetMousePos' in the below way > MDI works fully correctly concerning the mouse positions here (windows7 > tested): > > > procedure TQtMainWindow.OffsetMousePos(APoint: PQtPoint); > var >   MyWidget         : QWidgetH; >   MyStyle          : QStyleH; >   MyTitleBarHeight : Integer; > begin >   inherited OffsetMousePos(APoint); > >   if IsMdiChild and not IsMaximized then >   begin >     //correct windowed Y-pos >     //dec(APoint^.Y, GetSystemMetrics(SM_CYCAPTION)); //windows only >     MyWidget := GetWidget; >     MyStyle  := QWidget_style(MyWidget); >     MyTitleBarHeight := QStyle_pixelMetric(MyStyle > ,QStylePM_TitleBarHeight, nil, MyWidget); >     dec(APoint^.Y, MyTitleBarHeight); > >     //correct windowed X-pos >     dec(APoint^.X, (self.getFrameSize.Width - > self.getClientBounds.Size.Width) div 2); >   end; > end; > > > Can someone validate I am not doing something stupid here and update the > sources if not? > That would save me some work manually modifying these routines over here.. > > Thanks for taking the time to look at this.. Please open an issue about it and attach example project. zeljko From bo.berglund at gmail.com Sun Sep 9 13:33:22 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 09 Sep 2018 13:33:22 +0200 Subject: [Lazarus] Usage of Serial in a testing program? Message-ID: I am writing a testing application for checking out a TCP to Serial bridge component. I am using Lazarus 1.8.0 and fpc 3.0.4 on Windows 7 For the serial port handling I found the "built-in" Serial unit described here: http://wiki.freepascal.org/Hardware_Access#FPC_built_in_Serial_unit Now I have a few questions about its usage: 1) Serial port name ------------------- When opening the port the example does this: str(ComPortNr,tmpstr); ComPortName:= 'COM'+tmpstr+':'; serialhandle := SerOpen(ComPortName); So for say port 29 this results in ComPortName 'COM29:' Is this always the case? I have a hunch that for port numbers 1..9 the Windows port naming is different than for higher port numbers... And if I want to port this to Linux, I guess thta the name is completely different, but no hint is given. 2) Blocking send? ------------------ Is this port blocking for sending? The example has this: status := SerWrite(serialhandle, s[1], writecount ); where s is a string holding the text to send (I will actually need to use a TBytes array instead) and writecount returns the bytes actually sent. If I want to send an array of say 100 kbytes at 9600 baud, will the call return only when the data have been completely sent or earlier? It will take about 100 seconds to send that array... 3) Receiving data ---------------- For data reception I see this: s:=''; ComIn:=''; while (Length(Comin)<10) and (status>=0) and not keypressed do begin status:= SerRead(serialhandle, s[1], 10); ... Since the call parameters are the receive buffer and the count to read I do not understand how this can work. s has been emptied (length = 0) just before the call so how can SerRead stuff any data into the buffer starting at s[1], which should not even exist??? I would like to have a way to read incoming data asynchronously so I also could handle the user feedback and the TCP connection which is sending the data that ultimately will arrive on the serial line... Any suggestions on how to do this? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Sep 9 16:26:29 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 09 Sep 2018 16:26:29 +0200 Subject: [Lazarus] Usage of Serial in a testing program? References: Message-ID: On Sun, 09 Sep 2018 13:33:22 +0200, Bo Berglund via Lazarus wrote: >3) Receiving data >---------------- I forgot to add a question about read timeouts... 4) Read timeout --------------- When running this to read incoming data: status:= SerRead(serialhandle, s[1], 10); How can I get out of the call if there never arrives 10 bytes? Is there a timeout somewhere so that I can set it to some small value and put the SerRead into a thread that can check arriving data and if found fire off an event or such? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Sep 9 17:58:35 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 09 Sep 2018 17:58:35 +0200 Subject: [Lazarus] Usage of Serial in a testing program? References: Message-ID: On Sun, 09 Sep 2018 16:26:29 +0200, Bo Berglund via Lazarus wrote: >On Sun, 09 Sep 2018 13:33:22 +0200, Bo Berglund via Lazarus > wrote: > >>3) Receiving data >>---------------- >I forgot to add a question about read timeouts... > >4) Read timeout >--------------- >When running this to read incoming data: > >status:= SerRead(serialhandle, s[1], 10); > >How can I get out of the call if there never arrives 10 bytes? Is >there a timeout somewhere so that I can set it to some small value and >put the SerRead into a thread that can check arriving data and if >found fire off an event or such? Ok, I went to the sources and found this: interface ... { Reads a maximum of "Count" bytes of data into the specified buffer. Result: Number of bytes read. } function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt): LongInt; implementation ... function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt): LongInt; var BytesRead: DWORD; Timeouts: TCommTimeouts; begin if GetCommTimeouts(Handle, Timeouts) then begin Timeouts.ReadIntervalTimeout := MAXDWORD; Timeouts.ReadTotalTimeoutConstant := 0; SetCommTimeouts(Handle, Timeouts) end; if not ReadFile(Handle, Buffer, Count, BytesRead, nil) then result := 0 else result := BytesRead end { SerRead } ; So SerRead seems to read *up to* Count bytes, but does it do this by checking what is currently stored in the operating system inbound buffer or does it try to wait until Count bytes are available? If so how is the timeout that is needed in such a case changed? Seems to be set at infinity in the SerRead function (MAXDWORD).... Or is it ReadTotalTimeoutConstant that is used during read? If you drill further down you will get into ReadFile, but that is a call into Windows API... -- Bo Berglund Developer in Sweden From markMLl.lazarus at telemetry.co.uk Sun Sep 9 22:44:34 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Sun, 9 Sep 2018 20:44:34 +0000 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: References: Message-ID: On 09/09/18 12:00, Bo Berglund via Lazarus wrote: > I am writing a testing application for checking out a TCP to Serialbridge component. I am using Lazarus 1.8.0 and fpc 3.0.4 on Windows 7 > For the serial port handling I found the "built-in" Serial unitdescribed here:http://wiki.freepascal.org/Hardware_Access#FPC_built_in_Serial_unit > Now I have a few questions about its usage: > 1) Serial port name-------------------When opening the port the example does this: > str(ComPortNr,tmpstr);ComPortName:= 'COM'+tmpstr+':';serialhandle := SerOpen(ComPortName); > So for say port 29 this results in ComPortName 'COM29:'Is this always the case? I have a hunch that for port numbers 1..9 theWindows port naming is different than for higher port numbers... > And if I want to port this to Linux, I guess thta the name iscompletely different, but no hint is given. I did quite lot of work on the serial.pp unit more recently than that wiki page, in fact I didn't even know it existed. Please refer to the comments in that file in the first instance. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From giuliano.colla at fastwebnet.it Mon Sep 10 13:20:35 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 10 Sep 2018 13:20:35 +0200 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: References: Message-ID: <3864d0c5-2b3e-ef9a-732d-f158041cae83@fastwebnet.it> An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Mon Sep 10 15:19:31 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 10 Sep 2018 15:19:31 +0200 Subject: [Lazarus] Usage of Serial in a testing program? References: Message-ID: <3arcpdt8oilqj78alcijfs8qbm356q23dh@4ax.com> On Sun, 9 Sep 2018 20:44:34 +0000, Mark Morgan Lloyd via Lazarus wrote: >I did quite lot of work on the serial.pp unit more recently than that >wiki page, in fact I didn't even know it existed. Please refer to the >comments in that file in the first instance. Thanks Mark, I did that too and there is stuff I don't find there, like: Read blocking? ---------------------- >From interface section: { Reads a maximum of "Count" bytes of data into the specified buffer. Result: Number of bytes read. } function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt): LongInt; Does this function read whatever is in the buffer when called up to a maximum of Count, or does it actually wait until Count bytes have arrived? If it waits, for how long? Concerning the com port name for SerOpen(): { Open the serial device with the given device name, for example: \COM1, \COM2 (strictly, \\.\COM1...) for normal serial ports. ISDN devices, serial port redirectors/virtualisers etc. normally implement names of this form, but refer to your OS documentation. Returns "0" if device could not be found } function SerOpen(const DeviceName: String): TSerialHandle; In the Wiki example they use COMx: where x is a number, but this is probably only working for single digit numbers 1..9. In any case the naming there is not described in serial.pp I need to huse a high numbered com port since all I have is USB2Serial dongles, which typically get you a port number like 29... -- Bo Berglund Developer in Sweden From pascaldragon at googlemail.com Mon Sep 10 17:09:07 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Mon, 10 Sep 2018 17:09:07 +0200 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: <3arcpdt8oilqj78alcijfs8qbm356q23dh@4ax.com> References: <3arcpdt8oilqj78alcijfs8qbm356q23dh@4ax.com> Message-ID: Bo Berglund via Lazarus schrieb am Mo., 10. Sep. 2018, 15:19: > Concerning the com port name for SerOpen(): > > { Open the serial device with the given device name, for example: > \COM1, \COM2 (strictly, \\.\COM1...) for normal serial ports. > ISDN devices, serial port redirectors/virtualisers etc. normally > implement names of this form, but refer to your OS documentation. > Returns "0" if device could not be found } > function SerOpen(const DeviceName: String): TSerialHandle; > > In the Wiki example they use COMx: where x is a number, but this is > probably only working for single digit numbers 1..9. > In any case the naming there is not described in serial.pp > > I need to huse a high numbered com port since all I have is USB2Serial > dongles, which typically get you a port number like 29... > Did you test it? Cause the serial unit only passes on the name to the platform's API. So \COM29 should work for a Com port with number 29. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From markMLl.lazarus at telemetry.co.uk Mon Sep 10 17:27:13 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Mon, 10 Sep 2018 15:27:13 +0000 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: <3arcpdt8oilqj78alcijfs8qbm356q23dh@4ax.com> References: <3arcpdt8oilqj78alcijfs8qbm356q23dh@4ax.com> Message-ID: On 10/09/18 13:30, Bo Berglund via Lazarus wrote: > On Sun, 9 Sep 2018 20:44:34 +0000, Mark Morgan Lloyd via Lazarus wrote: >> I did quite lot of work on the serial.pp unit more recently than that >wiki page, in fact I didn't even know it existed. Please refer to the >comments in that file in the first instance. > Thanks Mark,I did that too and there is stuff I don't find there, like: > Read blocking?----------------------From interface section: > { Reads a maximum of "Count" bytes of data into the specified buffer. Result: Number of bytes read. }function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt):LongInt; > Does this function read whatever is in the buffer when called up to amaximum of Count, or does it actually wait until Count bytes havearrived? If it waits, for how long? From further down: function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt): LongInt; begin Result := fpRead(Handle, Buffer, Count); end; where the documentation for fpread() says "FpdRead reads at most nbytes bytes from the file descriptor fd, and stores them in buf. "The function returns the number of bytes actually read" So this is a unix-style read that is prepared to read Count bytes, but returns the number actually available. If you want timeouts then see SerReadTimeout(). I'd expect the Windows variants to behave the same (I tested Linux, Solaris and I think W2K, so there's a risk that newer versions behave differently). /If/ you find anomalies, please raise a bug report with the caveat that I have rather a lot of problems on my plate right now. > Concerning the com port name for SerOpen(): > { Open the serial device with the given device name, for example: \COM1, \COM2 (strictly, \\.\COM1...) for normal serial ports. ISDN devices, serial port redirectors/virtualisers etc. normally implement names of this form, but refer to your OS documentation. Returns "0" if device could not be found }function SerOpen(const DeviceName: String): TSerialHandle; On Linux that is, again, a very thin wrapper around the RTL fpOpen() function, on Windows it's a wrapper around CreateFile(). I really can't say the extent that I tested that with odder devices and high port numbers (I think I took SerOpen() etc. pretty much as supplied by the original author), but from other serial libraries on Delphi my recollection is that that leading \\.\ is mandatory for higher-numbered ports... I /think/ I got up to 12 ports but that really was a very long time ago. Note that C/C++ examples relating to that sort of thing will usually refer to \\\\.\\ because of the special significance of \ in strings. > In the Wiki example they use COMx: where x is a number, but this isprobably only working for single digit numbers 1..9.In any case the naming there is not described in serial.pp > I need to huse a high numbered com port since all I have is USB2Serialdongles, which typically get you a port number like 29... I can't comment on Windows there but on Linux they typically get called something like /dev/USB0 etc., with a risk that the numeric suffix will increment if it's replugged. I've used that library fairly heavily on Linux for instrumentation type stuff, it works fairly well with USB devices except that their timing can get flaky if you're trying to get the exact time at which e.g. CTS changes state relative to a stream of characters faster than about 300 Baud. When I was working on it the major thing I did was reorganise some of the flush/drain/sync stuff which was generally felt to be in a mess, add a bit more in the way of control signal interfacing, and add SerReadTimeout()... note the provision for an idle callback. HTH. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From bo.berglund at gmail.com Mon Sep 10 17:30:23 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 10 Sep 2018 17:30:23 +0200 Subject: [Lazarus] Usage of Serial in a testing program? References: <3864d0c5-2b3e-ef9a-732d-f158041cae83@fastwebnet.it> Message-ID: On Mon, 10 Sep 2018 13:20:35 +0200, Giuliano Colla via Lazarus wrote: >Il 09/09/2018 13:33, Bo Berglund via Lazarus ha scritto:
>>I am writing a testing application for checking out a TCP to Serial >>bridge component. I am using Lazarus 1.8.0 and fpc 3.0.4 on Windows 7 >> >>For the serial port handling I found the "built-in" Serial unit >>described here: >>http://wiki.freepascal.org/Hardware_Access#FPC_built_in_Serial_unit >> >>Now I have a few questions about its usage: >> >>1) Serial port name >>------------------- >>When opening the port the example does this: >> >>str(ComPortNr,tmpstr); >>ComPortName:= 'COM'+tmpstr+':'; >>serialhandle := SerOpen(ComPortName); >> >>So for say port 29 this results in ComPortName 'COM29:' >>Is this always the case? I have a hunch that for port numbers 1..9 the >>Windows port naming is different than for higher port numbers... >> >>And if I want to port this to Linux, I guess that the name is >>completely different, but no hint is given. >Here is the procedure I'm using to fill up a combo box with the >names of the existing serial devices on the platform. Please note >the different naming conventions in Linux and Windows. Also note >that to report a serial port as existing a test is made to open it >(using the fpc serial function), and avoid "phantom" ports. But does not this listing fail if a port is already in use, i.e. the SerOpen() call will return 0 indicating it is not found? >procedure TForm1.btnScanPortClick(Sender: TObject); >var > PortNr: Integer; > PortName: String; > PortHandle: TSerialHandle; >begin > cbSelPort.Items.Clear; > cbSelPort.Text:= ''; >{$IFDEF MSWINDOWS} > for PortNr := 1 to 9 do begin > PortName := 'COM' + IntToStr(PortNr); > PortHandle := SerOpen('\\.\'+PortName); //<= Fail if already open? > if PortHandle > 0 then begin > cbSelPort.Items.Add(PortName); > SerClose(PortHandle); > if cbSelPort.Text = '' then begin > cbSelPort.Text:=PortName; > PortSel.Caption:= PortName; > end; > end; > end; >{$ELSE} > for PortNr := 0 to 9 do begin > PortName := '/dev/ttyS' + IntToStr(PortNr); > PortHandle := SerOpen(PortName); > if PortHandle > 0 then begin > if cbSelPort.Text = '' then begin > cbSelPort.Text:=PortName; > PortSel.Caption:= PortName; > end; > cbSelPort.Items.Add(PortName); > SerClose(PortHandle); > end; > end; > for PortNr := 0 to 9 do begin > PortName := '/dev/ttyUSB' + IntToStr(PortNr); > PortHandle := SerOpen(PortName); > if PortHandle > 0 then begin > if cbSelPort.Text = '' then begin > cbSelPort.Text:=PortName; > PortSel.Caption:= PortName; > end; > cbSelPort.Items.Add(PortName); > SerClose(PortHandle); > end; > end; >{$ENDIF} >end; This seems only to deal with ports 1..9, what about the higher numbered ports 10..255? And would it not be a long execution time for testing all 255 possible com ports on Windows? >>2) Blocking send? >>------------------ >>Is this port blocking for sending? >> >>The example has this: >> >>status := SerWrite(serialhandle, s[1], writecount ); >> >>where s is a string holding the text to send (I will actually need to >>use a TBytes array instead) and writecount returns the bytes actually >>sent. >> >>If I want to send an array of say 100 kbytes at 9600 baud, will the >>call return only when the data have been completely sent or earlier? >>It will take about 100 seconds to send that array... >Yes, SerWrite is blocking. Does this mean that it is actually waiting for the data to be physically sent out on the wire or until the operating system transmit buffer has absorbed all of the data? If the latter then a possibility to resize the transmit buffer would help. But how? >I hope you don't plan to send 100 kbytes >in a single write on a serial line. The probability of an error in >between is near to 100%!
>What I'm doing in such cases is to create a dedicated thread to >handle send and receive, without blocking the main thread, which >remains responsive, and split the send in many small blocks (and >getting some sort of ACK/NAK from remote receiver), which makes it >possible to show a progress bar or whatever visual feedback you >like. Unfortunately not possible in the real case because the file transfer protocol of the device only sends a header with the count of the data to follow and then streams all of the bytes.... >>3) Receiving data >>---------------- >>For data reception I see this: >> >>s:=''; >>ComIn:=''; >>while (Length(Comin)<10) and (status>=0) and not keypressed do >>begin >> status:= SerRead(serialhandle, s[1], 10); >> ... >> >>Since the call parameters are the receive buffer and the count to read >>I do not understand how this can work. s has been emptied (length = 0) >>just before the call so how can SerRead stuff any data into the buffer >>starting at s[1], which should not even exist??? >> >>I would like to have a way to read incoming data asynchronously so I >>also could handle the user feedback and the TCP connection which is >>sending the data that ultimately will arrive on the serial line... >> >>Any suggestions on how to do this? >I never use SerRead, but rather SerReadTimeout (from the same >unit) which gives a much better control of what is going on. Of >course in that case your receiving buffer must be large enough to >accommodate the largest block you expect. (This replies also to >your further questions). Did not see this before, but it seems like a good choice for reading data in a loop until the return is less than Count, which means that the timeout has caused the exit. Thanks for the suggestion! >I hope that it helps. Yes it does, but it would have been even better if not full of HTML tags and stuff. I have edited out most but I guess there are some still left... For example inside the code there may be some things like > rather than > -- Bo Berglund Developer in Sweden From giuliano.colla at fastwebnet.it Mon Sep 10 19:44:22 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 10 Sep 2018 19:44:22 +0200 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: References: <3864d0c5-2b3e-ef9a-732d-f158041cae83@fastwebnet.it> Message-ID: <84e783df-0126-05c7-a731-e2294f46fb4c@fastwebnet.it> Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: > This seems only to deal with ports 1..9, what about the higher > numbered ports 10..255? > And would it not be a long execution time for testing all 255 possible > com ports on Windows? In my experience both Linux and Windows if you connect a new serial device do set a port number just higher than the previous one already there. This means that you'll have to deal with higher numbers only if you have more than 9 serial lines in your platform, which is a bit unlikely. Not to consider the likelihood of a platform with 200 serial lines! -- Do not do to others as you would have them do to you.They might have different tastes. From giuliano.colla at fastwebnet.it Mon Sep 10 19:49:39 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 10 Sep 2018 19:49:39 +0200 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: References: <3864d0c5-2b3e-ef9a-732d-f158041cae83@fastwebnet.it> Message-ID: <8976879b-4827-cc55-1b51-a7fc840004da@fastwebnet.it> Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: > Unfortunately not possible in the real case because the file transfer > protocol of the device only sends a header with the count of the data > to follow and then streams all of the bytes.... I don't know how your application is built, but if the origin is an ftp transfer, then data are sent in small packets. It would appear that you somehow get the ftp data and send them to a serial line. It is at that point of the processs that you should create your records to send them individually via the serial line. -- Do not do to others as you would have them do to you.They might have different tastes. From giuliano.colla at fastwebnet.it Mon Sep 10 19:56:16 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Mon, 10 Sep 2018 19:56:16 +0200 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: References: <3864d0c5-2b3e-ef9a-732d-f158041cae83@fastwebnet.it> Message-ID: <692f294e-57b4-86cd-56d2-4533b79df5d2@fastwebnet.it> Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: >> I hope that it helps. > Yes it does, but it would have been even better if not full of HTML > tags and stuff. I have edited out most but I guess there are some > still left... > For example inside the code there may be some things like > rather > than > Sorry, I forced HTML for better readability. But you may easily extract the clean text (without > and such) by creating an empty html file (whatever.html), and opening it with LibreOffice or OpenOffice. Then you may copy and paste into it the text from the e-mail, and finally save it as a pure text fle (whatever.txt). It is much faster and safer than manual editing. Giuliano -- Do not do to others as you would have them do to you.They might have different tastes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Mon Sep 10 22:29:16 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 10 Sep 2018 22:29:16 +0200 Subject: [Lazarus] Usage of Serial in a testing program? References: <3864d0c5-2b3e-ef9a-732d-f158041cae83@fastwebnet.it> <84e783df-0126-05c7-a731-e2294f46fb4c@fastwebnet.it> Message-ID: <2okdpdtk82r34bb7k4m691877q54jc1bsk@4ax.com> On Mon, 10 Sep 2018 19:44:22 +0200, Giuliano Colla via Lazarus wrote: >Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: > >> This seems only to deal with ports 1..9, what about the higher >> numbered ports 10..255? >> And would it not be a long execution time for testing all 255 possible >> com ports on Windows? >In my experience both Linux and Windows if you connect a new serial >device do set a port number just higher than the previous one already there. On Windows7 at least every time you attach a serial2usb dongle into a different USB port than before it creates a new COM port with a higher number. And this port is sticky on the PC too, it remains "taken". So after a few years (my laptop is from 2011) it stacks up and even though I have currently only attached 6 such converters (one is a 4-way) the com port numbers are 29-30-31-32-33-34... >This means that you'll have to deal with higher numbers only if you have >more than 9 serial lines in your platform, which is a bit unlikely. Not >to consider the likelihood of a platform with 200 serial lines! I would eventually get there if I continue to unplug and re-plug these dongles... -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Mon Sep 10 22:46:18 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 10 Sep 2018 22:46:18 +0200 Subject: [Lazarus] Usage of Serial in a testing program? References: <3864d0c5-2b3e-ef9a-732d-f158041cae83@fastwebnet.it> <8976879b-4827-cc55-1b51-a7fc840004da@fastwebnet.it> Message-ID: <61ldpdp9ost77ko6cvem0jnn8laro6josu@4ax.com> On Mon, 10 Sep 2018 19:49:39 +0200, Giuliano Colla via Lazarus wrote: >Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: >> Unfortunately not possible in the real case because the file transfer >> protocol of the device only sends a header with the count of the data >> to follow and then streams all of the bytes.... > >I don't know how your application is built, but if the origin is an ftp >transfer, then data are sent in small packets. It would appear that you >somehow get the ftp data and send them to a serial line. It is at that >point of the processs that you should create your records to send them >individually via the serial line. > No FTP! What I meant is that the device I want to communicate with has a proprietary serial protocol and it can do file transfers too. The protocol is delimited and checksummed, but when a file is transferred there is only one block of file data in the middle of the transfer and it could be up to 1 Mbytes (the memory limit of the device). My application is meant to test WiFi<=>Serial converters to evaluate those we could use with the data device. So I want to run data through the unit under test in both direction to verify that it is going to work in the real environment. In real use the data device is connected by RS232 wire to the Serial to WiFi converter and a device controller is hooked in via a TCP socket server on the converter. The test application implements both endpoints since it aims to check out the converter itself. So I am dealing with one enpoint as a TCP socket (using Indy here) and the other is the serial line where I am trying to use the Serial.pp unit since it is built-in. Once it is set up I will push a lot of data through and look at the performance. But now I will be off travelling for a week... -- Bo Berglund Developer in Sweden From giuliano.colla at fastwebnet.it Wed Sep 12 17:47:37 2018 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Wed, 12 Sep 2018 17:47:37 +0200 Subject: [Lazarus] Raw TBitmap objects vs LCL TBitmap properties inconsistencies Message-ID: <962d3aca-8adc-550e-902c-9e3e69679383@fastwebnet.it> Hi Lazarus experts, I have noticed a number of apparent inconsistencies which make life a bit complicate if you need to play with visual properties of LCL components. If you need a different canvas brush, you need to change a button glyph, or to dynamically change a TImage (just to make a few examples), you create your TBitmap, and with a simple assignment instruction you pass it to the component. It works and it's Ok. But then you're faced with a problem: what to do with the TBimap object you have created? Coming from Delphi I had assumed that a TBitmap is not copied on another one, but just the pointer to the underlying Handle is copied. This means that you should never free a TBitmap after copying. But if you use heaptrc you discover that a number of your TBitmaps are still there after closing all the forms. On the other hand, in some cases if you FreeAndNil a TBitmap which has just been copied to an LCL component you get a crash with an AV. Up to now my solution has been to enable heap trace, let heaptrc tell me what I need to free, and do it just for those bitmaps. Is there a better way? i.e. what is the logic behind some LCL components just taking the pointer of a TBitmap and some to create their own internal bitmap leaving the original TBitmap untouched? Giuliano -- Do not do to others as you would have them do to you.They might have different tastes. From fluisgirardi at gmail.com Tue Sep 18 16:27:15 2018 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Tue, 18 Sep 2018 11:27:15 -0300 Subject: [Lazarus] Mouse wheel problem Message-ID: Hi all! I'm experiencing a problem with the mouse wheel and combobox control. I have a big form (4900x1000) on a single monitor. I put this big form on a Scrollbox to make it scrollable. To make the things easy to user/system operator, I decided to move the screen using the mouse wheel. This works fine and makes the navigation on this screen/form easy. The problem appears when the mouse cursor stops (after mouse wheel) over a combobox control. Even the combobox over the mouse cursor doesn't have the focus, the next mouse wheel event doesn't move the screen, but changes the combobox selection. All combobox on my application has Style set to csDropDownList. Another point that I noted, is that mouse wheel change doesn't occur if ItemIndex = -1. The same behavior is in GTK2 and QT4. I don't have tried on QT5. Someone knows how workaround or fix this? -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Tue Sep 18 17:05:02 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 18 Sep 2018 17:05:02 +0200 Subject: [Lazarus] =?utf-8?q?Mouse_wheel_problem?= In-Reply-To: 00000000906c00023be801925032 References: 00000000906c00023be801925032 Message-ID: <20180918170502.3AEECDC6@atlas.cz> Hi, you can use event   procedure TForm1.ComboBox1MouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint;   var Handled: Boolean); begin   Handled:=True; end;    this will not scroll the scrollbox when mouse pointer is over combobox, but ComboBox.ItemIndex will at least not change.   V.   ______________________________________________________________ > Od: "Fabio Luis Girardi via Lazarus" > Komu: "Lazarus mailing list" > Datum: 18.09.2018 16:27 > Předmět: [Lazarus] Mouse wheel problem > Hi all!I'm experiencing a problem with the mouse wheel and combobox control. I have a big form (4900x1000) on a single monitor. I put this big form on a Scrollbox to make it scrollable. To make the things easy to user/system operator, I decided to move the screen using the mouse wheel. This works fine and makes the navigation on this screen/form easy. The problem appears when the mouse cursor stops (after mouse wheel) over a combobox control. Even the combobox over the mouse cursor doesn't have the focus, the next mouse wheel event doesn't move the screen, but changes the combobox selection.All combobox on my application has Style set to csDropDownList. Another point that I noted, is that mouse wheel change doesn't occur if ItemIndex = -1.The same behavior is in GTK2 and QT4. I don't have tried on QT5.Someone knows how workaround or fix this?-- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com ---------- -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From fluisgirardi at gmail.com Tue Sep 18 20:37:45 2018 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Tue, 18 Sep 2018 15:37:45 -0300 Subject: [Lazarus] Mouse wheel problem In-Reply-To: <20180918170502.3AEECDC6@atlas.cz> References: <20180918170502.3AEECDC6@atlas.cz> Message-ID: Hi! Even using this event, if the combobox selection is changed one time (ItemIndex<>-1), the mouse wheel will change the selection if the mouse cursor is over the combobox. I tried to modify the qt widget, but no success. Appears to be an LCL issue, since QT docs says to change the focus police to QtStrongFocus to solve this problem (I don't find the fix for GTK2) The best regards, Fabio Em ter, 18 de set de 2018 às 12:05, Vojtěch Čihák escreveu: > Hi, > > you can use event > > > > procedure TForm1.ComboBox1MouseWheel(Sender: TObject; Shift: TShiftState; > WheelDelta: Integer; MousePos: TPoint; > > var Handled: Boolean); > > begin > > Handled:=True; > > end; > > > > this will not scroll the scrollbox when mouse pointer is over combobox, > but ComboBox.ItemIndex will at least not change. > > > > V. > > > > ______________________________________________________________ > > Od: "Fabio Luis Girardi via Lazarus" > > Komu: "Lazarus mailing list" > > Datum: 18.09.2018 16:27 > > Předmět: [Lazarus] Mouse wheel problem > > > Hi all! > I'm experiencing a problem with the mouse wheel and combobox control. I > have a big form (4900x1000) on a single monitor. I put this big form on a > Scrollbox to make it scrollable. To make the things easy to user/system > operator, I decided to move the screen using the mouse wheel. This works > fine and makes the navigation on this screen/form easy. > The problem appears when the mouse cursor stops (after mouse wheel) over a > combobox control. Even the combobox over the mouse cursor doesn't have the > focus, the next mouse wheel event doesn't move the screen, but changes the > combobox selection. > All combobox on my application has Style set to csDropDownList. Another > point that I noted, is that mouse wheel change doesn't occur if ItemIndex = > -1. > The same behavior is in GTK2 and QT4. I don't have tried on QT5. > Someone knows how workaround or fix this? > -- > The best regards, > > Fabio Luis Girardi > PascalSCADA Project > http://sourceforge.net/projects/pascalscada > http://www.pascalscada.com > > > ---------- > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Wed Sep 19 13:36:00 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Wed, 19 Sep 2018 13:36:00 +0200 Subject: [Lazarus] =?utf-8?q?Mouse_wheel_problem?= In-Reply-To: 00000000906f0002419401924fd5 References: <20180918170502.3AEECDC6@atlas.cz>, <20180918220259.14D04F11@atlas.cz> 00000000906f0002419401924fd5 Message-ID: <20180919133600.8386CCA6@atlas.cz> Hi, I tested with Lazarus 2.1.0 r59059M FPC 3.3.1 x86_64-linux-qt, Qt 4.8.7 & libQt4pas 5.2.5, Qt 5.11.1 & libQt5pas 2.6.r57057-1, GTk 2.24.32   V. ______________________________________________________________ > Od: "Fabio Luis Girardi" > Komu: "Vojtěch Čihák" > Datum: 19.09.2018 12:49 > Předmět: Re: [Lazarus] Mouse wheel problem > What's your version of Lazarus and OS (including QT versions)? Em Ter, 18 de set de 2018 17:03, Vojtěch Čihák > escreveu:Here the "Handled" trick works well for Qt4 and Qt5, no matter if the ItemIndex is -1 or >=0 or if the Combo is focused or not. Problem remains with GTk2 only.    V. ______________________________________________________________ > Od: "Fabio Luis Girardi" > > Komu: "Vojtěch Čihák" > > Datum: 18.09.2018 20:37 > Předmět: Re: [Lazarus] Mouse wheel problem > Hi!Even using this event, if the combobox selection is changed one time (ItemIndex<>-1), the mouse wheel will change the selection if the mouse cursor is over the combobox.I tried to modify the qt widget, but no success. Appears to be an LCL issue, since QT docs says to change the focus police to QtStrongFocus to solve this problem (I don't find the fix for GTK2) The best regards,Fabio PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com ---------- -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Wed Sep 19 13:50:11 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 19 Sep 2018 13:50:11 +0200 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 Message-ID: <20180919135011.501e9aa0@limapholos.matflo.wg> The Lazarus team is glad to announce the first release candidate of Lazarus 2.0. This release was built with FPC 3.0.4. The previous release Lazarus 1.8.4 was built with FPC 3.0.4 as well. Here is the list of fixes for Lazarus 2.0.x: http://wiki.freepascal.org/Lazarus_2.0_fixes_branch Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.0.4 The release is available for download on SourceForge: http://sourceforge.net/projects/lazarus/files/ Choose your CPU, OS, distro and then the "Lazarus 2.0RC1" directory. Checksums for the SourceForge files: http://www.lazarus-ide.org/index.php?page=checksums#2_0_0RC1 Minimum requirements: Windows: 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. FreeBSD/Linux: gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. Mac OS X: 10.5 to 10.12; Carbon (32bit), Cocoa (64bit, beta), qt and qt5 (32 or 64bit). The svn tag is http://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_0_RC1 For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/ and later at (after some time for synchronization) http://mirrors.iwi.me/lazarus/ == Why should everybody (including you) test the release candidate? == In the past weeks the Lazarus team has stabilized the 2.0 fixes branch. The resulting 2.0RC1 is now stable enough to be used by any one for test purposes. However many of the fixes and new features that where committed since the release of 1.8 required changes to the code of existing features too. While we have tested those ourself, there may still be problems that only occur with very specific configurations or one project in a million. Yes, it may be that you are the only person with a project, that will not work in the new IDE. So if you do not test, we can not fix it. Please do not wait for the final release, in order to test. It may be too late. Once the release is out we will have to be more selective about which fixes can be merged for further 2.0.x releases. So it may be, that we can not merge the fix you require. And then you will miss out on all the new features. == How to test == Download and install the 2.0 RC1. - On Windows you can install as a 2ndary install, that will not affect your current install: http://wiki.lazarus.freepascal.org/Multiple_Lazarus#Installation_of_multiple_Lazarus - On other platforms, if you install to a new location you need to use --primary-config-path In either case you should make backups. (including your primary config) Open your project in the current Lazarus (1.8.x), and use "Publish Project" from the project menu. This creates a clean copy of your project. You can then open that copy in the RC1. Please test: - If you can edit forms in the designer - rename components / change properties in Object inspector / Add new events - Add components to form / Move components on form - Frames, if you use them - If you can navigate the source code (e.g. jump to implementation) - Auto completion in source code - Compile, debug and run - Anything else you use in your daily work Mattias From ganmax at narod.ru Wed Sep 19 14:07:01 2018 From: ganmax at narod.ru (Maxim Ganetsky) Date: Wed, 19 Sep 2018 15:07:01 +0300 Subject: [Lazarus] Call for translations updates for 2.0 release Message-ID: <9eaa621c-e66c-8aa4-c5fc-54dc8e131b8b@narod.ru> Hello. Now that Lazarus 2.0 branch has been created it is time for translators to review and update their translations. Check out fixes branch (http://svn.freepascal.org/svn/lazarus/branches/fixes_2_0 ), review and update your translations and post updates to our bugtracker. See \languages\README.txt for details. Mark your reports with Lazarus version clearly in order to avoid confusion. -- Best regards, Maxim Ganetsky mailto:ganmax at narod.ru From gabor at poczta.onet.pl Wed Sep 19 14:29:16 2018 From: gabor at poczta.onet.pl (gabor) Date: Wed, 19 Sep 2018 14:29:16 +0200 Subject: [Lazarus] Custom control with stepwise size adjustment Message-ID: <4b46282a-08b5-1355-8883-103767b3138f@poczta.onet.pl> Hi. How to properly create a control with step-size adjustment? I mean a control whose width is a multiple of, eg. 16 (16,32,48...). In delphi, I simply override TCustomControl.SetBounds method. procedure TMyControl.SetBounds(aTop, aLeft, aWidth, aHeight: Integer); begin aWidth := (aWidth div 16) * 16; if aWidth = 0 then aWidth := 16; aHeight := (aHeight div 16) * 16; if aHeight = 0 then aHeight := 16; inherited SetBounds(aTop, aLeft, aWidth, aHeight); end; Unfortunately, the same does not work well with LCL. Especially in connection with Anchors or in form designer. So how to deal with it? Regards, Michał. From aaa5500 at ya.ru Wed Sep 19 14:52:56 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Wed, 19 Sep 2018 15:52:56 +0300 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: <20180919135011.501e9aa0@limapholos.matflo.wg> References: <20180919135011.501e9aa0@limapholos.matflo.wg> Message-ID:  Hi. as I see, no OnMouseWheelHorz /Left/Right is added. is it ok? Alex From vojtech.cihak at atlas.cz Wed Sep 19 15:17:03 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Wed, 19 Sep 2018 15:17:03 +0200 Subject: [Lazarus] =?utf-8?q?Custom_control_with_stepwise_size_adjustment?= In-Reply-To: 00000000907400024aec0192502f References: 00000000907400024aec0192502f Message-ID: <20180919151703.CC07BC3B@atlas.cz> Try set Constraints - set MinHeight=MaxHeight=your calculated height, and the same for Width. But it will maybe fool Lazarus autosizing mechanism.   V. ______________________________________________________________ > Od: "gabor via Lazarus" > Komu: lazarus at lists.lazarus-ide.org > Datum: 19.09.2018 14:29 > Předmět: [Lazarus] Custom control with stepwise size adjustment > Hi. How to properly create a control with step-size adjustment? I mean a control whose width is a multiple of, eg. 16 (16,32,48...). In delphi, I simply override TCustomControl.SetBounds method. procedure TMyControl.SetBounds(aTop, aLeft, aWidth, aHeight: Integer); begin   aWidth := (aWidth div 16) * 16;   if aWidth = 0 then     aWidth := 16;   aHeight := (aHeight div 16) * 16;   if aHeight = 0 then     aHeight := 16;   inherited SetBounds(aTop, aLeft, aWidth, aHeight); end; Unfortunately, the same does not work well with LCL. Especially in connection with Anchors or in form designer. So how to deal with it? Regards, Michał. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Wed Sep 19 17:51:44 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Wed, 19 Sep 2018 18:51:44 +0300 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: References: <20180919135011.501e9aa0@limapholos.matflo.wg> Message-ID: OnMouseWheelHorz is already included, thanks. -- Regards, Alexey From markMLl.lazarus at telemetry.co.uk Wed Sep 19 18:20:48 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Wed, 19 Sep 2018 16:20:48 +0000 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: <20180919135011.501e9aa0@limapholos.matflo.wg> References: <20180919135011.501e9aa0@limapholos.matflo.wg> Message-ID: On 19/09/18 12:00, Mattias Gaertner via Lazarus wrote: > The Lazarus team is glad to announce the first release candidate ofLazarus 2.0. > This release was built with FPC 3.0.4.The previous release Lazarus 1.8.4 was built with FPC 3.0.4 as well. > Here is the list of fixes for Lazarus 2.0.x:http://wiki.freepascal.org/Lazarus_2.0_fixes_branch > Here is the list of changes for Lazarus and Free Pascal:http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_noteshttp://wiki.lazarus.freepascal.org/User_Changes_3.0.4 Please could somebody (Martin?) review the final patch at https://bugs.freepascal.org/view.php?id=33935 which limits a hack I put in to certain widget sets (Qt will print a $00 character, GTK2 won't). -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From acardenas at bsd-peru.org Wed Sep 19 21:48:11 2018 From: acardenas at bsd-peru.org (=?UTF-8?Q?Alonso_C=C3=A1rdenas_M=C3=A1rquez?=) Date: Wed, 19 Sep 2018 14:48:11 -0500 Subject: [Lazarus] Call for translations updates for 2.0 release In-Reply-To: <9eaa621c-e66c-8aa4-c5fc-54dc8e131b8b@narod.ru> References: <9eaa621c-e66c-8aa4-c5fc-54dc8e131b8b@narod.ru> Message-ID: El mié., 19 sept. 2018 a las 7:07, Maxim Ganetsky via Lazarus (< lazarus at lists.lazarus-ide.org>) escribió: > Hello. > > Now that Lazarus 2.0 branch has been created it is time for translators > to review and update their translations. > > Check out fixes branch > (http://svn.freepascal.org/svn/lazarus/branches/fixes_2_0 ), review and > update your translations and post updates to our bugtracker. See > \languages\README.txt for details. > > Mark your reports with Lazarus version clearly in order to avoid confusion. > > Hi Maxim Please look at https://bugs.freepascal.org/view.php?id=34304 for spanish translation. It applies to trunk Greetings -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabor at poczta.onet.pl Thu Sep 20 13:33:43 2018 From: gabor at poczta.onet.pl (gabor) Date: Thu, 20 Sep 2018 13:33:43 +0200 Subject: [Lazarus] Custom control with stepwise size adjustment In-Reply-To: <20180919151703.CC07BC3B@atlas.cz> References: <20180919151703.CC07BC3B@atlas.cz> Message-ID: Thanks for the hint but I found a solution. I've moved code to ChangeBounds method and it looks like it works correctly with Anchors. There is still a problem with form designer, but I can live with it - I simply use object inspector instead of using a mouse. Regards, Michał. W dniu 2018-09-19 o 15:17, Vojtěch Čihák via Lazarus pisze: > Try set Constraints - set MinHeight=MaxHeight=your calculated height, > and the same for Width. > > But it will maybe fool Lazarus autosizing mechanism. > > V. > > ______________________________________________________________ > > Od: "gabor via Lazarus" > > Komu: lazarus at lists.lazarus-ide.org > > Datum: 19.09.2018 14:29 > > Předmět: [Lazarus] Custom control with stepwise size adjustment > > > > Hi. > How to properly create a control with step-size adjustment? I mean a > control whose width is a multiple of, eg. 16 (16,32,48...). > In delphi, I simply override TCustomControl.SetBounds method. > > procedure TMyControl.SetBounds(aTop, aLeft, aWidth, aHeight: Integer); > begin >   aWidth := (aWidth div 16) * 16; >   if aWidth = 0 then >     aWidth := 16; >   aHeight := (aHeight div 16) * 16; >   if aHeight = 0 then >     aHeight := 16; >   inherited SetBounds(aTop, aLeft, aWidth, aHeight); > end; > > Unfortunately, the same does not work well with LCL. Especially in > connection with Anchors or in form designer. > So how to deal with it? > > Regards, Michał. > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > > From juha.manninen62 at gmail.com Thu Sep 20 19:20:23 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 20 Sep 2018 20:20:23 +0300 Subject: [Lazarus] Custom control with stepwise size adjustment In-Reply-To: <4b46282a-08b5-1355-8883-103767b3138f@poczta.onet.pl> References: <4b46282a-08b5-1355-8883-103767b3138f@poczta.onet.pl> Message-ID: On Wed, Sep 19, 2018 at 3:29 PM gabor via Lazarus wrote: > How to properly create a control with step-size adjustment? You can override procedures CalculatePreferredSize and GetPreferredSize, defined in TControl. TWinControl has more virtual methods that you should check out. Juha From gabor at poczta.onet.pl Thu Sep 20 20:37:24 2018 From: gabor at poczta.onet.pl (gabor) Date: Thu, 20 Sep 2018 20:37:24 +0200 Subject: [Lazarus] Custom control with stepwise size adjustment In-Reply-To: References: <4b46282a-08b5-1355-8883-103767b3138f@poczta.onet.pl> Message-ID: W dniu 2018-09-20 o 19:20, Juha Manninen via Lazarus pisze: > You can override procedures CalculatePreferredSize and > GetPreferredSize, defined in TControl. I tried. Unfortunately, it does not work with Anchors or Align - preferred values are ignored. But size correction in ChangeBounds actually works. > TWinControl has more virtual methods that you should check out. I noticed. The AutoSize mechanism is bit complicated. Regards, Michał From bupa at gmx.at Fri Sep 21 15:03:17 2018 From: bupa at gmx.at (=?UTF-8?Q?Franz_M=c3=bcller?=) Date: Fri, 21 Sep 2018 15:03:17 +0200 Subject: [Lazarus] derived forms and frames In-Reply-To: References: Message-ID: <44468d96-5188-d18e-d830-71b0a83d6040@gmx.at> Hello everybody! I have been developing programs in Delphi for many years (and even before in turbo Pascal). I would like to switch all my programming from Delphi to Lazarus / Free Pascal. Now I have encountered a serious issue that I don't know how to deal with. I have built a complex framework that I use in my programs. This frameworks includes form templates and frame templates from which I derive most of the forms of a project. In order to be able to derive a new form from a form tempate easily with the means of the lazarus IDE, the form template must be part of the project - I don't see another way to have a form shown in the menu "file - new". But in order to make new published properties of the template form available in the object inspector, the template form must be compiled as part of a package. But for good reasons it is strongly disadvised to use the same file in a package and as part of the project at the same time. Of course, I could manually modify the source for every new unit that I create, but that would be rather cumbersome and error prone. I would like to ask if there is a solution to the problem that I am not aware of - otherwise I would file a feature request. I feel that the ability to use forms and frames derived from TForm and TFrame as a base for new forms is a very important feature to build an efficient programming framework, and this programming framework should not be required to be part of every project that uses it. I would suggest a procedure similar to "register",  which should place a menu entry for a form or a frame from a package into the menu tree "file - new", just like register places a component into the component palette. Best regards Franz From skalogryz.lists at gmail.com Fri Sep 21 18:41:47 2018 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Fri, 21 Sep 2018 12:41:47 -0400 Subject: [Lazarus] Mandatory PopupParent (handle) for ShowModal Message-ID: Hello, What's the logic behind forcing a modal window to have a popupparent (handle)? Even if a PopupParent form is not specified explicitly, LCL code would find one for a modal being opened. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Fri Sep 21 19:29:31 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 21 Sep 2018 20:29:31 +0300 Subject: [Lazarus] typo in IDE popup tooltip Message-ID: <6dd5c75d-a076-aa5f-63a1-d517556ec894@ya.ru> function  StringToColor( const   S: shortstring ): TColor; /home/user/lazarus/lcl/graphics.pp(1901,10) Description StringToColor  - given a colour name*like 'Blue*', returns the corresponding colour value --> fix to 'clBlue' or better to 'clMagenta' -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Fri Sep 21 21:01:17 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 21 Sep 2018 22:01:17 +0300 Subject: [Lazarus] typo in IDE popup tooltip In-Reply-To: <6dd5c75d-a076-aa5f-63a1-d517556ec894@ya.ru> References: <6dd5c75d-a076-aa5f-63a1-d517556ec894@ya.ru> Message-ID: On Fri, Sep 21, 2018 at 8:29 PM AlexeyT via Lazarus wrote: > function StringToColor( const S: shortstring ): TColor; > /home/user/lazarus/lcl/graphics.pp(1901,10) > Description > StringToColor > - given a colour name like 'Blue', returns the corresponding colour value > > --> fix to 'clBlue' or better to 'clMagenta' Strangely enough, the "Colors" map does not have 'clMagenta'. It has 'clBlue'. See const Colors: array[0..106] of TIdentMapEntry = (... in graphics.pp line 2349. Does function StringToColor() work as expected? Anyway I fixed the documentation to say 'clBlue' in r59118. Juha From kapibara.pas at aol.com Fri Sep 21 23:03:05 2018 From: kapibara.pas at aol.com (kapibara) Date: Fri, 21 Sep 2018 23:03:05 +0200 Subject: [Lazarus] TMenu calls OnClick twice per click Message-ID: Hi Guys! Under Linux GTK2, clicking a MenuItem with RadioButton calls OnClick twice. Calling MenuItem.Click by code at runtime doesn't seem to change the selected menuitem in the menu? Under Windows I dont see the RadioButton in the menu, and OnClick is called only once. See demo. procedure TForm1.btnAddMenuItemClick(Sender: TObject); var   s:string;   aTargetMenu, aMenuItem: TMenuItem; begin   aTargetMenu:= MainMenu.Items.Find('&Menu');   s:='MenuItem ' +IntToStr(aTargetMenu.Count +1);   s:=InputBox('Menu name','Enter Menu Name:', s);   aMenuItem:=TMenuItem.Create(MainMenu);   aMenuItem.OnClick:=@MenuClickHandler;   aMenuItem.RadioItem:=True;   aMenuItem.Caption:=s;   aTargetMenu.Add(aMenuItem);   aMenuItem.Click;  //Doesnt change selected menuitem with RadioButton! end; procedure TForm1.MenuClickHandler(Sender: TObject); begin   ShowMessage('Clicked!'); end; -------------- next part -------------- A non-text attachment was scrubbed... Name: AddMenuItem.zip Type: application/zip Size: 2280 bytes Desc: not available URL: From dec12 at avidsoft.com.hk Sat Sep 22 09:17:02 2018 From: dec12 at avidsoft.com.hk (Dennis) Date: Sat, 22 Sep 2018 15:17:02 +0800 Subject: [Lazarus] derived forms and frames In-Reply-To: <44468d96-5188-d18e-d830-71b0a83d6040@gmx.at> References: <44468d96-5188-d18e-d830-71b0a83d6040@gmx.at> Message-ID: <30d19082-9c2d-7c7b-bc76-4ebd18b8fcdc@avidsoft.com.hk> Franz Müller via Lazarus wrote: > Hello everybody! > > I have been developing programs in Delphi for many years (and even > before in turbo Pascal). > I would like to switch all my programming from Delphi to Lazarus / > Free Pascal. > > Now I have encountered a serious issue that I don't know how to deal > with. > I have built a complex framework that I use in my programs. This > frameworks includes form templates and frame templates from which I > derive most of the forms of a project. In order to be able to derive a > new form from a form tempate easily with the means of the lazarus IDE, > the form template must be part of the project - I don't see another > way to have a form shown in the menu "file - new". I might not understand your question correctly. Please ignore me if I am mistaken. When I have customized Frame in the project, next time, I click File-New , under the "inherited item", there are a list of 'inherited project components' (those marked in yellow in this picture). Are those what you need? Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohapkjahabojbnho.png Type: image/png Size: 27999 bytes Desc: not available URL: From tony.whyman at mccallumwhyman.com Sat Sep 22 10:49:21 2018 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Sat, 22 Sep 2018 09:49:21 +0100 Subject: [Lazarus] derived forms and frames In-Reply-To: <44468d96-5188-d18e-d830-71b0a83d6040@gmx.at> References: <44468d96-5188-d18e-d830-71b0a83d6040@gmx.at> Message-ID: <4ae05b73-ae97-68b5-b1d2-22b5c5871776@mccallumwhyman.com> Franz, It sounds like we a share a programming style as I also use lots of derived forms and frames. You have to use packages if you are going to work with Lazarus in this way. Create a run-time package for your framework forms and frames and their dependencies - you may even want more than one package  in order to structure your framework properly and to avoid having a unit in multiple packages. Work out the package hierarchy that works best for you. Create a design time package which registers the forms and other components that you want to appear on the palette, plus any property editors you need. You may also want to call "RegisterNoIcon" for any TFrame descendents that your framework uses. This allows the IDE to quickly find the parent class for a derived frame. The ProjectTemplates package is also very useful here if you have any project templates you need to register. You will have to recompile Lazarus when you add new design time packages - but that's just how Lazarus works. You will not have to re-compile Lazarus every time you change a unit in a run-time package - that's only necessary if you change the design time behaviour of a unit. When you use your framework in your project, your run-time packages should automatically get included if you use a form from your design time package - otherwise just add them yourself. There is no need to explicitly include in your project a unit define in a package on which the project depends. Tip: If you are editing a frame/form make sure that any descendent frames/forms are closed, otherwise you will find that their inherited property values are decoupled from the parent frame/form. Hope this helps. Regards Tony Whyman MWA On 21/09/18 14:03, Franz Müller via Lazarus wrote: > Hello everybody! > > I have been developing programs in Delphi for many years (and even > before in turbo Pascal). > I would like to switch all my programming from Delphi to Lazarus / > Free Pascal. > > Now I have encountered a serious issue that I don't know how to deal > with. > I have built a complex framework that I use in my programs. This > frameworks includes form templates and frame templates from which I > derive most of the forms of a project. In order to be able to derive a > new form from a form tempate easily with the means of the lazarus IDE, > the form template must be part of the project - I don't see another > way to have a form shown in the menu "file - new". > But in order to make new published properties of the template form > available in the object inspector, the template form must be compiled > as part of a package. > But for good reasons it is strongly disadvised to use the same file in > a package and as part of the project at the same time. > > Of course, I could manually modify the source for every new unit that > I create, but that would be rather cumbersome and error prone. > > I would like to ask if there is a solution to the problem that I am > not aware of - otherwise I would file a feature request. I feel that > the ability to use forms and frames derived from TForm and TFrame as a > base for new forms is a very important feature to build an efficient > programming framework, and this programming framework should not be > required to be part of every project that uses it. I would suggest a > procedure similar to "register",  which should place a menu entry for > a form or a frame from a package into the menu tree "file - new", just > like register places a component into the component palette. > > Best regards > Franz > From bo.berglund at gmail.com Sun Sep 23 08:39:52 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 23 Sep 2018 08:39:52 +0200 Subject: [Lazarus] Usage of Serial in a testing program? References: Message-ID: On Sun, 09 Sep 2018 13:33:22 +0200, Bo Berglund via Lazarus wrote: Coming back to this issue after I have been travelling... >For the serial port handling I found the "built-in" Serial unit >described here: >http://wiki.freepascal.org/Hardware_Access#FPC_built_in_Serial_unit > >Now I have a few questions about its usage: > >1) Serial port name >------------------- >When opening the port the example does this: > >str(ComPortNr,tmpstr); >ComPortName:= 'COM'+tmpstr+':'; >serialhandle := SerOpen(ComPortName); > >So for say port 29 this results in ComPortName 'COM29:' >Is this always the case? I have a hunch that for port numbers 1..9 the >Windows port naming is different than for higher port numbers... I have now come as far in my application as I can test the way the Serial unit opens and closes com ports. It turns out that on Windows there are two port name syntaxes: Ports 1..9: COM1 to COM9 will work Ports 10..255: Only \\.\COM10 to \\.\COM255 will work But one does not need to use different naming depending on the port number, the second syntax \\.\COMx works also for ports 1..9 Notice that contrary to the wiki example adding a colon to the end like COM32: does NOT work so that is a wiki error. I have yet to complete other parts of the application so I don't yet know if the data flow will wok as expected. -- Bo Berglund Developer in Sweden From list2010 at BrenemanLabs.com Sun Sep 23 09:51:54 2018 From: list2010 at BrenemanLabs.com (Paul Breneman) Date: Sun, 23 Sep 2018 03:51:54 -0400 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: References: Message-ID: <7528b1e2-8cdd-a663-6aa4-69f63a8dfcba@BrenemanLabs.com> On 09/23/2018 02:39 AM, Bo Berglund via Lazarus wrote: ... > Notice that contrary to the wiki example adding a colon to the end > like COM32: does NOT work so that is a wiki error. If I remember correctly the colon at the end is required for WinCE? From bo.berglund at gmail.com Sun Sep 23 10:01:45 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 23 Sep 2018 10:01:45 +0200 Subject: [Lazarus] Usage of Serial in a testing program? References: Message-ID: On Sun, 23 Sep 2018 08:39:52 +0200, Bo Berglund via Lazarus wrote: >I have now come as far in my application as I can test the way the >Serial unit opens and closes com ports. >It turns out that on Windows there are two port name syntaxes: > >Ports 1..9: COM1 to COM9 will work >Ports 10..255: Only \\.\COM10 to \\.\COM255 will work > >But one does not need to use different naming depending on the port >number, the second syntax \\.\COMx works also for ports 1..9 Forgot to add a question regarding making this a cross-platform program: If I add a check for the platform inside my program, how sghould it look like to work on both Windows and Linux? Something like this: function TWiFiCommTester.ConnectSerial(Port: byte; Baud: integer): boolean; var ComportName: string; Flags: TSerialFlags; begin FLastError := ''; {$IFDEF WINDOWS} ComPortName:= '\\.\COM' + IntToStr(Port); {$ENDIF} {$IFDEF UNIX} //What goes here? ComPortName := ???? {$ENDIF} FSerial := SerOpen(ComPortName); .... -- Bo Berglund Developer in Sweden From mailinglists at geldenhuys.co.uk Sun Sep 23 10:42:19 2018 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 23 Sep 2018 09:42:19 +0100 Subject: [Lazarus] Building help files: the nitty-gritty In-Reply-To: <20180818171017.GA87912@stack.nl> References: <20180818163115.GA78798@stack.nl> <20180818171017.GA87912@stack.nl> Message-ID: <30adf86a-b49b-2c4b-2520-a29694ff97d8@geldenhuys.co.uk> On 18/08/18 18:10, Marco van de Voort via Lazarus wrote: >> On Tue, Jul 10, 2012 at 05:39:05PM +0100, Graeme Geldenhuys wrote: > ^^^^^^^^^^^ > > Well, that happens, when you try to be modern, and read your mail with mutt > instead of elm :-) hahaha... I was about to comment on dredging up such and *old* thread. The solution to the original question has been solved since a long time... DocView of course with the help source in IPF format. ;-) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From markMLl.lazarus at telemetry.co.uk Sun Sep 23 11:11:56 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Sun, 23 Sep 2018 09:11:56 +0000 Subject: [Lazarus] Usage of Serial in a testing program? In-Reply-To: References: Message-ID: On 23/09/18 08:15, Bo Berglund via Lazarus wrote: > On Sun, 23 Sep 2018 08:39:52 +0200, Bo Berglund via Lazarus wrote: >> I have now come as far in my application as I can test the way the>Serial unit opens and closes com ports.>It turns out that on Windows there are two port name syntaxes:>>Ports 1..9: COM1 to COM9 will work>Ports 10..255: Only \\.\COM10 to \\.\COM255 will work>>But one does not need to use different naming depending on the port>number, the second syntax \\.\COMx works also for ports 1..9 > Forgot to add a question regarding making this a cross-platformprogram: > If I add a check for the platform inside my program, how sghould itlook like to work on both Windows and Linux? > Something like this: > function TWiFiCommTester.ConnectSerial(Port: byte; Baud: integer):boolean;var ComportName: string; Flags: TSerialFlags;begin FLastError := ''; {$IFDEF WINDOWS} ComPortName:= '\\.\COM' + IntToStr(Port); {$ENDIF} {$IFDEF UNIX} //What goes here? ComPortName := ???? {$ENDIF} FSerial := SerOpen(ComPortName); .... Sorry Bo and Paul, I mailed you directly when I meant to reply here. This rolls up the messages from earlier. > Ports 1..9: COM1 to COM9 will workPorts 10..255: Only \\.\COM10 to \\.\COM255 will work Which is something that I pointed out to you, although in my case I think I only tested up to 12 (i.e. with an 8-port card). What comes after 255: 0 or 1? If 0 which form or name does it require? > I have yet to complete other parts of the application so I don't yetknow if the data flow will wok as expected. Note that that unit was specifically written to be usable either with or without separate communications threads. If you're /not/ using threads then there's a callback so that the read-with-timeout functions can periodically call Application.ProcessMessages, and that the places that it is used are OS-specific. You obviously /don't/ want to use that callback if the comms functions are in their own threads, since APM should only be called from the main thread. I'm probably losing this email address on Tuesday, if there's anything that you think I can possibly clarify please raise it sooner rather than later. > On 09/23/2018 02:39 AM, Bo Berglund via Lazarus wrote:...> Notice that contrary to the wiki example adding a colon to the end> like COM32: does NOT work so that is a wiki error. > If I remember correctly the colon at the end is required for WinCE?-- OK, but this is something that the application programmer needs to be aware of. I suppose it would be possible to modify the unit so that if it sees a trailing : it changes it to a leading \\.\ if there isn't one there already, but since the exact names are OS-specific and since we're already insisting that the application programmer or user puts in /dev/ for unix I'm not sure that's justifiable. In any event I'm not in a position to do any mods right now and am probably about to lose access to Solaris (which is probably still worth testing against) permanently. (* If there are no serial ports on the system then return NIL, otherwise a *) (* TStringList. *) (* *) (* This returns an object, it is the caller's (eventual) responsibility to free *) (* this. *) // FUNCTION EnumeratePorts: TStringList; (* On a Linux system with udev or similar the /dev directory will only contain *) (* devices which have been detected as being present. On an older system it *) (* will probably contain all possible devices so we need to restrict the list *) (* to what's reasonable; the user should still be able to enter a device name *) (* manually if necessary, e.g. where a machine with 2x standard ports plus a *) (* 2-port card insists that it's got ttyS0, ttyS1, ttyS45 and ttyS46. *) CONST countTtyS= 12; (* Main board plus an 8-port card *) countTtyUSB= 8; (* Four dual-port adapters *) countTtyI= 4; (* A single 4-port ISDN card. *) VAR searchRec: TSearchRec; counter: INTEGER; BEGIN RESULT:= TStringList.Create; RESULT.Sorted:= TRUE; counter:= countTtyS; IF FindFirst('/dev/ttyS*', faSysFile, searchRec) = 0 THEN REPEAT RESULT.Append('/dev/' + searchRec.Name); DEC(counter) UNTIL (FindNext(searchRec) <> 0) OR (counter <= 0); FindClose(searchRec); counter:= countTtyUSB; IF FindFirst('/dev/ttyUSB*', faSysFile, searchRec) = 0 THEN REPEAT RESULT.Append('/dev/' + searchRec.Name); DEC(counter) UNTIL (FindNext(searchRec) <> 0) OR (counter <= 0); FindClose(searchRec); counter:= countTtyI; IF FindFirst('/dev/ttyI*', faSysFile, searchRec) = 0 THEN REPEAT RESULT.Append('/dev/' + searchRec.Name); DEC(counter) UNTIL (FindNext(searchRec) <> 0) OR (counter <= 0); FindClose(searchRec); IF Result.Count = 0 THEN FreeAndNil(RESULT) END { EnumeratePorts } ; -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From markMLl.lazarus at telemetry.co.uk Sun Sep 23 11:18:17 2018 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Sun, 23 Sep 2018 09:18:17 +0000 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: References: <20180919135011.501e9aa0@limapholos.matflo.wg> Message-ID: <387a966c-6511-2bde-b6fd-c5e747407eb1@telemetry.co.uk> > Please could somebody (Martin?) review the final patch at > https://bugs.freepascal.org/view.php?id=33935 which limits a hack I put > in to certain widget sets (Qt will print a $00 character, GTK2 won't). I'm off-list in a couple of days time, I'll probably be able to get to Mantis before I have a replacement email address. I'm not cancelling this account's subscription so that my colleagues have access. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From michael at freepascal.org Sun Sep 23 13:16:26 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Sep 2018 13:16:26 +0200 (CEST) Subject: [Lazarus] IDE Spotter Message-ID: Hello, I've polished something that was started during the Lazarus Pro conference in Bonn the last days, the IDE Spotter (this is a "Working Title"). The idea is to have a command box such as it exists in Atom or Visual code studio. Press ALt-Shift-P (or Meta-Shift-P on Mac) to access it. Type the command you wish (e.g. open), navigate with arrows or click on the correct match. The command will be executed. You can type multiple words. all parts must be matched (and are colorized). You can find the package under 'components/idespotter' in SVN. It should also work under 1.8.4/2.0rc1 for those that want to try it. There are some options under Tools - Options - Environment - IDE Spotter. Ideas for improvements are currently: - Shrink window list if the match list is "small". - Search in recent files (projects/units/packages) - ... ? Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). Thanks go to James Ralston for pitching the idea, and Mattias for including it in SVN ! Michael. From florian at freepascal.org Sun Sep 23 15:22:41 2018 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 23 Sep 2018 15:22:41 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: References: Message-ID: Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: > > Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). Unit IDESpotterOptions missing in svn? From michael at freepascal.org Sun Sep 23 15:27:58 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Sep 2018 15:27:58 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: References: Message-ID: On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: > Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >> >> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). > > Unit IDESpotterOptions missing in svn? Ahaha.... The infamous 'forgot to add units' problem in SVN :) I added them, thanks ! Michael. From florian at freepascal.org Sun Sep 23 17:23:46 2018 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 23 Sep 2018 17:23:46 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: References: Message-ID: Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: > > > On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: > >> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >>> >>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). >> >> Unit IDESpotterOptions missing in svn? > > Ahaha.... The infamous 'forgot to add units' problem in SVN :) > > I added them, thanks ! Seems not work on windows though, even after I assigned another shortcut. From michael at freepascal.org Sun Sep 23 17:31:24 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Sep 2018 17:31:24 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: References: Message-ID: On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: > Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: >> >> >> On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: >> >>> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >>>> >>>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). >>> >>> Unit IDESpotterOptions missing in svn? >> >> Ahaha.... The infamous 'forgot to add units' problem in SVN :) >> >> I added them, thanks ! > > Seems not work on windows though, even after I assigned another shortcut. Hm. What does not work, showing the form ? It's also in the menu under View - IDE internals - IDE spotter. Does it work then ? Strange, I tested both Mac and Linux. Michael. From nc-gaertnma at netcologne.de Sun Sep 23 18:27:18 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 23 Sep 2018 18:27:18 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: References: Message-ID: <20180923182718.39dd7cb7@limapholos.matflo.wg> On Sun, 23 Sep 2018 17:23:46 +0200 Florian Klämpfl via Lazarus wrote: > Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: > > > > > > On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: > > > >> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: > >>> > >>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). > >> > >> Unit IDESpotterOptions missing in svn? > > > > Ahaha.... The infamous 'forgot to add units' problem in SVN :) > > > > I added them, thanks ! > > Seems not work on windows though, even after I assigned another shortcut. If you are using a docked IDE, I just fixed positioning the spotter for that case. Mattias From florian at freepascal.org Sun Sep 23 18:34:59 2018 From: florian at freepascal.org (=?UTF-8?Q?Florian_Kl=c3=a4mpfl?=) Date: Sun, 23 Sep 2018 18:34:59 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: <20180923182718.39dd7cb7@limapholos.matflo.wg> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> Message-ID: <56ec2b74-8d6f-5117-0e09-fed28ca9dc1c@freepascal.org> Am 23.09.2018 um 18:27 schrieb Mattias Gaertner via Lazarus: > On Sun, 23 Sep 2018 17:23:46 +0200 > Florian Klämpfl via Lazarus wrote: > >> Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: >>> >>> >>> On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: >>> >>>> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >>>>> >>>>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). >>>> >>>> Unit IDESpotterOptions missing in svn? >>> >>> Ahaha.... The infamous 'forgot to add units' problem in SVN :) >>> >>> I added them, thanks ! >> >> Seems not work on windows though, even after I assigned another shortcut. > > If you are using a docked IDE, I just fixed positioning the spotter > for that case. Indeed, this fixed it, thanks. From michael at freepascal.org Sun Sep 23 19:28:33 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 23 Sep 2018 19:28:33 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: <20180923182718.39dd7cb7@limapholos.matflo.wg> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> Message-ID: On Sun, 23 Sep 2018, Mattias Gaertner via Lazarus wrote: > On Sun, 23 Sep 2018 17:23:46 +0200 > Florian Klämpfl via Lazarus wrote: > >> Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: >> > >> > >> > On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: >> > >> >> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >> >>> >> >>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). >> >> >> >> Unit IDESpotterOptions missing in svn? >> > >> > Ahaha.... The infamous 'forgot to add units' problem in SVN :) >> > >> > I added them, thanks ! >> >> Seems not work on windows though, even after I assigned another shortcut. > > If you are using a docked IDE, I just fixed positioning the spotter > for that case. Ah. That's what your change meant... Good you left a comment now, many thanks! :) (I guess everyone now guessed, I don't use the docking IDE...) Michael. From md at delfire.net Sun Sep 23 20:38:06 2018 From: md at delfire.net (Marcos Douglas B. Santos) Date: Sun, 23 Sep 2018 15:38:06 -0300 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> Message-ID: On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus wrote: > > (I guess everyone now guessed, I don't u I thought that I was the last one not using a docked IDE :) Marcos Douglas From freedos.la at gmail.com Mon Sep 24 02:42:45 2018 From: freedos.la at gmail.com (Ralf Quint) Date: Sun, 23 Sep 2018 17:42:45 -0700 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> Message-ID: <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> On 9/23/2018 11:38 AM, Marcos Douglas B. Santos via Lazarus wrote: > On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus > wrote: >> (I guess everyone now guessed, I don't u > I thought that I was the last one not using a docked IDE :) Docked IDE (unless the term is used differently from how I understand it) doesn't make much sense if you have a multi-screen setup, IMHO... Ralf --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From pascaldragon at googlemail.com Mon Sep 24 07:39:10 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Mon, 24 Sep 2018 07:39:10 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> Message-ID: <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> Am 24.09.2018 um 02:42 schrieb Ralf Quint via Lazarus: > On 9/23/2018 11:38 AM, Marcos Douglas B. Santos via Lazarus wrote: >> On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus >> wrote: >>> (I guess everyone now guessed, I don't u >> I thought that I was the last one not using a docked IDE :) > Docked IDE (unless the term is used differently from how I understand > it) doesn't make much sense if you have a multi-screen setup, IMHO... It does if the second screen is not mainly for development. E.g. I myself use both Lazarus and Visual Studio on my primary monitor while I have the browser open on the other. And sometimes if I need to look at two documents at once I can open a new editor window in both IDEs and move it to the second screen to better compare them or whatever I need to do. :) Regards, Sven From freedos.la at gmail.com Mon Sep 24 08:30:07 2018 From: freedos.la at gmail.com (Ralf Quint) Date: Sun, 23 Sep 2018 23:30:07 -0700 Subject: [Lazarus] IDE Spotter In-Reply-To: <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> Message-ID: <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> On 9/23/2018 10:39 PM, Sven Barth via Lazarus wrote: > Am 24.09.2018 um 02:42 schrieb Ralf Quint via Lazarus: >> On 9/23/2018 11:38 AM, Marcos Douglas B. Santos via Lazarus wrote: >>> On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus >>> wrote: >>>> (I guess everyone now guessed, I don't u >>> I thought that I was the last one not using a docked IDE :) >> Docked IDE (unless the term is used differently from how I understand >> it) doesn't make much sense if you have a multi-screen setup, IMHO... > It does if the second screen is not mainly for development. E.g. I > myself use both Lazarus and Visual Studio on my primary monitor while > I have the browser open on the other. And sometimes if I need to look > at two documents at once I can open a new editor window in both IDEs > and move it to the second screen to better compare them or whatever I > need to do. :) Well, I just like to move the separate windows across the screens, basic IDE with project info on the default screen, usually the debugging.messaging stuff on it as well, and the editor windows on the second one. For a time, I even had a 3 screen setup, with the application output (or research browser, depending on the development stage) on the third screen... Ralf --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From nc-gaertnma at netcologne.de Mon Sep 24 09:46:06 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Sep 2018 09:46:06 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> Message-ID: <20180924094606.12518b83@limapholos.matflo.wg> On Sun, 23 Sep 2018 17:42:45 -0700 Ralf Quint via Lazarus wrote: > On 9/23/2018 11:38 AM, Marcos Douglas B. Santos via Lazarus wrote: > > On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus > > wrote: > >> (I guess everyone now guessed, I don't u > > I thought that I was the last one not using a docked IDE :) > Docked IDE (unless the term is used differently from how I understand > it) doesn't make much sense if you have a multi-screen setup, IMHO... Docked <> SDI. Docked means you can attach windows together. You can still distribute windows over various screens. Mattias From juha.manninen62 at gmail.com Mon Sep 24 10:35:07 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 24 Sep 2018 11:35:07 +0300 Subject: [Lazarus] IDE Spotter In-Reply-To: <20180924094606.12518b83@limapholos.matflo.wg> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <20180924094606.12518b83@limapholos.matflo.wg> Message-ID: Tested IDE Spotter on Linux / GTK2. Looks promising although it leaks memory. Regards, Juha --- Heap dump by heaptrc unit 4466835 memory blocks allocated : 800495659/813452344 4464534 memory blocks freed : 800391839/813341848 2301 unfreed memory blocks : 103820 True heap size : 4259840 True free heap : 3778816 Should be : 3854816 Call trace for block $00007F710BF15940 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645C680 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645C800 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645C8C0 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645B300 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645CD40 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645A7C0 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645CF80 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc From michael at freepascal.org Mon Sep 24 10:45:06 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 10:45:06 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <20180924094606.12518b83@limapholos.matflo.wg> Message-ID: On Mon, 24 Sep 2018, Juha Manninen via Lazarus wrote: > Tested IDE Spotter on Linux / GTK2. > Looks promising although it leaks memory. Hm. How to fix this ? because line 179 is: if SpotterForm=Nil then begin SpotterForm:=TSpotterForm.Create(Application); The form is owned by the TApplication instance. If the application is freed, the form should also be freed. That's TComponent 101... >From your stack trace, it would seem that the form is created multiple times, which is also strange, since it's a singleton pattern. The form is set to do coHide on close, so it should not be freed on close. Michael. > > Regards, > Juha > > --- > Heap dump by heaptrc unit > 4466835 memory blocks allocated : 800495659/813452344 > 4464534 memory blocks freed : 800391839/813341848 > 2301 unfreed memory blocks : 103820 > True heap size : 4259840 > True free heap : 3778816 > Should be : 3854816 > Call trace for block $00007F710BF15940 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645C680 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645C800 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645C8C0 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645B300 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645CD40 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645A7C0 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645CF80 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus From michael at freepascal.org Mon Sep 24 10:51:45 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 10:51:45 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <20180924094606.12518b83@limapholos.matflo.wg> Message-ID: The stack trace is highly misleading. I applied a possible fix; Please test and report. Michael. On Mon, 24 Sep 2018, Michael Van Canneyt via Lazarus wrote: > > > On Mon, 24 Sep 2018, Juha Manninen via Lazarus wrote: > >> Tested IDE Spotter on Linux / GTK2. >> Looks promising although it leaks memory. > > Hm. How to fix this ? because line 179 is: > > if SpotterForm=Nil then > begin > SpotterForm:=TSpotterForm.Create(Application); > > The form is owned by the TApplication instance. If the application is freed, > the form should also be freed. That's TComponent 101... > > From your stack trace, it would seem that the form is created multiple > times, which is also strange, since it's a singleton pattern. > > The form is set to do coHide on close, so it should not be freed on close. > > Michael. > >> >> Regards, >> Juha >> >> --- >> Heap dump by heaptrc unit >> 4466835 memory blocks allocated : 800495659/813452344 >> 4464534 memory blocks freed : 800391839/813341848 >> 2301 unfreed memory blocks : 103820 >> True heap size : 4259840 >> True free heap : 3778816 >> Should be : 3854816 >> Call trace for block $00007F710BF15940 size 20 >> $00000000013CB5CC line 179 of frmspotter.pas >> $0000000000667CE0 line 652 of include/customedit.inc >> $0000000000667C5A line 644 of include/customedit.inc >> $00000000005E7E74 line 1203 of include/control.inc >> $0000000000431B9F >> $00000000005D8DD7 line 5425 of include/wincontrol.inc >> $0000000000667557 line 528 of include/customedit.inc >> $000000000082BCE0 line 112 of lclmessageglue.pas >> Call trace for block $00007F712645C680 size 20 >> $00000000013CB5CC line 179 of frmspotter.pas >> $0000000000667CE0 line 652 of include/customedit.inc >> $0000000000667C5A line 644 of include/customedit.inc >> $00000000005E7E74 line 1203 of include/control.inc >> $0000000000431B9F >> $00000000005D8DD7 line 5425 of include/wincontrol.inc >> $0000000000667557 line 528 of include/customedit.inc >> $000000000082BCE0 line 112 of lclmessageglue.pas >> Call trace for block $00007F712645C800 size 20 >> $00000000013CB5CC line 179 of frmspotter.pas >> $0000000000667CE0 line 652 of include/customedit.inc >> $0000000000667C5A line 644 of include/customedit.inc >> $00000000005E7E74 line 1203 of include/control.inc >> $0000000000431B9F >> $00000000005D8DD7 line 5425 of include/wincontrol.inc >> $0000000000667557 line 528 of include/customedit.inc >> $000000000082BCE0 line 112 of lclmessageglue.pas >> Call trace for block $00007F712645C8C0 size 20 >> $00000000013CB5CC line 179 of frmspotter.pas >> $0000000000667CE0 line 652 of include/customedit.inc >> $0000000000667C5A line 644 of include/customedit.inc >> $00000000005E7E74 line 1203 of include/control.inc >> $0000000000431B9F >> $00000000005D8DD7 line 5425 of include/wincontrol.inc >> $0000000000667557 line 528 of include/customedit.inc >> $000000000082BCE0 line 112 of lclmessageglue.pas >> Call trace for block $00007F712645B300 size 20 >> $00000000013CB5CC line 179 of frmspotter.pas >> $0000000000667CE0 line 652 of include/customedit.inc >> $0000000000667C5A line 644 of include/customedit.inc >> $00000000005E7E74 line 1203 of include/control.inc >> $0000000000431B9F >> $00000000005D8DD7 line 5425 of include/wincontrol.inc >> $0000000000667557 line 528 of include/customedit.inc >> $000000000082BCE0 line 112 of lclmessageglue.pas >> Call trace for block $00007F712645CD40 size 20 >> $00000000013CB5CC line 179 of frmspotter.pas >> $0000000000667CE0 line 652 of include/customedit.inc >> $0000000000667C5A line 644 of include/customedit.inc >> $00000000005E7E74 line 1203 of include/control.inc >> $0000000000431B9F >> $00000000005D8DD7 line 5425 of include/wincontrol.inc >> $0000000000667557 line 528 of include/customedit.inc >> $000000000082BCE0 line 112 of lclmessageglue.pas >> Call trace for block $00007F712645A7C0 size 20 >> $00000000013CB5CC line 179 of frmspotter.pas >> $0000000000667CE0 line 652 of include/customedit.inc >> $0000000000667C5A line 644 of include/customedit.inc >> $00000000005E7E74 line 1203 of include/control.inc >> $0000000000431B9F >> $00000000005D8DD7 line 5425 of include/wincontrol.inc >> $0000000000667557 line 528 of include/customedit.inc >> $000000000082BCE0 line 112 of lclmessageglue.pas >> Call trace for block $00007F712645CF80 size 20 >> $00000000013CB5CC line 179 of frmspotter.pas >> $0000000000667CE0 line 652 of include/customedit.inc >> $0000000000667C5A line 644 of include/customedit.inc >> $00000000005E7E74 line 1203 of include/control.inc >> -- >> _______________________________________________ >> Lazarus mailing list >> Lazarus at lists.lazarus-ide.org >> https://lists.lazarus-ide.org/listinfo/lazarus > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > From r030t1 at gmail.com Mon Sep 24 12:26:27 2018 From: r030t1 at gmail.com (R0b0t1) Date: Mon, 24 Sep 2018 12:26:27 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: References: Message-ID: On Sun, Sep 23, 2018 at 1:16 PM, Michael Van Canneyt via Lazarus wrote: > > Hello, > > I've polished something that was started during the Lazarus Pro conference > in Bonn the last days, the IDE Spotter (this is a "Working Title"). > > The idea is to have a command box such as it exists in Atom or Visual code > studio. > > Press ALt-Shift-P (or Meta-Shift-P on Mac) to access it. > > Type the command you wish (e.g. open), navigate with arrows or click on the > correct match. The command will be executed. You can type multiple words. > all parts must be matched (and are colorized). > > You can find the package under 'components/idespotter' in SVN. > It should also work under 1.8.4/2.0rc1 for those that want to try it. > > There are some options under Tools - Options - Environment - IDE Spotter. > > Ideas for improvements are currently: > - Shrink window list if the match list is "small". > - Search in recent files (projects/units/packages) > - ... ? > > Please testdrive it. Ideas for improvements/comments/bugreports welcome > (well, the latter not so much ;)). > > Thanks go to James Ralston for pitching the idea, and Mattias for including > it in SVN ! > > Michael. This is a great idea. My window manager, i3, works very well with a feature like this. Sadly a lot of actions are application specific and require that specific application to support "hinting" (to work with a general solution) or to implement their own solution. You may want to look at https://pwmt.org/projects/girara/, which provides a vim-like input for an application. It finds use in Zathura (PDF reader) and Jumanji (browser, not usable iirc). Cheers, R0b0t1 From juha.manninen62 at gmail.com Mon Sep 24 12:59:56 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 24 Sep 2018 13:59:56 +0300 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <20180924094606.12518b83@limapholos.matflo.wg> Message-ID: On Mon, Sep 24, 2018 at 11:51 AM Michael Van Canneyt via Lazarus wrote: > I applied a possible fix; Please test and report. The Subversion server and bug tracker are down. I will try later again. Juha From michael at freepascal.org Mon Sep 24 13:03:40 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 13:03:40 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <20180924094606.12518b83@limapholos.matflo.wg> Message-ID: On Mon, 24 Sep 2018, Juha Manninen via Lazarus wrote: > On Mon, Sep 24, 2018 at 11:51 AM Michael Van Canneyt via Lazarus > wrote: >> I applied a possible fix; Please test and report. > > The Subversion server and bug tracker are down. I will try later again. They work here ? Michael. From nc-gaertnma at netcologne.de Mon Sep 24 13:24:53 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Sep 2018 13:24:53 +0200 Subject: [Lazarus] freepascal.org needs renewal Message-ID: <20180924132453.46a4b548@limapholos.matflo.wg> Hopefully some fpc guy reads the lazarus list: Going to www.freepascal.org gives: "www.freepascal.org has expired and is pending renewal or deletion." Also all mails to fpc lists bounce back because of this. Mattias From michael at freepascal.org Mon Sep 24 13:44:30 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 13:44:30 +0200 (CEST) Subject: [Lazarus] freepascal.org needs renewal In-Reply-To: <20180924132453.46a4b548@limapholos.matflo.wg> References: <20180924132453.46a4b548@limapholos.matflo.wg> Message-ID: On Mon, 24 Sep 2018, Mattias Gaertner via Lazarus wrote: > > Hopefully some fpc guy reads the lazarus list: > > Going to www.freepascal.org gives: > > "www.freepascal.org has expired and is pending renewal or deletion." > > Also all mails to fpc lists bounce back because of this. I've renewed the domain. All mails were being sent to my previous employer, so I never noticed this :( By adding 85.222.228.11 www.freepascal.org svn.freepascal.org docs.freepascal.org idefix.freepascal.org to your hosts file, you can establish a connection. Michael. From joseclaudio.faria at gmail.com Mon Sep 24 14:33:48 2018 From: joseclaudio.faria at gmail.com (Jose Claudio Faria) Date: Mon, 24 Sep 2018 09:33:48 -0300 Subject: [Lazarus] Is it possible to install the SynEdit used in Lazarus in Delphi? Message-ID: Hi, The SynEdit component used in Lazarus project runs only in the Lazarus IDE or is it possible to install it in Delphi 10.2 (for example)? Best, ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ Jose Claudio Faria UESC/DCET/Brasil joseclaudio.faria at gmail.com Telefones: 55(73)3680.5545 - UESC 55(73)99966.9100 - VIVO 55(73)98817.6159 - OI ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ If you have software to deal with statistics, you have arms; if you have good software, you have arms and legs; if you have software like R, you have arms, legs and wings... the height of your flight depends only on you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Mon Sep 24 14:51:23 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 24 Sep 2018 15:51:23 +0300 Subject: [Lazarus] IDE Spotter In-Reply-To: <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> Message-ID: <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves in listbox. (only one move. Ubuntu 18 gtk2). 2- colors (red, green) are configurable? Alex From aaa5500 at ya.ru Mon Sep 24 14:53:08 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 24 Sep 2018 15:53:08 +0300 Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> Message-ID: <46c91020-ffa8-2645-2230-a5586c405169@ya.ru> 3- input (edit) is not autosized, so height is small on Ubuntu. 4- if window is narrow: hotkey overlaps caption. better do: caption overlaps hotkey. Alex From aaa5500 at ya.ru Mon Sep 24 14:55:46 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 24 Sep 2018 15:55:46 +0300 Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <46c91020-ffa8-2645-2230-a5586c405169@ya.ru> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <46c91020-ffa8-2645-2230-a5586c405169@ya.ru> Message-ID: <367275af-d268-b889-3baf-a6cee52b573c@ya.ru> 5- on opening window, list is empty. i type "d", backspace, now list is _not empty? Alex From michael at freepascal.org Mon Sep 24 15:00:59 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 15:00:59 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> Message-ID: On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > 1- If i hold Up/Down key (edit is focused), i dont get many up/down > moves in listbox. > (only one move. Ubuntu 18 gtk2). Don't keep it pressed. press multiple times. > 2- colors (red, green) are configurable? Yes. See "Tools - Options - Environment - IDE Spotter". This is actually documented in the Readme.txt file of the package. The readme.txt is mandatory for lazarus packages. Seems like a waste of effort :( Michael. From michael at freepascal.org Mon Sep 24 15:02:05 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 15:02:05 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <46c91020-ffa8-2645-2230-a5586c405169@ya.ru> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <46c91020-ffa8-2645-2230-a5586c405169@ya.ru> Message-ID: On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > 3- input (edit) is not autosized, so height is small on Ubuntu. So ? > > 4- if window is narrow: hotkey overlaps caption. better do: caption > overlaps hotkey. I disagree. I specially chose it like this. Michael. From michael at freepascal.org Mon Sep 24 15:02:37 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 15:02:37 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <367275af-d268-b889-3baf-a6cee52b573c@ya.ru> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <46c91020-ffa8-2645-2230-a5586c405169@ya.ru> <367275af-d268-b889-3baf-a6cee52b573c@ya.ru> Message-ID: On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > 5- on opening window, list is empty. i type "d", backspace, now list is > _not empty? I will change this. Michael. From nc-gaertnma at netcologne.de Mon Sep 24 15:04:13 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Sep 2018 15:04:13 +0200 Subject: [Lazarus] Is it possible to install the SynEdit used in Lazarus in Delphi? In-Reply-To: References: Message-ID: <20180924150413.4ab1477e@limapholos.matflo.wg> On Mon, 24 Sep 2018 09:33:48 -0300 Jose Claudio Faria via Lazarus wrote: > Hi, > > The SynEdit component used in Lazarus project runs only in the Lazarus IDE > or is it possible to install it in Delphi 10.2 (for example)? No. For example it does not support UTF-16. Mattias From nc-gaertnma at netcologne.de Mon Sep 24 15:13:21 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Sep 2018 15:13:21 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> Message-ID: <20180924151321.382b3517@limapholos.matflo.wg> On Mon, 24 Sep 2018 15:00:59 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: > On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > > > 1- If i hold Up/Down key (edit is focused), i dont get many up/down > > moves in listbox. > > (only one move. Ubuntu 18 gtk2). > > Don't keep it pressed. press multiple times. > > > 2- colors (red, green) are configurable? > > Yes. See "Tools - Options - Environment - IDE Spotter". Maybe add a small button for settings. > This is actually documented in the Readme.txt file of the package. > > The readme.txt is mandatory for lazarus packages. > Seems like a waste of effort :( The readme.txt is for those browsing the folders, while the description in the lpk is for those installing a package. It's ok to use a short description and then point to the full description - location of your choice. And you can add a help button for users. Mattias From michael at freepascal.org Mon Sep 24 15:13:58 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 15:13:58 +0200 (CEST) Subject: [Lazarus] Domain again OK. Message-ID: Hi, The DNS for freepascal.org should again be OK. The renewal request was processed and the DNS servers reinstated. It may take some time for the renewal to reach your DNS server. My apologies for the oversight. Michael. From michael at freepascal.org Mon Sep 24 15:21:09 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 15:21:09 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: <20180924151321.382b3517@limapholos.matflo.wg> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> <20180924151321.382b3517@limapholos.matflo.wg> Message-ID: On Mon, 24 Sep 2018, Mattias Gaertner via Lazarus wrote: > On Mon, 24 Sep 2018 15:00:59 +0200 (CEST) > Michael Van Canneyt via Lazarus wrote: > >> On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: >> >> > 1- If i hold Up/Down key (edit is focused), i dont get many up/down >> > moves in listbox. >> > (only one move. Ubuntu 18 gtk2). >> >> Don't keep it pressed. press multiple times. >> >> > 2- colors (red, green) are configurable? >> >> Yes. See "Tools - Options - Environment - IDE Spotter". > > Maybe add a small button for settings. OK. How to open the settings dialog on a particular tab ? > > >> This is actually documented in the Readme.txt file of the package. >> >> The readme.txt is mandatory for lazarus packages. >> Seems like a waste of effort :( > > The readme.txt is for those browsing the folders, while the description > in the lpk is for those installing a package. The readme.txt is contained in the package files. So you can see it in the list. This seems kind of redundant. But I have referred to the readme in the description... Small effort after all. >It's ok to use a > short description and then point to the full description - > location of your choice. > And you can add a help button for users. Nono, I think the window should be as minimalistic as possible. I even think the settings button is already a violation of my almost non-existing esthetic feelings... :) Michael. From michael at freepascal.org Mon Sep 24 15:26:04 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 15:26:04 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <57d6df43-a80a-408d-0949-5dcedce058d4@ya.ru> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <46c91020-ffa8-2645-2230-a5586c405169@ya.ru> <57d6df43-a80a-408d-0949-5dcedce058d4@ya.ru> Message-ID: On Mon, 24 Sep 2018, AlexeyT wrote: >> 3- input (edit) is not autosized, so height is small on Ubuntu. >> >> So ? > > better set AutoSize=true, so height will be native. (1.3x bigger.) Done. Originally there were some resizing problems. At some point I indeed disabled AutoSize, because the effect of AutoSize for an edit is totally unclear to me. Michael. From aaa5500 at ya.ru Mon Sep 24 17:29:38 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 24 Sep 2018 18:29:38 +0300 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> <20180924151321.382b3517@limapholos.matflo.wg> Message-ID: <3b68e04c-cd43-7c5c-1047-5af1b1b794d4@ya.ru>  >I think the window should be as minimalistic as possible. good to add: spacing around edit (top, left, right) and listbox (left, right, bottom), 4-6pixels. -- Regards, Alexey From aaa5500 at ya.ru Mon Sep 24 17:31:15 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 24 Sep 2018 18:31:15 +0300 Subject: [Lazarus] IDE Spotter In-Reply-To: References: Message-ID: <85725833-8bde-f5a2-57af-966a45774c68@ya.ru> On 24.09.2018 13:26, R0b0t1 via Lazarus wrote: > IDE Spotter (this is a "Working Title"). Sublime Text and CudaText and Atom: name is Command Palette, better use this. -- Regards, Alexey From aaa5500 at ya.ru Mon Sep 24 17:40:06 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 24 Sep 2018 18:40:06 +0300 Subject: [Lazarus] IDE Spotter- issues Message-ID: 1- better use default color purple (or dark blue, Navy) instead of red. 2- w/o opened source editor, spotter don't called by hotkey. instead Project mainmenu pops up. -- Regards, Alexey From michael at freepascal.org Mon Sep 24 17:45:44 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 17:45:44 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: <85725833-8bde-f5a2-57af-966a45774c68@ya.ru> References: <85725833-8bde-f5a2-57af-966a45774c68@ya.ru> Message-ID: On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > On 24.09.2018 13:26, R0b0t1 via Lazarus wrote: >> IDE Spotter (this is a "Working Title"). > > Sublime Text and CudaText and Atom: name is Command Palette, better use this. Originally I did exactly that. But Mattias wanted a more catchy name. We still plan to add search in recent items, in which case it will be more than just commands... Michael. From michael at freepascal.org Mon Sep 24 17:47:53 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 17:47:53 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: References: Message-ID: On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > 1- better use default color purple (or dark blue, Navy) instead of red. Good point. Will change. > > 2- w/o opened source editor, spotter don't called by hotkey. instead > Project mainmenu pops up. Seems like a bug in the shortcut key handling of Lazarus... ? (Alt-P activates the 'Project' menu) Michael. From aaa5500 at ya.ru Mon Sep 24 17:48:20 2018 From: aaa5500 at ya.ru (Alexey) Date: Mon, 24 Sep 2018 18:48:20 +0300 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <85725833-8bde-f5a2-57af-966a45774c68@ya.ru> Message-ID: I suggest shorter title - Runner. From aaa5500 at ya.ru Mon Sep 24 17:52:39 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Mon, 24 Sep 2018 18:52:39 +0300 Subject: [Lazarus] IDE Spotter- issues Message-ID: 3- better add inner (inside listbox) left indent of text: 3-4pix. 4- right indent is too big (15-20pix even with scrollbar), use same 3-4pix as left (considering scrollbar) -- Regards, Alexey From michael at freepascal.org Mon Sep 24 18:02:42 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 18:02:42 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: References: Message-ID: On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > 3- better add inner (inside listbox) left indent of text: 3-4pix. Will do. > 4- right indent is too big (15-20pix even with scrollbar), use same > 3-4pix as left (considering scrollbar) Currently, the scroll bar width as reported is always used as indent, plus The 'W' width. Without it, the shortcut key was never drawn correctly. How do I know if the scrollbar is visible ? Michael. From michael at freepascal.org Mon Sep 24 18:17:05 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 24 Sep 2018 18:17:05 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <5f9757d5-e9a2-6160-32e5-18e434795638@ya.ru> References: <5f9757d5-e9a2-6160-32e5-18e434795638@ya.ru> Message-ID: On Mon, 24 Sep 2018, AlexeyT wrote: > >> >> How do I know if the scrollbar is visible ? > > TListbox.ClientWidth gives width considering scrollbar. OK, thank you. But should not the Rect in the ListBox OnDrawItem already take this into account ? Michael. From vojtech.cihak at atlas.cz Mon Sep 24 18:39:33 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Mon, 24 Sep 2018 18:39:33 +0200 Subject: [Lazarus] =?utf-8?q?IDE_Spotter-_issues?= In-Reply-To: 0000000090b40002c2fc0193505c References: , , , , <20180923182718.39dd7cb7@limapholos.matflo.wg>, , , <1569a163-7be5-fe40-291c-a976120514f5@gmail.com>, <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com>, <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com>, <46c91020-ffa8-2645-2230-a5586c405169@ya.ru>, , <57d6df43-a80a-408d-0949-5dcedce058d4@ya.ru> 0000000090b40002c2fc0193505c Message-ID: <20180924183933.448552D8@atlas.cz> TEdit.Autosize does autosizing of edit's Height to its Font (mainly font.size or font.height). It does not affect edit's Width. V. ______________________________________________________________ > Od: "Michael Van Canneyt via Lazarus" > Komu: "Lazarus mailing list" , "AlexeyT" > Datum: 24.09.2018 15:26 > Předmět: Re: [Lazarus] IDE Spotter- issues > On Mon, 24 Sep 2018, AlexeyT wrote: >> 3- input (edit) is not autosized, so height is small on Ubuntu. >> >> So ? > > better set AutoSize=true, so height will be native. (1.3x bigger.) Done. Originally there were some resizing problems. At some point I indeed disabled AutoSize, because the effect of AutoSize for an edit is totally unclear to me. Michael. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Mon Sep 24 19:30:51 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Sep 2018 19:30:51 +0200 Subject: [Lazarus] Domain again OK. In-Reply-To: References: Message-ID: <20180924193051.7ddc53fc@limapholos.matflo.wg> On Mon, 24 Sep 2018 15:13:58 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: > Hi, > > The DNS for freepascal.org should again be OK. It is. :) Mattias From nc-gaertnma at netcologne.de Mon Sep 24 19:52:37 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Sep 2018 19:52:37 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> <20180924151321.382b3517@limapholos.matflo.wg> Message-ID: <20180924195237.4d3eb18d@limapholos.matflo.wg> On Mon, 24 Sep 2018 15:21:09 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: >[...] > > Maybe add a small button for settings. > > OK. How to open the settings dialog on a particular tab ? Something like this LazarusIDE.DoOpenIDEOptions(TYourIDEOptionsFrame); > >> This is actually documented in the Readme.txt file of the package. > >> > >> The readme.txt is mandatory for lazarus packages. > >> Seems like a waste of effort :( > > > > The readme.txt is for those browsing the folders, while the description > > in the lpk is for those installing a package. > > The readme.txt is contained in the package files. > So you can see it in the list. This seems kind of redundant. There are multiple entry points to find your help, yes. > But I have referred to the readme in the description... Small effort after all. :) Mattias From wkitty42 at windstream.net Tue Sep 25 03:58:17 2018 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Mon, 24 Sep 2018 21:58:17 -0400 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> Message-ID: <3ef3ea62-6ce8-dfa2-2c83-9c441362276b@windstream.net> On 09/24/2018 09:00 AM, Michael Van Canneyt via Lazarus wrote: > On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > >> 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves >> in listbox. (only one move. Ubuntu 18 gtk2). > > Don't keep it pressed. press multiple times. auto-key-repeat is ignored? -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* From michael at freepascal.org Tue Sep 25 07:54:44 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 25 Sep 2018 07:54:44 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: <3ef3ea62-6ce8-dfa2-2c83-9c441362276b@windstream.net> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> <3ef3ea62-6ce8-dfa2-2c83-9c441362276b@windstream.net> Message-ID: On Mon, 24 Sep 2018, wkitty42--- via Lazarus wrote: > On 09/24/2018 09:00 AM, Michael Van Canneyt via Lazarus wrote: >> On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: >> >>> 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves >>> in listbox. (only one move. Ubuntu 18 gtk2). > >> Don't keep it pressed. press multiple times. > > > auto-key-repeat is ignored? I don't know what messages are sent when the key is held down. I assume when you keep the key down, only key-down messages are sent. At this moment, the key-up event is used. I will investigate it. Michael. From nc-gaertnma at netcologne.de Tue Sep 25 08:14:23 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 25 Sep 2018 08:14:23 +0200 Subject: [Lazarus] IDE Spotter In-Reply-To: References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> <3ef3ea62-6ce8-dfa2-2c83-9c441362276b@windstream.net> Message-ID: <20180925081423.50251f1a@limapholos.matflo.wg> On Tue, 25 Sep 2018 07:54:44 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: > On Mon, 24 Sep 2018, wkitty42--- via Lazarus wrote: > > > On 09/24/2018 09:00 AM, Michael Van Canneyt via Lazarus wrote: > >> On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > >> > >>> 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves > >>> in listbox. (only one move. Ubuntu 18 gtk2). > > >> Don't keep it pressed. press multiple times. > > > > > > auto-key-repeat is ignored? > > I don't know what messages are sent when the key is held down. KeyPress > I assume when you keep the key down, only key-down messages are sent. > At this moment, the key-up event is used. I will investigate it. Mattias From michael at freepascal.org Tue Sep 25 09:16:53 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 25 Sep 2018 09:16:53 +0200 (CEST) Subject: [Lazarus] IDE Spotter In-Reply-To: <20180925081423.50251f1a@limapholos.matflo.wg> References: <20180923182718.39dd7cb7@limapholos.matflo.wg> <1569a163-7be5-fe40-291c-a976120514f5@gmail.com> <941c4386-e8bf-f6b4-4517-5ccada5eef88@googlemail.com> <67c3ec28-8dbc-b8ae-f3ab-d8abfd702b30@gmail.com> <0366ce93-5d86-cd72-29ee-8e431a6b9f28@ya.ru> <3ef3ea62-6ce8-dfa2-2c83-9c441362276b@windstream.net> <20180925081423.50251f1a@limapholos.matflo.wg> Message-ID: On Tue, 25 Sep 2018, Mattias Gaertner via Lazarus wrote: > On Tue, 25 Sep 2018 07:54:44 +0200 (CEST) > Michael Van Canneyt via Lazarus wrote: > >> On Mon, 24 Sep 2018, wkitty42--- via Lazarus wrote: >> >> > On 09/24/2018 09:00 AM, Michael Van Canneyt via Lazarus wrote: >> >> On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: >> >> >> >>> 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves >> >>> in listbox. (only one move. Ubuntu 18 gtk2). > >> >> Don't keep it pressed. press multiple times. >> > >> > >> > auto-key-repeat is ignored? >> >> I don't know what messages are sent when the key is held down. > > KeyPress I doubt that. procedure TSpotterForm.ESearchKeyPress(Sender: TObject; var Key: char); This signature cannot handle an arrow key or shift state. Those are only available in key down/up events. Michael. From michael at freepascal.org Tue Sep 25 10:07:51 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 25 Sep 2018 10:07:51 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <5f9757d5-e9a2-6160-32e5-18e434795638@ya.ru> References: <5f9757d5-e9a2-6160-32e5-18e434795638@ya.ru> Message-ID: On Mon, 24 Sep 2018, AlexeyT wrote: > >> >> How do I know if the scrollbar is visible ? > > TListbox.ClientWidth gives width considering scrollbar. I committed a new version with some visual improvements and bugfixes: * Actually load saved options on startup :) * Button to go to settings * Margins around controls * Better Left and right margin inside listbox * Use different default colors (maroon, navy) * Handle keydown instead of key up, so repeat is enabled... Michael. From hdpc at talktalk.net Tue Sep 25 10:30:39 2018 From: hdpc at talktalk.net (Howard Page-Clark) Date: Tue, 25 Sep 2018 09:30:39 +0100 Subject: [Lazarus] IDE Spotter- issues In-Reply-To: References: <5f9757d5-e9a2-6160-32e5-18e434795638@ya.ru> Message-ID: <31a81f8d-eb55-3713-04df-89c8e66f788a@talktalk.net> On 25/09/18 09:07, Michael Van Canneyt via Lazarus wrote: > > > On Mon, 24 Sep 2018, AlexeyT wrote: > >> >>> >>> How do I know if the scrollbar is visible ? >> >> TListbox.ClientWidth gives width considering scrollbar. > > I committed a new version with some visual improvements and bugfixes: > > * Actually load saved options on startup :) > * Button to go to settings > * Margins around controls > * Better Left and right margin inside listbox > * Use different default colors (maroon, navy) > * Handle keydown instead of key up, so repeat is enabled... > > Michael. A further issue: Spotter appears not to know about menu items added by some packages. For instance, LazProfiler adds three new menu items to the IDE, but Spotter does not list them. Howard From michael at freepascal.org Tue Sep 25 14:13:51 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 25 Sep 2018 14:13:51 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <31a81f8d-eb55-3713-04df-89c8e66f788a@talktalk.net> References: <5f9757d5-e9a2-6160-32e5-18e434795638@ya.ru> <31a81f8d-eb55-3713-04df-89c8e66f788a@talktalk.net> Message-ID: On Tue, 25 Sep 2018, Howard Page-Clark via Lazarus wrote: > On 25/09/18 09:07, Michael Van Canneyt via Lazarus wrote: >> >> >> On Mon, 24 Sep 2018, AlexeyT wrote: >> >>> >>>> >>>> How do I know if the scrollbar is visible ? >>> >>> TListbox.ClientWidth gives width considering scrollbar. >> >> I committed a new version with some visual improvements and bugfixes: >> >> * Actually load saved options on startup :) >> * Button to go to settings >> * Margins around controls >> * Better Left and right margin inside listbox >> * Use different default colors (maroon, navy) >> * Handle keydown instead of key up, so repeat is enabled... >> >> Michael. > > A further issue: Spotter appears not to know about menu items added by > some packages. > > For instance, LazProfiler adds three new menu items to the IDE, but > Spotter does not list them. I don't know how lazprofiler installs itself, so I can't comment. But in general, I suppose that is possible. It only lists available commands. If a package installs a menu item without a command, then it will not be visible in the spotter... See it as an incentive for package maintainers to install commands instead of simply menu items : I can imagine that installing commands also makes them available for e.g. the editor toolbar. But I suppose some lazarus dev needs to comment on the exact inner workings. Michael. From aaa5500 at ya.ru Tue Sep 25 16:32:19 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Tue, 25 Sep 2018 17:32:19 +0300 Subject: [Lazarus] LConvEncoding patch to raise exception Message-ID: <89feb6d5-a97e-2c70-9433-5f8ed1b397b3@ya.ru> This tiny patch adds global var (option) which allows to raise exeption, when utf8 cannot convert to single byte page. needed for CudaText to detect that user text cannot convert to current codepage. its default is off (don't use exception). -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: cnv.diff Type: text/x-patch Size: 763 bytes Desc: not available URL: From mlistft at mail.ru Tue Sep 25 19:44:42 2018 From: mlistft at mail.ru (=?UTF-8?B?RlR1cnRsZQ==?=) Date: Tue, 25 Sep 2018 20:44:42 +0300 Subject: [Lazarus] =?utf-8?q?IDE_Spotter-_issues?= In-Reply-To: References: <5f9757d5-e9a2-6160-32e5-18e434795638@ya.ru> Message-ID: <1537897482.588080564@f480.i.mail.ru> >I committed a new version with some visual improvements and bugfixes: > >* Actually load saved options on startup :) >* Button to go to settings >* Margins around controls >* Better Left and right margin inside listbox >* Use different default colors (maroon, navy) >* Handle keydown instead of key up, so repeat is enabled... > 1. Standard for margins around controls in Lazarus is 6 pixels. Now is lesser. This is very noticeable visually. 2. Spotter does not respect IDE option "Prefer double-click over single-click". It is very uncomfortable for people who prefer double click in lists. -- FTurtle -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Tue Sep 25 20:27:54 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 25 Sep 2018 20:27:54 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <1537897482.588080564@f480.i.mail.ru> References: <5f9757d5-e9a2-6160-32e5-18e434795638@ya.ru> <1537897482.588080564@f480.i.mail.ru> Message-ID: On Tue, 25 Sep 2018, FTurtle via Lazarus wrote: > >> I committed a new version with some visual improvements and bugfixes: >> >> * Actually load saved options on startup :) >> * Button to go to settings >> * Margins around controls >> * Better Left and right margin inside listbox >> * Use different default colors (maroon, navy) >> * Handle keydown instead of key up, so repeat is enabled... >> > > 1. Standard for margins around controls in Lazarus is 6 pixels. Now is lesser. This is very noticeable visually. Really ? You must have 100/10 vision. I don't see any difference. But I can say with certainty the IDE is not consistent in this regard, e.g. the project inspector uses different spacing than the IDE Options dialog. The only reason I saw that is because of your remark I started putting things side by side. > > 2. Spotter does not respect IDE option "Prefer double-click over single-click". It is very uncomfortable for people who prefer double click in lists. Really ? I did not know all these things. The single click was chosen because this is how it works in Atom. Where are all these options or rules described ? Because the IDE Tools - Options page does not contain such a setting. Or at least, I didn't find it. If I select something, it's always single click. Project inspector, IDE Tools - Options treeview. Everywhere. Michael. From mlistft at mail.ru Tue Sep 25 22:49:18 2018 From: mlistft at mail.ru (=?UTF-8?B?RlR1cnRsZQ==?=) Date: Tue, 25 Sep 2018 23:49:18 +0300 Subject: [Lazarus] =?utf-8?q?IDE_Spotter-_issues?= In-Reply-To: References: <1537897482.588080564@f480.i.mail.ru> Message-ID: <1537908558.516165278@f433.i.mail.ru> >> 1. Standard for margins around controls in Lazarus is 6 pixels. Now is lesser. This is very noticeable visually. > >Really ? You must have 100/10 vision. I don't see any difference. > >But I can say with certainty the IDE is not consistent in this regard, e.g. >the project inspector uses different spacing than the IDE Options dialog. >The only reason I saw that is because of your remark I started putting >things side by side. Read wiki: http://wiki.lazarus.freepascal.org/GUI_design_guidelines#Spacings_and_sizes "Spacing between elements: 6 pixels." >> 2. Spotter does not respect IDE option "Prefer double-click over single-click". It is very uncomfortable for people who prefer double click in lists. > >Really ? I did not know all these things. > >The single click was chosen because this is how it works in Atom. > >Where are all these options or rules described ? > >Because the IDE Tools - Options page does not contain such a setting. >Or at least, I didn't find it. Don't forget about filter. Just insert "do". It placed here: Tools/Options/Environment/General/Section "Mouse Action", Checkbox "Prefer double-click over single-click". >If I select something, it's always single click. >Project inspector, IDE Tools - Options treeview. Everywhere. This option has an impact, in particular, on "Search results" form, "ToDo List" and etc.  -- FTurtle -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlistft at mail.ru Tue Sep 25 23:45:03 2018 From: mlistft at mail.ru (=?UTF-8?B?RlR1cnRsZQ==?=) Date: Wed, 26 Sep 2018 00:45:03 +0300 Subject: [Lazarus] =?utf-8?q?IDE_Spotter-_issues?= In-Reply-To: <1537908558.516165278@f433.i.mail.ru> References: <1537908558.516165278@f433.i.mail.ru> Message-ID: <1537911903.763833520@f474.i.mail.ru> >Read wiki: >http://wiki.lazarus.freepascal.org/GUI_design_guidelines#Spacings_and_sizes > >"Spacing between elements: 6 pixels." > More suitable quote from wiki: http://wiki.lazarus.freepascal.org/GUI_design_guidelines#BorderSpacing   "A typical borderspacing of 6 pixels around a component is used." -- FTurtle -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Wed Sep 26 00:28:56 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 26 Sep 2018 00:28:56 +0200 (CEST) Subject: [Lazarus] IDE Spotter- issues In-Reply-To: <1537908558.516165278@f433.i.mail.ru> References: <1537897482.588080564@f480.i.mail.ru> <1537908558.516165278@f433.i.mail.ru> Message-ID: On Tue, 25 Sep 2018, FTurtle via Lazarus wrote: >> The single click was chosen because this is how it works in Atom. >> >> Where are all these options or rules described ? >> >> Because the IDE Tools - Options page does not contain such a setting. >> Or at least, I didn't find it. > Don't forget about filter. Just insert "do". > It placed here: > Tools/Options/Environment/General/Section "Mouse Action", Checkbox "Prefer double-click over single-click". I already found it. It's not available in packages, only forms internal to the IDE can access this setting. > >> If I select something, it's always single click. >> Project inspector, IDE Tools - Options treeview. Everywhere. > This option has an impact, in particular, on "Search results" form, "ToDo List" and etc.  I discussed this with Mattias. While the option you mention is useful for the windows you mention, We think the IDE spotter is more like a dropdown in functionality. So single click. But I will change the spacing. Michael. From andrea.mauri.75 at gmail.com Wed Sep 26 17:42:48 2018 From: andrea.mauri.75 at gmail.com (Andrea Mauri) Date: Wed, 26 Sep 2018 17:42:48 +0200 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: <20180919135011.501e9aa0@limapholos.matflo.wg> References: <20180919135011.501e9aa0@limapholos.matflo.wg> Message-ID: <2d5794bd-9d20-dd01-b834-d2fbcd467a6c@gmail.com> I have issues with TListView and cocoa using lazarus trunk. I didn't tested on Lazarus 2.0 RC1. See forum post: http://forum.lazarus.freepascal.org/index.php/topic,42671.0.html Il 19/09/2018 13:50, Mattias Gaertner via Lazarus ha scritto: > The Lazarus team is glad to announce the first release candidate of > Lazarus 2.0. > > This release was built with FPC 3.0.4. > The previous release Lazarus 1.8.4 was built with FPC 3.0.4 as well. > > Here is the list of fixes for Lazarus 2.0.x: > http://wiki.freepascal.org/Lazarus_2.0_fixes_branch > > Here is the list of changes for Lazarus and Free Pascal: > http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes > http://wiki.lazarus.freepascal.org/User_Changes_3.0.4 > > The release is available for download on SourceForge: > http://sourceforge.net/projects/lazarus/files/ > > Choose your CPU, OS, distro and then the "Lazarus 2.0RC1" directory. > > Checksums for the SourceForge files: > http://www.lazarus-ide.org/index.php?page=checksums#2_0_0RC1 > > Minimum requirements: > > Windows: > 2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit. > > FreeBSD/Linux: > gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit. > > Mac OS X: > 10.5 to 10.12; Carbon (32bit), Cocoa (64bit, beta), qt and > qt5 (32 or 64bit). > > The svn tag is > http://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_0_RC1 > > For people who are blocked by SF, the Lazarus releases from SourceForge > are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/ > and later at (after some time for synchronization) > http://mirrors.iwi.me/lazarus/ > > == Why should everybody (including you) test the release candidate? == > > In the past weeks the Lazarus team has stabilized the 2.0 fixes branch. > The resulting 2.0RC1 is now stable enough to be used by any one for > test purposes. > > However many of the fixes and new features that where committed since > the release of 1.8 required changes to the code of existing features > too. While we have tested those ourself, there may still be problems > that only occur with very specific configurations or one project in a > million. > > Yes, it may be that you are the only person with a project, that will > not work in the new IDE. So if you do not test, we can not fix it. > > Please do not wait for the final release, in order to test. It may be > too late. Once the release is out we will have to be more selective > about which fixes can be merged for further 2.0.x releases. So it may > be, that we can not merge the fix you require. And then you will miss > out on all the new features. > > == How to test == > > Download and install the 2.0 RC1. > - On Windows you can install as a 2ndary install, that will not affect > your current install: > http://wiki.lazarus.freepascal.org/Multiple_Lazarus#Installation_of_multiple_Lazarus > - On other platforms, if you install to a new location you need to use > --primary-config-path > > In either case you should make backups. (including your primary config) > > Open your project in the current Lazarus (1.8.x), and use "Publish > Project" from the project menu. This creates a clean copy of your > project. > > You can then open that copy in the RC1. Please test: > - If you can edit forms in the designer > - rename components / change properties in Object inspector / Add new > events > - Add components to form / Move components on form > - Frames, if you use them > - If you can navigate the source code (e.g. jump to implementation) > - Auto completion in source code > - Compile, debug and run > - Anything else you use in your daily work > > > Mattias > From juha.manninen62 at gmail.com Wed Sep 26 18:05:47 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 26 Sep 2018 19:05:47 +0300 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: <2d5794bd-9d20-dd01-b834-d2fbcd467a6c@gmail.com> References: <20180919135011.501e9aa0@limapholos.matflo.wg> <2d5794bd-9d20-dd01-b834-d2fbcd467a6c@gmail.com> Message-ID: On Wed, Sep 26, 2018 at 6:43 PM Andrea Mauri via Lazarus wrote: > I didn't tested on Lazarus 2.0 RC1. Well, this theread is about Lazarus 2.0 RC1. Maybe you should write about it elsewhere. Cocoa is under construction. It will not be stable in Lazarus 2.0. Juha From juha.manninen62 at gmail.com Wed Sep 26 20:08:32 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 26 Sep 2018 21:08:32 +0300 Subject: [Lazarus] Package -> New Component ... Message-ID: Hello I improved the New Component feature and its GUI in r59170. Now it accepts 3 icons for different resolutions. The higher resolution icons will be picked automatically if their file names have '_150' and '_200' suffix. They can be selected manually, too. Parts of the GUI were dummy. For example it allowed a user to change a unit's filename but then complained if he did so. Now a generated file name is shown in a label. The directory for a unit file can still be selected. There are other minor improvements although more would be needed I guess. Please check out. The resource type generated is still the old Lazarus Recourse (.lrs). The next step is to generate the FPC's Delphi compatible resource (.res). I try to hurry this up because a new book about Lazarus will have a chapter about this New Component feature and the old dialog was badly outdated. The HighDPI support with multi-resolution icons is a major new feature in Lazarus / LCL after all. I would like to push this improvement to the 2.0 branch although it touches the IDE's resource strings and thus breaks the basic rule of letting translators do their job in peace after a release branch is forked. What do you think? Juha From michael at freepascal.org Wed Sep 26 21:17:58 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 26 Sep 2018 21:17:58 +0200 (CEST) Subject: [Lazarus] Spotter enhancements Message-ID: Hi, I've enhanced the IDE spotter. It now also searches (if you want) in recent files/projects/packages. You can configure this in the Tools - Options - IDE Spotter. Selecting a recent files/project/package will open it (obviously). Note that this version of IDE spotter no longer will compile in 1.8.4, since a change in the IDE interfaces was needed. Next step is to add searching for components and select them on the component palette and/or drop them on the currently selected control in the form designer. Michael. From ganmax at narod.ru Thu Sep 27 01:13:14 2018 From: ganmax at narod.ru (Maxim Ganetsky) Date: Thu, 27 Sep 2018 02:13:14 +0300 Subject: [Lazarus] Package -> New Component ... In-Reply-To: References: Message-ID: <4ee88477-6592-5bb3-ab1f-d0251f8a3380@narod.ru> 26.09.2018 21:08, Juha Manninen via Lazarus пишет: > I try to hurry this up because a new book about Lazarus will have a > chapter about this New Component feature and the old dialog was badly > outdated. The HighDPI support with multi-resolution icons is a major > new feature in Lazarus / LCL after all. Hurrying and rushing features at the last moment is never good. Chances are the dialog will have regressions and it may turn out that further significant rework will be needed. > I would like to push this improvement to the 2.0 branch although it > touches the IDE's resource strings and thus breaks the basic rule of > letting translators do their job in peace after a release branch is > forked. > What do you think? Changes are quite minimal, so I don't see any major problem from this side. -- Best regards, Maxim Ganetsky mailto:ganmax at narod.ru From juha.manninen62 at gmail.com Thu Sep 27 10:12:31 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 27 Sep 2018 11:12:31 +0300 Subject: [Lazarus] Package -> New Component ... In-Reply-To: <4ee88477-6592-5bb3-ab1f-d0251f8a3380@narod.ru> References: <4ee88477-6592-5bb3-ab1f-d0251f8a3380@narod.ru> Message-ID: On Thu, Sep 27, 2018 at 2:13 AM Maxim Ganetsky via Lazarus wrote: > Hurrying and rushing features at the last moment is never good. Chances > are the dialog will have regressions and it may turn out that further > significant rework will be needed. In general that is true. However my changes were quite moderate in complexity. The code does not switch to the new resource type but still uses the old .lrs. It does not change the way of selecting ancestor type which will need improvements later. The changes for GUI fixed some clear usability bugs. I tested the multi-icon feature thoroughly but only with Linux + KDE so far. Windows people, please test and give feedback. > Changes are quite minimal, so I don't see any major problem from this side. In that case I would say it is safe to merge after getting some feedback from testers. BTW, the new book does not need to explain which resource type is used when intruducing this feature and dialog. We can "quietly" update for the new .res type later, maybe in Lazarus 2.0.2. Regards, Juha From fluisgirardi at gmail.com Thu Sep 27 11:53:08 2018 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Thu, 27 Sep 2018 06:53:08 -0300 Subject: [Lazarus] Mouse wheel problem In-Reply-To: <20180919133600.8386CCA6@atlas.cz> References: <20180918170502.3AEECDC6@atlas.cz> <20180918220259.14D04F11@atlas.cz> <20180919133600.8386CCA6@atlas.cz> Message-ID: Hi! Appears to be fixed in Lazarus 2.0 RC1. Em qua, 19 de set de 2018 às 08:36, Vojtěch Čihák escreveu: > Hi, I tested with Lazarus 2.1.0 r59059M FPC 3.3.1 x86_64-linux-qt, Qt > 4.8.7 & libQt4pas 5.2.5, Qt 5.11.1 & libQt5pas 2.6.r57057-1, GTk 2.24.32 > > > > V. > > ______________________________________________________________ > > Od: "Fabio Luis Girardi" > > Komu: "Vojtěch Čihák" > > Datum: 19.09.2018 12:49 > > Předmět: Re: [Lazarus] Mouse wheel problem > > > What's your version of Lazarus and OS (including QT versions)? > > Em Ter, 18 de set de 2018 17:03, Vojtěch Čihák > escreveu: > >> Here the "Handled" trick works well for Qt4 and Qt5, no matter if the >> ItemIndex is -1 or >=0 or if the Combo is focused or not. Problem remains >> with GTk2 only. >> >> >> >> V. >> >> ______________________________________________________________ >> > Od: "Fabio Luis Girardi" >> > Komu: "Vojtěch Čihák" >> > Datum: 18.09.2018 20:37 >> > Předmět: Re: [Lazarus] Mouse wheel problem >> > >> Hi! >> Even using this event, if the combobox selection is changed one time >> (ItemIndex<>-1), the mouse wheel will change the selection if the mouse >> cursor is over the combobox. >> I tried to modify the qt widget, but no success. Appears to be an >> LCL issue, since QT docs says to change the focus police to QtStrongFocus >> to solve this problem (I don't find the fix for GTK2) >> The best regards, >> Fabio >> >>> >>> >>> PascalSCADA Project >>> http://sourceforge.net/projects/pascalscada >>> http://www.pascalscada.com >>> >>> >>> ---------- >>> >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> Lazarus at lists.lazarus-ide.org >>> https://lists.lazarus-ide.org/listinfo/lazarus >> >> >> -- >> The best regards, >> >> Fabio Luis Girardi >> PascalSCADA Project >> http://sourceforge.net/projects/pascalscada >> http://www.pascalscada.com >> > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Thu Sep 27 14:16:40 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Thu, 27 Sep 2018 14:16:40 +0200 Subject: [Lazarus] Package -> New Component ... In-Reply-To: References: Message-ID: <511689c2-ae40-1798-5e73-ffa949a4681d@freenet.de> Once all images are loaded into the dialog the 32x32 and 48x48 images are truncated because the three buttons have the same size. Wouldn't it be better to adapt the size of the buttons to the size of the images, or make the buttons as large as the largest image so that truncating is avoided? From juha.manninen62 at gmail.com Thu Sep 27 17:10:21 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 27 Sep 2018 18:10:21 +0300 Subject: [Lazarus] Package -> New Component ... In-Reply-To: <511689c2-ae40-1798-5e73-ffa949a4681d@freenet.de> References: <511689c2-ae40-1798-5e73-ffa949a4681d@freenet.de> Message-ID: On Thu, Sep 27, 2018 at 3:19 PM Werner Pamler via Lazarus wrote: > Once all images are loaded into the dialog the 32x32 and 48x48 images > are truncated because the three buttons have the same size. Wouldn't it > be better to adapt the size of the buttons to the size of the images, or > make the buttons as large as the largest image so that truncating is > avoided? Yes. I will look at this. Do the icons work OK in component palette after a component got installed? Juha From werner.pamler at freenet.de Thu Sep 27 19:20:59 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Thu, 27 Sep 2018 19:20:59 +0200 Subject: [Lazarus] Package -> New Component ... In-Reply-To: References: <511689c2-ae40-1798-5e73-ffa949a4681d@freenet.de> Message-ID: <72674770-f3f1-9eb8-42b0-1ceb3ce74a16@freenet.de> Am 27.09.2018 um 17:10 schrieb Juha Manninen via Lazarus: > Do the icons work OK in component palette after a component got installed? Yes, I tested on a VM with 150% resolution, and the icon of the newly created test component looked as crisp as the others. From juha.manninen62 at gmail.com Fri Sep 28 09:07:29 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 28 Sep 2018 10:07:29 +0300 Subject: [Lazarus] Package -> New Component ... In-Reply-To: <72674770-f3f1-9eb8-42b0-1ceb3ce74a16@freenet.de> References: <511689c2-ae40-1798-5e73-ffa949a4681d@freenet.de> <72674770-f3f1-9eb8-42b0-1ceb3ce74a16@freenet.de> Message-ID: One more issue: Are the labels 'Icon 24x24:', 'Icon 36x36:' and 'Icon 48x48:' good or should they mention the percentages 150% and 200%? I have the resizable button code ready and will comit it soon. Juha From werner.pamler at freenet.de Fri Sep 28 11:31:31 2018 From: werner.pamler at freenet.de (Werner Pamler) Date: Fri, 28 Sep 2018 11:31:31 +0200 Subject: [Lazarus] Package -> New Component ... In-Reply-To: References: <511689c2-ae40-1798-5e73-ffa949a4681d@freenet.de> <72674770-f3f1-9eb8-42b0-1ceb3ce74a16@freenet.de> Message-ID: <30cb398c-de78-85b8-b49c-5e2854a8543e@freenet.de> Am 28.09.2018 um 09:07 schrieb Juha Manninen via Lazarus: > One more issue: Are the labels 'Icon 24x24:', 'Icon 36x36:' and 'Icon > 48x48:' good or should they mention the percentages 150% and 200%? I'd keep it like this. 48x48 is clear to everybody, 200% maybe not. And it also makes clear that the standard palette icon size is 24x24, not 16x16. Playing with the "New component" dialog a bit more I noticed that it is possible to select a 32x32 image although the 24x24 button has been pressed. My first thoughts were: Shouldn't the routine check for the image size? But maybe this is intentional - I don't even know how the component palette behaves when it gets a component with a non-standard sized icon. I don't know if this already happens, but the dialog should try to load the image and see if the file is not defective - otherwise the user might see unexpected errors after installation of the new component. Another idea: the dialog should use the path to the previously selected image as InitialDirectory of the FileDialog because images of different sizes are usually stored in close vicinity of the folder hierarchy. Currently, the dialog switches back to the package directory, and I have to navigate to the images again. Werner From juha.manninen62 at gmail.com Fri Sep 28 13:25:18 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 28 Sep 2018 14:25:18 +0300 Subject: [Lazarus] Package -> New Component ... In-Reply-To: <30cb398c-de78-85b8-b49c-5e2854a8543e@freenet.de> References: <511689c2-ae40-1798-5e73-ffa949a4681d@freenet.de> <72674770-f3f1-9eb8-42b0-1ceb3ce74a16@freenet.de> <30cb398c-de78-85b8-b49c-5e2854a8543e@freenet.de> Message-ID: On Fri, Sep 28, 2018 at 12:34 PM Werner Pamler via Lazarus wrote: > Playing with the "New component" dialog a bit more I noticed that it is > possible to select a 32x32 image although the 24x24 button has been > pressed. My first thoughts were: Shouldn't the routine check for the > image size? But maybe this is intentional - I don't even know how the > component palette behaves when it gets a component with a non-standard > sized icon. AFAIK the icons are scaled then. It may depend on widgetset. At least nothing crashes with a non-standard icon. I would keep it now like it is. The size told in the label can be seen as a recommendation. A user must be able to choose an icon with different size if that is all he has. Later we can tweak with errors and warnings about wrong sizes if needed. > I don't know if this already happens, but the dialog should try to load > the image and see if the file is not defective - otherwise the user > might see unexpected errors after installation of the new component. The image is loaded into the button glyph. Any defect should be visible then. This can also be tweaked further later if needed. > Another idea: the dialog should use the path to the previously selected > image as InitialDirectory of the FileDialog because images of different > sizes are usually stored in close vicinity of the folder hierarchy. > Currently, the dialog switches back to the package directory, and I have > to navigate to the images again. I improved that, too. Please test with r59176. It includes the button resize logic. I plan to mark these 2 commits for merging to fixes_2.0. Maxim showed green light for changing resource strings there. Juha From juha.manninen62 at gmail.com Sat Sep 29 09:46:36 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 29 Sep 2018 10:46:36 +0300 Subject: [Lazarus] Package -> New Component ... In-Reply-To: References: <511689c2-ae40-1798-5e73-ffa949a4681d@freenet.de> <72674770-f3f1-9eb8-42b0-1ceb3ce74a16@freenet.de> <30cb398c-de78-85b8-b49c-5e2854a8543e@freenet.de> Message-ID: One clarification: The InitialDirectory for selecting images is set when the unit directory changes. Usually it is the package directory. When an icon is selected from another directory, the code relies on OS / widgetset to remember the new path and use it next time the dialog opens. It works with GTK2 and QT. Does it work the same way with all widgetsets, I am not sure. Juha