[REBOL] Re: win-offset? screen-offset? bug
From: brett:codeconscious at: 24-Mar-2002 12:17
> The only "error" of layout is the variable assignement, not the cascade of
> face/pane (else it does not works) which, btw, is fully set for a window
> by the display code activated by View, not by the layout function (this
> that immediately after a layout the parent-face field is not correctely
> ALL the faces, but this is another problem :-).
Well variables returned from layout *are* pretty important :^)
As for parent-face I don't know if that is really a problem, just a matter
of usage, we know it it gets calculated after View been activated.
> The win-offset? give a wrong result also if you do not use the panel
> l: layout [p: box 200x200 edge [size: 50x50]]
> f: make-face/spec 'button [action: func [face value][print win-offset?
> p/pane: reduce [f]
> view l
Ah that example helps considerably :^)
Yes it does look like a problem.
> > I haven't worked out how to fix it but you can see a work around in the
> > anyway.
> Yes, to reach the right face you must get the parent-face of the face
> by the var, in your example:
> panel-face: panel-face/parent-face
Now doubt you'll see my later message - which I think fixes this problem.
> Here are my patched win-offset? screen-offset?:
Thanks for your patches, I'm going to add them to my patches.r script along
with my change to layout.