Try it with the wrong assignment ";=" in the else statement and you will get a 
the error message "illegal expression", you will not get the error message 
"Wrong number of parameters" as indicated by John.

Try to use a button with the name "btnTestMeClick" (ending on "Click" in the 
name of the control) and you will get the error message as indicated by John.

(This is at leased what happens on my SuSE Linux box).

Regards,
Rob Casparie.


Op dinsdag 23 mei 2006 23:01, schreef Sergio Samayoa:
> > a bug or not but using a name like "btnTestMe" for your buttun runs fine.
>
> IS NOT A BUG.
>
> CHECK the first assignment statement in the else's statements, it has ";="
> instead of ":=".
>
> It is interpreted, as someone said before, as two separated statements:
>
> STATEMENT 1: btnTestMeClick.Caption;
> STATEMENT 2: ='Click';
>
> Both statements are incorrect.
>
> Regards.
>
> -----Mensaje original-----
> De: Rob [mailto:[EMAIL PROTECTED]
> Enviado el: Martes, 23 de Mayo de 2006 03:41 p.m.
> Para: [email protected]
> Asunto: Re: [lazarus] What's wrong with this code?
>
> Op dinsdag 23 mei 2006 20:23, schreef John Meyer:
> > begin
> >    if btnTestMeClick.tag=0 then
> >       begin
> >            btnTestMeClick.Caption:='Click me Again';
> >            btnTestMeClick.tag:=1;
> >       end else
> >       begin
> >            btnTestMeClick.Caption;='Click';
> >            btnTestMeClick.tag:=0;
> >       end
> >
> > end;
> >
> >
> > On the if line, I'm getting this error:
> >
> > unit1.pas(32,6) Error: Wrong number of parameters specified
> >
> >
> > This is copied almost word for word from the wiki tutorial.
> >
> > _________________________________________________________________
> >      To unsubscribe: mail [EMAIL PROTECTED] with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives
>
> I am very new to Lazarus and not a Pascal programmer. I am not sure if it
> is
>
> a bug or not but using a name like "btnTestMe" for your buttun runs fine.
> Maybe a name ending on "Click" might confuse Lazarus maybe it expects an
> OnClick procedure for the control "btnTestMe" when using the name
> "btnTestMeClick".
>
> Using "Click" at the end of a control's name might be confusing for your
> self
> as well.
>
> Rob.
>
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
>
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to