[Lazarus] The "Publish Package" functionality is horribly broken.
Hi, I noticed this menu option in the fpgui_toolkit.lpk package. So I selected it and made sure the “include” filter selects all files, and nothing is “excluded”. This clicked okay. After that I had a look in the destination directory, and there was only 9 file. Yet the fpgui_toolkit.lpk package actually has 117 files. See the screenshot showing the result (blue window) vs the actual package files. So again, what is the function of “publish package”? It it is meant to copy all units from a package to a destination directory (*), it fails miserably at that. I'm using Lazarus 1.9.0 r54792 FPC 2.6.4 x86_64-freebsd-gtk2 * - Seems that is supposed to be its function, based on the wiki help page. But clearly it doesn't do a good job. [http://wiki.lazarus.freepascal.org/IDE_Window:_Package_Editor#More] 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 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Codetools OnBeforeCompile/After events
On Fri, 26 May 2017 01:40:27 -0500 Lars via Lazarus wrote: > On 2017-05-26 01:24, Ondrej Pokorny via Lazarus wrote: > > On 26.05.2017 8:21, Lars via Lazarus wrote: > >> Does something like OnBeforeCompile/OnAfterCompile exist in codetools? > > > > Yes, they exists. "OnAfterCompile": > > > > LazarusIDE.AddHandlerOnProjectBuildingFinished(@MyEvent); > > LazarusIDE.AddHandlerOnLazarusBuildingFinished(@MyEvent); > > > > Ondrej > > -- > > Ahh, maybe I am looking at codetools when I should be looking at > lazideintf.pp instead. > As that's where those are located.. This may help: http://wiki.freepascal.org/Extending_the_IDE > For some reason I thought it would be part of code tools for writing > plugins to the ide. Codetools is standalone package and the IDE uses it a lot. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools On Event insert? detect
On Wed, 24 May 2017 13:43:10 -0500 Lars via Lazarus wrote: >[...] > I want to intercept/detect this, and add > >SomeCode(); > > between the begin/end of the event, i.e. on button 1 click. > > Does codetools provide some way to do it? Donald Ziesig added templates to alter the inserted code snippets. Please update svn, compile the IDE with -dEnableCodeCompleteTemplates and restart it. Read the header notes in lazarus/components/codetools/codecompletiontemplater.pas Default templates are defined in components/codetools/codecompletiontemplates.xml You can choose your own template file in Tools / Options / Codetools / Code creation / Template file. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Show value hints while debugging fills screen - patch
On Tue, 23 May 2017 12:35:36 +0200 Russ via Lazarus wrote: > I find debugging value hints (TurboPowerIProDsgn installed, "Show value > hints while debugging") useful but annoying when the hint becomes so big > it covers the variable being checked or even fills the screen; on single > monitor systems the only way to close the hint is to scroll down to the > variable link. Especially annoying when the mouse-over was inadvertent. > > The following code illustrates the problem: > > program HugeHintProblem; > var >HugeHintVar: array[1..100, 1..100] of byte; >i, j: Integer; > begin >for i := 1 to 100 do > for j := 1 to 100 do >HugeHintVar[i,j] := random(255); > { Break on the next statement and mouse-over HugeHintVar - The hint > will fill the screen (this may take some time).} >HugeHintVar[1, 1] := 56; > end. > > > The following patch seems to fix the problem, limiting the hint span > from the left side of the variable and one line below to the bottom > right corner of the editor in undocked mode, and to the bottom right > corner of the IDE in docked mode. > > > Index: components/ideintf/idehelpintf.pas > === > --- components/ideintf/idehelpintf.pas(revision 55056) > +++ components/ideintf/idehelpintf.pas(working copy) > @@ -383,6 +383,8 @@ > end; > > procedure DoHtml; > + var > +MaxWidth, MaxHeight: Integer; > begin > if HintFont<>nil then > HintRenderWindow.Font := HintFont; > @@ -397,10 +399,16 @@ > ms.Free; > end; > HtmlHelpProvider.ControlIntf.GetPreferredControlSize(NewWidth,NewHeight); > +MaxWidth := Screen.ActiveForm.Left + Screen.ActiveForm.Width - > ScreenPos.x; > +MaxHeight := Screen.ActiveForm.Top + Screen.ActiveForm.Height - > ScreenPos.y; > if NewWidth <= 0 then > - NewWidth := 500; > + NewWidth := 500 > +else if NewWidth > MaxWidth then > + NewWidth := MaxWidth; > if NewHeight <= 0 then > - NewHeight := 200; > + NewHeight := 200 > +else if NewHeight > MaxHeight then > + NewHeight := MaxHeight; > HintRenderWindow.HintRectAdjust := Rect(0, 0, NewWidth, NewHeight); > if MouseOffset then > HintRenderWindow.OffsetHintRect(ScreenPos) > > > I have tested this with windows XP, 7 and 8.1, Lazarus V1.64, V1.65 and > trunk, and with two monitors in various configurations Thanks, applied. > I tried to register an account on the bug tracker twice, but the link in > the confirmation email leads to an APPLICATION ERROR #1902 in Mantis, > complaining about an invalid confirmation URL Marc fixed one problem. Does it now work for you? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] CodeTools knowledge about a project - find a class
Hi, Does CodeTools only know about the unit or units that are currently open? Or does in know about all files in a project - and maybe even associated packages? The problem === I want to implement a Lazarus IDE feature "open type" - that's if it doesn't already exist (please let me know). Imagine, you need to have a look at the "TFoo" class. But, where is the "TFoo" class? Is it in the "Boo" project or maybe in the Boo_tools.lpk package? Or somewhere else (in a project search path)? I would like to be able to simply trigger the "Open Type" shortcut, which shows me a dialog where I can type "Foo", and a listbox below that will list all possible class matches with the name "Foo" (similar to what the Procedure List dialog currently does. I can then simply press Enter to select the first found option, or press the up/down arrows to select another match and then press Enter, and it will take me to the correct unit and class definition. Ctrl+LClick can already to this - somewhat. But for Ctrl+LClick to work, you need the correct unit in the uses clause. My problem is, what if you don't know the unit name either, or the unit name isn't in the uses list (yet - or might not even be needed at all, you simply wanted to double check something in the "TFoo" class). 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 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
On Fri, 26 May 2017 11:47:35 +0100 Graeme Geldenhuys via Lazarus wrote: > Hi, > > Does CodeTools only know about the unit or units that are currently > open? Or does in know about all files in a project - and maybe even > associated packages? Codetools only knows about the defines for each directory. But any IDE addon can access source editor and codetools. > The problem > === > I want to implement a Lazarus IDE feature "open type" - that's if it > doesn't already exist (please let me know). Imagine, you need to have a > look at the "TFoo" class. But, where is the "TFoo" class? Is it in the > "Boo" project or maybe in the Boo_tools.lpk package? Or somewhere else > (in a project search path)? > > I would like to be able to simply trigger the "Open Type" shortcut, > which shows me a dialog where I can type "Foo", and a listbox below that > will list all possible class matches with the name "Foo" (similar to > what the Procedure List dialog currently does. I can then simply press > Enter to select the first found option, or press the up/down arrows to > select another match and then press Enter, and it will take me to the > correct unit and class definition. Sounds like cody's dictionary: http://wiki.lazarus.freepascal.org/Cody#Unit_.2F_Identifier_Dictionary > Ctrl+LClick can already to this - somewhat. But for Ctrl+LClick to work, > you need the correct unit in the uses clause. My problem is, what if you > don't know the unit name either, or the unit name isn't in the uses list > (yet - or might not even be needed at all, you simply wanted to double > check something in the "TFoo" class). Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
On 26.05.2017 12:47, Graeme Geldenhuys via Lazarus wrote: I want to implement a Lazarus IDE feature "open type" - that's if it doesn't already exist (please let me know). Imagine, you need to have a look at the "TFoo" class. But, where is the "TFoo" class? Is it in the "Boo" project or maybe in the Boo_tools.lpk package? Or somewhere else (in a project search path)? I would like to be able to simply trigger the "Open Type" shortcut, which shows me a dialog where I can type "Foo", and a listbox below that will list all possible class matches with the name "Foo" (similar to what the Procedure List dialog currently does. I can then simply press Enter to select the first found option, or press the up/down arrows to select another match and then press Enter, and it will take me to the correct unit and class definition. Please share this feature with us when you implemented it! I miss it as well (I do a simple Search in Files now). Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie
On Thu, 25 May 2017 18:46:43 +0200, Joe via Lazarus wrote: >I am trying to test Lazarus 1.8 RC1 (and following versions) under >Raspbian Jessie with PIXEL. >But unfortunately I could not find any instructions or scripts helping >to install *this* RC. >Any hint? You could try my script for installation of FPC + Lazarus on an RPi3. http://blog.boberglund.com/install_lazfpc_local_pi.sh In order to get the version you need just edit the script before running it and replace the versions at the top of the file with the one you want. It will install into the pi user space rather than make a global installation using sudo. I have not tested with the more recent Lazarus 1.8, but it worked fine with 1.6RCx and 1.6 release. -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
On 2017-05-26 12:01, Mattias Gaertner via Lazarus wrote: Sounds like cody's dictionary: http://wiki.lazarus.freepascal.org/Cody#Unit_.2F_Identifier_Dictionary Fantastic! From the wiki description, this sounds exactly like what I was going to try and implement. Open Source developers are amazing. :) Thanks for pointing me to this. I'll give it a try immediately. 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 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
On 2017-05-26 12:06, Ondrej Pokorny via Lazarus wrote: Please share this feature with us when you implemented it! I miss it as well (I do a simple Search in Files now). It seems it already exists (as Mattias pointed out) - we just didn’t know about it. :) All that remains is to assign a shortcut to it, if a default one doesn't exist. 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 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The "Publish Package" functionality is horribly broken.
On Fri, 26 May 2017 09:21:32 +0100 Graeme Geldenhuys via Lazarus wrote: > Hi, > > I noticed this menu option in the fpgui_toolkit.lpk package. So I > selected it and made sure the “include” filter selects all files, and > nothing is “excluded”. This clicked okay. After that I had a look in the > destination directory, and there was only 9 file. Yet the > fpgui_toolkit.lpk package actually has 117 files. See the screenshot > showing the result (blue window) vs the actual package files. > > So again, what is the function of “publish package”? It it is meant to > copy all units from a package to a destination directory (*), it fails > miserably at that. It copies the package directory with some options. The fpgui_toolkit directory only contains the 9 files. The other files are in parent or sibling directories. It now checks if some unit/inc path are outside and disables the "publish" menu item. > I'm using Lazarus 1.9.0 r54792 FPC 2.6.4 x86_64-freebsd-gtk2 > > > * - Seems that is supposed to be its function, based on the wiki help > page. But clearly it doesn't do a good job. > [http://wiki.lazarus.freepascal.org/IDE_Window:_Package_Editor#More] I added a note of this limitation. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The "Publish Package" functionality is horribly broken.
Thanks for looking at this. On 2017-05-26 12:42, Mattias Gaertner via Lazarus wrote: It copies the package directory with some options. The fpgui_toolkit directory only contains the 9 files. The other files are in parent or sibling directories. But those are still part of the package. At you saying that when using "lazarus packages" you must (or should) always limit yourself to only one directory? Than seems a bit limiting. I've also seen many projects where the project file and packages files are in the root directory of a project, and all source code are in sub directories. So all those are "wrong" too? It now checks if some unit/inc path are outside and disables the "publish" menu item. Fine with me, but it still seems like a useless feature then. Not actually being able to publish what is inside the package. If it is making releases that one is after, it seems a much better solution is still (if you use git): $ git archive --prefix=prj-1.4.0/ -o prj-1.4.0.tar.gz v1.4.0 or $ git archive --output /full/path/to/zipfile.zip master where "prj" is the name of the project. The last parameter is the commit, tag or branch you want to export. I believe SubVersion's equivalent would be 'svn export ...' command. 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 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The "Publish Package" functionality is horribly broken.
On Fri, 26 May 2017 13:09:34 +0100 Graeme Geldenhuys via Lazarus wrote: >[...] > On 2017-05-26 12:42, Mattias Gaertner via Lazarus wrote: > > It copies the package directory with some options. > > The fpgui_toolkit directory only contains the 9 files. The other files > > are in parent or sibling directories. > > But those are still part of the package. At you saying that when using > "lazarus packages" you must (or should) always limit yourself to only > one directory? Than seems a bit limiting. No. Only the "publish package" function is limited. > I've also seen many projects where the project file and packages files > are in the root directory of a project, and all source code are in sub > directories. So all those are "wrong" too? > > > > It now checks if some unit/inc path are outside and disables the > > "publish" menu item. > > Fine with me, but it still seems like a useless feature then. It is useless for the fpgui package. That's why it is now disabled. > Not actually being able to publish what is inside the package. What do you mean with "inside"? It lists some units, but not all. Some directories are shared by other packages. I see no straightforward rule to publish only the package fpgui_toolkit. > If it is making releases that one is after, it seems a much better > solution is still (if you use git): > >$ git archive --prefix=prj-1.4.0/ -o prj-1.4.0.tar.gz v1.4.0 Huh? That is the whole fpgui, instead of just the fpgui_toolkit package. > or > > $ git archive --output /full/path/to/zipfile.zip master > > > where "prj" is the name of the project. The last parameter is the > commit, tag or branch you want to export. > > I believe SubVersion's equivalent would be 'svn export ...' command. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie
On 26/05/17 11:20, Bo Berglund via Lazarus wrote: On Thu, 25 May 2017 18:46:43 +0200, Joe via Lazarus wrote: I am trying to test Lazarus 1.8 RC1 (and following versions) under >Raspbian Jessie with PIXEL.>But unfortunately I could not find any instructions or scripts helping >to install *this* RC.>Any hint? You could try my script for installation of FPC + Lazarus on an RPi3.http://blog.boberglund.com/install_lazfpc_local_pi.sh In order to get the version you need just edit the script beforerunning it and replace the versions at the top of the file with theone you want.It will install into the pi user space rather than make a globalinstallation using sudo. I have not tested with the more recent Lazarus 1.8, but it worked finewith 1.6RCx and 1.6 release. Just to check the "standard way of doing it" in case there's any surprises, with FPC 3.0.2 installed: svn co http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0_RC1 cd lazarus_1_8_0_RC1 make That worked as expected. make clean bigide That also worked, except that there was a message about EditorMacroScript at startup. A purist woult probably object that the binary hadn't been added to the desktop environment's menu. That's an up-to-date "full" Raspbian (i.e. not "lite"). -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] The "Publish Package" functionality is horribly broken.
On 2017-05-26 14:11, Mattias Gaertner via Lazarus wrote: Not actually being able to publish what is inside the package. What do you mean with "inside"? It lists some units, but not all. Some directories are shared by other packages. I see no straightforward rule to publish only the package fpgui_toolkit. By "inside" I mean the files that are included in the original *.lpk package (what the Packages dialog shows). See the 114 files shown in the screenshot in the first message of this thread. That is the fpgui_toolkit.lpk Package Dialog - not simply a directory listing. 1) Also note that the published package unit "fpgui_toolkit.pas" (which states "Do not edit!") lists all the units of the fpgui_toolkit.lpk package, but they didn't exist in the published directory. 2) The published fpgui_toolkit.lpk also contains SearchPath entries. They were not modified from the original. Neither were the items in the Files tag. So yeah, good you disabled that published option then, because the results were totally broken. ;-) What could possibly work (but is more effort to implement) is to publish a package to a single directory (even if the original had multiple paths), but then the SearchPath and Files sections in the published .lpk file needs to be modified. So if somebody else opens that published package, all units are still found and is actually compilable. Just my 2c worth. But to be honest, I can't actually see a use for the "published package" functionality in the real world, so this could be chalked up as "no further action needed". 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 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
This looks like a nice feature, but it only seems to know stuff you have already open or opened in the current session. It doesn't know all identifiers and whatever might be available from the currently loaded project and packages. For example if you have a unit Foo (either in the project or in one of the packages) but you don't have it opened at any time in the current session, it wont be able to show you anything that Foo exports. If you open Foo then it will, even if you close it after, but if you restart Lazarus it will have forgotten everything. Also i'd prefer if the Jump to button was default. It is trivial to change this via code (i just set the button's Default property to true) but i'd be nice if it was configurable in options. Finally while it does seem to remember unit names, this is as a byproduct of units being symbols and when you jump to a unit it puts the cursor to the top of the file. It'd be nice if it had a special case for units that only switched/opened the unit file without moving the cursor so you can quickly jump between files with the same shortcut. TBH i think such a "quick jump" would be a good thing to have in the base IDE out of the box. Popular modern IDEs provide this functionality these days and it is even included in some editors like Sublime. I think the necessary low level functionality is almost there and it is mainly a matter of tying everything together. On Fri, May 26, 2017 at 2:11 PM, Graeme Geldenhuys via Lazarus < lazarus@lists.lazarus-ide.org> wrote: > On 2017-05-26 12:06, Ondrej Pokorny via Lazarus wrote: > >> Please share this feature with us when you implemented it! I miss it as >> well (I do a simple Search in Files now). >> > > It seems it already exists (as Mattias pointed out) - we just didn’t know > about it. :) All that remains is to assign a shortcut to it, if a default > one doesn't exist. > > 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 > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie
On Fri, 26 May 2017 13:29:50 +, Mark Morgan Lloyd via Lazarus wrote: > >Just to check the "standard way of doing it" in case there's any >surprises, with FPC 3.0.2 installed: > >svn co http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0_RC1 >cd lazarus_1_8_0_RC1 >make > >That worked as expected. > >make clean bigide > >That also worked, except that there was a message about >EditorMacroScript at startup. A purist woult probably object that the >binary hadn't been added to the desktop environment's menu. > >That's an up-to-date "full" Raspbian (i.e. not "lite"). I made the script in order to install "everything" on a bare bones RPi with Raspbian from the install image. So it therefore also installs FPC, then Lazarus. And it uses a start compiler I made myself since I could not find any 3.0.0 FPC for ARMHF on RPi at the time. It is downloaded as part of running the script. -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
On Fri, 26 May 2017 17:49:35 +0300 Kostas Michalopoulos via Lazarus wrote: > This looks like a nice feature, but it only seems to know stuff you have > already open or opened in the current session. It doesn't know all > identifiers and whatever might be available from the currently loaded > project and packages. For example if you have a unit Foo (either in the > project or in one of the packages) but you don't have it opened at any time > in the current session, it wont be able to show you anything that Foo > exports. If you open Foo then it will, even if you close it after, but if > you restart Lazarus it will have forgotten everything. No. It stores all learned identifiers in a file: http://wiki.lazarus.freepascal.org/Cody#Unit_.2F_Identifier_Dictionary For example on this machine the dictionary knows over a million identifiers. It needs some clean up dialog. ;) > Also i'd prefer if the Jump to button was default. It is trivial to change > this via code (i just set the button's Default property to true) but i'd be > nice if it was configurable in options. Feel free to submit a patch. > Finally while it does seem to remember unit names, this is as a byproduct > of units being symbols and when you jump to a unit it puts the cursor to > the top of the file. It'd be nice if it had a special case for units that > only switched/opened the unit file without moving the cursor so you can > quickly jump between files with the same shortcut. Feel free to add an option for that too. > TBH i think such a "quick jump" would be a good thing to have in the base > IDE out of the box. Popular modern IDEs provide this functionality these > days and it is even included in some editors like Sublime. I think the > necessary low level functionality is almost there and it is mainly a matter > of tying everything together. It needs some work to make it "newbie" safe. Mattias > > > On Fri, May 26, 2017 at 2:11 PM, Graeme Geldenhuys via Lazarus < > lazarus@lists.lazarus-ide.org> wrote: > > > On 2017-05-26 12:06, Ondrej Pokorny via Lazarus wrote: > > > >> Please share this feature with us when you implemented it! I miss it as > >> well (I do a simple Search in Files now). > >> > > > > It seems it already exists (as Mattias pointed out) - we just didn’t know > > about it. :) All that remains is to assign a shortcut to it, if a default > > one doesn't exist. > > > > 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 > > -- > > ___ > > Lazarus mailing list > > Lazarus@lists.lazarus-ide.org > > http://lists.lazarus-ide.org/listinfo/lazarus > > -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
> No. It stores all learned identifiers in a file: > But then why does it behave as i mentioned? When i restart Lazarus it has forgotten everything. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
On Fri, 26 May 2017 18:24:12 +0300 Kostas Michalopoulos via Lazarus wrote: > > No. It stores all learned identifiers in a file: > > > > But then why does it behave as i mentioned? When i restart Lazarus it has > forgotten everything. What platform? What happens when you click on Tools / Options / Codetools / IDE Integration / Save dictionary now? Move the mouse over the button and wait for the hint to find out where it stores the file. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie
On 26/05/17 15:02, Bo Berglund via Lazarus wrote: On Fri, 26 May 2017 13:29:50 +, Mark Morgan Lloyd via Lazarus wrote: Just to check the "standard way of doing it" in case there's any >surprises, with FPC 3.0.2 installed:>>svn co http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0_RC1>cd lazarus_1_8_0_RC1>make>>That worked as expected.>>make clean bigide>>That also worked, except that there was a message about >EditorMacroScript at startup. A purist woult probably object that the >binary hadn't been added to the desktop environment's menu.>>That's an up-to-date "full" Raspbian (i.e. not "lite"). I made the script in order to install "everything" on a bare bones RPiwith Raspbian from the install image. So it therefore also installsFPC, then Lazarus. And it uses a start compiler I made myself since Icould not find any 3.0.0 FPC for ARMHF on RPi at the time.It is downloaded as part of running the script. My apologies, but since you hadn't tested it for the current RC I assumed you'd abandoned it. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
Actually it works fine, after peppering the code with writelns to see the flow, i figured out what was the issue: there is a 10 minute interval (by default) between saves and the dictionary is only saved at the interval. I expected it to be saved when exiting the IDE regardless of when the last save was. I added a Save; call right at the beginning of the OnIDEClose callback, like this procedure TCodyUnitDictionary.OnIDEClose(Sender: TObject); begin Save; // Save the dictionary before closing the IDE fClosing:=true; FreeAndNil(fTimer); end; And it seems to behave as i expect it now. This way it wont lose any data when i restart the IDE (which i do often when working with custom controls). TBH i'm not sure the approach of only scanning what you have loaded is enough since it still wont show anything from a unit i haven't already loaded before. For example if i show the dialog looking for TGraphic it will only show up after i have already used it at least once. So if i have an empty database i get this: 1. Open the identifier db dialog (i have set it up as Alt+`) 2. Start typing TGraph 3. Nothing shows up 4. Press Ctrl+Space in a form code (e.g. Unit1 in the default empty project) 5. Start typing TGraph so that it shows in the completion dialog 6. Press esc to cancel the completion dialog 7. Open the identifier db dialog again 8. Start typing TGraph 9. Now TGraphic (and other stuff) show up I think there needs to be a way for the dialog to also know whatever is or can be known with the currently loaded packages and units, not just whatever you have encountered so far. That information seems to already be available in the IDE in other places. On Fri, May 26, 2017 at 6:38 PM, Mattias Gaertner via Lazarus < lazarus@lists.lazarus-ide.org> wrote: > On Fri, 26 May 2017 18:24:12 +0300 > Kostas Michalopoulos via Lazarus wrote: > > > > No. It stores all learned identifiers in a file: > > > > > > > But then why does it behave as i mentioned? When i restart Lazarus it has > > forgotten everything. > > What platform? > > What happens when you click on Tools / Options / Codetools / IDE > Integration / Save dictionary now? > > Move the mouse over the button and wait for the hint to find out where > it stores the file. > > Mattias > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools knowledge about a project - find a class
On Fri, 26 May 2017 19:29:00 +0300 Kostas Michalopoulos via Lazarus wrote: > Actually it works fine, after peppering the code with writelns to see the > flow, i figured out what was the issue: there is a 10 minute interval (by > default) between saves and the dictionary is only saved at the interval. I > expected it to be saved when exiting the IDE regardless of when the last > save was. Saving takes some time when the file is big. I prefer a fast closing IDE. Maybe some option can be added. > I added a Save; call right at the beginning of the OnIDEClose callback, > like this > > procedure TCodyUnitDictionary.OnIDEClose(Sender: TObject); > begin > Save; // Save the dictionary before closing the IDE > fClosing:=true; > FreeAndNil(fTimer); > end; > > And it seems to behave as i expect it now. This way it wont lose any data > when i restart the IDE (which i do often when working with custom controls). Why that? Simply start a second instance for testing. > TBH i'm not sure the approach of only scanning what you have loaded is > enough since it still wont show anything from a unit i haven't already > loaded before. Yes, the empty database on first use is currently the show stopper. It would be great, if it somehow (TM) knows at least the FPC and Lazarus sources after install. >[...] > I think there needs to be a way for the dialog to also know whatever is or > can be known with the currently loaded packages and units, not just > whatever you have encountered so far. That information seems to already be > available in the IDE in other places. The IDE parses the sources on demand when information is needed. It is not available per se. Since parsing a project can take some seconds even on fast machines, this is not done automatically. Maybe the dictionary can start parsing the project on idle when it is shown to update its database. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 1.8 RC1 under Raspbian Jessie
On Fri, 26 May 2017 15:52:06 +, Mark Morgan Lloyd via Lazarus wrote: >My apologies, but since you hadn't tested it for the current RC I >assumed you'd abandoned it. No apology needed! It's just that I have 6 RPi:s running at home for different purposes and those I use for FPC programming are working well as it is, so I have not even looked for new releases of Lazarus recently. The script was done for this: 1) To simplify the initial installation on a brand new RPi 2) To make sure the install is done to the pi environment rather than global with sudo. -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] A simple way to stop the never ending story of long executable?
On Sat, 20 May 2017 12:24:01 +0200, Giuliano Colla via Lazarus wrote: >...would stop the complaints about "long executable". How about strip -s as a post-compile step before shipping? -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools On Event insert? detect
On 2017-05-26 04:44, Mattias Gaertner via Lazarus wrote: On Wed, 24 May 2017 13:43:10 -0500 Lars via Lazarus wrote: [...] I want to intercept/detect this, and add SomeCode(); between the begin/end of the event, i.e. on button 1 click. Does codetools provide some way to do it? Donald Ziesig added templates to alter the inserted code snippets. Please update svn, compile the IDE with -dEnableCodeCompleteTemplates and restart it. Read the header notes in lazarus/components/codetools/codecompletiontemplater.pas Default templates are defined in components/codetools/codecompletiontemplates.xml You can choose your own template file in Tools / Options / Codetools / Code creation / Template file. Thanks, I will try. Is it a special Define because it is a new untested feature waiting for approval? If so I could be a tester -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] CodeTools On Event insert? detect
[...] I want to intercept [...] and add SomeCode(); between the begin/end of the event, i.e. on button 1 click. Does codetools provide some way to do it? Found this discussions about it too: http://lists.lazarus.freepascal.org/pipermail/lazarus/2014-March/086457.html http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-RFC-Code-tools-Feature-td4036425.html That's interesting that Michael V. C. wanted logging at begin/end of code snippets in procedures, because that's exactly what powtils had to do but it looks kind of ugly at the source level to have IFDEF DEBUG at the end and begin of each procedure, but that's how I did it.. But, this requirement that I need has nothing to do with that, it's for something else.. but still interesting! -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus