RE: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
-Original Message- From: Vincent Snijders [EMAIL PROTECTED] To: lazarus@miraclec.com Sent: 17/05/07 07:07 Subject: Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to =If you don't want this, use public fields insteads of =properties. It's nuts. What's it supposed to protect? It just makes simple things hard work without protecting anything. Sam _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Luiz Americo Pereira Camara schreef: Burkhard Carstens wrote: Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? This is not a bug. It is caused by a change in fpc. Assignments to fields of structured properties are not allowed anymore (since r7250). e.g.: property prop : trec read frec; instance.prop.a:=5; I hope this will be optional at least If you don't want this, use public fields insteads of properties. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Burkhard Carstens wrote: Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? This is not a bug. It is caused by a change in fpc. Assignments to fields of structured properties are not allowed anymore (since r7250). e.g.: property prop : trec read frec; instance.prop.a:=5; Seems like you have to introduce more properties in the class or work with tmpvars in the code: tmp:=instance.prop; tmp.a:=5; instance.prop:=tmp; Hi, I'm just curious why this was changed. Was it to promote better coding practices or a more practical reason? Again, just curious. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Lee Jenkins schreef: Burkhard Carstens wrote: Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? This is not a bug. It is caused by a change in fpc. Assignments to fields of structured properties are not allowed anymore (since r7250). e.g.: property prop : trec read frec; instance.prop.a:=5; Seems like you have to introduce more properties in the class or work with tmpvars in the code: tmp:=instance.prop; tmp.a:=5; instance.prop:=tmp; Hi, I'm just curious why this was changed. Was it to promote better coding practices or a more practical reason? If your property is declared as: property MyProp: TMyRec read GetMyRec write FMyRec; then instance.MyProp.B := 5; writeln(instance.MyProp.B); would not write 5. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Vincent Snijders wrote: Lee Jenkins schreef: Burkhard Carstens wrote: Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? This is not a bug. It is caused by a change in fpc. Assignments to fields of structured properties are not allowed anymore (since r7250). e.g.: property prop : trec read frec; instance.prop.a:=5; Seems like you have to introduce more properties in the class or work with tmpvars in the code: tmp:=instance.prop; tmp.a:=5; instance.prop:=tmp; Hi, I'm just curious why this was changed. Was it to promote better coding practices or a more practical reason? If your property is declared as: property MyProp: TMyRec read GetMyRec write FMyRec; then instance.MyProp.B := 5; writeln(instance.MyProp.B); would not write 5. Thanks Vincent. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? Lazarus svn 11153 FPC svn 7358 OS: linux fedora core 6 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? This is not a bug. It is caused by a change in fpc. Assignments to fields of structured properties are not allowed anymore (since r7250). e.g.: property prop : trec read frec; instance.prop.a:=5; Seems like you have to introduce more properties in the class or work with tmpvars in the code: tmp:=instance.prop; tmp.a:=5; instance.prop:=tmp; regards Burkhard _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
--- fedorax [EMAIL PROTECTED] escribió: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? Lazarus svn 11153 FPC svn 7358 OS: linux fedora core 6 Yes, unfortunately the compiler (2.3.1) doesn't allow this anymore don't know if this will be merged to 2.1.x maybe it is already (?), you will have to use a temporal TTextStyle variable, something like this: var T: TTextStyle; begin etc. T := Printer.Canvas.TextStyle; T.Alignment := taRightJustify; Printer.Canvas.TextStyle := T; etc. end; I don't have 2.3.1 to test, hope it works; Jesus Reyes A. ___ Do You Yahoo!? La mejor conexión a Internet y b 2GB/b extra a tu correo por $100 al mes. http://net.yahoo.com.mx _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Selon Jesus Reyes [EMAIL PROTECTED]: --- fedorax [EMAIL PROTECTED] escribió: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? Lazarus svn 11153 FPC svn 7358 OS: linux fedora core 6 Yes, unfortunately the compiler (2.3.1) doesn't allow this anymore don't know if this will be merged to 2.1.x maybe it is already (?), you will have to use a temporal TTextStyle variable, something like this: var T: TTextStyle; begin etc. T := Printer.Canvas.TextStyle; T.Alignment := taRightJustify; Printer.Canvas.TextStyle := T; etc. end; I don't have 2.3.1 to test, hope it works; Jesus Reyes A. Thank's, your tip work. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Burkhard Carstens wrote: Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? This is not a bug. It is caused by a change in fpc. Assignments to fields of structured properties are not allowed anymore (since r7250). e.g.: property prop : trec read frec; instance.prop.a:=5; I hope this will be optional at least Luiz _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives