Re: [Lazarus] gdb problems on ubtuntu 19.10
If anyone wants to follow along with this problem, I've posted a question about it on askubuntu here: https://askubuntu.com/questions/1185729/ubuntu-19-10-gdb-nearly-unusable-long-delay -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] gtk2 font sizes
I have just upgraded to Fedora 31, and noticed some odd effects with font sizes. With some investigation the cause seems to be that the underlying font sizes can be a non-integer number of pixels; with a 'MonoSpace' example looking at gtk2widgetset.inc:5919: TextMetric.tmAscent := pango_font_metrics_get_ascent(APangoMetrics) div PANGO_SCALE; evaluates as 11406/1024 = 11.129 which is truncated to 11 TextMetric.tmDescent := pango_font_metrics_get_descent(APangoMetrics) div PANGO_SCALE; evaluates as 2898/1024 = 2.83 which is truncated to 2. The effective font height seems to be 2 pixels larger in this case, ot at least that is what is required to fix previously working code. I wonder if these calculations should be rounded up rather than down? Colin -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
On Sat, 2 Nov 2019, Sven Barth via lazarus wrote: Martin Frb via lazarus schrieb am Sa., 2. Nov. 2019, 16:29: You mention using RealVNC in another mail. IIRC there were some very strange key effects reported with vnc in the past (no idea if that applies to RealVNC). From distant memory, vnc sends control keys with a timestamp that does not match the interpretation that I would have from the doc of this field That said I have no idea if vnc is right or not. There is an argument that it works with other apps, but that is void, because other apps may not use this (timestamp) field at all, and then if it was wrong they would ignore that. Not sure what happened with regards to this entire story. I myself had reported something similar with VNC, so it's indeed likely to be the culprit. Yes. I've found Lazarus or any LCL app to be unworkable with VNC :( Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
Martin Frb via lazarus schrieb am Sa., 2. Nov. 2019, 16:29: > You mention using RealVNC in another mail. > > IIRC there were some very strange key effects reported with vnc in the > past (no idea if that applies to RealVNC). > From distant memory, vnc sends control keys with a timestamp that does > not match the interpretation that I would have from the doc of this > field That said I have no idea if vnc is right or not. > There is an argument that it works with other apps, but that is void, > because other apps may not use this (timestamp) field at all, and then > if it was wrong they would ignore that. Not sure what happened with > regards to this entire story. > I myself had reported something similar with VNC, so it's indeed likely to be the culprit. Regards, Sven > -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
On 11/2/2019 7:42 AM, Martin Frb via lazarus wrote: Alt - n (1-9) is "goto source editor n" (switch to tab n) Why this triggers on altgr for you, I am not sure I am almost certain that this is an issue with the access VNC, and would not occur on the RPi if you connect a keyboard to it and test it thus directly... Ralf -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
On 02/11/2019 16:10, Bo Berglund via lazarus wrote: On Sat, 2 Nov 2019 15:42:54 +0100, Martin Frb via lazarus wrote: Alt - n (1-9) is "goto source editor n" (switch to tab n) Why this triggers on altgr for you, I am not sure OK, but then where in Key Mappings do I find it so I can disable it? It is very confusing for me not having used these before. I go to Tools/Options/Editor/Key Mappings And here I find a bewildering number of functions... You can search for the name (left filter edit). Though there is a space "Go to source editor" Or you can search by key (button "Find Key combination") In this case the entries are in "Source Notebook commands" if you look at the main tree nodes. SourceNotebookCommands/GoToPriorEditor is set to use Ctrl+Shift+Tab And this does exactly what the AltGr key by itself does, except it wraps around from the first tab to the last (rightmost) when used in the leftmost tab. AltGr does not do that, it stops at he leftmost tab. I have no idea what your alt-gr key does You mention using RealVNC in another mail. IIRC there were some very strange key effects reported with vnc in the past (no idea if that applies to RealVNC). From distant memory, vnc sends control keys with a timestamp that does not match the interpretation that I would have from the doc of this field That said I have no idea if vnc is right or not. There is an argument that it works with other apps, but that is void, because other apps may not use this (timestamp) field at all, and then if it was wrong they would ignore that. Not sure what happened with regards to this entire story. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
On Sat, 2 Nov 2019 15:42:54 +0100, Martin Frb via lazarus wrote: >Alt - n (1-9) is "goto source editor n" (switch to tab n) >Why this triggers on altgr for you, I am not sure OK, but then where in Key Mappings do I find it so I can disable it? It is very confusing for me not having used these before. I go to Tools/Options/Editor/Key Mappings And here I find a bewildering number of functions... SourceNotebookCommands/GoToPriorEditor is set to use Ctrl+Shift+Tab And this does exactly what the AltGr key by itself does, except it wraps around from the first tab to the last (rightmost) when used in the leftmost tab. AltGr does not do that, it stops at he leftmost tab. Very confusing -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
On 02/11/2019 15:34, Bo Berglund via lazarus wrote: On Sat, 2 Nov 2019 15:04:15 +0100, Sven Barth via lazarus wrote: Bo Berglund via lazarus schrieb am Sa., 2. Nov. 2019, 14:59: If I am in a tab to the right (not the left-most tab) with the cursor anywhere in the code and I want to add say a { character, I need to press AltGr (the right hand Alt key) and the 7 key. This normally results in a { character being output at the cursor. But in Lazarus the focus immediately shifts to a different tab when AltGr is pressed!! How did that happen? All European languages to my knowledge uses the AltGr key to compose special chars like {[]}\|~ Why is Lazarus stealing the AltGr key? Check the key mappings in Lazarus' options. Nothing to see there (don't even know how the AltGr key would be listed). But now I have tested all threee versions I have on the RPi4 (2.0.2, 2.0.4 and 2.0.6) and all of them do this... Alt - n (1-9) is "goto source editor n" (switch to tab n) Why this triggers on altgr for you, I am not sure -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...
On 02/11/2019 14:48, Bo Berglund via lazarus wrote: Now it happened again! I was compiling the program then executing it inside a terminal (external to Lazarus) and then repeating this to find my bug. When I found it I doubleclicked the name of my logging component to copy its name, but instead instanly Lazarus disappeared! I will now revert back to Lazarus 2.0.4 instead. It would be really helpful if you could try to get a trace. (see my last reply) Otherwise this issue may be present for a lot of future versions. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
On Sat, 2 Nov 2019 15:04:15 +0100, Sven Barth via lazarus wrote: >Bo Berglund via lazarus schrieb am Sa., 2. >Nov. 2019, 14:59: > >> On Sat, 02 Nov 2019 11:10:32 +0100, Bo Berglund via lazarus >> wrote: >> >> I just found another strange IDE "feature": >> >> If I am in a tab to the right (not the left-most tab) with the cursor >> anywhere in the code and I want to add say a { character, I need to >> press AltGr (the right hand Alt key) and the 7 key. This normally >> results in a { character being output at the cursor. >> >> But in Lazarus the focus immediately shifts to a different tab when >> AltGr is pressed!! >> How did that happen? All European languages to my knowledge uses the >> AltGr key to compose special chars like {[]}\|~ >> Why is Lazarus stealing the AltGr key? >> > >Check the key mappings in Lazarus' options. > Nothing to see there (don't even know how the AltGr key would be listed). But now I have tested all threee versions I have on the RPi4 (2.0.2, 2.0.4 and 2.0.6) and all of them do this... So I started my 2.0.4 on the Windows7 laptop (that is where I started the console project), and this does NOT happen there. No tab switching just inserting the correct characters. Also started a text editor on the RPi4 and typed in my commands there to create the special chars. Worked like a charm. No problems there at all. So it seems like Lazarus on Raspbian (maybe also on Debian in general) will hook into the AltGr key and do something unexpected with it. The fact that I am using RealVNC to access the desktop from Windows does not really matter because then it would be a problem also in text editor outside of Lazarus, which it isn't. Right now in RPi4 I have to use a text editor window from which I can copy the needed special chars and paste them into Lazarus since Lazarus itself is unable to handle them correctly... Funny note: If I am on the leftmost tab in Lazarus on RPi4, then I can compose the special chars just fine... So another workaround would be to move the tab holding the file to edit to the leftmost position before editing... -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
Bo Berglund via lazarus schrieb am Sa., 2. Nov. 2019, 14:59: > On Sat, 02 Nov 2019 11:10:32 +0100, Bo Berglund via lazarus > wrote: > > I just found another strange IDE "feature": > > If I am in a tab to the right (not the left-most tab) with the cursor > anywhere in the code and I want to add say a { character, I need to > press AltGr (the right hand Alt key) and the 7 key. This normally > results in a { character being output at the cursor. > > But in Lazarus the focus immediately shifts to a different tab when > AltGr is pressed!! > How did that happen? All European languages to my knowledge uses the > AltGr key to compose special chars like {[]}\|~ > Why is Lazarus stealing the AltGr key? > Check the key mappings in Lazarus' options. Regards, Sven > -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
On Sat, 02 Nov 2019 11:10:32 +0100, Bo Berglund via lazarus wrote: I just found another strange IDE "feature": If I am in a tab to the right (not the left-most tab) with the cursor anywhere in the code and I want to add say a { character, I need to press AltGr (the right hand Alt key) and the 7 key. This normally results in a { character being output at the cursor. But in Lazarus the focus immediately shifts to a different tab when AltGr is pressed!! How did that happen? All European languages to my knowledge uses the AltGr key to compose special chars like {[]}\|~ Why is Lazarus stealing the AltGr key? -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...
On Fri, 1 Nov 2019 23:03:16 +0100, Martin Frb via lazarus wrote: >> I have never before encountered a crash like this, could it be because >> the IDE is so "fresh out of the presses"? >Good question "why". That can't be answered easily. And the issue could >be new or old. > >Unfortunately more info would be needed. So it depends how reproducible >the issue is. >It could easily be something related to RP (and then may happen again). >Or Gtk (2 or 3 ?). > >Is there a core file? If yes, try to get a trace with gdb. > >If it can be reproduced, try getting a stacktrace. If the IDE is build >with debug info, and run from console (or with --debug-log=file) then it >will in most cases print a trace of the crash. >If it does not print a trace, then running the IDE (still with debug >info) under gdb can help. Now it happened again! I was compiling the program then executing it inside a terminal (external to Lazarus) and then repeating this to find my bug. When I found it I doubleclicked the name of my logging component to copy its name, but instead instanly Lazarus disappeared! I will now revert back to Lazarus 2.0.4 instead. -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Separation of source code and compiled units
Il 02/11/2019 11:26, Karl-Michael Schindler via lazarus ha scritto: I am working on the package description for lazarus for MacPorts and are struggling with the following: $PREFIX/share/lazarus contains the source code as well as the compiled units. In case lazarus is recompiled the directory $PREFIX/share/lazarus needs to be writable by all users. At least this is as far as I got. Is there a way to keep the source files readonly and place the compiled files somewhere separate? How has this been dealt with for linux? As Sven pointed, in Linux when the $PREFIX/lazarus directory is not writable, the compiled files and the executable are put into the user's home directory under ~/.lazarus (which is also the default path for user configuration files). Executable in ~/.lazarus/bin, compiled units in ~/.lazarus/lib and ~/.lazarus/units. That's the default behaviour, but you may also select a different target directory for your recompiled copy from Tools->Configure "Build Lazarus"->Target directory. Moreover, startlazarus will check if the lazarus copy in $PREFIX/lazarus is newer than your local recompiled lazarus, which happens if you update to a new version. In that case it will ask you which one you want to start. If you make $PREFIX/lazarus writable, you will always have only one copy of Lazarus. If you don't, you will have two copies: the original one, and your recompiled one. Giuliano -- Do not do to others as you would have them do to you.They might have different tastes. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Separation of source code and compiled units
Am 02.11.2019 um 12:00 schrieb Sven Barth via : > Karl-Michael Schindler via lazarus schrieb > am Sa., 2. Nov. 2019, 11:27: > >> Hi >> >> I am working on the package description for lazarus for MacPorts and are >> struggling with the following: $PREFIX/share/lazarus contains the source >> code as well as the compiled units. In case lazarus is recompiled the >> directory $PREFIX/share/lazarus needs to be writable by all users. At least >> this is as far as I got. Is there a way to keep the source files readonly >> and place the compiled files somewhere separate? How has this been dealt >> with for linux? > > If I remember correctly then Lazarus recompiles itself into a directory in > the user's home directory if the original isn't writable. > > Regards, > Sven I looked into that and I might even manage to bend it, in order to use $PREFIX/var/lib/lazarus and keep $PREFIX/share/lazarus readonly. But before going down that way with all the time for testing, i would appreciate opinions on that? Regards - Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Separation of source code and compiled units
Karl-Michael Schindler via lazarus schrieb am Sa., 2. Nov. 2019, 11:27: > Hi > > I am working on the package description for lazarus for MacPorts and are > struggling with the following: $PREFIX/share/lazarus contains the source > code as well as the compiled units. In case lazarus is recompiled the > directory $PREFIX/share/lazarus needs to be writable by all users. At least > this is as far as I got. Is there a way to keep the source files readonly > and place the compiled files somewhere separate? How has this been dealt > with for linux? > If I remember correctly then Lazarus recompiles itself into a directory in the user's home directory if the original isn't writable. Regards, Sven > -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus code editor improvement?
Bo Berglund via lazarus schrieb am Sa., 2. Nov. 2019, 11:10: > Is this possible already (but hidden in the standard config of > Lazarus) or is it a new feature noone has requested before? > Tools -> Options -> Codetools -> General -> Jump directly to method body Regards, Sven > -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Separation of source code and compiled units
Hi I am working on the package description for lazarus for MacPorts and are struggling with the following: $PREFIX/share/lazarus contains the source code as well as the compiled units. In case lazarus is recompiled the directory $PREFIX/share/lazarus needs to be writable by all users. At least this is as far as I got. Is there a way to keep the source files readonly and place the compiled files somewhere separate? How has this been dealt with for linux? Greetings - Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Annoying code completion failure
Hi, TStrings has a property property Values[const Name: string]: string read GetValue write SetValue; The setter is defined as: procedure SetValue(const Name, Value: string); Note that both arguments are 'const' When adding a new property, and pressing 'CTRL-C', the IDE adds the new property, but also insists on adding a new SetValue: procedure SetValue(const Name: string; AValue: string); Note the missing const on the second parameter. It does this of course not only for TStrings, but for all such properties. Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Lazarus code editor improvement?
When I am working on a multi-unit application I very often want to check the implementation of a function which is called from somewhere. So I right click the function name in the code line and select "Find Declaration of " This brings me invariably to the interface section function declaration from which I have to jump to the actual implementation (Ctrl-Shift-Downarrow). I would like to avoid this 2-step process if possible by having a second right-click command: "Find Implemnentation of " Is this possible already (but hidden in the standard config of Lazarus) or is it a new feature noone has requested before? When I work in other IDE:s for different languages this is a common feature I use a lot when troubleshooting -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 2.0.6 IDE suddenly disappeared losing a lot of edits...
On Sat, 2 Nov 2019 06:00:44 +0100, Ondrej Pokorny via lazarus wrote: >On 01.11.2019 23:03, Martin Frb via lazarus wrote: >> Well and a "autosave" feature might be nice, but needs to be written... > >The project is always automatically saved when you compile it. > Yes, I know that and it works fine. But this happened while I was busy writing a description of the application data file usage and where what goes where. I put this into the comment section I always have at the top of the file (below the unit name line). Luckily I did not have any actual code changes at the time so only my comments were lost and had to be re-created. It was my first code editing after installing the needed packages into Lazarus 2.0.6 -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] gdb problems on ubtuntu 19.10
On Fri, 1 Nov 2019, Anthony Walter via lazarus wrote: An update. I installed Linux Mint 19.2 on the same laptop and re-ran my install script. The problem previously described with gdb did not present itself. This leads me to believe there is some kind of problem with gdb in Ubtuntu 19.10, the prior OS I was testing. It might be a good idea to report it. Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus