[fpc-pascal] Release of fpc-2.1.4 aka 2.2.0-beta
bartek
bbartek at gmx.net
Sun May 20 17:06:15 CEST 2007
On Sunday 20 May 2007 16:43:34 Jonas Maebe wrote:
> On 20 May 2007, at 16:38, bartek wrote:
> > OK. And what about this:
> > -----8<-----
> > /home/bartek/Dev/units/glgui/glgui.pp(376,33) Error: Can't take the
> > address of
> > constant expressions
> > -----8<-----
> > constructor TGLGUI3DMouseMapper.Create(aOwnerDesktop: TGLGUIDesktop);
> > begin
> > OwnerDesktop:=aOwnerDesktop;
> > OwnerDesktop.MouseMapper:=self; // 376 is here
> > end;
> > -----8<-----
> >
> > Definition snippet:
> > -----8<-----
> > // properties
> > property OwnerDesktop: TGLGUIDesktop read
> > fOwnerDesktop write
> > fOwnerDesktop;
> > -----8<-----
>
> You cannot write to fields of properties. The reason is that any
> property accessor should be transparently replaceable by a function
> call, and if you do that in the above expression then your assignment
> would change something inside the (temporary) function result rather
> than in the field.
>
Thank you very much, now everything works like a charm.
bartek
More information about the fpc-pascal
mailing list