[Lazarus] Break in 'case...of' block.

2010-08-22 Thread Dave Coventry
I have a function that tests for a series of different conditions according to a value in a 'case...of' block. Result:=false; mylist:=TStringlist.Create; case i of 1: begin if condition1 then begin Result:=true; break; end; if condition2 then

Re: [Lazarus] Break in 'case...of' block.

2010-08-22 Thread ik
You can do several thins: 1. use Else !! 2. Surround (I hope that the proper spelling) everything in try finally and then in the finally place the free statement. 3. Make a shorter code: Result := (condition1) OR (condition2) OR (condition3) Will be the same as your if statment, but shorter.

Re: [Lazarus] Break in 'case...of' block.

2010-08-22 Thread patspiper
On 08/22/2010 10:10 AM, Dave Coventry wrote: I have a function that tests for a series of different conditions according to a value in a 'case...of' block. Result:=false; mylist:=TStringlist.Create; case i of 1: begin if condition1 then begin Result:=true;

Re: [Lazarus] Break in 'case...of' block.

2010-08-22 Thread patspiper
You should use Else. But if you insist on break, you can insert a dummy repeat/until loop: One more thing, since you are creating a TStringList, it is recommended to enclose your code anyway in a try/finally block irrespective whether you use the dummy loop or not. This guarantees the

Re: [Lazarus] Break in 'case...of' block.

2010-08-22 Thread Michael Van Canneyt
On Sun, 22 Aug 2010, Dave Coventry wrote: I have a function that tests for a series of different conditions according to a value in a 'case...of' block. Result:=false; mylist:=TStringlist.Create; case i of 1: begin if condition1 then begin Result:=true; break;

Re: [Lazarus] Multithreadprocs and Synchronize

2010-08-22 Thread Juha Manninen (gmail)
Thanks. What about updating GUI in main thread, like normally done with TThread.Synchronize? I tried this: Item.Thread.Synchronize(Item.Thread, @ShowStatus); where ShowStatus is part of the class calling the parallel funcs. It doesn't work -- RunError(210). Juha --

Re: [Lazarus] Break in 'case...of' block.

2010-08-22 Thread Dave Coventry
Great answers! Thanks, guys! :) On 22 August 2010 11:36, Michael Van Canneyt mich...@freepascal.org wrote: On Sun, 22 Aug 2010, Dave Coventry wrote: I have a function that tests for a series of different conditions according to a value in a 'case...of' block. Result:=false;

[Lazarus] Language Translations - Multi-Threaded app

2010-08-22 Thread Lee Jenkins
Hi all, Anyone use i18n capabilities in lazarus/fpc multi-threaded server apps? Can you tell me if there are threading issues that I should be aware of? Thanks, -- Warm Regards, Lee -- ___ Lazarus mailing list

[Lazarus] CHM help snapshot

2010-08-22 Thread Marco van de Voort
Hello, I've generated a new help snapshot. (chm files) The archive still is at http://www.stack.nl/~marcov/doc-chm.zip and contains rtl,fcl,lcl ,fpdoc,ref,user,prog.chm This release benefits from several improvements in the fpdoc generation, specially links between packages, and links in

Re: [Lazarus] CHM help snapshot

2010-08-22 Thread silvioprog
Em 22/08/2010 15:26, Marco van de Voort escreveu: Hello, I've generated a new help snapshot. (chm files) The archive still is at http://www.stack.nl/~marcov/doc-chm.zip and contains rtl,fcl,lcl ,fpdoc,ref,user,prog.chm This release benefits from several improvements in the fpdoc

Re: [Lazarus] CHM help snapshot

2010-08-22 Thread Howard Page-Clark
On 22/8/10 7:26, Marco van de Voort wrote: Hello, I've generated a new help snapshot. (chm files) The archive still is at http://www.stack.nl/~marcov/doc-chm.zip and contains rtl,fcl,lcl ,fpdoc,ref,user,prog.chm Thanks for this. The archive contains .xct, but no .kwd files. Is this an

[Lazarus] TChildControlResizeStyle prefix crs, but in the comment the prefix ces

2010-08-22 Thread Zaher Dirkey
Small typo in controls.pp, line 1450 TChildControlResizeStyle started with crs like crsScaleChilds but in the note (comment) it is cesScaleChilds, it is need a review. Thanks in advance. -- Zaher Dirkey -- ___ Lazarus mailing list