[REBOL] Re: Catching the Close Event
From: rotenca::telvia::it at: 12-Jan-2003 14:32
> > I want to catch the close event to save the position of the window when it
> is closed.
> >> view/new l: layout [button]
> >> l/feel/detect: func [f e][all [e/type = 'close probe f/offset] e]
> >> do-events
Do not forget to make the feel before changing it, else every window will
share this code.
The standard window-feel has code for detecting key event.
If you want to preserve it, you must do something like this:
view/new l: layout [button]
l/feel: make l/feel [
detect: func [face event][
if event/type = 'close [print face/offset]
return o-d face event
RT suggest to use the global chain of event-func at sceen level, just to not
change the standard the window-feel, i argue.