Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: win-offset? screen-offset? bug

From: brett:codeconscious at: 24-Mar-2002 12:17

Hi Romano,
> 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
only
> by the display code activated by View, not by the layout function (this
means
> that immediately after a layout the parent-face field is not correctely
set in
> 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
style:
> l: layout [p: box 200x200 edge [size: 50x50]] > f: make-face/spec 'button [action: func [face value][print win-offset?
f]]
> 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
code
> > anyway. > > Yes, to reach the right face you must get the parent-face of the face
pointed
> 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. Regards, Brett.