Open Siskin-Bot opened 4 years ago
As BrianH commented, there is now map-gob-offset
and so the example could be rewritten as:
view/options win [
offset: 'center
handler: [
name: 'my-handler
priority: 10
handler: func [event] [
switch event/type [
close [quit]
down [
print "win:"
inner: map-gob-offset win event/offset
outer: map-gob-offset/reverse win event/offset
? inner
? outer
print "g1:"
inner: map-gob-offset g1 event/offset
outer: map-gob-offset/reverse g1 event/offset
? inner
? outer
print "g2:"
inner: map-gob-offset g2 event/offset
outer: map-gob-offset/reverse g2 event/offset
? inner
? outer
]
]
none
]
]
]
But the problem is still there... the outer
is always the win
gob! When clicked on the green box (g2
), I expect the outer
be it's parent, which is the red box (g1
).
Submitted by: oldes
The result of map-outer always return gob of the window. It shoult return gob relative to given gob.
Imported from: CureCode [ Version: alpha 31 Type: Bug Platform: All Category: n/a Reproduce: Always Fixed-in:none ] Imported from: https://github.com/rebol/rebol-issues/issues/303
Comments:
Submitted by: admin
Please clarify this bug. -Carl
Maybe you should first clarify, what is the first 'gob argument used for. If this function is used just to get root, it should be probably renamed. Or there is some extra refinement... because if it should return root of the gob, why there is the position? Or if it should return root from position, why there is the gob?
I understand it like map-inner/first which would return first (outer) gob, which is inside the given gob under given position. So it could be used to find my own gob window, which holds many gobs inside (so I can for example focus this window (which is not OS based!)) Now when I use map-inner, I would get just the inner-most gob and traverse back manually.
Submitted by: BrianH
MAP-OUTER and MAP-INNER have been replaced with MAP-GOB-OFFSET.