Re: [Lazarus] Foreach?

2013-06-08 Thread Antônio
for i := 0 to 9 do TButton(Form1.FindComponent('btnMacro' + IntToStr(i + 1))).Caption := Macrolist[i].Name; Antônio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] New compiler options page "Additions and Overrides"

2013-06-08 Thread Martin
On 08/06/2013 14:38, Mattias Gaertner wrote: It is not practical because the plan is to have Debug and Release modes by default. They are useful for anyone. I doubt that. See Michael's, Dodi's and my mails. Which ones? There are many mails from 2 Michaels... Michael Van Canneyt wrote a mail

Re: [Lazarus] New compiler options page "Additions and Overrides"

2013-06-08 Thread Zaher Dirkey
Great :D, i will test it soon. On Fri, Jun 7, 2013 at 12:48 AM, Mattias Gaertner wrote: > Hi all, > > The page in the "Project options / Compiler options / IDE Macro Values" > was replaced with a more powerful page "Additions and Overrides". > > Things that you can do now, which were not possib

Re: [Lazarus] SynEdit changes line ending

2013-06-08 Thread Zaher Dirkey
On Sat, Jun 8, 2013 at 12:31 AM, Martin wrote: > I would not be in favour of detecting the style when setting text. That > will lead to a lot of confusion. There may be mixed style, or other > operations later can have other style. It is also unescesarry work, for > something rarely ever needed (

Re: [Lazarus] Foreach?

2013-06-08 Thread Antônio
You actually do 10 loops. Antônio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Foreach?

2013-06-08 Thread Antônio
10 iterations X FindComponent loop = 10 loops on the components array. Antônio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Foreach?

2013-06-08 Thread Antônio
That is not so bad, since what FindComponent loop does is the same as Barth done with his loop, matching the name of the component. Antônio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listi

Re: [Lazarus] Foreach?

2013-06-08 Thread Antônio
For a single loop, maybe this, if was not so complicated: for i := 0 to Form1.ComponentCount - 1 do if Pos('btnMacro', Form1.Components[i].Name) = 1 then TButton(Form1.Components[i]).Name := MacroList[StrToInt(Copy(Form1.Components[i].Name, 9, 2))].Name; -- __

Re: [Lazarus] Foreach?

2013-06-08 Thread Antônio
If you have no UTF8 character. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus