Re: [fpc-pascal] fpImage resample via interpolation

2008-11-28 Thread Mattias Gaertner
On Fri, 28 Nov 2008 15:47:35 +0100 (CET) [EMAIL PROTECTED] (Marco van de Voort) wrote: > In our previous episode, Graeme Geldenhuys said: > > > > > > I'm curious: who needs more than 13 different image > > > interpolations? > > > > Someone that writes image editing/manipulation software like Gimp

[fpc-pascal] number of cpu cores

2008-11-29 Thread Mattias Gaertner
I need a default value of the number of maximum threads. Is there already some RTL function that can be used for that? For example if the program runs on a 2 x quad core it would be nice to get 8. Hyperthreading multipliers should be applied. Mattias

Re: [fpc-pascal] TListBox bug in LCL of Lazarus?

2008-12-11 Thread Mattias Gaertner
On Thu, 11 Dec 2008 18:39:18 +0100 Jürgen Hestermann wrote: > Hi, > > hopefully someone can help me with my first steps at migrating my > Delphi programs to Lazarus. > > I have a TListBox which I modify in the following way: > --- > with Form1.ListBoxAusg

Re: [fpc-pascal] number of cpu cores

2008-12-13 Thread Mattias Gaertner
On Sat, 29 Nov 2008 19:14:39 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Michalis Kamburelis said: > [ Charset ISO-8859-1 unsupported, converting... ] > > Florian Klaempfl wrote: > > > Mattias Gaertner schrieb: > > >> I need

Re: [fpc-pascal] RRDTool binding

2008-12-18 Thread Mattias Gaertner
On Fri, 12 Dec 2008 10:25:57 +0100 Koenraad Lelong wrote: > Hello, > Is there a binding for RRDTool ? > With a linux-box I'm monitoring a device and for the moment I store > the data in a text-file. Then I convert that text-file to a script to > put the data in rrdtool and then I can get various

Re: [fpc-pascal] Procedure types

2008-12-20 Thread Mattias Gaertner
On Sat, 20 Dec 2008 16:21:45 +0100 JoshyFun wrote: > Hello Mark, > > Saturday, December 20, 2008, 1:40:15 PM, you wrote: > > MML> Already am using (*$MODE DELPHI *) > > Hmmm... this should be {$MODE DELPHI} do not ? using (* *) you get a > comment, or maybe I'm wrong ? > > In Delphi mode you

Re: [fpc-pascal] Procedure types

2008-12-20 Thread Mattias Gaertner
On Sat, 20 Dec 2008 17:00:37 + Mark Morgan Lloyd wrote: > Mattias Gaertner wrote: > > On Sat, 20 Dec 2008 16:21:45 +0100 > > JoshyFun wrote: > > > >> Hello Mark, > >> > >> Saturday, December 20, 2008, 1:40:15 PM, you wrote: > >> &g

Re: [fpc-pascal] TListBox bug in LCL of Lazarus?

2008-12-21 Thread Mattias Gaertner
On Sun, 21 Dec 2008 18:26:27 +0100 Jürgen Hestermann wrote: > > And your tone isn't very helpful. I responded only in a intention to > > help, and yet the response doesn't seam to have been apreciated. > > Forgive me if I am sounding a bit rude. Of course that's not meant > against any person o

Re: [fpc-pascal] My favourite missing feature

2008-12-23 Thread Mattias Gaertner
On Wed, 24 Dec 2008 01:41:16 +0200 ik wrote: > It looks for a date pattern like the follow > > 10/10/08 and 10/10/2008 with space and then some other chars as well. > > I think if it was with boundaries of begin and/or end (^ and $) it > would work even better. > > The () indicates groups. eac

[fpc-pascal] Profiling

2009-01-26 Thread Mattias Gaertner
I need to profile lazarus applications under linux. I tried gprof, but it is broken since years and shows no record. I tried valgrind (callgrind), but it slows down the execution by factor 80, making it unusable. I found the following page, but it does not help here: http://wiki.lazarus.freepascal

[fpc-pascal] FCL documentation AVL_tree

2009-03-09 Thread Mattias Gaertner
Is there already a documentation/example for the AVL_tree unit of the FCL? If not, I would like to provide one. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FCL documentation AVL_tree

2009-03-09 Thread Mattias Gaertner
On Mon, 9 Mar 2009 20:47:27 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Michael Van Canneyt said: > > > Is there already a documentation/example for the AVL_tree unit of > > > the FCL? > > > If not, I would like to provide one. > > > > The documentation is t

Re: [fpc-pascal] "Generics" Red Black Tree for fpc

2009-04-03 Thread Mattias Gaertner
On Fri, 3 Apr 2009 13:08:42 +0200 Helmut Hartl wrote: > Hi all, > > due to interest i post here our generic version of a red black tree > implementation. A R/B tree is a quite fast directory datastructure > which allows o(log n) access times. > > Warning: The code compiles only under 2.2.4RC1+,

Re: [fpc-pascal] "Generics" Red Black Tree for fpc

2009-04-03 Thread Mattias Gaertner
On Fri, 3 Apr 2009 17:16:50 +0200 Helmut Hartl wrote: > Von: Mattias Gaertner > Gesendet: Fr 03.04.2009 16:51 > An: fpc-pascal@lists.freepascal.org; > Betreff: Re: [fpc-pascal] "Generics" Red Black Tree for fpc > > > How much work do you think is it to extend

Re: [fpc-pascal] Best method for code reuse?

2009-04-04 Thread Mattias Gaertner
On Sat, 04 Apr 2009 12:10:30 -0400 Francisco Reyes wrote: > What are my options for code reuse? > Creating units for common code? > Any other method? Units is the right way. And even better: create a lazarus package for the new units. Mattias ___ fpc-

Re: [fpc-pascal] Best method for code reuse?

2009-04-04 Thread Mattias Gaertner
On Sat, 04 Apr 2009 12:28:18 -0400 Francisco Reyes wrote: > Mattias Gaertner writes: > > > Units is the right way. > > And even better: create a lazarus package for the new units. > > Most of what I do is CLI, have not even installed lazarus. Lazarus is an IDE for any

Re: [fpc-pascal] Sample unit code

2009-04-04 Thread Mattias Gaertner
On Sat, 04 Apr 2009 12:56:51 -0400 Francisco Reyes wrote: > Michael Van Canneyt writes: > > > I'll add more examples. > > Thanks. > I will also go over the existing unit documentation and send you some > thoughts and suggestions from a newbie's point of view. Often what is > clear to an experi

Re: [fpc-pascal] Can I define a custom "simple" type for my applications?

2009-04-06 Thread Mattias Gaertner
On Mon, 6 Apr 2009 19:21:50 +0200 Graeme Geldenhuys wrote: > Hi, > > I need a "new" boolean type in my applications that support three > values. True, False and Null. Null value means undefined and has > various uses and gets handled differently to True or False. Is this > possible in Free Pas

Re: [fpc-pascal] Return Statement

2009-04-10 Thread Mattias Gaertner
On Fri, 10 Apr 2009 12:57:20 -0400 Richard Ward wrote: > My last post got me thinking about weaning myself from macpas > mode. One of the statements I have found quite useful is the macpas > defined "return" statement which is used to return the function value > and exits immediately from inside

Re: [fpc-pascal] How I can install FPC IDE in MacOS

2009-04-16 Thread Mattias Gaertner
On Tue, 14 Apr 2009 09:17:33 -0500 Travis Siegel wrote: > > On Apr 11, 2009, at 5:13 AM, Adam Pahlevi wrote: > > > i don't understand how to do that, i search all my need in > > Internet, but they all refer to Lazarus. Is there FPC IDE that can > > run inside Mac OS X > > I for one have no des

Re: [fpc-pascal] Difference between initialization and begin in a unit

2009-04-16 Thread Mattias Gaertner
On Sun, 12 Apr 2009 20:11:42 -0700 (PDT) leledumbo wrote: > > Might be a stupid question, but it's nowhere mentioned in the > documentation though allowed. What are the differences between: > > unit A; > > interface > > implementation > > initialization > > > end. > > and: > > unit B;

Re: [fpc-pascal] Difference between initialization and begin in a unit

2009-04-16 Thread Mattias Gaertner
On Thu, 16 Apr 2009 13:44:13 -0700 "Cox, Stuart TRAN:EX" wrote: > Could there be one slight difference in that an initialization section > is required if there's going to be a finalization section in the unit? > That is, there can't be a finalization section in the absence of an > initialization

[fpc-pascal] qprof

2009-04-28 Thread Mattias Gaertner
Hi, Has someone managed to profile a fpc program with qprof under 32bit linux (ubuntu)? I always get "0 samples, 0 counts". Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] qprof

2009-04-28 Thread Mattias Gaertner
On Wed, 29 Apr 2009 00:21:03 +0200 Mattias Gaertner wrote: > Hi, > > Has someone managed to profile a fpc program with qprof under 32bit > linux (ubuntu)? > > I always get "0 samples, 0 counts". Sorry. I had compiled with

[fpc-pascal] FindFirst FindNext

2009-05-01 Thread Mattias Gaertner
I thought the file attributes are ignored under linux, but apparently they are not. Is it normal, that FindNext returns a file twice? uses SysUtils; var Info: TSearchRec; begin if FindFirst('*',faDirectory,Info)=0 then begin repeat writeln(Info.Name); until FindNext(Info)<>0

Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Mattias Gaertner
On Fri, 1 May 2009 17:13:39 +0200 Graeme Geldenhuys wrote: > On Fri, May 1, 2009 at 11:55 AM, Mattias Gaertner > wrote: > > I thought the file attributes are ignored under linux, but > > apparently they are not. > > Is it normal, that FindNext returns a file twice? >

Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Mattias Gaertner
On Fri, 1 May 2009 17:43:48 +0200 Jonas Maebe wrote: > On 01 May 2009, at 11:55, Mattias Gaertner wrote: > > > I thought the file attributes are ignored under linux, but > > apparently they are not. > > They are currently ignored if you do not use wildcards, otherw

Re: [fpc-pascal] TFPColor vs TColor

2009-05-05 Thread Mattias Gaertner
On Tue, 5 May 2009 13:15:02 +0200 Graeme Geldenhuys wrote: > On Tue, May 5, 2009 at 1:08 PM, Vincent Snijders > wrote: > > > > Under what circumstances are properties of  fpGUI classes streamed > > when LCL-fpGUI is developed? > > I haven't delved much into the LCL widgetset internals, so I mig

Re: [fpc-pascal] TFPColor vs TColor

2009-05-05 Thread Mattias Gaertner
On Tue, 5 May 2009 13:59:13 +0200 Graeme Geldenhuys wrote: > On Tue, May 5, 2009 at 1:36 PM, Mattias Gaertner > wrote: > > > > No. > > Only the widgetset independent LCL properties are set. The LCL > > interfaces then reads/sets the widgetset properti

Re: [fpc-pascal] TFPColor vs TColor

2009-05-05 Thread Mattias Gaertner
On Tue, 5 May 2009 15:14:02 +0200 Graeme Geldenhuys wrote: > On Tue, May 5, 2009 at 2:30 PM, Mattias Gaertner > wrote: > > > > If you don't like the lfm format, write a TReader/TWriter for your > > format. > > I don't have issues with the LFM format, it

Re: [fpc-pascal] TFPColor vs TColor

2009-05-05 Thread Mattias Gaertner
On Tue, 5 May 2009 17:10:01 +0200 Graeme Geldenhuys wrote: > On Tue, May 5, 2009 at 4:21 PM, Mattias Gaertner wrote: > > > >>  * If a component changes, a simple "search and replace" can fix > >> all your code. > > > > This works in lfm too, does

Re: [fpc-pascal] TFPColor vs TColor

2009-05-05 Thread Mattias Gaertner
On Tue, 5 May 2009 20:05:34 +0200 Graeme Geldenhuys wrote: > On Tue, May 5, 2009 at 6:08 PM, Mattias Gaertner > wrote: > > > > There are ways to use a single include file. For example: > > > > - > > {$I unit1.lfm} > > > > constructo

Re: [fpc-pascal] TFPColor vs TColor

2009-05-05 Thread Mattias Gaertner
I just noticed that this thread has gone off-topic for this mail list. My apologies. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] A complex trouble(at least for me)

2009-05-08 Thread Mattias Gaertner
On Thu, 07 May 2009 18:12:50 -0300 Arí Ricardo Ody wrote: > Suppose the following structure: > > 01 a-1. > 03 b-1 pic xxx. > 03 b-2 pic 999. > 03 b-3. >05 c-1 pic aaa. >05 c-2. > 07 d-1 pic zzz. > 07 d-2 pic xxx. >05 c-3 pic 99. > 03 b-

Re: [fpc-pascal] A question or two regarding the FPC

2009-05-08 Thread Mattias Gaertner
On Fri, 8 May 2009 14:35:52 -0300 Gustavo Enrique Jimenez wrote: > Hi Nino: > > I am using FPC since 2000-2001. I use it for data aquisition and > temperature control. Console programs compiled with FPC 1.x work for > days, even weeks. In the "Laboratorio de Física del Sólido, Tucumán - > Argen

Re: [fpc-pascal] How trate with JPG

2009-05-24 Thread Mattias Gaertner
On Sun, 24 May 2009 21:18:44 +0200 Diego Antonio Lucena Pumar wrote: > > Hi list: > > I have a question, is for a elementary program. What > are the routines to manipulate with jpg image in FreePascal?. Thank, > Diego Antonio Lucena Pumar. fpImage There are examples in the

[fpc-pascal] fpmake: output directories

2009-06-01 Thread Mattias Gaertner
Hi fpmake devels, fpmake uses as ppu output directory for example: units/i386-linux/ And there is no way to change this. Right? Some LCL packages have different PPUs per widgetset, so they need an output directory per widgetset. At the moment they use for example: units/i386-linux-gtk2/ Another

Re: [fpc-pascal] fpmake: output directories

2009-06-05 Thread Mattias Gaertner
On Tue, 2 Jun 2009 16:03:08 +0200 (CEST) Michael Van Canneyt wrote: >[...] > > Thanks. > > Maybe this can be used for debug/release. > > I don't see how this can be used for the widgetsets. > > Why not ? you can use > subtarget=gtk2-debug How can I pass sub targets to fppkg? > > My dream is

Re: [fpc-pascal] Compiling Lazarus and LCL using rebuilt FPC RTL

2009-06-11 Thread Mattias Gaertner
On Thu, 11 Jun 2009 08:49:03 +0200 fpcl...@silvermono.co.za wrote: > Hi Guys, > > Assuming that a FPC RTL rebuild has succeeded, can somebody please > describe the process of rebuilding Lazarus and the LCL using the new > FPC RTL? Install your new FPC. And then see here http://wiki.lazarus.free

Re: [fpc-pascal] Compiling Lazarus and LCL using rebuilt FPC RTL

2009-06-12 Thread Mattias Gaertner
On Fri, 12 Jun 2009 15:50:50 +0200 fpcl...@silvermono.co.za wrote: > On Thursday 11 June 2009 08:49:03 fpcl...@silvermono.co.za wrote: > > Hi Guys, > > > > Assuming that a FPC RTL rebuild has succeeded, can somebody please > > describe the process of rebuilding Lazarus and the LCL using the > > ne

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Mattias Gaertner
On Thu, 16 Jul 2009 10:30:23 +0200 Jürgen Hestermann wrote: > > Jürgen Hestermann, how often do you change your working machine? > > Well, I seldom change it [...] > > If I log off, the local profile is saved (partely) to the (Novell) > home dir and then the local Windows user is deleted complet

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Mattias Gaertner
On Thu, 16 Jul 2009 11:51:29 +0200 Jürgen Hestermann wrote: > >> Therefore it would be the best of all worlds to save the Lazarus > >> settings to the Lazarus directory. > > No. A sane environment shouldn't even grant you write permissions > > there. > > Then Lazarus should ask where to put the

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-17 Thread Mattias Gaertner
On Thu, 16 Jul 2009 19:03:40 +0200 Florian Klaempfl wrote: > Micha Nelissen schrieb: > > Florian Klaempfl wrote: > >>> Then you must be the only one since everybody I know despises it. > >>> We use multiple times login sometimes and then the settings are > >>> always messed up. > >> > >> Well, t

Re: [fpc-pascal] ICONV status

2009-07-23 Thread Mattias Gaertner
On Thu, 23 Jul 2009 10:15:39 +0300 ik wrote: > The example has bug that I reported a while back (with a ptch) that > afaik was ignored completely so yo are welcome to look for that bug > and add the patch and you'll have (I hope) a working version of the > example. What bug? > The API itself

[fpc-pascal] TFileStream.SetSize sometimes fails

2009-08-13 Thread Mattias Gaertner
I want to replace the content of an existing file (keeping the type and rights). I used: fs := TFileStream.Create(Filename, fmOpenWrite or fmShareDenyNone); fs.Size := 0; fs.Write(.); fs.Free; But it does not always work. The line fs.Size does not clear the file on every file system. So the

Re: [fpc-pascal] TFileStream.SetSize sometimes fails

2009-08-13 Thread Mattias Gaertner
On Thu, 13 Aug 2009 21:46:23 +0200 (CEST) Michael Van Canneyt wrote: > > > On Thu, 13 Aug 2009, Mattias Gaertner wrote: > > > > > I want to replace the content of an existing file (keeping the type > > and rights). I used: > > > > fs := T

Re: [fpc-pascal] TFileStream.SetSize sometimes fails

2009-08-14 Thread Mattias Gaertner
On Fri, 14 Aug 2009 01:09:27 +0200 Luca Olivetti wrote: > En/na Mattias Gaertner ha escrit: > > > > > Yes. The code worked pretty well for years on many systems. But > > you know the story of the ext4 bug. I hope this is not something > > like that. > > I

Re: [fpc-pascal] Why is cthreads unit not included by default

2009-08-27 Thread Mattias Gaertner
On Thu, 27 Aug 2009 13:46:21 +0200 Mattias Gärtner wrote: >[...] > I would say, that using cthreads under Linux in an LCL app is ok. > I didn't test yet a LCL app under OS X, *BSD or Sparc, so don't > know if cthreads has a performance penalty there. I did some tests on OS X and got some intere

Re: [fpc-pascal] Why is cthreads unit not included by default

2009-08-27 Thread Mattias Gaertner
On Thu, 27 Aug 2009 18:55:10 +0200 Jonas Maebe wrote: > > On 27 Aug 2009, at 18:48, Mattias Gaertner wrote: > > > On Thu, 27 Aug 2009 13:46:21 +0200 > > Mattias Gärtner wrote: > > > >> [...] > >> I would say, that using cthreads under Linux in a

Re: [fpc-pascal] Why is cthreads unit not included by default

2009-08-27 Thread Mattias Gaertner
On Thu, 27 Aug 2009 18:57:58 +0200 Jonas Maebe wrote: > > On 27 Aug 2009, at 18:55, Jonas Maebe wrote: > > > Without saying what this command line application and this LCL > > application do exactly, it's kind of hard to understand this > > conclusion. > > > Oh, now I see that the procedu

[fpc-pascal] Lazarus 0.9.28 released

2009-10-12 Thread Mattias Gaertner
The Lazarus team is glad to announce the 0.9.28 release. This release is based on fpc 2.2.4. This release can be downloaded from the SourceForge download page: http://sourceforge.net/projects/lazarus/files/ Highlights / Major changes: LCL: *LCL now uses gtk2 as default widgetset on Linux and BSD

Re: [fpc-pascal] streaming child components

2009-10-25 Thread Mattias Gaertner
On Sun, 25 Oct 2009 21:56:01 +0100 Roland Schaefer wrote: > Hi, > I have another question regarding serialization. I need to stream > child components, and here: > http://wiki.freepascal.org/Streaming_components it says that > "TComponent extends TPersistent by the ability to have child > compone

Re: [fpc-pascal] How to set LCL widgetset for my project?

2009-10-27 Thread Mattias Gaertner
On Tue, 27 Oct 2009 09:55:03 +0200 Graeme Geldenhuys wrote: >[...] > You might be able to use lazbuild as well - though I have no clue how > that program works. Gladfully the wiki knows: http://wiki.lazarus.freepascal.org/lazbuild Mattias ___ fpc-pas

Re: [fpc-pascal] PChar -> AnsiString -> PChar = memory leak?

2009-10-29 Thread Mattias Gaertner
On Thu, 29 Oct 2009 15:00:53 +0200 Graeme Geldenhuys wrote: > Hi, > > Do I create a memory leak if I cast a PChar it a AnsiString. Then > append text to the AnsiString and then cast it back to the original > PChar? > > eg: > var > Text: Pchar;<-- global var containing text. > > procedure

Re: [fpc-pascal] PChar -> AnsiString -> PChar = memory leak?

2009-10-29 Thread Mattias Gaertner
On Thu, 29 Oct 2009 15:00:53 +0200 Graeme Geldenhuys wrote: > Hi, > > Do I create a memory leak if I cast a PChar it a AnsiString. Then > append text to the AnsiString and then cast it back to the original > PChar? > > eg: > var > Text: Pchar;<-- global var containing text. > > procedure

Re: [fpc-pascal] PChar -> AnsiString -> PChar = memory leak?

2009-10-29 Thread Mattias Gaertner
On Thu, 29 Oct 2009 13:20:42 + Henry Vermaak wrote: > 2009/10/29 Mattias Gaertner : > > On Thu, 29 Oct 2009 15:00:53 +0200 > > Graeme Geldenhuys wrote: > > > >> Hi, > >> > >> Do I create a memory leak if I cast a PChar it a AnsiString. Then

Re: [fpc-pascal] PChar -> AnsiString -> PChar = memory leak?

2009-10-29 Thread Mattias Gaertner
On Thu, 29 Oct 2009 15:44:09 +0200 Graeme Geldenhuys wrote: > On 29/10/2009, Mattias Gaertner wrote: > > > > > > Text:=strnew(PChar(s)); > > You read my mind. I was going to ask if it's ok to cast a PString to > a PChar. Yes. But it will not change the r

Re: [fpc-pascal] How to set LCL widgetset for my project?

2009-10-29 Thread Mattias Gaertner
On Thu, 29 Oct 2009 22:28:39 +0800 章宏九 wrote: > Thank you for all your detailed answers. I read information about > lazbuild, but I think using Lazarus is much more easier. Since I am > used to vim, it might cost me some time to get familiar with it. Maybe if you ask Martin in the right way he w

Re: [fpc-pascal] PChar -> AnsiString -> PChar = memory leak?

2009-10-29 Thread Mattias Gaertner
On Thu, 29 Oct 2009 16:42:23 +0200 Graeme Geldenhuys wrote: > 2009/10/29 Mattias Gaertner : > > > > It compiles here. Probably you use some special units. > > Weird... As I mentioned, I'm using FPC 2.3.1 (64bit) under Linux and > $mode objfpc. I hope you mean {

Re: [fpc-pascal] Debugger for the fpc available?

2009-11-08 Thread Mattias Gaertner
On Sat, 7 Nov 2009 16:48:03 -0800 David Emerson wrote: > I used fpc for a while before starting to use Lazarus. Of course back > then, lazarus was not as stable as it is now... > > Now that I have gotten accustomed to using lazarus, I will never go > back! Lazarus is a wonderful tool. I believ

Re: [fpc-pascal] Lazarus

2009-11-15 Thread Mattias Gaertner
On Sun, 15 Nov 2009 23:00:34 +0100 Rainer Stratmann wrote: > Am Sunday 15 November 2009 20:03:21 schrieb Martin: > > Rainer Stratmann wrote: > > > Is here a contact person who is developing lazarus? > > > May be everyone is interested in this: > > > When searching text in lazarus, always the prec

Re: [fpc-pascal] Split and Join

2009-11-27 Thread Mattias Gaertner
On Fri, 27 Nov 2009 20:11:25 +0100 (CET) Michael Van Canneyt wrote: > > > On Fri, 27 Nov 2009, Juha Manninen wrote: > > > Hi, > > > > FPC's strutils or other libraries still don't have functions for splitting a > > string to a list and joining a list of strings again to one string, given a > >

Re: [fpc-pascal] private integer is an illegal counter variable

2009-11-27 Thread Mattias Gaertner
On Sat, 28 Nov 2009 00:43:39 +0200 Juha Manninen wrote: > On perjantai, 27. marraskuuta 2009 23:52:30 Frank Peelo wrote: > > > The reason is that a for-loop tries to make a number of reasonable > > > guarantees that the counter variable cannot be modified during the loop. > > > E.g., direct assig

Re: [fpc-pascal] readonly variables

2009-11-28 Thread Mattias Gaertner
On Sat, 28 Nov 2009 14:58:26 +0100 Jürgen Hestermann wrote: > > is it possible to set a variable in a programm as a readonly variable? > > Not that I am aware of. But for what reason do you want such a behaviour? > > And if I think it over, this can only work at runtime (letting the program >

Re: [fpc-pascal] String types in a wider perspective (was: private integer is an illegal counter variable)

2009-12-01 Thread Mattias Gaertner
On Tue, 1 Dec 2009 14:03:37 +0200 Juha Manninen wrote: >[...] > This apparently small syntax detail has a wider symbolic message. When people > here are seriously arguing about how important ShortString is ('cause you can > save 3 bytes or something...) the message for potential new Pascal > p

Re: [fpc-pascal] [OT] which editor - emacs?

2010-01-17 Thread Mattias Gaertner
On Sun, 10 Jan 2010 14:59:03 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: >[...] > I don't use Lazarus for FPC development. This is not a problem of Lazarus, > but more that I don't want to often rebuild lazarus when I'm working on FPC. You don't need to. Mattias

Re: [fpc-pascal] RTTI Bug or something else i did wrong...

2010-01-17 Thread Mattias Gaertner
On Sat, 16 Jan 2010 07:43:59 -0300 "Jorge Aldo G. de F. Junior" wrote: > well, the bug still stands... > > fTypeData := GetTypeData(Self.ClassInfo); This works here. Do you have a complete example? > this line is the problem... looks like i cannot either "GetTypeData" > of self in cons

Re: [fpc-pascal] Component Writing - Registering Components with the widget set

2010-02-06 Thread Mattias Gaertner
This is a fpc list. Please put lazarus question on the lazarus list or forum. On Fri, 5 Feb 2010 07:55:41 +1100 "Justin Smyth" wrote: > Can someone help here , if i have my own custom component thats got a > container that has a base class of TCustomControl does one need to register > it on th

Re: [fpc-pascal] Pointers

2010-02-11 Thread Mattias Gaertner
On Thu, 11 Feb 2010 21:53:59 +0100 Rainer Stratmann wrote: > Am Thursday 11 February 2010 21:24:03 schrieb Ralf A. Quint: > > At 12:07 PM 2/11/2010, Jonas Maebe wrote: > > >On 11 Feb 2010, at 18:17, Rainer Stratmann wrote: > > >>In the past with the turbopascal compiler and other always sizeof >

Re: [fpc-pascal] png bitmap

2010-02-28 Thread Mattias Gaertner
On Sun, 28 Feb 2010 02:00:59 +0100 Rainer Stratmann wrote: > Has someone experience with creating png bitmap files? > Is it easy or complicated? > I programmed a web server and wanted to serve diagrams also. Something like this: http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Drawin

Re: [fpc-pascal] png bitmap

2010-02-28 Thread Mattias Gaertner
On Sun, 28 Feb 2010 16:42:53 -0300 Felipe Monteiro de Carvalho wrote: > On Sun, Feb 28, 2010 at 4:24 PM, Ingemar Ragnemalm > wrote: > > Looks nice, but it doesn't link on my Mac. I get a bunch of link errors all > > prefixed _FT_. FreeType? (Irrelevant for the PNGs though.) > > Just delete the

Re: [fpc-pascal] Determining procedure's name

2010-03-03 Thread Mattias Gaertner
On Wed, 03 Mar 2010 21:33:45 +0200 Wimpie Nortje wrote: > Hello everybody, > > Is there a macro or function that gives the current procedure's name? > > E.g. > > procedure TClass.SomeProc; > begin > writeln(Format('This procedure's name is %s', [THE_MACRO])); > end; If you use Lazarus you c

Re: [fpc-pascal] Is it save to think default value of untouched string is ''?

2010-03-06 Thread Mattias Gaertner
On Sun, 7 Mar 2010 01:13:05 +0200 Juha Manninen wrote: > > Sorry ... What ? It must be garanteed in ansistring mode! or > > everything will simple kboom! There is no way to initialize a non > > initialized string. > > By initializing I mean: > str:=''; > or some other assignment. > I remember

Re: [fpc-pascal] Re: source code UTF8 with BOM problems ?

2010-03-22 Thread Mattias Gaertner
On Mon, 22 Mar 2010 12:43:43 -0500 Luis Fernando Del Aguila Mejía wrote: > Another question. > For write programs in console or mode text. > For the source code. What charsets is appropriate to use with Free Pascal? > > a) ASCII (7 bits) > b) iso-8859-1 > c) Windows-1252 > d) IBM 850 > e) Unico

Re: [fpc-pascal] Published -> Public

2010-04-17 Thread Mattias Gaertner
On Sat, 17 Apr 2010 13:05:07 +0200 Zaher Dirkey wrote: > 2010/4/17 Flávio Etrusco : > > On Fri, Apr 16, 2010 at 4:54 PM, José Mejuto wrote: > >> Hello FPC-Pascal, > >> > >> Friday, April 16, 2010, 9:06:45 PM, you wrote: > >> > >> FE> Published methods can be found with TObject.MethodAddress, tha

Re: [fpc-pascal] Published -> Public

2010-04-17 Thread Mattias Gaertner
On Sat, 17 Apr 2010 14:28:16 +0200 Zaher Dirkey wrote: > On Sat, Apr 17, 2010 at 1:08 PM, Mattias Gaertner > wrote: > > On Sat, 17 Apr 2010 13:05:07 +0200 > > Zaher Dirkey wrote: > > > >> 2010/4/17 Flávio Etrusco : > >> > On Fri, Apr 16, 2010 at 4

Re: [fpc-pascal] "start" Lazarus

2010-04-17 Thread Mattias Gaertner
On Sat, 17 Apr 2010 16:11:48 +0200 Ritchie Flick wrote: > > On Apr 16, 2010, at 6:40 PM, spir ☣ wrote: > > > Hello, > > > > Newcomer here. > > Seems stupid, but I had a hard time in simply starting Lazarus -- on > > Ubuntu. When I typed "lazarus", I got an error message about a lazarus > > p

Re: [fpc-pascal] "start" Lazarus

2010-04-18 Thread Mattias Gaertner
On Sun, 18 Apr 2010 19:25:53 +0200 spir ☣ wrote: >[...] > > It is true that there is an older package tct with a binary > > 'lazarus' (to revive partitions). > > So the lazarus package had to name the IDE 'lazaruside' instead. > > Actually seems to be "lazarus-ide" on Ubuntu: > > s...@o:~$ laza

Re: [fpc-pascal] FPClassChart

2010-04-22 Thread Mattias Gaertner
On Thu, 22 Apr 2010 16:29:43 +0200 (CEST) Michael Van Canneyt wrote: > > > On Thu, 22 Apr 2010, Marco van de Voort wrote: > > > In our previous episode, Michael Van Canneyt said: > >> Timing: > >> The codetools of the IDE were developed before fcl-passrc was fully > >> developed. > >> > >> May

Re: [fpc-pascal] FPClassChart

2010-04-23 Thread Mattias Gaertner
On Fri, 23 Apr 2010 09:58:25 +0200 Graeme Geldenhuys wrote: > Mattias Gaertner het geskryf: > > > > No. The fcl-passrc is not optimized for speed (it uses TList and > > creates a lot of strings) and I would estimate it supports only > > half of the fpc languages fea

Re: [fpc-pascal] method order

2010-04-30 Thread Mattias Gaertner
On Fri, 30 Apr 2010 18:34:43 +0200 spir ☣ wrote: > (Note: I use "method" for "either procedure or function"; if there is a > proper term, please tell me --I don't know any.) Normally: method = function/procedure of a class with an instance 'Self' class method = method where Self is the class

Re: [fpc-pascal] WriteComponent not outputting a hierarchy of components?

2010-06-03 Thread Mattias Gaertner
On Thu, 3 Jun 2010 20:38:26 +0200 (CEST) Michael Van Canneyt wrote: > > > On Thu, 3 Jun 2010, Graeme Geldenhuys wrote: > > > On 3 June 2010 17:24, Michael Van Canneyt wrote: > >> > >> You must override GetChildren. > >> > >> In the LCL, TWinControl overrides GetChildren to write child control

Re: [fpc-pascal] WriteComponent not outputting a hierarchy of components?

2010-06-03 Thread Mattias Gaertner
On Thu, 3 Jun 2010 22:32:38 +0200 Graeme Geldenhuys wrote: > On 3 June 2010 20:53, Mattias Gaertner wrote: > > > > For example a TOpenDialog is not in Controls, so it must be put into > > GetChildren. > > Sorry, I don't understand. I don't have VCL

Re: [fpc-pascal] WriteComponent not outputting a hierarchy of components?

2010-06-03 Thread Mattias Gaertner
On Thu, 3 Jun 2010 22:38:53 +0200 Graeme Geldenhuys wrote: > On 3 June 2010 21:22, Marco van de Voort wrote: > >> > >> I deliberately didn't mention these cases ;) > > > > labelededit ? > > > Huh? > I added a LabelEdit to my test app mentioned in my reply to > Mattias. Here is the output, and

Re: [fpc-pascal] WriteComponent not outputting a hierarchy of components?

2010-06-04 Thread Mattias Gaertner
On Fri, 4 Jun 2010 00:33:18 +0200 Graeme Geldenhuys wrote: > On 3 June 2010 22:55, Mattias Gaertner wrote: > > I other words: There are two tree like structures: Owner and Parent. > > Parent is optional and will make your stream files more readable. > > > >[...] > &

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Mattias Gaertner
On Thu, 17 Jun 2010 10:51:46 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Graeme Geldenhuys said: > > Op 2010-06-17 10:39, Marco van de Voort het geskryf: > > > > > > IIRC delphi has a equivalent of -Ur ({$IMPLICITBUILD OFF}). Were the > > > _original_ compo

Re: [fpc-pascal] Is this if /else syntax wrong?

2010-07-01 Thread Mattias Gaertner
On Thu, 1 Jul 2010 10:01:52 +0200 Bart wrote: > Compiles just fine (with or without the semicolon) with Lazarus > r25303M / fpc 2.4.1 2.5.1 eats both too. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-pascal] methods of an object to create others objects

2010-07-05 Thread Mattias Gaertner
On Mon, 5 Jul 2010 17:26:52 -0300 Marcos Douglas wrote: >[...] > But if a remove the variable *someObj* and call like this: > myObj.createObj; // I _removed_ the *someObj* here!!! > > What will happen with the "result" variable? Is it released by the compiler? No. This will create a mem leak.

Re: [fpc-pascal] methods of an object to create others objects

2010-07-05 Thread Mattias Gaertner
On Mon, 5 Jul 2010 17:46:39 -0300 Marcos Douglas wrote: > On Mon, Jul 5, 2010 at 5:30 PM, Mattias Gaertner > wrote: > > > > No. This will create a mem leak. > > Thanks Mattias, I expect that... > > > On Mon, Jul 5, 2010 at 5:39 PM, Martin wrote: > &g

Re: [fpc-pascal] installing or using multiple versions of FPC on linux

2010-07-27 Thread Mattias Gaertner
On Mon, 26 Jul 2010 14:49:02 +0200 Jonas Maebe wrote: > > On 26 Jul 2010, at 14:18, Bernd Kreuss wrote: > > > What is the easiest way to have a second installation of FPC around that > > I can easily switch to on the same machine without having to change half > > a dozen paths and moving config

Re: [fpc-pascal] Licensing issue: Subclassing

2010-07-27 Thread Mattias Gaertner
On Tue, 27 Jul 2010 17:32:12 +0500 Vladimir Zhirov wrote: > Hi, > > There was a question raised in Russian FPC forum about whether LCL > license (modified LGPL) should be applied to a subclass of LCL class: > TMyButton = class(TButton) > This turned out to be a deeper problem, since it would a

[fpc-pascal] Current TThread

2010-12-21 Thread Mattias Gaertner
Hi, How to get the current TThread instance? For example: I created a TThread and called a function, which calls a function One of those sub functions needs to call TThread.Synchronize, which needs as parameter the current TThread. Mattias ___ fp

Re: [fpc-pascal] Current TThread

2010-12-21 Thread Mattias Gaertner
On Tue, 21 Dec 2010 14:29:36 +0100 (CET) michael.vancann...@wisa.be wrote: > > > On Tue, 21 Dec 2010, Mattias Gaertner wrote: > > > Hi, > > > > How to get the current TThread instance? > > There is no documented method. Strange. Am I really the firs

[fpc-pascal] array of ?

2011-02-09 Thread Mattias Gaertner
What is the meaning of: __pad1: array[1..4-sizeof(mode_t)]; ? See unit ipc.pp line 114. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Context of TThread.OnTerminate

2011-02-24 Thread Mattias Gaertner
On Thu, 24 Feb 2011 15:36:17 +0200 Wimpie Nortje wrote: > Hi everybody, > > The manual (possibly Delphi one) says that TThread.OnTerminate executes > in the GUI thread. This is easy if the GUI thread owns the TThread. > > Suppose the GUI owns a TTHread which owns a subthread. In which context >

Re: [fpc-pascal] circular reference

2011-03-05 Thread Mattias Gaertner
On Sat, 5 Mar 2011 23:07:45 -0300 Marcos Douglas wrote: > If circular reference not is a good practice (even if to use a > implementation section) then I have to put all code, that works > together, in the same unit, right? No, only compatibility or your boss can force you to do that. You can us

[fpc-pascal] TThread.Resume

2011-03-10 Thread Mattias Gaertner
Hi all, TThread.Resume is marked deprecated. Where is the comment or documentation what to use now? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TThread.Resume

2011-03-10 Thread Mattias Gaertner
On Thu, 10 Mar 2011 19:38:11 +0100 Jonas Maebe wrote: > > On 10 Mar 2011, at 19:27, Mattias Gaertner wrote: > > > TThread.Resume is marked deprecated. Where is the comment or documentation > > what to use now? > > http://wiki.freepa

[fpc-pascal] upgrading fpc rpm removes fpc.cfg

2011-03-17 Thread Mattias Gaertner
Hi all, I just installed on a fresh Linux Fedora 14 the fpc rpm via yum, which installed fpc 2.4.0. Then I downloaded from www.freepascal.org the rpm for fpc 2.4.2 and installed it via upgrade function (rpm -Uvh fpc-2.4.2-1.i686.rpm). To my surprise this renamed the /etc/fpc.cfg to /etc/fpc.cfg.or

Re: [fpc-pascal] TDOMElement and multiple attributes

2011-03-18 Thread Mattias Gaertner
On Fri, 18 Mar 2011 15:42:13 +0100 Reimar Grabowski wrote: > Hi all, > > I want to create a node with multiple attributes. It works by using > SetAttribute multiple times but it looks like I cannot specify the order in > which the attributes appear in the xml. The order of my SetAttribute call

<    1   2   3   4   5   6   7   8   9   10   >