[REBOL] Re: specifiv position in area
From: rotenca:telvia:it at: 25-Feb-2002 16:04
Hi Brett,
> Anybody else got some clues?
All the problem arises from this func:
system/view/screen-face/feel/event-funcs/1
(1 before any insert-event-func) which is the default func for handling
events:
func [face event /local fac][
if all [
system/view/focal-face
event/type = 'down
not within? event/offset win-offset? system/view/focal-face
system/view/focal-face/size
system/view/focal-face/dirty?
] [
fac: system/view/focal-face
unfocus
do-face fac none
fac/dirty?: none
]
event
]
As you can see, a mouse 'down event unfocus the actual focal-face (and caret)
and do-es its action, but only if the dirty? flag is true. This flag is high
when the user changes some text in an area/field face. So when you type
something, the dirty? flag is high and at the next 'down event (on a button,
for example) the face will be unfocus-ed before your button action routine can
take the control.
---
Ciao
Romano