[Lazarus] Iterate TStringToStringTree

2010-06-15 Thread Juha Manninen
Hi Is there a cleaner way to iterate TStringToStringTree? This is the codetoolsstructs version but the LCL version is almost the same. var MapToEdit: TStringToStringTree; Node: TAVLTreeNode; Item: PStringToStringTreeItem; begin ... Node:=MapToEdit.Tree.FindLowest; while Nodenil

[Lazarus] Regexp syntax

2010-06-15 Thread Juha Manninen
Hi any regexp gurus out there? For converter I need a regexp that matches a string starting with Tnt, not followed by LX and captures everything after Tnt. This actually works: ^Tnt([^L][^X].+) but I am sure it could be written in a cleaner way. Then there is another regexp that captures

Re: [Lazarus] Iterate TStringToStringTree

2010-06-15 Thread Mattias Gaertner
On Tue, 15 Jun 2010 11:05:34 +0300 Juha Manninen juha.manni...@phnet.fi wrote: Hi Is there a cleaner way to iterate TStringToStringTree? This is the codetoolsstructs version but the LCL version is almost the same. With fpc 2.5.1 you could write an enumerator:

Re: [Lazarus] Regexp syntax

2010-06-15 Thread Mattias Gaertner
On Tue, 15 Jun 2010 11:12:52 +0300 Juha Manninen juha.manni...@phnet.fi wrote: Hi any regexp gurus out there? For converter I need a regexp that matches a string starting with Tnt, not followed by LX and captures everything after Tnt. This actually works: ^Tnt([^L][^X].+) This would

[Lazarus] Multiple editor windows bug

2010-06-15 Thread Torsten Bonde Christiansen
Hi List. I believe i have found a bug when using multiple editor windows in the most recent svn version. I can confirm this exists in both Win32 and Linux (GTk2), but I would like someone else to confirm this too: 1) Start a new project 2) Open a new/existing source file (could be any, eg.

Re: [Lazarus] Functions, procedures etc for using Dbase3/4 files ... what are they in Lazarus? (I used XBase1 in Delphi 5)

2010-06-15 Thread Joost van der Sluis
On Tue, 2010-06-15 at 14:54 +1000, Peter E Williams wrote: Hi All, On Mon, 2010-06-14 at 17:37 +0200, Michael Van Canneyt wrote: You may want to look at the TDBF component. I think the package is called lazdbf or dbflaz. Michael. On Mon Jun 14 18:00:51 CEST 2010, Howard

[Lazarus] Updating an app on the fly

2010-06-15 Thread Mark Morgan Lloyd
To what extent could a Lazarus app replace itself with a new version without interruption? For example, if the main form had a menu at the top, synedit with popups and a status bar at the bottom, presumably much of the intelligence could be moved into dll/so libraries which could be closed

Re: [Lazarus] Regexp syntax

2010-06-15 Thread Juha Manninen
but I am sure it could be written in a cleaner way. ^Tnt(([^L]|.[^X]).+) Hmmm... It doesn't look very clean. It may be more correct but I am not sure of that. Does [^L]|.[^X] mean: anything but 'L' or anything, followed by anything but 'X' ? Juha --

Re: [Lazarus] Regexp syntax

2010-06-15 Thread Mattias Gaertner
On Tue, 15 Jun 2010 15:21:52 +0300 Juha Manninen juha.manni...@phnet.fi wrote: but I am sure it could be written in a cleaner way. ^Tnt(([^L]|.[^X]).+) Hmmm... It doesn't look very clean. It may be more correct but I am not sure of that. It is not very clean. It does not match TntL

Re: [Lazarus] Regexp syntax

2010-06-15 Thread Graeme Geldenhuys
^Tnt(([^L]|.[^X]).+) Hmmm... It doesn't look very clean. I don't think *any* regex looks clean. ;-) -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ --

Re: [Lazarus] Iterate TStringToStringTree

2010-06-15 Thread Graeme Geldenhuys
On 15/06/2010, Juha Manninen wrote: Is there a cleaner way to iterate TStringToStringTree? This is the codetoolsstructs version but the LCL version is almost the same. With any FPC version your can simply create a new Iterator descendant. See the link below for a description. The code is

Re: [Lazarus] Regexp syntax

2010-06-15 Thread Alexander Klenin
On Tue, Jun 15, 2010 at 23:55, Mattias Gaertner nc-gaert...@netcologne.de wrote: On Tue, 15 Jun 2010 15:21:52 +0300 Juha Manninen juha.manni...@phnet.fi wrote: but I am sure it could be written in a cleaner way. ^Tnt(([^L]|.[^X]).+) Hmmm... It doesn't look very clean. It may be more

Re: [Lazarus] Regexp syntax

2010-06-15 Thread Hans-Peter Diettrich
Mattias Gaertner schrieb: Even better regexp is: ^Tnt(([^L]|L[^X]).*|L$) I wonder who will be able to understand and update such expressions, at any later time. To me it looks like typical write-only code :-( DoDi -- ___ Lazarus mailing list

[Lazarus] Rotated Text for Label or Panel

2010-06-15 Thread Andrew Brunner
Is there a component that offers rotated text drawn on component like TLabel or TPanel? Rotation via the orientation property on the font object does not seem to work (at least on the Windows 7 box I'm presently on). Anyone have something that works within LCL? Thanks. --

Re: [Lazarus] Rotated Text for Label or Panel

2010-06-15 Thread Mattias Gaertner
On Tue, 15 Jun 2010 14:20:59 -0500 Andrew Brunner andrew.t.brun...@gmail.com wrote: Is there a component that offers rotated text drawn on component like TLabel or TPanel? Feel free to improve TLabel and TPanel to support that. Rotation via the orientation property on the font object does

[Lazarus] Accessing WinControls from DLL

2010-06-15 Thread SteveG
I believe that 'writing' (without syncronization) to a TWinControl from a thread or dll function is BAD(tm), but just wondering if the same applies to 'reading' (properties / etc) ? another way - can 'non-mainthread' access to WinControls be considered 'ReadOnly' Thanks - SteveG --

Re: [Lazarus] Functions, procedures etc for using Dbase3/4 files ... what are they in Lazarus? (I used XBase1 in Delphi 5)

2010-06-15 Thread Peter E Williams
Hi Joost All, On Tue, 2010-06-15 at 11:40 +0200, Joost van der Sluis wrote: On Tue, 2010-06-15 at 14:54 +1000, Peter E Williams wrote: On Mon Jun 14 18:00:51 CEST 2010, Howard Page-Clark wrote: For a general introduction have a look at

Re: [Lazarus] Regexp syntax

2010-06-15 Thread Jürgen Hestermann
Hans-Peter Diettrich schrieb: ^Tnt(([^L]|L[^X]).*|L$) I wonder who will be able to understand and update such expressions, at any later time. To me it looks like typical write-only code :-( Yes, I also never got accustomed to regex syntax. But I know that some are using it frequently.