Re: [Lazarus] Control Notification bug?
On Sun, Feb 3, 2013 at 2:52 PM, Juha Manninen wrote: > On Sun, Feb 3, 2013 at 2:17 PM, Mattias Gaertner > wrote: >> Why not override InsertControl and RemoveControl? > > Because I didn't realize those methods existed. :) > I will try them next ... Done. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling IDE issues using FreeBSD 9.1 & FPC 2.6.0
On Sun, 3 Feb 2013 23:28:45 +0100 Marco van de Voort wrote: > On Sun, Feb 03, 2013 at 11:22:10PM +0100, Mattias Gaertner wrote: > > > > $ find . -name fileutil.* -print > > > > ./components/lazutils/fileutil.inc > > > > ./components/lazutils/lib/x86_64-freebsd/fileutil.ppu > > > > ./components/lazutils/lib/x86_64-freebsd/fileutil.o > > > > This is ok. > > > > > > ./components/lazutils/fileutil.pas > > > > ./docs/xml/lazutils/fileutil.xml > > > > ./lcl/units/x86_64-freebsd/fileutil.ppu > > > > ./lcl/units/x86_64-freebsd/fileutil.o > > > > Where is this fileutil.ppu coming from? > > > > Maybe the "gmake clean" does not work under FreeBSD? > > Are there any custom rules regarding this file, or SED use? > > Makefile operation under FreeBSD is older than fpcmake generated makefiles. [clean] # clear all .ppu/.o/.rst files in all source and output directories files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*.lfm) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*.res) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) \ $(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) \ $(wildcard widgetset/*$(OEXT)) $(wildcard widgetset/*$(PPUEXT)) $(wildcard widgetset/*$(RSTEXT))\ $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling IDE issues using FreeBSD 9.1 & FPC 2.6.0
On Sun, Feb 03, 2013 at 11:22:10PM +0100, Mattias Gaertner wrote: > > > $ find . -name fileutil.* -print > > > ./components/lazutils/fileutil.inc > > > ./components/lazutils/lib/x86_64-freebsd/fileutil.ppu > > > ./components/lazutils/lib/x86_64-freebsd/fileutil.o > > This is ok. > > > > ./components/lazutils/fileutil.pas > > > ./docs/xml/lazutils/fileutil.xml > > > ./lcl/units/x86_64-freebsd/fileutil.ppu > > > ./lcl/units/x86_64-freebsd/fileutil.o > > Where is this fileutil.ppu coming from? > > Maybe the "gmake clean" does not work under FreeBSD? Are there any custom rules regarding this file, or SED use? Makefile operation under FreeBSD is older than fpcmake generated makefiles. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling IDE issues using FreeBSD 9.1 & FPC 2.6.0
On Thu, 31 Jan 2013 17:33:27 + Graeme Geldenhuys wrote: > [...] > On 01/31/13 17:25, Graeme Geldenhuys wrote: > > > > $ gmake bigide > > ...snip... > > Compiling ctunitgroupgraph.pas > > Assembling ctunitgroupgraph > > Assembling codetools > > 117099 lines compiled, 5.6 sec > > /bin/cp -f Makefile.compiled units/x86_64-freebsd/CodeTools.compiled > > gmake[1]: Leaving directory `/data/devel/lazarus/components/codetools' > > gmake -C lcl LCL_PLATFORM=nogui > > gmake[1]: Entering directory `/data/devel/lazarus/lcl' > > /bin/rm -f units/x86_64-freebsd/alllclunits.ppu > > /data/devel/fpc-2.6.0/x86_64-freebsd/bin/ppcx64 -gl > > -Fu../packager/units/x86_64-freebsd > > -Fu../components/lazutils/lib/x86_64-freebsd -Fu. -Funonwin32 -Fuforms > > -Fuwidgetset -Fiinclude -FE. -FUunits/x86_64-freebsd -Cg -dx86_64 > > alllclunits.pp > > Free Pascal Compiler version 2.6.0 [2011/12/30] for x86_64 > > Copyright (c) 1993-2011 by Florian Klaempfl and others > > Target OS: FreeBSD for x86-64 > > Compiling alllclunits.pp > > Compiling barchart.pp > > Compiling lclproc.pas > > Compiling lclstrconsts.pas > > Writing Resource String Table file: lclstrconsts.rst > > Assembling lclstrconsts > > PPU Loading units/x86_64-freebsd/fileutil.ppu > > PPU Source: fileutil.pas not found > > PPU Source: fileutil.inc not found > > Recompiling FileUtil, checksum changed for LCLStrConsts > > fileutil.pas(42,62) Fatal: Can't find unit FileUtil used by LazLogger > > Fatal: Compilation aborted > > gmake[1]: *** [alllclunits.ppu] Error 1 > > gmake[1]: Leaving directory `/data/devel/lazarus/lcl' > > gmake: *** [lazbuild] Error 2 > > 8<-8<-8<-8<-8< > > > > Yet, if I do the following, it does seem to find the unit in the > > directory hierarchy. > > > > $ find . -name fileutil.* -print > > ./components/lazutils/fileutil.inc > > ./components/lazutils/lib/x86_64-freebsd/fileutil.ppu > > ./components/lazutils/lib/x86_64-freebsd/fileutil.o This is ok. > > ./components/lazutils/fileutil.pas > > ./docs/xml/lazutils/fileutil.xml > > ./lcl/units/x86_64-freebsd/fileutil.ppu > > ./lcl/units/x86_64-freebsd/fileutil.o Where is this fileutil.ppu coming from? Maybe the "gmake clean" does not work under FreeBSD? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling IDE issues using FreeBSD 9.1 & FPC 2.6.0
On Fri, Feb 01, 2013 at 02:39:00AM +0100, Mattias Gaertner wrote: > > 'bigide' option, or one of the packages that 'bigide' pulls in has a > > compile problem under FreeBSD. > > Please create a bug report with the complete output of the "make clean > bigide" output. And the dates of both fileutil.ppu's. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Buttons in frames
Mattias Gaertner wrote: Source -> Unit Information -> General on the new DbConfigCode2(2) tab tells me /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas [manual transcript] which is what the file should be. ok ... Unit paths refers to /usr/local/src/heavywethers/inifiles/trunk which is OK. Source paths ditto. ok But Source -> Unit Information -> General on the original DbConfigCode2 tab tells me it's /usr/local/src/inifiles/trunk/dbconfigcode2.pas which is wrong. What is this "original"? When is it opened? In my former mails I assumed you had opened it yourself. dbconfigcode2 is the name on the tab created when the IDE (at startup) read the project. I was assuming that dbconfigcode2(2) was the one that the IDE created when the compiler reported the error, but looking at the file paths I'm not entirely sure. Reading the project simply restores the files last time open. That does not count. Question still open: When was the wrong file opened? It would appear either at the time the unit is first saved, or when a frame (possibly form) is opened that crosses an ambiguity. I need to be very cautious about jumping to any conclusions over this (having already been wrong once), but it looks as though the compiler is getting and reporting the right path Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas yes. but the IDE at some earlier stage has resolved it to /usr/local/src/inifiles/trunk/dbconfigcode2.pas which it shouldn't. What is this "some earlier stage"? When the IDE was opening the project. See above. That actually fits my experience that given that sort of duplicate tab it's safer to close the older one. If I close the older tab/pane, save-all and terminate then restart, the one tab that's displayed relating to that file has the correct name /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas. ..up to this point where I've just done something that makes the problem go away. All tabs are named uniquely. If you open two units with the same name one will get the "(2)" appended. The "(2)" vanishes when the name becomes unique again. Yes, but which tab gets the suffix: the one that already exists or the newly-created duplicate? When a second is opened it gets the (2), the third gets (3), and so forth. It does not matter which one is the project's one. Which fits in with the original tab (DbConfigCode2) being given the wrong filename by the IDE, and the new tab (DbConfigCode2(2)) getting the right filename from the compiler's error message. [...] However I think that's something to do with the non-working OnClick which I'll get back to presently, this business with tab/pane duplication is at least a few weeks old. So it looks as though it's something to do with the saved state of the project, i.e. which files are listed as to be opened when the project is loaded. The file giving the problem had been open (across multiple sessions of the IDE) ever since the unit and associated frame was created and saved, I can't remember exactly how I did the save (i.e. whether it was an explicit save-all or an implicit save when the compiler was run or the IDE shut down). The does not matter for the session. If the compilation is run and finds an error where the file isn't already open, the file is opened with the correct path and there are no further problems. Nice. That's what I thought- for a while at least :-) Drat- it's just started happening again. The thing that appears to have made the difference was telling the IDE to open the frame associated with the unit, I can now see both forms of the path/name stored in the .lps file: .. You can see that the IDE knows that Unit12 belongs to the project, while Unit15 is simply a file on your disk. About "the IDE to open the frame associated with the unit". Which file is "the frame" and which file is "the unit"? If I delete the .lps file and start the IDE it seems to open dbconfig2.pas by default, I find this in .lpi: If I run the compilation (knowing there's an error in that file) and save-all (even without correcting it), I have DbConfigCode2 and DbConfigCode2(2) tabs and the new .lps includes I think the answer is that unit12 is the frame and unit13 is the form. Looking at the IDE Source -> Unit Information, the tab DbConfigCode2 is /usr/local/src/inifiles/trunk/dbconfigcode2.pas and the tab DbConfigCode2(2) is /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas (both of those manually transcribed). Hope tha
Re: [Lazarus] Buttons in frames
On Sun, 03 Feb 2013 15:14:45 + Mark Morgan Lloyd wrote: >[...] > SourceEditorManager.SomethingModified > > Source Editor: >/usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas > Component=True > > and the IDE now doesn't open a duplicate tab/pane when the compiler > complains about the error. I think what's happened is that my action of > restarting the IDE with the file closed has sorted things out. In other > words this lot is still approximately valid... > > >> Project units: > >> ./../inifiles/trunk/dbconfigcode.pas SessionModified > >> > >> which based on the project directory being > >> /usr/local/src/heavywethers/trunk implies > >> /usr/local/src/inifiles/trunk/dbconfigcode2.pas (I'm trying to be > >> cautious jumping to conclusions here). > > > > see above. > > > > > >> Source -> Unit Information -> General on the new DbConfigCode2(2) tab > >> tells me /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas > >> [manual transcript] which is what the file should be. > > > > ok > > > >> ... Unit paths > >> refers to /usr/local/src/heavywethers/inifiles/trunk which is OK. Source > >> paths ditto. > > > > ok > > > > > >> But Source -> Unit Information -> General on the original DbConfigCode2 > >> tab tells me it's /usr/local/src/inifiles/trunk/dbconfigcode2.pas which > >> is wrong. > > > > What is this "original"? When is it opened? > > In my former mails I assumed you had opened it yourself. > > dbconfigcode2 is the name on the tab created when the IDE (at startup) > read the project. I was assuming that dbconfigcode2(2) was the one that > the IDE created when the compiler reported the error, but looking at the > file paths I'm not entirely sure. Reading the project simply restores the files last time open. That does not count. Question still open: When was the wrong file opened? > >> I need to be very cautious about jumping to any conclusions over this > >> (having already been wrong once), but it looks as though the compiler is > >> getting and reporting the right path > >> > >> Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas > > > > yes. > > > > > >> but the IDE at some earlier stage has resolved it to > >> /usr/local/src/inifiles/trunk/dbconfigcode2.pas which it shouldn't. > > > > What is this "some earlier stage"? > > When the IDE was opening the project. See above. > >> That > >> actually fits my experience that given that sort of duplicate tab it's > >> safer to close the older one. > >> > >> If I close the older tab/pane, save-all and terminate then restart, the > >> one tab that's displayed relating to that file has the correct name > >> /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas. > > ..up to this point where I've just done something that makes the > problem go away. > > > All tabs are named uniquely. If you open two units with the same name > > one will get the "(2)" appended. The "(2)" vanishes when the name > > becomes unique again. > > Yes, but which tab gets the suffix: the one that already exists or the > newly-created duplicate? When a second is opened it gets the (2), the third gets (3), and so forth. It does not matter which one is the project's one. >[...] > >> However I think that's something to do with the non-working OnClick > >> which I'll get back to presently, this business with tab/pane > >> duplication is at least a few weeks old. > > So it looks as though it's something to do with the saved state of the > project, i.e. which files are listed as to be opened when the project is > loaded. The file giving the problem had been open (across multiple > sessions of the IDE) ever since the unit and associated frame was > created and saved, I can't remember exactly how I did the save (i.e. > whether it was an explicit save-all or an implicit save when the > compiler was run or the IDE shut down). The does not matter for the session. > If the compilation is run and finds an error where the file isn't > already open, the file is opened with the correct path and there are no > further problems. Nice. > Drat- it's just started happening again. The thing that appears to have > made the difference was telling the IDE to open the frame associated > with the unit, I can now see both forms of the path/name stored in the > .lps file: > > > > > > .. > > > You can see that the IDE knows that Unit12 belongs to the project, while Unit15 is simply a file on your disk. About "the IDE to open the frame associated with the unit". Which file is "the frame" and which file is "the unit"? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extract LazFreeType from LazUtils
2013/2/3 Mattias Gaertner > On Sun, 3 Feb 2013 23:42:08 +1100 > Alexander Klenin wrote: > > > On Sun, Feb 3, 2013 at 10:54 PM, Mattias Gaertner > > wrote: > > > On Sun, 3 Feb 2013 14:19:14 +1100 > > > Alexander Klenin wrote: > > > > > >> I have recently applied several patches to LazFreeType. > > >> Why looking over it, I wonder -- why is it part of LazUtils as opposed > > >> to a separate package? > > >> Note that LazUtils is very "basic" package -- even LCLBase depends on > it. > > >> I propose to move LazFreeType to a separate package. > > > > lazfreetype.pas > > lazfreetypefontcollection.pas > > ttcache.pas > > ttcalc.pas > > ttcalc1.inc > > ttcalc2.inc > > ttcalc3.inc > > ttcalc4.inc > > ttcmap.pas > > ttconfig.inc > > ttdebug.pas > > tterror.pas > > ttfile.pas > > ttgload.pas > > ttinterp.pas > > ttload.pas > > ttmemory.pas > > ttobjs.pas > > ttprofile.pas > > ttraster.pas > > ttraster_sweep.inc > > tttables.pas > > tttypes.pas > > +1 > > Mattias > +1 -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Buttons in frames
Mattias Gaertner wrote: On Sun, 03 Feb 2013 13:13:21 + Mark Morgan Lloyd wrote: Mattias Gaertner wrote: but I now have two tabbed panes in my source editor: "DbConfigCode2" and "DbConfigCode2(2)" with the latter focussed. And that's where you loose me. Why should /usr/local/src/inifiles/trunk/dbconfigcode2.pas be open in the editor? From the project's point of view it is an unrelated file. You tell me! But the IDE opens a new tab/pane, and that's the whole point I'm trying to make! Sorry. The IDE does not resolve symlinks in paths. That means if the IDE opens a wrong file, then it does so, even if the two directories were copies instead of symlinks. Your talk about a problem with symlinks mislead me. Don't worry, it was some while before I started focusing on what the real problem was. To add context for the error message, the error I've forced in looks like -8<- typeTDbConfigInit= procedure(confFrame: TDbConfigFrame; init: boolean= true); TDbConfigRead= function(confFrame: TDbConfigFrame; mr: TModalResult): boolean; ty pe // Line 22 { TDbConfigFrame } TDbConfigFrame = class(TFrame) ->8- So, let's forget the symlinks and find out why the IDE opens the wrong file. Please confirm: The messages window shows an error on the file /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas(22,4) Fatal: Syntax error, "=" expected but "identifier PE" found but the source editor opens the file /usr/local/src/inifiles/trunk/dbconfigcode2.pas Right? I think so, or at the very least it opens a new tab/pane so that I've now got tabs labeled "DbConfigCode2" and "DbConfigCode2(2)". "Information about the IDE" tells me Project.SomethingModified Session Project units: ./../inifiles/trunk/dbconfigcode2.pas SessionModified Is this "../../" or really "./../" ? I'm pretty sure that was ../../ but the cut or paste operation was trimming it. However I think we've got a Heisenbug here: "Information about the IDE" -> Modified is now displaying SourceEditorManager.SomethingModified Source Editor: /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas Component=True and the IDE now doesn't open a duplicate tab/pane when the compiler complains about the error. I think what's happened is that my action of restarting the IDE with the file closed has sorted things out. In other words this lot is still approximately valid... Project units: ./../inifiles/trunk/dbconfigcode.pas SessionModified which based on the project directory being /usr/local/src/heavywethers/trunk implies /usr/local/src/inifiles/trunk/dbconfigcode2.pas (I'm trying to be cautious jumping to conclusions here). see above. Source -> Unit Information -> General on the new DbConfigCode2(2) tab tells me /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas [manual transcript] which is what the file should be. ok ... Unit paths refers to /usr/local/src/heavywethers/inifiles/trunk which is OK. Source paths ditto. ok But Source -> Unit Information -> General on the original DbConfigCode2 tab tells me it's /usr/local/src/inifiles/trunk/dbconfigcode2.pas which is wrong. What is this "original"? When is it opened? In my former mails I assumed you had opened it yourself. dbconfigcode2 is the name on the tab created when the IDE (at startup) read the project. I was assuming that dbconfigcode2(2) was the one that the IDE created when the compiler reported the error, but looking at the file paths I'm not entirely sure. I need to be very cautious about jumping to any conclusions over this (having already been wrong once), but it looks as though the compiler is getting and reporting the right path Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas yes. but the IDE at some earlier stage has resolved it to /usr/local/src/inifiles/trunk/dbconfigcode2.pas which it shouldn't. What is this "some earlier stage"? When the IDE was opening the project. That actually fits my experience that given that sort of duplicate tab it's safer to close the older one. If I close the older tab/pane, save-all and terminate then restart, the one tab that's displayed relating to that file has the correct name /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas. ..up to this point where I've just done something that makes the problem go away. All tabs are named uniquely. If you open two units with the same name one will get the "(2)" appended. The "(2)" vanishes when the name becomes unique again. Yes, but which tab gets the suffix: the one that already exists or the newly-created duplicate? I think it's worth noting that since I updated this copy of the IDE etc. to trunk (i.e. rather than it being a couple of weeks old) I'm seeing additional startup warnings FindMissingClass DbConfigFrame1:TDbConfigFrame IsInherited=False TLazSourceFileManager.LoadL
Re: [Lazarus] Buttons in frames
On Sun, 03 Feb 2013 13:13:21 + Mark Morgan Lloyd wrote: > Mattias Gaertner wrote: > > but I now have two tabbed panes in my source editor: "DbConfigCode2" and > "DbConfigCode2(2)" with the latter focussed. > >>> And that's where you loose me. > >>> Why should /usr/local/src/inifiles/trunk/dbconfigcode2.pas be open in > >>> the editor? From the project's point of view it is an unrelated file. > >> You tell me! But the IDE opens a new tab/pane, and that's the whole > >> point I'm trying to make! > > > > Sorry. > > The IDE does not resolve symlinks in paths. That means if the IDE > > opens a wrong file, then it does so, even if the two directories were > > copies instead of symlinks. Your talk about a problem with symlinks > > mislead me. > > Don't worry, it was some while before I started focusing on what the > real problem was. > > To add context for the error message, the error I've forced in looks like > > -8<- > typeTDbConfigInit= procedure(confFrame: TDbConfigFrame; init: > boolean= true); > TDbConfigRead= function(confFrame: TDbConfigFrame; mr: > TModalResult): boolean; > > ty pe // Line 22 > >{ TDbConfigFrame } > >TDbConfigFrame = class(TFrame) > ->8- > > > So, let's forget the symlinks and find out why the IDE opens the wrong > > file. > > > > Please confirm: > > The messages window shows an error on the file > > /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas > > /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas(22,4) > Fatal: Syntax error, "=" expected but "identifier PE" found > > > but the source editor opens the file > > /usr/local/src/inifiles/trunk/dbconfigcode2.pas > > Right? > > I think so, or at the very least it opens a new tab/pane so that I've > now got tabs labeled "DbConfigCode2" and "DbConfigCode2(2)". > "Information about the IDE" tells me > > Project.SomethingModified Session > > Project units: > ./../inifiles/trunk/dbconfigcode2.pas SessionModified Is this "../../" or really "./../" ? > Project units: > ./../inifiles/trunk/dbconfigcode.pas SessionModified > > which based on the project directory being > /usr/local/src/heavywethers/trunk implies > /usr/local/src/inifiles/trunk/dbconfigcode2.pas (I'm trying to be > cautious jumping to conclusions here). see above. > Source -> Unit Information -> General on the new DbConfigCode2(2) tab > tells me /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas > [manual transcript] which is what the file should be. ok > ... Unit paths > refers to /usr/local/src/heavywethers/inifiles/trunk which is OK. Source > paths ditto. ok > But Source -> Unit Information -> General on the original DbConfigCode2 > tab tells me it's /usr/local/src/inifiles/trunk/dbconfigcode2.pas which > is wrong. What is this "original"? When is it opened? In my former mails I assumed you had opened it yourself. > I need to be very cautious about jumping to any conclusions over this > (having already been wrong once), but it looks as though the compiler is > getting and reporting the right path > > Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas yes. > but the IDE at some earlier stage has resolved it to > /usr/local/src/inifiles/trunk/dbconfigcode2.pas which it shouldn't. What is this "some earlier stage"? > That > actually fits my experience that given that sort of duplicate tab it's > safer to close the older one. > > If I close the older tab/pane, save-all and terminate then restart, the > one tab that's displayed relating to that file has the correct name > /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas. All tabs are named uniquely. If you open two units with the same name one will get the "(2)" appended. The "(2)" vanishes when the name becomes unique again. > I think it's worth noting that since I updated this copy of the IDE etc. > to trunk (i.e. rather than it being a couple of weeks old) I'm seeing > additional startup warnings > > FindMissingClass DbConfigFrame1:TDbConfigFrame IsInherited=False > TLazSourceFileManager.LoadLFM loading nested class TDbConfigFrame needed > by /usr/local/src/inifiles/trunk/dbconfigcode.pas It simply means: This form is opened and needs some frame of another unit. > However I think that's something to do with the non-working OnClick > which I'll get back to presently, this business with tab/pane > duplication is at least a few weeks old. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Buttons in frames
Mattias Gaertner wrote: but I now have two tabbed panes in my source editor: "DbConfigCode2" and "DbConfigCode2(2)" with the latter focussed. And that's where you loose me. Why should /usr/local/src/inifiles/trunk/dbconfigcode2.pas be open in the editor? From the project's point of view it is an unrelated file. You tell me! But the IDE opens a new tab/pane, and that's the whole point I'm trying to make! Sorry. The IDE does not resolve symlinks in paths. That means if the IDE opens a wrong file, then it does so, even if the two directories were copies instead of symlinks. Your talk about a problem with symlinks mislead me. Don't worry, it was some while before I started focusing on what the real problem was. To add context for the error message, the error I've forced in looks like -8<- typeTDbConfigInit= procedure(confFrame: TDbConfigFrame; init: boolean= true); TDbConfigRead= function(confFrame: TDbConfigFrame; mr: TModalResult): boolean; ty pe // Line 22 { TDbConfigFrame } TDbConfigFrame = class(TFrame) ->8- So, let's forget the symlinks and find out why the IDE opens the wrong file. Please confirm: The messages window shows an error on the file /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas(22,4) Fatal: Syntax error, "=" expected but "identifier PE" found but the source editor opens the file /usr/local/src/inifiles/trunk/dbconfigcode2.pas Right? I think so, or at the very least it opens a new tab/pane so that I've now got tabs labeled "DbConfigCode2" and "DbConfigCode2(2)". "Information about the IDE" tells me Project.SomethingModified Session Project units: ./../inifiles/trunk/dbconfigcode2.pas SessionModified Project units: ./../inifiles/trunk/dbconfigcode.pas SessionModified which based on the project directory being /usr/local/src/heavywethers/trunk implies /usr/local/src/inifiles/trunk/dbconfigcode2.pas (I'm trying to be cautious jumping to conclusions here). Source -> Unit Information -> General on the new DbConfigCode2(2) tab tells me /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas [manual transcript] which is what the file should be. ... Unit paths refers to /usr/local/src/heavywethers/inifiles/trunk which is OK. Source paths ditto. But Source -> Unit Information -> General on the original DbConfigCode2 tab tells me it's /usr/local/src/inifiles/trunk/dbconfigcode2.pas which is wrong. I need to be very cautious about jumping to any conclusions over this (having already been wrong once), but it looks as though the compiler is getting and reporting the right path Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas but the IDE at some earlier stage has resolved it to /usr/local/src/inifiles/trunk/dbconfigcode2.pas which it shouldn't. That actually fits my experience that given that sort of duplicate tab it's safer to close the older one. If I close the older tab/pane, save-all and terminate then restart, the one tab that's displayed relating to that file has the correct name /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas. I think it's worth noting that since I updated this copy of the IDE etc. to trunk (i.e. rather than it being a couple of weeks old) I'm seeing additional startup warnings FindMissingClass DbConfigFrame1:TDbConfigFrame IsInherited=False TLazSourceFileManager.LoadLFM loading nested class TDbConfigFrame needed by /usr/local/src/inifiles/trunk/dbconfigcode.pas However I think that's something to do with the non-working OnClick which I'll get back to presently, this business with tab/pane duplication is at least a few weeks old. -- 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.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Control Notification bug?
On Sun, Feb 3, 2013 at 2:17 PM, Mattias Gaertner wrote: > Why not override InsertControl and RemoveControl? Because I didn't realize those methods existed. :) I will try them next ... Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extract LazFreeType from LazUtils
On Sun, 3 Feb 2013 23:42:08 +1100 Alexander Klenin wrote: > On Sun, Feb 3, 2013 at 10:54 PM, Mattias Gaertner > wrote: > > On Sun, 3 Feb 2013 14:19:14 +1100 > > Alexander Klenin wrote: > > > >> I have recently applied several patches to LazFreeType. > >> Why looking over it, I wonder -- why is it part of LazUtils as opposed > >> to a separate package? > >> Note that LazUtils is very "basic" package -- even LCLBase depends on it. > >> I propose to move LazFreeType to a separate package. > > lazfreetype.pas > lazfreetypefontcollection.pas > ttcache.pas > ttcalc.pas > ttcalc1.inc > ttcalc2.inc > ttcalc3.inc > ttcalc4.inc > ttcmap.pas > ttconfig.inc > ttdebug.pas > tterror.pas > ttfile.pas > ttgload.pas > ttinterp.pas > ttload.pas > ttmemory.pas > ttobjs.pas > ttprofile.pas > ttraster.pas > ttraster_sweep.inc > tttables.pas > tttypes.pas +1 Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extract LazFreeType from LazUtils
On Sun, Feb 3, 2013 at 11:42 PM, Alexander Klenin wrote: >>> I propose to move LazFreeType to a separate package. >> >> What units belong to it? >> > > lazfreetype.pas > lazfreetypefontcollection.pas > ttcache.pas > ttcalc.pas > ttcalc1.inc > ttcalc2.inc > ttcalc3.inc > ttcalc4.inc > ttcmap.pas > ttconfig.inc > ttdebug.pas > tterror.pas > ttfile.pas > ttgload.pas > ttinterp.pas > ttload.pas > ttmemory.pas > ttobjs.pas > ttprofile.pas > ttraster.pas > ttraster_sweep.inc > tttables.pas > tttypes.pas ... and I forgot easylazfreetype.pas, which IMHO is not optimal name for a main unit :) -- Alexander S. Klenin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extract LazFreeType from LazUtils
On Sun, Feb 3, 2013 at 10:54 PM, Mattias Gaertner wrote: > On Sun, 3 Feb 2013 14:19:14 +1100 > Alexander Klenin wrote: > >> I have recently applied several patches to LazFreeType. >> Why looking over it, I wonder -- why is it part of LazUtils as opposed >> to a separate package? >> Note that LazUtils is very "basic" package -- even LCLBase depends on it. >> I propose to move LazFreeType to a separate package. > > What units belong to it? > lazfreetype.pas lazfreetypefontcollection.pas ttcache.pas ttcalc.pas ttcalc1.inc ttcalc2.inc ttcalc3.inc ttcalc4.inc ttcmap.pas ttconfig.inc ttdebug.pas tterror.pas ttfile.pas ttgload.pas ttinterp.pas ttload.pas ttmemory.pas ttobjs.pas ttprofile.pas ttraster.pas ttraster_sweep.inc tttables.pas tttypes.pas -- Alexander S. Klenin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Control Notification bug?
On Sun, 3 Feb 2013 13:58:42 +0200 Juha Manninen wrote: >[...] > In fact the control does not have parent or even name when > Notification is called. > Apparently the control is still under construction. If I set its > properties there, it leads to a crash. > I solved it by using OnIdle handler. Notification sets FNewControl and > registers the handler which looks like this : > > procedure TCustomCoolBar.OnIdle(Sender: TObject; var Done: Boolean); > var > Band: TCoolBand; > begin > Assert(Assigned(FNewControl) and Assigned(FNewControl.Parent), > 'TCoolBar.OnIdle: FNewControl or FNewControl.Parent not assigned'); > DebugLn(['TCoolBar.OnIdle, Control.Name=', FNewControl.Name]); > if FNewControl.Parent = Self then > begin > Band := FBands.Add; > Band.Control := FNewControl; > FNewControl := Nil; > end; > Application.RemoveOnIdleHandler(@OnIdle); > end; > > > It seems to work but may not be the cleanest way to do it. "Not to be the cleanest way" lol It's a dirty hack. Even an QueueAsyncCall would be better. > Comments ? Why not override InsertControl and RemoveControl? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Buttons in frames
On Sun, 03 Feb 2013 11:37:03 + Mark Morgan Lloyd wrote: > Mattias Gaertner wrote: > > >> [TCompiler.Compile] CmdLine="/usr/local/bin/ppc386-2.6.0 -MObjFPC > >> -Scagi -O1 -g -gl -vewnhi -Se3 -Fi/usr/local/share/lazarus-trunk/ide > >> -Fl/opt/gnome/lib -Fu/usr/local/src/heavywethers/inifiles/trunk > >> .. > >> Compiling HeavyWethers.lpr > >> Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas > > > > Good. > > > > > >> but I now have two tabbed panes in my source editor: "DbConfigCode2" and > >> "DbConfigCode2(2)" with the latter focussed. > > > > And that's where you loose me. > > Why should /usr/local/src/inifiles/trunk/dbconfigcode2.pas be open in > > the editor? From the project's point of view it is an unrelated file. > > You tell me! But the IDE opens a new tab/pane, and that's the whole > point I'm trying to make! Sorry. The IDE does not resolve symlinks in paths. That means if the IDE opens a wrong file, then it does so, even if the two directories were copies instead of symlinks. Your talk about a problem with symlinks mislead me. So, let's forget the symlinks and find out why the IDE opens the wrong file. Please confirm: The messages window shows an error on the file /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas but the source editor opens the file /usr/local/src/inifiles/trunk/dbconfigcode2.pas Right? > > As I wrote: > > You can use linked directories, but within a project you can use > > only one of them. > > I'm trying to, dagnabbit! :-) > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Control Notification bug?
On Sun, Feb 3, 2013 at 1:44 PM, Mattias Gaertner wrote: > On Sun, 3 Feb 2013 13:32:09 +0200 > Juha Manninen wrote: > No. The Notification is inherited from TComponent. So, it's about > Owner, not about TControl.Parent. Most controls are owned by the form. Ok. >> I solved the problem by checking if the control's parent = Self. > > Good. In fact the control does not have parent or even name when Notification is called. Apparently the control is still under construction. If I set its properties there, it leads to a crash. I solved it by using OnIdle handler. Notification sets FNewControl and registers the handler which looks like this : procedure TCustomCoolBar.OnIdle(Sender: TObject; var Done: Boolean); var Band: TCoolBand; begin Assert(Assigned(FNewControl) and Assigned(FNewControl.Parent), 'TCoolBar.OnIdle: FNewControl or FNewControl.Parent not assigned'); DebugLn(['TCoolBar.OnIdle, Control.Name=', FNewControl.Name]); if FNewControl.Parent = Self then begin Band := FBands.Add; Band.Control := FNewControl; FNewControl := Nil; end; Application.RemoveOnIdleHandler(@OnIdle); end; It seems to work but may not be the cleanest way to do it. Comments ? Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extract LazFreeType from LazUtils
On Sun, 3 Feb 2013 14:19:14 +1100 Alexander Klenin wrote: > I have recently applied several patches to LazFreeType. > Why looking over it, I wonder -- why is it part of LazUtils as opposed > to a separate package? > Note that LazUtils is very "basic" package -- even LCLBase depends on it. > I propose to move LazFreeType to a separate package. What units belong to it? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] AlignControls
On Sun, 3 Feb 2013 13:17:22 +0200 Juha Manninen wrote: > On Fri, Feb 1, 2013 at 1:47 PM, Mattias Gaertner > wrote: > > Well, your AlignControls should move them anyway, so that would be > > sufficient. > > Thanks Mattias, I got it working. > > > > You can set > > Child.ControlStyle:=Child.ControlStyle+[csDesignFixedBounds]; > > This had no effect in my tests. The control could still be moved. Fixed. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Control Notification bug?
On Sun, 3 Feb 2013 13:32:09 +0200 Juha Manninen wrote: > My new TCoolBar component uses overridden notification: > > procedure Notification(AComponent: TComponent; Operation: > TOperation); override; > > When Operation is opInsert, it adds a band and associates the new > control with it. > It works as expected when a control is dropped on a CoolBar. > However, CoolBar is notified also when a control is dropped anywhere > on the same form. I believe it is a bug, it should not happen. No. The Notification is inherited from TComponent. So, it's about Owner, not about TControl.Parent. Most controls are owned by the form. > I solved the problem by checking if the control's parent = Self. Good. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Buttons in frames
Mattias Gaertner wrote: [TCompiler.Compile] CmdLine="/usr/local/bin/ppc386-2.6.0 -MObjFPC -Scagi -O1 -g -gl -vewnhi -Se3 -Fi/usr/local/share/lazarus-trunk/ide -Fl/opt/gnome/lib -Fu/usr/local/src/heavywethers/inifiles/trunk .. Compiling HeavyWethers.lpr Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas Good. but I now have two tabbed panes in my source editor: "DbConfigCode2" and "DbConfigCode2(2)" with the latter focussed. And that's where you loose me. Why should /usr/local/src/inifiles/trunk/dbconfigcode2.pas be open in the editor? From the project's point of view it is an unrelated file. You tell me! But the IDE opens a new tab/pane, and that's the whole point I'm trying to make! As I wrote: You can use linked directories, but within a project you can use only one of them. I'm trying to, dagnabbit! :-) -- 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.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Control Notification bug?
My new TCoolBar component uses overridden notification: procedure Notification(AComponent: TComponent; Operation: TOperation); override; When Operation is opInsert, it adds a band and associates the new control with it. It works as expected when a control is dropped on a CoolBar. However, CoolBar is notified also when a control is dropped anywhere on the same form. I believe it is a bug, it should not happen. I solved the problem by checking if the control's parent = Self. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] AlignControls
On Fri, Feb 1, 2013 at 1:47 PM, Mattias Gaertner wrote: > Well, your AlignControls should move them anyway, so that would be sufficient. Thanks Mattias, I got it working. > You can set > Child.ControlStyle:=Child.ControlStyle+[csDesignFixedBounds]; This had no effect in my tests. The control could still be moved. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Buttons in frames
On Sun, 03 Feb 2013 10:42:33 + Mark Morgan Lloyd wrote: > Mattias Gaertner wrote: > > >>> 1. Why should the compiler report a wrong path? > >> That's not quite what I said. You pointed out that the IDE was > >> converting the relative path to an absolute one which is what the > >> compiler sees, the compiler reports an absolute path in any error > >> message, and by the time it sees that the IDE's forgotten that it's > >> already got the file open. > > > > Sorry. You lost me. > > Well, I obviously accept that I'm Doing It Wrong, and that having > symlinked directories in the search path is ill-advised (which to my > mind is unfortunate). Many people use symlinked directories without problems. > I honestly don't want to bang on about this to the > extent that I appear boorish, but I'll try once more in the interest of > highlighting something which I think is a problem. > > The project file is /usr/local/src/heavywethers/trunk/heavywethers.lpi > and the program file is in the same directory. One of the files it's > referencing is dbconfig2.pas (internal name DbConfigCode2), which is in > the absolute directory /usr/local/src/inifiles/trunk accessed via a > symlinked directory and the project's "Other unit files" setting as > ./inifiles/trunk. I guess you mean "../inifiles/trunk", which resolves to "/usr/local/src/heavywethers/inifiles/trunk/". To avoid misunderstanding: When I'm talking about "absolute filename" I meant everything that starts with a /. No matter if a part contains a symlink or mount point. The project (i.e. IDE and compiler) uses /usr/local/src/heavywethers/inifiles/trunk/dbconfig2.pas. > If I force an error into this file and force all files to be saved, when > I run the compilation I see > > [TCompiler.Compile] CmdLine="/usr/local/bin/ppc386-2.6.0 -MObjFPC > -Scagi -O1 -g -gl -vewnhi -Se3 -Fi/usr/local/share/lazarus-trunk/ide > -Fl/opt/gnome/lib -Fu/usr/local/src/heavywethers/inifiles/trunk > .. > Compiling HeavyWethers.lpr > Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas Good. > but I now have two tabbed panes in my source editor: "DbConfigCode2" and > "DbConfigCode2(2)" with the latter focussed. And that's where you loose me. Why should /usr/local/src/inifiles/trunk/dbconfigcode2.pas be open in the editor? From the project's point of view it is an unrelated file. > If I fix the error on the > focussed pane, force save-all, and hit compile I get an immediate > dialogue "Some files have changed on disk:" > "/usr/local/src/inifiles/trunk/dbconfigcode2.pas". I can fix that by > selecting "Reload from disk" *provided* that I've done manual saves > after every change, If I don't force the saves then the most recent > edits might be lost. Well, with some work it is possible to find out if two symlinked files are the same under Unix and improve the messages. It is not possible in general to find duplicates. For example with network shares or special file systems. > The second tabbed pane should not, to my mind, be opened: the file > already exists on the screen, and the only reason that the IDE thinks > it's not is that it's not kept track of the fact that it's canonicalised > the path when it passed it to the compiler. Also the dialogue should not > pop up: all changes have already been flushed to disk but the IDE hasn't > adequately realised that. It must pop up the file given by the compiler. That is the one in the project and is therefore parsed with the project settings, the other is not. The two files share only sectors on the disk. As I wrote: You can use linked directories, but within a project you can use only one of them. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Project Options dialog
On 3-2-2013 9:23, leledumbo wrote: > I'd rather have those options appear when the target platform combobox > changes > I would prefer Howard's idea - having all options visible means you can set them for any other platform in one go... But it's all subjective. ... and as far as we're talking about this, having some tooltips/hints that explain a bit more what the settings do would be nice... -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Buttons in frames
Mattias Gaertner wrote: 1. Why should the compiler report a wrong path? That's not quite what I said. You pointed out that the IDE was converting the relative path to an absolute one which is what the compiler sees, the compiler reports an absolute path in any error message, and by the time it sees that the IDE's forgotten that it's already got the file open. Sorry. You lost me. Well, I obviously accept that I'm Doing It Wrong, and that having symlinked directories in the search path is ill-advised (which to my mind is unfortunate). I honestly don't want to bang on about this to the extent that I appear boorish, but I'll try once more in the interest of highlighting something which I think is a problem. The project file is /usr/local/src/heavywethers/trunk/heavywethers.lpi and the program file is in the same directory. One of the files it's referencing is dbconfig2.pas (internal name DbConfigCode2), which is in the absolute directory /usr/local/src/inifiles/trunk accessed via a symlinked directory and the project's "Other unit files" setting as ./inifiles/trunk. If I force an error into this file and force all files to be saved, when I run the compilation I see [TCompiler.Compile] CmdLine="/usr/local/bin/ppc386-2.6.0 -MObjFPC -Scagi -O1 -g -gl -vewnhi -Se3 -Fi/usr/local/share/lazarus-trunk/ide -Fl/opt/gnome/lib -Fu/usr/local/src/heavywethers/inifiles/trunk .. Compiling HeavyWethers.lpr Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas but I now have two tabbed panes in my source editor: "DbConfigCode2" and "DbConfigCode2(2)" with the latter focussed. If I fix the error on the focussed pane, force save-all, and hit compile I get an immediate dialogue "Some files have changed on disk:" "/usr/local/src/inifiles/trunk/dbconfigcode2.pas". I can fix that by selecting "Reload from disk" *provided* that I've done manual saves after every change, If I don't force the saves then the most recent edits might be lost. The second tabbed pane should not, to my mind, be opened: the file already exists on the screen, and the only reason that the IDE thinks it's not is that it's not kept track of the fact that it's canonicalised the path when it passed it to the compiler. Also the dialogue should not pop up: all changes have already been flushed to disk but the IDE hasn't adequately realised that. -- 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.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Project Options dialog
I'd rather have those options appear when the target platform combobox changes -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Project-Options-dialog-tp4029037p4029039.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus