[Lazarus] TDataModule accepts some visual controls
I discovered that a datamodule will let you drop a TMainMenu or a TPopupMenu on it. Is this by design, or an oversight? Should I report this as a bug? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Beta testers needed / Lazarus with Editor-Macro-Script
On 30/11/12 1:21, Martin wrote: Hi, I need some testers for all the different available platforms. Because, unfortunately, I do not have every available hardware/OS myself :( NumberOfFailures="0" NumberOfRunTests="3" NumberOfIgnoredTests="0"> NumberOfErrors="0" NumberOfFailures="0" NumberOfRunTests="3" NumberOfIgnoredTests="0"> ElapsedTime="00:00:50.825"/> 3 0 0 0 00:00:51.246 2012-11-30 11:00:04 This is on a Win 7 (Home Premium) 64 bit dual core processor running 32-bit Lazarus, FPC 2.6.1 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Why doesn't this work?
On 28/11/12 10:15, Erwin van den Bosch wrote: procedure TForm1.Button1Click(Sender: TObject); var iLastError: integer; begin iLastError:=10053; if iLastError in [10053, 10054] then Label1.Caption:='Yes, it works!' else Label1.Caption:='No, it doesn''t work!'; // Output : No, it doesn''t work! end; You may be thinking of how "in" is used in a for..in..do loop like this procedure TForm1.Button1Click(Sender: TObject); var iLastError, j: integer; intArray: array[0..1] of integer = (10053,10054); begin iLastError:=10053; for j in intArray do if j=iLastError then begin Label1.Caption:='iLastError present'; Break; end else label1.Caption:= 'iLastError not found'; end; -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Where is the System Unit source?
On 14/11/12 4:19, Curt Carpenter wrote: Could anyone tell me where I'll find the system unit source? I have the source for FPC, but can's seem to find system.pas anywhere. Look in fpc/rtl/inc/system.inc Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How do you install Lazarus on Debian?
I tried that first. Didn't work. Some problem with deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe On Thu, Nov 8, 2012 at 1:49 PM, bsquared wrote: > > Detailed instructions are here: > http://wiki.lazarus.**freepascal.org/Installing_**Lazarus<http://wiki.lazarus.freepascal.org/Installing_Lazarus> > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How do you install Lazarus on Debian?
I was not able to find the deb files. How do you download them? When I did a search for "lazarus install on debian", I got a list of installation instructions for everything except Debian -- and directions for doing a source checkout and build. BTW, I missed the part about needing to configure fpc and fpc-packages before doing the make. After an apt-get install fpc, make appears to be running just fine in the lazarus directory. Now to figure out how to start it up... On Thu, Nov 8, 2012 at 1:40 PM, Chavoux Luyt wrote: > Hi Howard > > On 8 November 2012 21:26, Howard Lee Harkness < > howard.lee.harkn...@gmail.com> wrote: > >> I'm a relative n00b at Linux admin stuff, but I'd really like to be able >> to run Lazarus on the Debian system I've just inherited at my new contract. >> >> I have done a checkout of the Lazarus svn repository per the instructions >> in http://wiki.freepascal.org/Getting_Lazarus. But when I execute "make" >> in the lazarus directory, I just get a bunch of error messages. >> > Do you have a specific reason why you want to install Lazarus from source > (svn)? In general I find it easier in Debian to download the .deb files and > install from there. Normally these will also ensure that the prerequisite > packages (e.g. fpc) are also installed. > > HTH > Chavoux > > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] How do you install Lazarus on Debian?
edit/units/-/nogui -Fu../components/lazcontrols/lib/-/nogui -Fu../units/-/nogui ' make[2]: -iVSPTPSOTO: Command not found make[2]: Entering directory `/etc/lazarus/ide' FE. -FUunits/- -Fu../packager/units/- -Fu../components/codetools/units/- -Fu../components/lazutils/lib/- -Fu../lcl/units/- -Fu../lcl/units/-/nogui -Fu../ideintf/units/-/nogui -Fu../components/synedit/units/-/nogui -Fu../components/lazcontrols/lib/-/nogui -Fu../units/-/nogui lazbuild.lpr make[2]: FE.: Command not found make[2]: [lazbuild.exe] Error 127 (ignored) make[2]: Leaving directory `/etc/lazarus/ide' make[1]: Leaving directory `/etc/lazarus/ide' make -C lcl make[1]: -iVSPTPSOTO: Command not found make[1]: Entering directory `/etc/lazarus/lcl' /bin/rm -f units/-/alllclunits.ppu FE. -FUunits/- alllclunits.pp make[1]: FE.: Command not found make[1]: [alllclunits.ppu] Error 127 (ignored) /bin/cp -f Makefile.compiled units/-/LCLBase.compiled make[1]: Leaving directory `/etc/lazarus/lcl' make -C components/lazcontrols make[1]: -iVSPTPSOTO: Command not found make[1]: Entering directory `/etc/lazarus/components/lazcontrols' /bin/rm -f units/-/lazcontrols.ppu FE. -FUunits/- lazcontrols.pas make[1]: FE.: Command not found make[1]: [lazcontrols.ppu] Error 127 (ignored) /bin/cp -f Makefile.compiled units/-/LazControls.compiled make[1]: Leaving directory `/etc/lazarus/components/lazcontrols' make -C components/synedit make[1]: -iVSPTPSOTO: Command not found make[1]: Entering directory `/etc/lazarus/components/synedit' /bin/rm -f units/-/allsynedit.ppu FE. -FUunits/- allsynedit.pas make[1]: FE.: Command not found make[1]: [allsynedit.ppu] Error 127 (ignored) /bin/cp -f Makefile.compiled units/-/SynEdit.compiled make[1]: Leaving directory `/etc/lazarus/components/synedit' make -C ideintf make[1]: -iVSPTPSOTO: Command not found make[1]: Entering directory `/etc/lazarus/ideintf' /bin/rm -f units/-/ideintf.ppu FE. -FUunits/- ideintf.pas make[1]: FE.: Command not found make[1]: [ideintf.ppu] Error 127 (ignored) /bin/cp -f Makefile.compiled units/-/IDEIntf.compiled make[1]: Leaving directory `/etc/lazarus/ideintf' make -C components/synedit/design make[1]: -iVSPTPSOTO: Command not found make[1]: Entering directory `/etc/lazarus/components/synedit/design' /bin/rm -f units/-/allsyneditdsgn.ppu FE. -FUunits/- allsyneditdsgn.pas make[1]: FE.: Command not found make[1]: [allsyneditdsgn.ppu] Error 127 (ignored) /bin/cp -f Makefile.compiled units/-/SynEditDsgn.compiled make[1]: Leaving directory `/etc/lazarus/components/synedit/design' make -C ide ide make[1]: -iVSPTPSOTO: Command not found make[1]: Entering directory `/etc/lazarus/ide' make -C ../tools svn2revisioninc OS_TARGET= CPU_TARGET= OPT='' make[2]: -iVSPTPSOTO: Command not found make[2]: Entering directory `/etc/lazarus/tools' make[2]: *** No rule to make target `svn2revisioninc'. Stop. make[2]: Leaving directory `/etc/lazarus/tools' make[1]: *** [revisioninc] Error 2 make[1]: Leaving directory `/etc/lazarus/ide' make: *** [ide] Error 2 root@debian:/etc/lazarus# -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] returning the stop execution dialog
On 02/11/12 12:32, ik wrote: After I executed a code from the IDE, I pressed by mistake on "Do not show this dialog anymore", of the finish dialog. How can I make Lazarus to display it again (so it will be clearer when the execution ended) ? I think you mean the IDE Options dialog, Debugger, General page, "Show message on stop" checkbox. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Splash window with drop shadow
On 30/10/12 10:49, Leonardo M. Ramé wrote: Alberto, how can I make a window transparent?. There's a suggestion here: http://www.lazarus.freepascal.org/index.php/topic,18738.msg106055.html#msg106055 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TStrings, Windows and Unicode
On 24/10/12 2:37, Marcos Douglas wrote: ...in my example I didn't do that and worked, why? I had not explained very well. When I said the file is Ok I mean the file on Windows Explorer, not in LCL. Do the test and you see. I guess the stringlist streaming saves the string with a BOM, and so Explorer then recognises the encoding? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TStrings, Windows and Unicode
On 24/10/12 12:40, Marcos Douglas wrote: Nope. A stringlist is not LCL and it does not expect anything but strings. I agree... If you write the contents of a stringlist to a file you get bytes you have put into the list. Nothing more nothing less. Yes, but... If you want a UTF8 text file written, make sure you put UTF8 in it. Same for reading. When using filenames, you need to convert the name using the LCL function LCLtoSys (or something like that) ...in my example I didn't do that and worked, why? Because you added a UTF8 string to a stringlist. It was saved as UTF8 bytes (as Marc pointed out) and when later retrieved via a stringlist LoadFromFile call those bytes will be inserted into the stringlist just as they were saved, ready to display in UTF8 encoding. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TStrings, Windows and Unicode
Marc Weustink wrote: A stringlist is not LCL and it does not expect anything but strings. If you write the contents of a stringlist to a file you get bytes you have put into the list. Nothing more nothing less. Thanks for the clarification. Juergen Hestermann wrote: > There is the theory of having UTF8 but in practice you have to > watch out because in *some* situations the UTF8 paradigm > is *not* valid and you have to convert strings yourself. > But where are these places? Mostly they are not even documented. There may be other places, but this applies at least to every RTL system call involving names (mainly file and directory routines). It's annoying, but not insurmountable. And when the new Unicode string is fully implemented these code-page-related woes will fade into history (well, that's the theory). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TStrings, Windows and Unicode
On 24/10/12 2:25, Marcos Douglas wrote: In the example below, running on Windows: The name of file, after saved, is "atenção.txt" but the content is "atenção". I understand the filename, i.e, I need to use UTF8ToSys but I do not understand the valid content. procedure TForm1.Button1Click(Sender: TObject); var lStrings: TStrings; begin lStrings := TStringList.Create; lStrings.Text := 'atenção'; lStrings.SaveToFile('c:\atenção.txt'); lStrings.Free; end; Internally the LCL uses only UTF8 encoding, so stringlists etc. all expect strings in that encoding and process them correctly when supplied (as here) with a string from the IDE Editor which is also UTF8. However the streaming code in SaveToFile eventually calls some Windows system routine which does not handle UTF8 and so requires conversion from the UTF8 filename to be correctly handled. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TListBox.AddItem doesn't exist?
On 21/10/12 3:25, Timothy Groves wrote: So I am trying to add a TListBox to my program. Relevant code is below. TfrmFicMake = class(TForm) . . . lstVolumeList: TListBox; . . . end; procedure TfrmFicMake.btnAddVolumeClick(Sender: TObject); var index : integer; begin frmCreateVolume.ShowModal; lstVolumeList.Clear; for index := 0 to (Length (Volumes) - 1) do lstVolumeList.AddItem (Volumes [index].VolumeName); end; The AddItem method takes two parameters, a string and an associated TObject. If you only want to use the listbox to store a list of string items use lstVolumeList.Items.Add(Volumes[index].VolumeName); Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to deselect text in edit control
On 09/10/12 1:32, Frank Church wrote: Whenever I press the enter key in an edit control which is not configured to tab to the next item, all the ext in the edit control becomes selected. Is there some way to disable this behaviour, or unselect the selected text? Try setting AutoSelect to False (I'm not sure if this is effective on all platforms). Else trap the Enter key in the OnKeyPress event and set it to #0 or whatever suits your purpose. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Toolbar buttons with caption on right
On 04/10/12 11:27, Graeme Geldenhuys wrote: How do I get the toolbar button captions to appear on the right of the button image? When I enable ShowCaptions, they always appear below the images. What I want, is like what can be seen in a Delphi app - see attached screenshots. If you use TSpeedButton, just set button.Layout:= blGlyphLeft and button.ShowCaption:= True; Also, how to I centre the image in the toolbar button height? As you can see from the Lazarus screenshot, the images appear in the top/left of the button. On Windows they are automatically centred. Is this a GTK oddity? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Object Inspector
There is currently a spelling discrepancy which probably needs to be rectified in that the OI Favorites page is spelt in the US way, as is the popup context menu text that refers to it. Whereas the dialog caption and interior label of the "Add to favourite properties" dialog (and associated source code) all use the British spelling of favourite. I also wonder if the default setting whereby the OI statusbar is always shown is the best option. I have never found the OI statusbar gives essential information, but perhaps I have simply not paid attention to it at the right moment, or perhaps there are plans to expand its usefulness. It would be more helpful to beginners, I think, if the OI InfoBox were shown by default in preference to the statusbar. Although a statusbar provides a useful sizing grip, the OI can also be resized without it, and turning it off allows one more property to be displayed in the grid without the need to scroll. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Passing a section of an array to a function.
On 10/9/12 7:36, Dave Coventry wrote: Hi, I have an array of Byte which I have loaded from a file. I want to process a 100 byte section of the array which starts at offset 32 in my array. My function (or procedure) is as follows: procedure decompress_r(cbuf: array of byte); var len,i: integer; begin i:=1; if (cbuf[0]and $F0)=$20 then begin Inc(i,2); len:=cbuf[i]and $7; end; ... end; There is no looping construct (while or repeat) in your decompress_r procedure. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TForm BorderIcons
On 06/9/12 8:21, Roberto P. wrote: Before going to call for a bug, is there anyone who can try it on a blank Form ? Setting biHelp here (Win 7, 32-bit app) does not give an extra border icon. Presence/absence of a manifest makes no difference either. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.0 release notes
On 06/9/12 10:05, Mattias Gaertner wrote: The HTML is totally different. I converted both to text, but the diff still shows a lot of formatting changes. I attached the diff. I used LibreOffice to do the editing, and it may have mangled the HTML on saving. I'm not used either to editing HTML, or to producing and using diffs. What would be a helpful next step? Could you supply the content as plain-text, and I will edit that and produce a diff? I did not want to edit the wiki as Graeme suggested, since I don't know if that is the original file, and anyway I think changes should be reviewed by one of the developers in case some rephrasing (say for clarity) inadvertently changes the meaning. Obviously I do not intend for that to happen, but any editing opens that possibility. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What is aarre?
On 03/9/12 9:56, Mattias Gaertner wrote: On Mon, 3 Sep 2012 16:03:26 +0200 Vincent Snijders wrote: Hi, I looked at recent svn commits and wondered, what is aarre? "Aarre" is finnish for "treasure". Maybe the name will change. Aarre has the benefit of being distinctive. If an English word is preferred it could be called "chest", which describes the container, rather than the contents. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.0 Release
On 29/8/12 8:06, Bernd wrote: Is there an official press release so that the news portals that might happen to stumble over this news know what they need to write? I've just done a bit of tidying-up on the wiki history page in case news editors use that link (which Mattias mentions) for information. But something custom-written for today is probably needed too. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What happened with make LCL_PLATFORM?
On 29/8/12 4:32, Krzysztof wrote: BTW two questions: 1. What is FPC 2.6.1? Is this stable version? If yes why on http://www.freepascal.org/ is 2.6.0 as latest? 2.6.1 is some patch? 2. When FPC 2.7.X is planned? We have now Lazarus 1.0, It would be nice if it worked with version 2.7.X Since FPC and Lazarus are continuously developed, development versions (odd numbered) are always ahead of release versions (even numbered). 2.6.0 is the last FPC *release* (stable, well-tested, documented...). Lazarus 1.0 probably does compile with 2.7.x (I haven't tried this), but it does not require a 2.7. FPC, i. e. it does not use features introduced in the 2.7.x branch. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] html control from turbopower_ipro that comes with lazarus
On 23/8/12 8:17, Ajeandro Gonzalo wrote: But how can this control be used like Delphi's RichEdit control to just add color and bold (for example) to simple text? AFAIK the control itself has no colouring or emboldening capabilities beyond its ability to render valid html text correctly. You have to adapt your text data, i. e. save it as an .html file and insert the HTML tags yourself. So the text 'This has a single *bold* word' would need to be saved as (say) test.html containing the data: This has a single bold word Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Delphi post-XE3 roadmap
If you have not seen it, users of Delphi XE2 may be interested to read Delphi Product Manager JT's blog about what Embarcadero are working on for native Android and iOS development (which won't be in the forthcoming XE3 release - it's all further ahead than that), dropping FPC in favour of another open source toolchain and their own new debugger, revamped FireMonkey etc. http://blogs.embarcadero.com/jtembarcadero/2012/08/20/xe3-and-beyond/ Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Project | New project...
On 09/8/12 10:06, Kostas Michalopoulos wrote: instantfpc comes with fpc 2.6.0. It isn't installed here: Directory of C:\FPC\2.6.0\bin\i386-win32 File Not Found Something went wrong during your installation. A clean RC1 install (on 64-bit Windows 7) here yields c:\lazarus\fpc>dir instant*.* /s Volume in drive C is HP Volume Serial Number is 283C-A4ED Directory of C:\lazarus\fpc\2.6.0\bin\i386-win32 29/07/12 14:00 193,024 instantfpc.exe 1 File(s)193,024 bytes Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Project | New project...
The 'Create a new project' dialog currently offers 7 project options of which the first (selected by default) is called Application. I suggest this be renamed 'GUI Application', because this would be more informative for complete beginners, and is also consonant with the third option which has the informative name 'Console application'. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Type_Class_Explorer application
I'm contributing an application which you can find in the Third Party Announcements section of the online Lazarus forum (at 186k it's too big to travel as an attachment on this email list). It may be suitable for inclusion with existing Lazarus examples, now that the release of Version 1.0 gets nearer. This class explorer displays information on all LCL Palette components, including the unit where it is declared and a visual hierarchy of ancestor classes, together with information on a variety of non-Palette LCL and FCL classes, and information on a range of simple types. Additionally, almost every palette component that has visual GUI functionality is provided with a mini-applet demonstrating some simple feature of one or two properties, and a display which logs the commonest events (where possible) to give beginners a bit of simple working code to use. For the Chart components I've adapted code from Alexander's excellent examples (cut down to a bare minimum). Database examples are mostly based on TDbf, because although deprecated, it works out-of-the-box without requiring external database installation to obtain a working example. I struggled with reliably working code for some RTTI components (see the TTIImage and TTIFLoatSpinEdit). Flickering may arise from poor coding on my part, or perhaps it is the OnIdle trigger setting properties repeatedly? I'm not sure exactly which components will be installed by default into the Palette for Version 1.0, so the selection is based on RC1, and since component selection is unfortunately hard-coded (I'm not sufficiently experienced to work out how to do this dynamically), further adjustments may be needed to make the program work with a comprehensive Version 1.0 component set. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.0 release candidate 1 available for download
On 01/8/12 10:35, Mattias Gaertner wrote: The Lazarus team is glad to announce that Lazarus 1.0RC is available for download at the SourceForge download page: http://sourceforge.net/projects/lazarus/files/ Also let me know if you installed it without any problem. Installed on 64-bit Win 7 flawlessly. I like the new Windows installer options "Install chm files", and Clean up: "Delete all user config files from previous installs". Haven't checked yet whether these are available on other OSs. The installer somehow has a more professional feel to it. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] "Unitname already in project" dialog
When saving a new unit over an old one, you get an IDE dialog worded thus: The unit "..." already exists. Ignore will force the renaming, Cancel will cancel the saving of this source and Abort will abort the whole saving. However the dialog does not have the 3 buttons implied (Ignore, Cancel, Abort) but two: "Force renaming", and "Cancel renaming". I suggest the text is reworded to remove reference to Abort (or an Abort button is provided, or there is an indication that this refers to the [X] close icon), and that the reference to Ignore is altered to refer to "Force renaming". There are clearly various ways to improve the wording - but there is no reason the provided buttons should not be better identified, along with their purpose. Howard <>-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TTIProgressBar component
On 24/7/12 9:26, Mattias Gaertner wrote: Presently TTIProgressBar's properties Link and UseRTTIMinMax remain public. To be useful in this component surely they should be promoted to published? I published them. Thanks. I just noticed another one that got overlooked: TTIColorButton.Link needs to be published too. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] KZdesktop: tabbed IDE package
"KZ" doesn't ring a bell for me (and Google didn't help either), and since the developer seems to be Brazilian he's probably unaware of any offensive meaning. Can somebody please enlighten me? see http://en.wikipedia.org/wiki/Nazi_concentration_camps -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TTIProgressBar component
Presently TTIProgressBar's properties Link and UseRTTIMinMax remain public. To be useful in this component surely they should be promoted to published? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Strings Property Editor dialog newline keystroke reminder
The object inspector's strings editor has its [OK] button set as the default so pressing [Enter] closes the dialog, which is logical. I usually forget this when trying to enter several lines of text, and so close the dialog when trying to enter a new line in the strings memo. Could the dialog's StatusLabel's caption have a bit of help appended to it something on the lines of ' (Use [Ctrl][Enter] to add a new line)' ? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Probable CodeTools error?
On 05/7/12 6:56, Mattias Gaertner wrote: On Thu, 05 Jul 2012 18:11:00 +0100 It does in many cases, but not in all. Scanning everything every time would be too slow. Understood. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Probable CodeTools error?
On 05/7/12 5:33, Mattias Gaertner wrote: In recent Lazarus trunk revisions (running under Win 7, 32-bit) I get CodeTools errors on units that specify unneeded units in the uses clause (usually Classes or SysUtils). The Messages window error message includes a negative line number something along the lines of unit1.pp(-1,7) Error: unit not found: Classes Does anyone else find this? Maybe you updated your compiler? Have you tried Tools / Rescan FPC source directory? Thanks for the prompt response. Indeed I had updated the compiler, and rescanning the source directory clears the problem. Is it possible for the code tools to be aware of an updated compiler and warn (or automatically rescan)? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Probable CodeTools error?
In recent Lazarus trunk revisions (running under Win 7, 32-bit) I get CodeTools errors on units that specify unneeded units in the uses clause (usually Classes or SysUtils). The Messages window error message includes a negative line number something along the lines of unit1.pp(-1,7) Error: unit not found: Classes Does anyone else find this? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Main menu disappeared
On 20/6/12 5:50, Timothy Groves wrote: I am working on a project, and decided for the first time ever to use a main menu. I set it up, it worked, and then it vanished. It is still present in the IDE and source code, but it no longer appears when the app is run. You could check that the menuItems' Visible properties are all True. Else post your form.pas and form.lfm here and others may notice something amiss. What Lazarus version and what OS do you compile for? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Removing read-only files in FileUtil.DeleteDirectory ?
On 30/4/12 11:45, Bart wrote: On 4/29/12, Juha Manninen wrote: I would change the declaration to: function DeleteDirectory(const DirectoryName: string; OnlyChilds: boolean; const RemoveReadOnlyFiles: Boolean = False): boolean; If the suggestion is adopted it needs to be function DeleteDirectory(const DirectoryName: string; OnlyChildren: boolean; ... -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Object inspector hints ?
On 30/4/12 11:54, Hans-Peter Diettrich wrote: Howard Page-Clark schrieb: What's the use of such additional information in OI? You can let the OI create the event handler for you, no need to bother with parameters here. For people who use a stable release all the time, set up according to their established preferences, this is true. I prefer to work mainly with the cutting-edge. And working help for some reason is often the first casualty of a new installation. Since Lazarus does not yet install all help files on all platforms ready-to-run, I often find on upgrading or using a daily snapshot that help and hints have stopped working for me, and require quite a lot of downloads and file copying and setting of help parameters (as URLs, not usual directory locations) before the new help installation is rolling again. Unaccountably this process sometimes goes quickly and smoothly, and at other times takes far too long, and I have to refer to wiki articles and mail list archives to try to solve the problem. OTOH the OI already lists all published events nicely, without need to look up the sources. So it is quicker for me (if help is not yet working) to drop a component on a form, inspect some information in the OI as needed, and perhaps delete the component again if it is not actually needed. Obviously for classes that are not on the Component Palette this method is not applicable, but often it seems the quickest way to get to the information I need. Otherwise I quickly end up with loads of source files open in the Editor (which I prefer to avoid because it makes it harder to find the few files I am working on; and if ever I close a file, I nearly always seem to need it only a few moments later). Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Object inspector hints ?
On 30/4/12 9:23, Mattias Gaertner wrote: On Mon, 30 Apr 2012 10:03:41 +0200 (CEST) Michael Van Canneyt wrote: Hi, The lazarus code editor shows tooltip hints about identifiers; It gets those from the sources or even fpdoc. Is there any reason why the object inspector would not be able to offer the same hints ? Properties and events are also just identifiers after all. Right click on OI: enable Show hints There is also the (optional) OI information box which displays limited documentation. However, it is often very limited. e.g. "TControl.OnClick Event Handler for mouse click" which hardly aids a programmer looking for more information, and in fact is hardly worth displaying at all. Would it be difficult to add parameter and parameter type information, and function return type such as codetools offers in the Editor? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Has there been a known bug in GTK2 where TabVisible property affects the visibility of the tabsheet?
On 25/4/12 2:44, Frank Church wrote: I am running a program developed for Win32 on Linux and I notice that setting the TabVisible to false on a PageControl make the whole tabsheet invisible. Is that a known bug with the GTK2 page control? TabSheets have two properties (for Delphi compatibility), Visible and TabVisible. Visible controls the visibility of items within the client area of a TabSheet. TabVisible allows the display (or not) of the tabSheet as a whole. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Minor typo in rttigrids.pas and objectinspector.pp
I've noticed that the property PrefferedSplitterX is misspelled in three source files (should be PreferredSplitterX). The corresponding "F" data field that holds the value is spelled correctly, so it's clearly an inadvertent typo. Locations are: lazarus\components\rtticontrols\rttigrids.pas (74,14) lazarus\debugger\frames\debugger_general_options.pas (274,5) lazarus\ideintf\objectinspector.pp (488,14) (536,14) (3745,62) (3787,10) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] minor typo
/lazarus/lcl/lclclasses.pp has a minor typo in line 203. The debugln string should read '... circular reference ...' (not 'circulair'). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] External help dialog
On 04/3/12 5:57, Mattias Gaertner wrote: On Sat, 03 Mar 2012 23:05:32 + Howard Page-Clark wrote: The work being done to improve the Help functionality in Lazarus is much appreciated. One part of the newer interface that currently seems inadequate to me is the naming of the "Macrofy" button I changed it to "use macros". Thanks. I think this will help new users understand its purpose better. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] External help dialog
The work being done to improve the Help functionality in Lazarus is much appreciated. One part of the newer interface that currently seems inadequate to me is the naming of the "Macrofy" button (Tools¦Options¦Help¦External). I think it is OK to name the underlying string function Macrofy, as a convenient neologism to describe the functionality. However, it does not work as a button label, being far too cryptic, and I think the hint description "Replace common directories with macros" (or something like it) should be part of caption of the control that initiates the macrofying. Such a long phrase is probably too verbose for a button caption, but the present terse "Macrofy" is just too odd (at least in English, perhaps it works better in other languages), and it is too short, lacking the immediately obvious meaning that the button will effect a replacement of directory path names with macro substitutions. I welcome the functionality, but think it needs to be presented to the user less cryptically. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Test
On 02/3/12 9:22, Richard Mace wrote: Please can someone respond, as I don't think my messages are getting through to the list. That message appeared OK. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] from hfiandor 23 feb 2012 about popup menu
On 23/2/12 3:50, Ing. Héctor F. Fiandor Rosario wrote: Dear colleagues: i have included a tPopUpMenu in a form and programed as in Delphi, but I can´t make it visible. 1. You've hijacked an existing thread with an unrelated topic. Please start a new thread when raising a new issues. 2. A stripped-down version of your code showing the lines that don't achieve the desired effect will help someone here advise you what to do. 3. We presume since your program comes from Delphi that its a Windows target, but it always helps others to make this information explicit. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Adding Notes in FPDoc
On 11/2/12 3:04, Michael Van Canneyt wrote: Within the tag, you can include one or more tags. Why so complicated? Can you give a *reasonable* example of the intended usage of this feature? Yes. User notes on a website. This website has been in the pipeline for a long time. The prospect of a website dedicated to discussion of documentation seems to me to be a helpful move forward. This mailing list is not well suited to detailed discussions of the numerous issues 'documentation' and 'help' raise, and use of it for that creates a lot of noise that some find irritating. Nevertheless it is one of the major bullets to be bitten before Lazarus can consider getting to the 1.0 stage, and so having an interactive arena dedicated to it would be excellent, and I hope would move Lazarus docs further towards the goal of being adequate if not good or excellent. FPC documentation has the advantage of being overseen by a single person who has the ability not only to produce and maintain the tools needed to write the documentation, but is punctilious in writing the docs and keeping shiny new code (however good) out of the FCL until it is properly documented. Someone who has poured countless hours into writing and correcting the existing docs - making that a priority - alongside writing much of the original code. Someone who is also good at collaborating with other core developers. Also FPC does not need to document or provide help for a complex IDE that is growing in features all the time. I think the Lazarus team lacks an equivalent core person who combines coding expertise with the organisational, administrative and English/XML writing skills (and available time to marshal all the information/databases/people/wikis and so on) needed to produce good quality documentation, and good quality help. This is not to knock anyone - goodness knows, each does his best - but simply to point out what is true for so many open source collaborative efforts: you have to work with the people who offer and stay engaged for more than just the short term, and who make the time to contribute enough to make their contribution significant. I hope that a new website might help us bring together the best of what is in the current wiki and has been written over the years in these mailing lists and the already published Lazarus book. A consolidation and editing exercise is needed (in addition to documenting the hitherto undocumented parts of the LCL), and I believe there are several people, myself included, who are ready to help with this task who have not done much towards it so far beyond tidying up the worst bits we stumble over in the wiki. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RE : TQuery.Open 100x slower than same code using PostrgreSQL
After several hours (over a period of a couple of months) of battling this problem, I finally found the cause. I was not looking in the right place. Turns out that I had a dependent query that were being opened after the client TQuery. Actually, there were 3 different dependent queries, only one of which was causing the problem. On my system, I never ran into the problem, primarily because my testing was not comprehensive enough -- and the attorney ran into it almost immediately every time he used it (and he just complained that it was too slow). I finally just recorded *exactly* what he was doing, and then easily duplicated the problem. The problem query was the "cases" table, which has a client ID foreign key, an OID (primary key), a date and a large text field. PostgreSQL did not have any slowdown at all with this database schema, so I was surprised to see that SQLite took two orders of magnitude longer to open that same table. What I did was simply close the case table whenever doing the incremental search. That works, although it seems to be a bit of a hack. On Sun, Aug 7, 2011 at 3:08 AM, Ludo Brands wrote: > > > > There has GOT to be something I'm not understanding. I > > thought SQLite was going to speed things up, not slow them down. > > > > Clearly you are not providing enough information to reproduce the problem. > So far it has all been guess work for people trying to help. Fe. your > initial request for help "forgot" to mention that there were several > dependant queries. If you upload the project we can take a look at it. Data > aren't needed. Populating with random data is easy. Seen the size of your > project (I guess this mailing list has attachment size limits) upload it > somewhere and post the link. > > Ludo > > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TPageControl - how to use it?
On 28/1/12 9:00, Mattias Gaertner wrote: Hint: You don't need the Delphism "set Parent first" under LCL. The above will create a lot of updates. procedure TForm1.AddTab(AFileName: String); var Sheet: TTabSheet; Ed: TSynEdit; begin Sheet := TTabSheet.Create(pagecontrol1); Sheet.Caption := 'Unnamed'; Ed := TSynEdit.Create(Sheet); ed.Align := alClient; // fill the whole sheet ed.LineText := 'specimen line'; ed.Parent := Sheet; PageControl1.ActivePage := Sheet; sheet.Parent := PageControl1; // set Parent as last to reduce updates end; Thanks for the hint. I would not have known that from reading the wiki - I think it is worth documenting there somewhere. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TPageControl - how to use it?
On 28/1/12 7:50, Bernd wrote: I have a TPageControl on my form and at runtime I want to add a new page with a SynEdit on it. This is what I have so far: ... But it does not work. Try this: procedure TForm1.AddTab(AFileName: String); var Sheet: TTabSheet; Ed: TSynEdit; begin Sheet := TTabSheet.Create(pagecontrol1); sheet.Parent := PageControl1; Sheet.Caption := 'Unnamed'; Ed := TSynEdit.Create(Sheet); ed.Parent := Sheet; ed.BoundsRect := sheet.BoundsRect; ed.LineText := 'specimen line'; PageControl1.ActivePage := Sheet; end; -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Displaying serial data
On 26/1/12 10:28, Koenraad Lelong wrote: I'm using a memo to contain the serial port data. I add the data to the last line of the memo, until I get a CR and/or LF character, then I add a new line in the memo. That works fine, except when the lines are longer, then the memo starts to flicker. Is the memo's DoubleBuffered property set to True? This might help (depending on your platform). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Need help with TValueListEditor
On 18/1/12 5:52, Mattias Gaertner wrote: Please create a bug report with a small example project (only sources). Done, issue 21115. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Need help with TValueListEditor
On 14/1/12 5:59, Hans-Peter Diettrich wrote: Where can I find sample code for this control? I want to initialize the content with key/value pairs in code, track changes and/or save the content in OnExit when Modified. Here I ran into any number of quirks and bugs :-( E.g. the code does not check properly for I<0 in various methods, after subtracting the number of fixed rows/cols, resulting in list index exceptions. When the user edits the fields, Modified seems to be set only when a new key is added, but not when a value is changed? Indeed, if you drop a memo and valueListEditor on Form1 and add two buttons named btnCopyMemoToValueList and btnCopyValueListToMemo with the following event handlers you can see one of the bugs immediately: procedure TForm1.FormCreate(Sender: TObject); begin ValueListEditor1.Strings.Text := 'one=1'+LineEnding+'two=2'+LineEnding+'three=3'+LineEnding+'four=4'; memo1.Lines.Text := 'Afghanistan=Kabul'+LineEnding+'Albania=Tirane'+LineEnding+'Algeria=Algiers'+ LineEnding+'Angola=Luanda'+LineEnding+'Armenia=Yerevan'+LineEnding+ 'Australia=Canberra'+LineEnding+'Austria=Vienna'+'Azerbaijan=Baku'+LineEnding; end; procedure TForm1.btnCopyMemoToValueListClick(Sender: TObject); begin ValueListEditor1.Strings.Assign(Memo1.Lines); ValueListEditor1.Invalidate; end; procedure TForm1.btnCopyValueListToMemoClick(Sender: TObject); begin Memo1.Lines.Assign(ValueListEditor1.Strings); Memo1.Invalidate; end; Perhaps no one has used this component before (I hadn't) to see that it is rather buggy? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Code templates syntax
On 10/1/12 1:29, Antonio Fortuny wrote: Hi folks. Does anyone know where I can find a syntax description and the usage rules of all keywords which appear in the source code templates ? And those which do not appear as well ;-) Basically I did find the file "..\lazarus\ide\lazarus_dci_file.dci" and it already gives some self explanatory rules. My purpose is to enriche as much as possible with code snippets that I use very often I would say that the Lazarus .dci file you mention is illuminating but not definitive, since Lazarus is derivative, based on the Free Pascal dialect. For that the most concise description of keywords etc. is the published Language Reference Guide documentation available at e. g. ftp://ftp.freepascal.org/pub/fpc/docs-pdf/ref.pdf Also the language is (slowly) evolving through all the Delphi innovations, for-in loop notation, generics etc. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] circular reference etc.
On 05/1/12 4:21, etienne.lebl...@free.fr wrote: in a famous French langage dictionnary there was once upon a time a perfect circular reference étourneau (see) sansonnet sansonnet (see) étourneau .. not to mention the numerous programming books which have indexes containing entries like Recursion: see recursion Infinite Loop: see Loop, Infinite Loop, Infinite: see Infinite Loop -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cycle vs. Circle errors
On 05/1/12 12:39, Mattias Gaertner wrote: In both cases the important thing is not so much the adjective (circular, cyclic) but the combination of adjective plus noun, which /should/ be used consistently in documentation and error messages. Yes. And since this is open source, it should also be consistent with the sources, which means the used structures and algorithms. I changed it to circular dependencies and endless loops because Google gave more results. Thanks for clarifying this. Let's try to use 'circular dependencies' and 'endless loops' (or 'infinite loops' which is an equivalent phrase) and their non-English translations in future comments and documentation, and avoid 'cycle', 'circle', 'cyclic' and so on - not so much because they are wrong (graph theory quite validly introduced them) but for consistency and ease of understanding among Pascallers who don't know graph theory (or only know it intuitively). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cycle vs. Circle errors
On 03/1/12 5:43, Mattias Gaertner wrote: The term "circle" was translated from German graph theory, but the common words in English graph theory are "cycle" and "cyclic". I'm not familiar with graph theory and the possibly specialist technical meanings given there to words in common use. However, in everyday English neither of the nouns 'cycle' or 'circle' has the meaning 'mutual interdependence' except perhaps as a curious extension of the metaphor which works poorly if at all. Whereas the adjective 'circular' can carry a meaning of 'interdependent' or 'dependent on itself'. So a 'circular argument' is flawed in that it refers to itself rather than to an independently established proposition. But in English you would not normally refer to such a circular argument as a 'circle' and expect people (apart perhaps from graph theorists?) to appreciate immediately what you meant. Dependency (or interdependency) is the more descriptive term, which does not rely on a strained metaphor - although 'mutual dependency' is rather a mouthful. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Combobox styles
On 27/12/11 12:57, Hans-Peter Diettrich wrote: A combobox with csSimple style is not handled properly at design time (win32). It's impossible to give the control a specific Height, it stays on the dropdown style equivalent (Height=23). Is it me, or is this a bug? I think it's a limitation of the underlying win32 widget. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Date format conversion function?
On Thu, Dec 22, 2011 at 2:30 AM, wrote: > > See FormatDateTime in sysutils. > > And TDateEdit has a Date property which is of type TDateTime. > > Michael. > I discovered that about thirty minutes after I posted the request. Thanks! -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Date format conversion function?
I am using SQLite in a small application, and using TDateEdit to pick a date. The date is returned in the Text field (I can't find a DateTime property in this control) in the format 'mm/dd/', and to use INSERT in SQLite, it wants dates in the format '-mm-dd'. Yes, I can write a reformatting function, but I would expect one to be already available somewhere. I'm having some trouble believing that there is no such function in Lazarus, but I just can't find it. If somebody here knows where such a function (or equivalent functionality in a class) may be found, please enlighten me. TIA! -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Check changes on disk with loading
On 11/12/11 4:52, Juha Manninen wrote: Ok, after reading your reply again I got it, and the feature even seems to work as advertised. Still,'Check changes on disk while loading' doesn't mean anything. Maybe it should be: 'Read also file contents when checking if file has changed on disk' Possible improved phrasing (if I've understood the feature correctly) might be 'Check for disk file changes via content rather than timestamp' Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Petition to Skype
On 05/12/11 8:14, Krzysztof wrote: I am wondering... maybe create some online petition to Skype? Corrections are welcome (my English is not good). I don't know if there is merit in such a submission. But if so, my suggestions for slightly improved phrasing are as follows: "This petition is submitted to the Skypekit developers from a community of Free Pascal and Lazarus users. Free Pascal shares an aim of the Skype(kit) project - to run on as many platforms as possible. This professional open source compiler is currently available for 32-bit and 64-bit processors such as Intel x86, AMD64/x86_64, PowerPC, PowerPC64, Sparc and ARM, and supported operating systems include Linux, FreeBSD, Haiku, Mac OS x/Darwin, Win32, Win64, WinCE, OS/2, Netware (libc and classic), MorphOS, Amiga and Symbian. The Lazarus IDE adds support for interfaces including the Windows API, GTK, QT, Cocoa, Carbon and Android. We are disappointed that such a rich and continuously developing environment has been omitted from Skypekit project development, and write to ask for support for Free Pascal to be considered and included in future. We believe that Free Pascal developers would extend and enhance Skype services, just as C++, Python and Java developers are doing. Yours sincerely, the Free Pascal and Lazarus community" BTW, does FPC/Lazarus currently run under OS/2? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RunError(53216) in TOpenDialog
On 09/11/11 6:21, Anders E. Andersen wrote: I uninstalled win64 lazarus and installed win32 lazarus and rebuild my project. It works fine in 32 bit! Then I uninstalled that and reinstalled 64 bit lazarus and rebuild again. The program crashes again. In which case you have uncovered a bug in 64-bit Lazarus (or 64-bit FPC). It may have been reported already, but best to log it as an issue on Mantis with your example code so that it can be assigned to a developer to sort out (if you can't discover and remedy the cause, and submit a patch). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RunError(53216) in TOpenDialog
On 08/11/11 12:30, Anders E. Andersen wrote: I am using Lazarus 0.9.30.2 on Windows 7 Home premium 64 bit. When I hover with the mouse over a word document in TOpenDialog I get the runerror. I compile and run your project without errors on Win7. This runtime error you experience may be related to errors in the Windows registry, possibly caused by earlier virus infections or incomplete software uninstalls. I suggest you run a thorough antivirus scan (and also a registry cleaner if you have one), and see if that solves the problem. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] recent Tools->Example Projects dialog
Just for clarity in the code I suggest that \ide\manageexamples.pas lines 54 and 55 should have procedures named: FillDirectoriesPending; FillProjectsPending; with a 'P' not a 'B'? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 0.9.30.2RC2 available
On 26/10/11 7:39, silvioprog wrote: The setup to Windows is corrupted too: http://imagebin.org/180904 Strange, I had no problem with the windows download or installation. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to obtain the color of a component?
On 20/10/11 4:57, Felipe Monteiro de Carvalho wrote: Hello, Is there any easy way to obtain the color of a component taking into considerating all the factors? aka, propagating ParentColor, resolving clDefault, etc. I have my TCDPageControl on top of a form, but for TCDPageControl.Color I get just clDefault, which turns out to be black. =( using Parent.GetDefaultColor(dcBrush) also returned black in Windows... If there is no easy way maybe we should add one? I think it is possible since clDefault is TColor($2000) and clBlack is TColor($00) there are situations where the most significant bits of clDefault are lost and the two colours become identical. I've found that the Object Inspector's default component editor for colours seems at times to initialise colours to $00 whatever the component's constructor may have directed. In these situations I've resorted to overriding the Loaded method to set the desired value. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] FindInFiles dialog size
Under Windows (not sure about appearance on Mac or Linuxes) the FindInFiles dialog is not big enough to show the "Where" radiobutton group. The .lfm has object LazFindInFilesDialog: TLazFindInFilesDialog Left = 408 Height = 400 Height needs to be closer to 500 to display all the contained components correctly. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] unfortunate typo in ideintf\propedits.pp
In the declaration of the class TCustomShortCutGrabBox there is a hilarious inadvertent typo at line 1430. The method was doubtless intended to be named OnShiftCheckBoxClick, but a vital 'f' got missed. Lines 6408 and 6513 need adjusting accordingly too. Mattias, you made my day! regards Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Does Lazarus have file name and line number macros for inserting into DebugLn/WriteLn statements?
On 06/10/11 1:12, Frank Church wrote: all that remains is the name of the current procedure :) There is already $ProcedureName() you can use in a code template (see Tools->Code Templates). H -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lazde problem with '<' character
On 03/10/11 1:14, Mattias Gaertner wrote: On Sun, 02 Oct 2011 20:57:20 +0100 Howard Page-Clark wrote: If you attempt to open the lazarus\docs\xml\rtl\system.xml in lazde it chokes on line 9705 pos 31 with an exception: character '<' not allowed in attribute value I fixed the system.xml Many thanks Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] lazde problem with '<' character
If you attempt to open the lazarus\docs\xml\rtl\system.xml in lazde it chokes on line 9705 pos 31 with an exception: character '<' not allowed in attribute value and in the offending line: it is clear that the 'less-than' operator is causing the problem. Presumably lazde was not used to create this file? Is there some way to escape characters such as this which have a special meaning to an XML file parser? If not, should I report this as a bug? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem to rename a form
On 28/9/11 1:24, Rafael Tuim Elias wrote: I found a strange behavior in Lazarus IDE. To reproduce follow that steps: 1 - Create a new project. 2 - Rename Form1 to fmAINmENU 3 - Save all 4 - Try to rename the form to FMainMenu IDE doesn't permit. The error: This component has already the class TFPrint. I think it is a little bug. It's not a bug if the error message is "This component has already the class fmAINmENU" since the IDE rightly disallows having two components with identical names (ignoring case). So, yes, the IDE does not check if you are just altering the case of the component name from what was originally entered. It won't let you do that. Hardly a big deal. However, the English error message would be better "This component already has the class..." (which is English, rather than transliterated German). H -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] typinfo routine gives memory leak
On 20/9/11 10:02, Martin wrote: On 20/09/2011 21:59, Howard Page-Clark wrote: The following (button and memo) program loses 276 bytes heap memory that are not recovered. ... procedure TForm1.BGetPropertiesClick(Sender: TObject); var ppl: PPropList; pl: TPropList; ppi: PPropInfo; pi: TPropInfo; begin GetPropList(TEdit, ppl); pl := ppl^; ppi := pl[0]; pi := ppi^; if PropIsType(TEdit, pi.Name, tkAString) then ShowMessageFmt('TEdit''s first PropList entry is %s of tkAString',[pi.Name]); end; end. Anyone know what I'm doing wrong? afaik you need to FreeMem(ppl); Many thanks H. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] typinfo routine gives memory leak
The following (button and memo) program loses 276 bytes heap memory that are not recovered. unit Unit1; {$mode objfpc}{$H+} interface uses Forms, StdCtrls; type TForm1 = class(TForm) BGetProperties: TButton; Memo1: TMemo; procedure BGetPropertiesClick(Sender: TObject); end; var Form1: TForm1; implementation uses Dialogs, typinfo; {$R *.lfm} procedure TForm1.BGetPropertiesClick(Sender: TObject); var ppl: PPropList; pl: TPropList; ppi: PPropInfo; pi: TPropInfo; begin GetPropList(TEdit, ppl); pl := ppl^; ppi := pl[0]; pi := ppi^; if PropIsType(TEdit, pi.Name, tkAString) then ShowMessageFmt('TEdit''s first PropList entry is %s of tkAString',[pi.Name]); end; end. Anyone know what I'm doing wrong? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [Feature request] Add PNF image to Package
On 31/8/11 3:34, Zaher Dirkey wrote: Is it possible in the future to have this feature Add an png file to the package, when compile the package it automatically convert it to the .lrs file related to this package, it is useful for adding image icons for our controls. When you create a new component for a package you can select an icon (not only png). Creating an lrs from a png is a one liner on the console/terminal. Thanks for your replay, but it is more easy for newbe Lazarus users or for lazy people like me. I presume you are aware that selecting an icon for a new component in the Package Editor causes automatic generation of an appropriate .lrs file for the icon, provided the icon has the same name as the new component class (ignoring extension), and that it is no bigger than 24x24 pixels? Lazarus also auto-generates in the Register procedure an appropriate {$I componentUnitName_icon.lrs} line as well. So provided you are only adding one new component, everything is done for you by the IDE, except for designing the icon. If you want several icons to be registered in one unit for several components, then you do have to write a bit of code, and use the lazres.exe tool to generate the correct .lrs file yourself. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TQuery.Open 100x slower than same code using PostrgreSQL
Now I'm seeing a very slow response to opening the main table, even with no dependent tables. I set the SQL in the TQuery, then do an open. It takes 4 to 6 seconds to populate the TDBGrid. When I was using PostgreSQL with the same database, it was instant. qClients.Close; qClients.SQL.Text:='select * from clients where lastname is not NULL order by lastname,firstname,middlename'; qClients.Open; // takes 4 to 6 seconds here There has GOT to be something I'm not understanding. I thought SQLite was going to speed things up, not slow them down. On Wed, Aug 3, 2011 at 11:10 AM, Howard Lee Harkness wrote: > I have added some code to only open a query if the corresponding > tabsheet is selected, which I think speeds things up sufficiently. > Still would like to know why a TQuery component would take 2 or 3 > seconds to open, even on a slow machine. > > Here is the SQL from my address table query: > > select * from addresses > where ID = :ID > order by atype,asof > > "atype" is a string (home, work, etc.) and "asof" is a date. > > The SQL for the other two queries is very similar. > > In the synchronization procedure to set the :ID value for each query: > > closeDependentQueries; > CurrentClientID := qClients.FieldByName('ID').AsInteger; > qAddresses.Params.ParamByName('ID').Value := CurrentClientID; > qCases.Params.ParamByName('ID').Value := CurrentClientID; > qPhones.Params.ParamByName('ID').Value := CurrentClientID; > > I have not yet played around with the foreign key stuff, and I'm not > really sure how to enable & use foreign keys in SQLite, anyway. > > On Mon, Aug 1, 2011 at 4:21 PM, Howard Lee Harkness > wrote: >> I have a dummy database and complete program I can let you look at if >> you would like. Nothing particularly proprietary about the code; it's >> a trivial application. The database is the sensitive part, and I have >> it dummied out. >> >> I posted the schema a few days ago, and I've added a zipcode table to >> that. I had initially thought I had solved the performance problem, >> but when I got to the client, and ran it on his machine (which is >> about 100x slower than mine). I had not noticed the lag on my machine, >> but it was really awful on his. >> >> The whole project is in a 1.6Mb zip, expands to just over 7Mb. Would >> you like me to email it directly to you, or post it? >> >> On Mon, Aug 1, 2011 at 1:56 PM, Michael Van Canneyt >> wrote: >>> >>> >>> On Mon, 1 Aug 2011, Howard Lee Harkness wrote: >>> >>>> I thought I had fixed the performance problem, but it is still there. >>>> What I am doing is opening 3 dependent queries after selecting a >>>> record in the main table. It takes 8 or 9 seconds to do the 3 calls to >>>> TQuery.Open. Any clues as to what I might be doing wrong? The sample >>>> queries done from sqlite3.exe return instantaneously, so I am >>>> concluding that I have not set something up correctly in the LCL. >>> >>> Can you provide test data and a sample program ? Without that, it's very >>> hard to give recommendations. >>> >>> The architecture of the sqlite components is not fundamentally different >>> from >>> the other database, and those do work instantaneously. >>> >>> Michael. >>> >>> -- >>> ___ >>> Lazarus mailing list >>> Lazarus@lists.lazarus.freepascal.org >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >>> >> >> >> >> -- >> Howard Lee Harkness >> (214) 390-4896 >> > > > > -- > Howard Lee Harkness > (214) 390-4896 > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Chain procedure in FPC/Lazarus?
Thanks! I found it after somebody mentioned TProcess. On Wed, Aug 3, 2011 at 3:19 PM, Howard Page-Clark wrote: > On 03/8/11 8:41, Howard Lee Harkness wrote: >> >> In Delphi, I recall that there is an Exec procedure for calling >> another .exe, and a Chain procedure for transferring to another .exe. >> I assume that these are also in FPC/Lazarus, but I haven't found any >> Lazarus documentation for these calls. Could somebody tell me where to >> look? >> > try > http://wiki.lazarus.freepascal.org/Executing_External_Programs > CreateProcess() is the principal function call. > > H. > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Chain procedure in FPC/Lazarus?
On 03/8/11 8:41, Howard Lee Harkness wrote: In Delphi, I recall that there is an Exec procedure for calling another .exe, and a Chain procedure for transferring to another .exe. I assume that these are also in FPC/Lazarus, but I haven't found any Lazarus documentation for these calls. Could somebody tell me where to look? try http://wiki.lazarus.freepascal.org/Executing_External_Programs CreateProcess() is the principal function call. H. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Chain procedure in FPC/Lazarus?
2011/8/3 "Arí Ricardo Ody" : > TProcess That was what I needed. Using that as the search term got me the relevant documentation. Thanks! -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Chain procedure in FPC/Lazarus?
In Delphi, I recall that there is an Exec procedure for calling another .exe, and a Chain procedure for transferring to another .exe. I assume that these are also in FPC/Lazarus, but I haven't found any Lazarus documentation for these calls. Could somebody tell me where to look? -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] I thought it was solved -- TQuery.Open very slow.
I have added some code to only open a query if the corresponding tabsheet is selected, which I think speeds things up sufficiently. Still would like to know why a TQuery component would take 2 or 3 seconds to open, even on a slow machine. Here is the SQL from my address table query: select * from addresses where ID = :ID order by atype,asof "atype" is a string (home, work, etc.) and "asof" is a date. The SQL for the other two queries is very similar. In the synchronization procedure to set the :ID value for each query: closeDependentQueries; CurrentClientID := qClients.FieldByName('ID').AsInteger; qAddresses.Params.ParamByName('ID').Value := CurrentClientID; qCases.Params.ParamByName('ID').Value := CurrentClientID; qPhones.Params.ParamByName('ID').Value := CurrentClientID; I have not yet played around with the foreign key stuff, and I'm not really sure how to enable & use foreign keys in SQLite, anyway. On Mon, Aug 1, 2011 at 4:21 PM, Howard Lee Harkness wrote: > I have a dummy database and complete program I can let you look at if > you would like. Nothing particularly proprietary about the code; it's > a trivial application. The database is the sensitive part, and I have > it dummied out. > > I posted the schema a few days ago, and I've added a zipcode table to > that. I had initially thought I had solved the performance problem, > but when I got to the client, and ran it on his machine (which is > about 100x slower than mine). I had not noticed the lag on my machine, > but it was really awful on his. > > The whole project is in a 1.6Mb zip, expands to just over 7Mb. Would > you like me to email it directly to you, or post it? > > On Mon, Aug 1, 2011 at 1:56 PM, Michael Van Canneyt > wrote: >> >> >> On Mon, 1 Aug 2011, Howard Lee Harkness wrote: >> >>> I thought I had fixed the performance problem, but it is still there. >>> What I am doing is opening 3 dependent queries after selecting a >>> record in the main table. It takes 8 or 9 seconds to do the 3 calls to >>> TQuery.Open. Any clues as to what I might be doing wrong? The sample >>> queries done from sqlite3.exe return instantaneously, so I am >>> concluding that I have not set something up correctly in the LCL. >> >> Can you provide test data and a sample program ? Without that, it's very >> hard to give recommendations. >> >> The architecture of the sqlite components is not fundamentally different >> from >> the other database, and those do work instantaneously. >> >> Michael. >> >> -- >> ___ >> Lazarus mailing list >> Lazarus@lists.lazarus.freepascal.org >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> > > > > -- > Howard Lee Harkness > (214) 390-4896 > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] I thought it was solved -- TQuery.Open very slow.
I have a dummy database and complete program I can let you look at if you would like. Nothing particularly proprietary about the code; it's a trivial application. The database is the sensitive part, and I have it dummied out. I posted the schema a few days ago, and I've added a zipcode table to that. I had initially thought I had solved the performance problem, but when I got to the client, and ran it on his machine (which is about 100x slower than mine). I had not noticed the lag on my machine, but it was really awful on his. The whole project is in a 1.6Mb zip, expands to just over 7Mb. Would you like me to email it directly to you, or post it? On Mon, Aug 1, 2011 at 1:56 PM, Michael Van Canneyt wrote: > > > On Mon, 1 Aug 2011, Howard Lee Harkness wrote: > >> I thought I had fixed the performance problem, but it is still there. >> What I am doing is opening 3 dependent queries after selecting a >> record in the main table. It takes 8 or 9 seconds to do the 3 calls to >> TQuery.Open. Any clues as to what I might be doing wrong? The sample >> queries done from sqlite3.exe return instantaneously, so I am >> concluding that I have not set something up correctly in the LCL. > > Can you provide test data and a sample program ? Without that, it's very > hard to give recommendations. > > The architecture of the sqlite components is not fundamentally different > from > the other database, and those do work instantaneously. > > Michael. > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] I thought it was solved -- TQuery.Open very slow.
I thought I had fixed the performance problem, but it is still there. What I am doing is opening 3 dependent queries after selecting a record in the main table. It takes 8 or 9 seconds to do the 3 calls to TQuery.Open. Any clues as to what I might be doing wrong? The sample queries done from sqlite3.exe return instantaneously, so I am concluding that I have not set something up correctly in the LCL. -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] (no subject)
On 30/7/11 11:15, Leonardo Rame wrote: Hi, I would like to drag the mouse over a form, while the mouse is dragged, FPos X and Y values must change in the direction of the move, but the mouse cursor must be fixed at the position where the first click was made. This code does more or less what I want, but has two problems: 1 - The mouse still moves a little. 2 - The values of FPos.X and FPos.Y doesn't change. procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if ssLeft in shift then begin Mouse.CursorPos := ClientToScreen(FPos); FPos.X := X; FPos.Y := Y; Invalidate; end; end; Changing the mouse cursor position interferes with the Invalidate call. Try this: unit Unit1; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, windows; type { TForm1 } TForm1 = class(TForm) Label1: TLabel; procedure FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure FormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure FormPaint(Sender: TObject); private FPos: TPoint; FOldCursorPos: TPoint; FOldCursor: TCursor; end; var Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if ssleft in shift then begin FPos.X := X; FPos.Y := Y; FOldCursorPos:= FPos; FOldCursor := Cursor; Cursor := crNone; end; end; procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if ssLeft in shift then begin //Mouse.CursorPos := ClientToScreen(FPos); FPos.X := X; FPos.Y := Y; Invalidate; end; end; procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin Cursor := FOldCursor; end; procedure TForm1.FormPaint(Sender: TObject); var HCursor : THandle; begin Label1.Caption := Format('X: %d - Y: %d', [FPos.X, FPos.Y]); HCursor := Screen.Cursors[Ord(Screen.Cursor)]; DrawIconEx(Canvas.Handle, FOldCursorPos.X, FOldCursorPos.y, HCursor, 32, 32, 0, 0, DI_NORMAL) ; end; end. It is only a solution for Windows, and it does not remove the 'permanent' cursor until a second click, but it should get you on the right path. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] RE : SQLite performance problem. Simple query takes too long. (SOLVED)
Ok, I found a fix, although I'm not really sure that I have fixed the problem in the best way. What I did was to close all of the dependent queries while doing the incremental search until the user selects a client entry in the main dbgrid. Now the incremental search is as fast as it was in PostgreSQL. Although this dialog did not point directly to a solution, I learned a lot, which eventually enabled me to find the bottleneck. If any of you should think of a better way, please let me know. Otherwise, I think it's good enough to deliver tomorrow. I spoke with the customer and explained the slight difference in behavior, and he thinks that is an improvement, because it will help prevent accidentally entering phone #, address, etc. for the wrong client. Thanks for the help! On Fri, Jul 29, 2011 at 2:21 PM, Howard Lee Harkness wrote: > On Fri, Jul 29, 2011 at 1:42 PM, Ludo Brands wrote: >> I traced through TSqlQuery.Close and there isn't happening a lot, except for >> cleaning up prepared statements and cursors. And that is where your direct >> BEGIN/COMMIT could very well confuse sqlite. >> sqlite3_finalize(fstatement) is used to unprepare a statement. But is >> fstatement still valid after you have restarted a transaction? I doubt it. >> Do replace the ExecuteDirect with a TSqlQuery component. It is only a small >> change and it removes a lot of causes of errors. > > Ok, it seems like a reasonable suggestion, so I tried that. > > The TSQLQuery object: > object qDIU: TSQLQuery > IndexName = 'DEFAULT_ORDER' > AutoCalcFields = False > Database = FormDatabase.SQLite3Connection > Transaction = FormDatabase.SQLTransaction > ReadOnly = False > Params = <> > left = 308 > top = 48 > end > > The updated procedure: > procedure TfrmMain.ExecSQL(sql:string); > begin > // FormDatabase.SQLite3Connection.ExecuteDirect(sql); > // FormDatabase.SQLite3Connection.ExecuteDirect('commit'); > // FormDatabase.SQLite3Connection.ExecuteDirect('begin transaction'); > qDIU.SQL.Text:=sql; > qDIU.ExecSQL; > FormDatabase.SQLTransaction.CommitRetaining; > end; > > I also tracked down one other usage of ExecuteDirect in another form > (not used for this test, but just in case) and applied the same > change. > > The result: No improvement. If anything, things got slightly worse. > > However, I think maybe I have some insight into what is causing the > problem. It looks like the lookups for the dependent tables are > happening multiple times. Not sure why that would be (I didn't think I > did anything to that part of the code other than change database > engines), but I hope to find out shortly. > -- > Howard Lee Harkness > (214) 390-4896 > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RE : RE : SQLite performance problem. Simple query takestoolong.
On Fri, Jul 29, 2011 at 1:42 PM, Ludo Brands wrote: > I traced through TSqlQuery.Close and there isn't happening a lot, except for > cleaning up prepared statements and cursors. And that is where your direct > BEGIN/COMMIT could very well confuse sqlite. > sqlite3_finalize(fstatement) is used to unprepare a statement. But is > fstatement still valid after you have restarted a transaction? I doubt it. > Do replace the ExecuteDirect with a TSqlQuery component. It is only a small > change and it removes a lot of causes of errors. Ok, it seems like a reasonable suggestion, so I tried that. The TSQLQuery object: object qDIU: TSQLQuery IndexName = 'DEFAULT_ORDER' AutoCalcFields = False Database = FormDatabase.SQLite3Connection Transaction = FormDatabase.SQLTransaction ReadOnly = False Params = <> left = 308 top = 48 end The updated procedure: procedure TfrmMain.ExecSQL(sql:string); begin // FormDatabase.SQLite3Connection.ExecuteDirect(sql); // FormDatabase.SQLite3Connection.ExecuteDirect('commit'); // FormDatabase.SQLite3Connection.ExecuteDirect('begin transaction'); qDIU.SQL.Text:=sql; qDIU.ExecSQL; FormDatabase.SQLTransaction.CommitRetaining; end; I also tracked down one other usage of ExecuteDirect in another form (not used for this test, but just in case) and applied the same change. The result: No improvement. If anything, things got slightly worse. However, I think maybe I have some insight into what is causing the problem. It looks like the lookups for the dependent tables are happening multiple times. Not sure why that would be (I didn't think I did anything to that part of the code other than change database engines), but I hope to find out shortly. -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RE : SQLite performance problem. Simple query takes toolong.
QLite3Connection instance and > TSQLQuery.Transaction to the SQLTransaction instance. Active:= False, > SQL.Text:=''. > > Now to execute an insert query (assuming > TSQLite3Connection.Connected:=true): > SQLQuery.SQL.Text:=sql; > SQLQuery.ExecSQL; > SQLTransaction.CommitRetaining; > > That's it. SQLTransaction.CommitRetaining; does the COMMIT and a BEGIN to > start a new transaction. > > Just to be complete, I'm using lazarus 0.9.31 svn with fpc 2.5.1 svn. > > Ludo -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLite performance problem. Simple query takes too long.
I have established that the problem is not in SQLite, but has to be in my code somewhere. I suspect it is related to the transaction/commit problem I posted a few days ago, and I plan to track that down today if I can. I need to finish this application by tomorrow. 2011/7/29 Martin Schreiber : > Am Donnerstag 28 Juli 2011, 22:01:32 schrieb Howard Lee Harkness: >> Unfortunately, it has a lot of information that is sensitive (belongs >> to a client). I will look at building a database with dummy data. I >> can, however, provide the schema, if that would help. >> > I tested with MSEide+MSEgui, it is instant too, see attachment. > Suggestion: test with a similar simple Lazarus application. > > Martin > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLite performance problem. Simple query takes too long.
Unfortunately, it has a lot of information that is sensitive (belongs to a client). I will look at building a database with dummy data. I can, however, provide the schema, if that would help. On Thu, Jul 28, 2011 at 2:10 PM, Martin Schreiber wrote: > On Thursday 28 July 2011 17:54:03 Howard Lee Harkness wrote: >> I am doing a conversion of a small database application from >> PostgreSQL to SQLite. >> >> I have gotten the program to work, but it it about 2 orders of >> magnitude slower than the PostgreSQL version. In particular, a query >> like >> >> select distinct clients.* from clients where lastname like >> 'Hark%' order by lastname, firstname, middlename; >> > Can you post the database file at a place where I can download it or send it > to my Email address if it is not too big? > > Martin > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] SQLite performance problem. Simple query takes too long.
I am doing a conversion of a small database application from PostgreSQL to SQLite. I have gotten the program to work, but it it about 2 orders of magnitude slower than the PostgreSQL version. In particular, a query like select distinct clients.* from clients where lastname like 'Hark%' order by lastname, firstname, middlename; ...take nearly 3 seconds, whereas in the PostgreSQL version, it was done instantly. Before I indexed the clients table on lastname, it was something like 6 seconds. This is for a table with about 8000 records, and the above query returns 3 rows. I tried reducing the "order by" clause to just lastname, but that made no difference. I even removed the "order by" clause completely, and that made no difference. I tried without "distinct" and that made no difference. What did make a difference was running the above query using sqlite3.exe from the command line -- which was instantaneous. This implies that the LCL components are taking 3 seconds to do some sort of setup for the query. This makes no sense to me. The LCL looks fairly straightforward. Here is the call: qClients.Close; qClients.SQL.Text:=sql; // where sql contains the above select statement qClients.Open; The Open step is the one taking the time. The database setup is below, since I suspect that may be where the problem is. I hope this is enough info. Any clue about what is taking so long? Environment: Windows 7 SQLite3.dll Lazarus 9.30 using TSQLite3Connection, TSQLTransaction, TSQLQuery, TDataSource, TDBGrid object FormDatabase: TFormDatabase Left = 473 Height = 240 Top = 169 Width = 184 Caption = 'FormDatabase' OnDestroy = FormDestroy LCLVersion = '0.9.30' object SQLite3Connection: TSQLite3Connection Connected = True LoginPrompt = False DatabaseName = 'DB.s3db' KeepConnection = True Password = 'test' Transaction = SQLTransaction UserName = 'user' Options = [] left = 53 top = 123 end object SQLTransaction: TSQLTransaction Active = True Action = caNone Database = SQLite3Connection left = 53 top = 67 end end excerpts from main form: object dsClients: TDatasource DataSet = qClients OnStateChange = Sync OnDataChange = dsClientsDataChange OnUpdateData = Sync left = 552 top = 64 end object qClients: TSQLQuery IndexName = 'DEFAULT_ORDER' // what is this, and why can't I change it? I tried IndexFieldNames = 'lastname' but that was EVEN SLOWER AutoCalcFields = False Database = FormDatabase.SQLite3Connection Transaction = FormDatabase.SQLTransaction ReadOnly = False SQL.Strings = ( 'select * from clients' 'order by lastname,firstname,middlename' ) Params = <> left = 504 top = 64 end -- Howard Lee Harkness -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLitePass package install problems
What is the status of SQLitePass? I went to what was supposed to be a download page for it (http://source.online.free.fr/), but what appears to be the only link to download the actual components was a link to a dead GeoCities page. Is this available anywhere? Has it changed names? Does it differ from the components in sqlite3laz 0.4? Speaking of the latter, is there any user documentation for sqlite3laz *anywhere*? 2010/7/12 K. P. : > Thanks Jaroslaw, > it does indeed work - quite different from Delphi. This will teach me not to > assume too much but rather search for documentation! > Cheers > Kai > >> Date: Sat, 10 Jul 2010 11:20:23 +0200 >> From: j@poczta.fm >> To: lazarus@lists.lazarus.freepascal.org >> Subject: Re: [Lazarus] SQLitePass package install problems >> >> from SqlitePass docs: >> >> Packages Installation for Lazarus users (>=0.9.20) >> >> 1. Uninstall any previous version of SqlitePassDbo components : >> Choose [Components] [Configure Installed Packages] from IDE menu >> 2. Select the Laz_SqlitePassDbo_Runtime and >> Laz_SqlitePassDbo_Designtime packages and click [Uninstall the >> selection] then [Save and quit the dialog]. >> 3. Compile the Laz_SqlitePassDbo_Runtime package. Compile and >> install the Designtime package : Choose [File] [Open] from the IDE menu >> and select >> ..\SQLitePass\Packages\Lazarus\Laz_SqlitePassDbo_Designtime.lpk. In >> package dialog, Choose compile - this way, the Laz_SqlitePassDbo_Runtime >> will automatically be compiled. Then select install to rebuild the IDE. >> 4. Check installation : Select SqlitePassDbo on Component palette >> pages and drop a SqlitePassDatabase and a SqlitePassDataset on a new >> form. Check the components versions are correct in object inspector. >> >> it works :) >> >> -- >> Doladuj telefon przez Internet. >> Sprawdz >>> http://linkint.pl/f2778 >> >> >> -- >> ___ >> Lazarus mailing list >> Lazarus@lists.lazarus.freepascal.org >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > Hotmail: Free, trusted and rich email service. Get it now. > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with SQLite commit in Lazarus
For now, I have a fairly ugly workaround, since I have another more important task to finish: The performance of the SQLite database is very poor. I was able to speed it up a bit by putting indices on most of the commonly-search columns on the main table, but it's still about 20 to 30 times slower than the PostgreSQL version that I am replacing. As I slowly get back up to speed in Lazarus (it's been 3 years since I wrote the last iteration), it occurs to me that I may need some more sophisticated tools than I currently have. I also see that the current version of Lazarus made several subtle changes to the IDE, and I can't even find the way to get the stack trace anymore. Probably nothing that can't be solved with sufficient time and effort, but I was really hoping this migration would be a lot easier. Is there some way that I can get SQLite to just read all of the tables into memory during the run of the program? Surely that would speed things up. 2011/7/27 Max Vlasov : > > > On Wed, Jul 27, 2011 at 6:28 AM, Howard Lee Harkness > wrote: >> >> I am guessing that I am missing some basic detail in the setup >> somewhere, or not understanding some subtlety in the operation of >> SQLite. I would greatly appreciate somebody sending me a clue on how >> to deal with this. TIA! >> -- > > > Howard, looking at the file > \fpc\\source\packages\fcl-db\src\sqldb\sqlite\sqlite3conn.pp > I suggest you to set breakpoints in StartdbTransaction and CommitRetaining > and look at the call stack for the place that starts and ends the > transaction without your intervention. The only problem could be the fpc > sources usually compiled without debug info, don't know whether this > applicable to fpc packages. > > Max > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- Howard Lee Harkness (214) 390-4896 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Problem with SQLite commit in Lazarus
I am migrating a small Lazarus database application from PostgreSQL to SQLite (PostgreSQL was overkill, and I need something which is zero-config and can run from a flash drive on different machines). In the process, I have run into several little oddities in the way that SQLite differs from other DBMs with which I am familiar. Most of them I have been able to puzzle out, but this one has me befuddled. I construct an SQL insert statement in variable sql, and then do the following: FormDatabase.SQLite3Connection.ExecuteDirect(sql); FormDatabase.SQLite3Connection.ExecuteDirect('commit'); First time through, no problems. Second time through with another row of data, and I get an exception with a message saying there is no active transaction when it reaches the commit (both inserts actually get saved in the table, however). If I omit the commit, nothing gets saved to the table on exit from the program. If I add the line: FormDatabase.SQLite3Connection.ExecuteDirect('begin'); ...before the lines above, it gives an exception complaining that I can't nest transactions. I am guessing that I am missing some basic detail in the setup somewhere, or not understanding some subtlety in the operation of SQLite. I would greatly appreciate somebody sending me a clue on how to deal with this. TIA! -- Howard Lee Harkness -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Documentation style
On 23/7/11 1:20, Hans-Peter Diettrich wrote: During the development of the doc tracker I stumbled over several issues: The English wording often violates my feeling for the language. Can some native English speakers proofread the documentation, and correct stylistic flaws? I also can assign doc files to those people, which are willing to proofread the documentation, so that we can avoid duplicate work. I'm a native English speaker, and I'm willing to proofread documentation, and make suggestions for improvements. However, I suspect it is almost an endless task, and probably too much for one person to undertake (although the ideal would be for one English-speaker to undertake this, to get a consistent 'house style' and consistent spelling [UK > US English?]). Several questions arise immediately. Where precisely are the original documents? How can I (or anyone else) be trusted to edit them correctly? What about formatting style, indenting etc. for code examples? It would be good to have consistency here too. I notice quite a lot of fpc/Lazarus source is quite terse: [ result:=i*trunc(x/y); rather thanresult := i * Trunc( x/y ); ] yours Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Absolute paths on different platforms
On 27/6/11 8:12, Marco van de Voort wrote: Some of these features have been added only after W2K, as Mark annotated. It may be for compatibility reasons, or not-updated Explorer behaviour, when links and shortcuts still are stored in the old-fashion way. The tipping point is Vista, not XP afaik. XP (NTFS 5.0 and higher) does support Junctions (a folder-only type of symlink). However they are unuseable on XP (unless you install a shell extension), because XP's Explorer does not handle them correctly. So few XP users are aware of Junction functionality. Vista and Win7 have native Explorer support for Junctions as well as true POSIX-like symlink behaviour for files as well as folders. Though GUI access needs a shell extension, there is the command-line utility mklink, which confusingly (why does M$ do this?) has Source and Target parameters the opposite way round from what Linux experience leads you to expect. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Drawing angle boundaries
On 23/6/11 1:11, Leonardo M. Ramé wrote: Hi, I need to draw the angle(s) formed by any given four points. As you can see in the attached image, there are two crossed lines and an skewed-rotated ellipse that touches all four points, then between each two points and the cross point I would like to draw the angle formed (in the example filled in blue). Does anyone knows how can I do this?. Try the attached unit, for which the .lpr is as follows: program pAngleDrawing; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Interfaces, // this includes the LCL widgetset Forms, uAngleDrawing; {$R *.res} begin RequireDerivedFormResource := True; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. It's a bit buggy and has no error checking for impossible point values, but should give you some ideas (uAngleDrawing.lfm is just an empty form). Howard unit uAngleDrawing; {$mode objfpc}{$H+} interface uses Classes, Forms, Graphics, Dialogs, ExtCtrls; type TPointArray = array[0..3] of TPoint; { Tquad } Tquad = class private FCanvas: TCanvas; Fa, Fb, Fc, Fd, FIntersection: TPoint; FcAD, FcBC: integer; FmAD, FmBC: double; function Yad(anX: integer): integer; function Ybc(anX: integer): integer; function InterSecAdBc: TPoint; public constructor Create(aCanvas: TCanvas; const dataPoints: array of TPoint); procedure DrawAngleAB(col: TColor); procedure DrawAngleBC(col: TColor); procedure DrawAngleCD(col: TColor); procedure DrawAngleDA(col: TColor); property a: TPoint read Fa write Fa; property b: TPoint read Fb write Fb; property c: TPoint read Fc write Fc; property d: TPoint read Fd write Fd; property mAD: double read FmAD; property mBC: double read FmBC; property cAD: integer read FcAD; property cBC: integer read FcBC; end; { TForm1 } TForm1 = class(TForm) procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private FQuad: Tquad; FTimer: TTimer; public procedure DrawAngles(Sender: TObject); end; const ARR: TPointArray = ( (x:6; y:7), (x:204; y:13), (x:23; y:245), (x:290; y:275) ); var Form1: TForm1; implementation uses math; { TForm1 } procedure TForm1.FormCreate(Sender: TObject); begin FQuad:= Tquad.Create(Self.Canvas, ARR); FTimer := TTimer.Create(self); FTimer.Interval:= 300; FTimer.OnTimer:= @DrawAngles; FTimer.Enabled:= True; end; procedure TForm1.FormDestroy(Sender: TObject); begin FQuad.Free; end; procedure TForm1.DrawAngles(Sender: TObject); begin FQuad:= Tquad.Create(Self.Canvas, ARR); Randomize; FQuad.DrawAngleAB(Random(High(TColor))); FQuad.DrawAngleBC(Random(High(TColor))); FQuad.DrawAngleCD(Random(High(TColor))); FQuad.DrawAngleDA(Random(High(TColor))); end; {$R *.lfm} { quad } function Tquad.Yad(anX: integer): integer; begin result := Round(FmAD*anX) + FcAD; end; function Tquad.Ybc(anX: integer): integer; begin result := Round(FmBC*anX) + FcBC; end; function Tquad.InterSecAdBc: TPoint; var x, mi, ma, diff: integer; begin result := Point(0,0); mi := Min(b.x, c.x); ma := Max(b.x, c.x); if (ma = mi) then begin ShowMessage('Points must be distinct!'); Exit; end; for diff := 0 to mi do for x := mi to ma do begin if (Yad(x) - Ybc(x) = diff) then begin result.x:= x; Result.y:= Ybc(x); Exit; end; end; ShowMessage('No exit from Intersection loop!'); end; constructor Tquad.Create(aCanvas: TCanvas; const dataPoints: array of TPoint); begin inherited Create; FCanvas := aCanvas; Fa := dataPoints[0]; Fb := dataPoints[1]; Fc := dataPoints[2]; Fd := dataPoints[3]; FmBC:= (b.y - c.y) / (b.x - c.x); FcBC:= ((b.y + c.y) - Round(FmBC * (b.x + c.x))) div 2; FmAD:= (a.y - d.y) / (a.x - d.x); FcAD:= ((a.y + d.y) - Round(FmAD * (a.x + d.x))) div 2; FIntersection := InterSecAdBc; end; procedure Tquad.DrawAngleAB(col: TColor); begin FCanvas.Pen.Color:= col; FCanvas.MoveTo(a); FCanvas.LineTo(FIntersection); FCanvas.LineTo(b); end; procedure Tquad.DrawAngleBC(col: TColor); begin FCanvas.Pen.Color:= col; FCanvas.MoveTo(b); FCanvas.LineTo(FIntersection); FCanvas.LineTo(c); end; procedure Tquad.DrawAngleCD(col: TColor); begin FCanvas.Pen.Color:= col; FCanvas.MoveTo(c); FCanvas.LineTo(FIntersection); FCanvas.LineTo(d); end; procedure Tquad.DrawAngleDA(col: TColor); begin FCanvas.Pen.Color:= col; FCanvas.MoveTo(d); FCanvas.LineTo(FIntersection); FCanvas.LineTo(a); end; end. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LCL memory leak
On 20/6/11 7:04, Mattias Gaertner wrote: On Mon, 20 Jun 2011 17:43:35 +0100 Howard Page-Clark wrote: Since the LCL has become a package like any other I've been building it using the heaptrace unit. This shows an 8 byte leak in line 30 of chmlcl.pas following the creation of baseBaseURL: THelpBaseURLObject; (see attached .png) Please create a bug report. Done, issue 19597. SVN revision is 31279 (but issue has been true for some time). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus