On Sat, 07 Nov 2009 21:52:08 +0000
Martin <laza...@mfriebe.de> wrote:

> I put 2 componets on my Form
> 
> A button named "foo2
> a label named "Owner"  (case sensitive)
> 
> Now I try to set an anchorside of the Button to the Form. But because
> of the Form is the Buttons Owner this is streamed as
>  object Button1: TButton
>     AnchorSideRight.Control = Owner
> 
> And when the form is loaded, the anchorside is set to the Label, and
> not the Form....

That is correct. I added a check, so that lazarus does not allow naming
a component 'Owner'.


> rtl\objpas\classes\writer.inc
> procedure TWriter.WriteProperty(Instance: TPersistent; PropInfo:
> Pointer); ...
>   tkClass:
> .... (line 1076)
>               { Determine the correct name of the component this 
> property contains }
>               if Component.Owner = LookupRoot then
>                 Name := Component.Name
>               else if Component = LookupRoot then
>                 Name := 'Owner'


Mattias
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to