[REBOL] Re: win-offset? screen-offset? bug
From: brett:codeconscious at: 23-Mar-2002 15:05
> I find these standard functions wrong (beyond they have the same comment):
> win-offset?: func [
> screen-offset?: func [
> The problem is that they do not add the edge size of panels.
> Are I right?
Yes and no. The functions are correct in my opinion as they should not be
dependent on VID styles. I believe the problem is with panels/layout.
Look at this example code, the panel-face variable is pointing
to something that does not exist in the face object model.
view lyo: layout [
style button button 200x20
panel-face: panel 300x300 [
blue-box: box blue
red-box: box red
] edge [size: 5x5 color: orange]
green-face: box green
button "Move to phantom face" [
green-face/offset: win-offset? panel-face
button "Move to actual panel face" [
green-face/offset: win-offset? lyo/pane/1
Now have a look at these results:
>> equal? lyo/pane/1 panel-face
>> type? lyo/pane/1/pane
The panel-face variable appears to get set to some intermediate face made
the construction of the panel but which is not actually part of the final
I haven't worked out how to fix it but you can see a work around in the code