Re: [Lazarus] typinfo routine gives memory leak

2011-09-21 Thread Howard Page-Clark
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:

Re: [Lazarus] object streams

2011-09-21 Thread Andrea Mauri
Il 20/09/2011 19:35, Zaher Dirkey ha scritto: check this functions procedure XMLReadObjectStream(Instance: TObject; Stream: TStream); procedure XMLWriteObjectStream(Instance: TObject; Stream: TStream); I will take a look thanks -- ___ Lazarus

[Lazarus] [wiki] License information missing

2011-09-21 Thread Lukasz Sokol
Hi, currently the http://wiki.lazarus.freepascal.org/ displays Content is available under . under each page. Kind Regards, Lukasz -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Updated docs

2011-09-21 Thread Graeme Geldenhuys
On 21/09/2011, Michael Schnell wrote: in the command line, but I don't see what the /path/to/fpdoc is supposed to be. The full path to your 'fpdoc' executable that came with FPC. mschnell@mschnell-Linux:~/Downloads/svn/lazarus/trunk/docs/html ./build_lcl_docs --outfmt ipf --fpdoc

Re: [Lazarus] Updated docs

2011-09-21 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: mschnell@mschnell-Linux:~/Downloads/svn/lazarus/trunk/docs/html ./build_lcl_docs --outfmt ipf --fpdoc ~/Downloads/svn/fpc/trunk/utils/fpdoc Warning! No corresponding xml file for unit /paswstring.pas Warning! No corresponding xml file for unit forms/forms.pp This is

[Lazarus] Thread finalization

2011-09-21 Thread Leonardo M . Ramé
I'm having a rough time with Threads. When my app starts, it creates an instance of a TThread that loads a bunch of images. That TThread instance can be destroyed in two ways: 1) When the loading finishes. 2) When the user closes the app while loading. In case 2, I destroy the thread using this

Re: [Lazarus] Updated docs

2011-09-21 Thread Graeme Geldenhuys
On 21/09/2011, Michael Schnell wrote: This is warnings generated by 'build_lcl_docs', not 'fpdoc'. Obviously It wasn't that obvious to me. :) Sorry, no idea what you are meaning here. In what file(s) should I comment this out and how ? In fact I have no idea what file(s) build_lcl_docs

[Lazarus] lmessages.pp question

2011-09-21 Thread Lubos Pintes
Hi, What this means? TLMGetText = record Msg: Cardinal; {$ifdef cpu64} UnusedMsg: Cardinal; {$endif} ... What is that UnusedMsg? How messages are handled on 64-bit cpu? Thank -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Thread finalization

2011-09-21 Thread Sven Barth
Am 21.09.2011 14:31, schrieb Leonardo M. Ramé: I'm having a rough time with Threads. When my app starts, it creates an instance of a TThread that loads a bunch of images. That TThread instance can be destroyed in two ways: 1) When the loading finishes. 2) When the user closes the app while

Re: [Lazarus] Thread finalization

2011-09-21 Thread Leonardo M . Ramé
On 2011-09-21 14:55:06 +0200, Sven Barth wrote: Am 21.09.2011 14:31, schrieb Leonardo M. Ramé: I'm having a rough time with Threads. When my app starts, it creates an instance of a TThread that loads a bunch of images. That TThread instance can be destroyed in two ways: 1) When the

Re: [Lazarus] Thread finalization

2011-09-21 Thread Zaher Dirkey
On Wed, Sep 21, 2011 at 2:31 PM, Leonardo M. Ramé l.r...@griensu.comwrote: if Assigned(FMyThread) then begin FMyThread.Terminate; while not FMyThread.Finished do CheckSynchronize(100); FreeAndNil(FMyThread); end; try FMyThread.Terminate; FMyThread.WaitFor;

Re: [Lazarus] Thread finalization

2011-09-21 Thread Leonardo M . Ramé
On 2011-09-21 15:21:18 +0200, Zaher Dirkey wrote: On Wed, Sep 21, 2011 at 2:31 PM, Leonardo M. RamA(c) l.r...@griensu.com wrote: A if Assigned(FMyThread) then A begin A A FMyThread.Terminate; A A while not FMyThread.Finished do A A A

Re: [Lazarus] Thread finalization

2011-09-21 Thread cobines
Your thread calls OnTerminate via Synchronize and waits until the callback finishes. In the callback you call Thread.Destroy which waits until the thread finishes. It is a deadlock. Other than using FreeOnTerminate=True, maybe periodically check from the main thread the status of the thread. If

Re: [Lazarus] Thread finalization

2011-09-21 Thread Leonardo M . Ramé
On 2011-09-21 15:38:08 +0200, cobines wrote: Your thread calls OnTerminate via Synchronize and waits until the callback finishes. In the callback you call Thread.Destroy which waits until the thread finishes. It is a deadlock. Other than using FreeOnTerminate=True, maybe periodically check

[Lazarus] SynEdit.Lines.LoadFromFile and non-ascii filenames

2011-09-21 Thread Bart
Hi, After staring myself blind for several hours on why my program malfunctioned, I finally noticed a difference in behaviour between SynEdit.Lines.LoadFromFile and e.g. TMemo.Lines.LoadFromFile with regard to non-ascii characters in filenames. As I understood it the proper way to open files,

Re: [Lazarus] Updated docs

2011-09-21 Thread Graeme Geldenhuys
On 21/09/2011, Michael Schnell wrote: thus reducing what fpdoc will process. ??? How will fpdoc know about my edited file ??? Because your edited file is a script (*.sh) or batch (*.bat) file. You run your edited file. -- Regards, - Graeme -

Re: [Lazarus] Thread finalization

2011-09-21 Thread Mattias Gaertner
On Wed, 21 Sep 2011 11:12:12 -0300 Leonardo M. Ramé l.r...@griensu.com wrote: On 2011-09-21 15:38:08 +0200, cobines wrote: [...] Well, the best way I found is to create a Timer that checks if the thread is terminated, then destroy it. I don't like this. It would be better if the thread can

Re: [Lazarus] SynEdit.Lines.LoadFromFile and non-ascii filenames

2011-09-21 Thread Mattias Gaertner
On Wed, 21 Sep 2011 16:14:56 +0200 Bart bartjun...@gmail.com wrote: Hi, After staring myself blind for several hours on why my program malfunctioned, I finally noticed a difference in behaviour between SynEdit.Lines.LoadFromFile and e.g. TMemo.Lines.LoadFromFile with regard to non-ascii

Re: [Lazarus] Thread finalization

2011-09-21 Thread Mattias Gaertner
On Wed, 21 Sep 2011 11:41:56 -0300 Leonardo M. Ramé l.r...@griensu.com wrote: On 2011-09-21 16:28:45 +0200, Mattias Gaertner wrote: On Wed, 21 Sep 2011 11:12:12 -0300 Leonardo M. Ramé l.r...@griensu.com wrote: On 2011-09-21 15:38:08 +0200, cobines wrote: [...] Well, the best way

Re: [Lazarus] SynEdit.Lines.LoadFromFile and non-ascii filenames

2011-09-21 Thread Mattias Gaertner
On Wed, 21 Sep 2011 17:26:18 +0200 Bart bartjun...@gmail.com wrote: When I control-clicked on TSynEdit.Lines.LoadFromFile() I ended up in TSrings.LoadFromFile, which does TFileStream.Create(FileName,fmOpenRead or fmShareDenyWrite). I also ended up here when control-clicking on

Re: [Lazarus] lmessages.pp question

2011-09-21 Thread Hans-Peter Diettrich
Lubos Pintes schrieb: Hi, What this means? TLMGetText = record Msg: Cardinal; {$ifdef cpu64} UnusedMsg: Cardinal; {$endif} ... What is that UnusedMsg? A filler to align the following elements properly. How messages are handled on 64-bit cpu? The same as on 32 bit CPUs. The record

Re: [Lazarus] Thread finalization

2011-09-21 Thread Zaher Dirkey
On Wed, Sep 21, 2011 at 4:24 PM, Leonardo M. Ramé l.r...@griensu.comwrote: Zahker, using WaitFor blocks the app. Block the whole application or the current thread that run WaitFor? Example: Listener thread WaitFor Connection Thread. Thanks Zaher Dirkey --

[Lazarus] About Threads

2011-09-21 Thread Kjow
Hi all, I need to unlock my program when I run a function (it simply loads a file and elaborates some data, I would do something of beauty like a progress bar). I read the wiki, but it seems to be too much for my purpose and the function I need to run is already inside a class (I wouldn't touch