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

[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 > 281x281
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 [ o-d: :detect detect: func [face event][ if event/type = 'close [print face/offset] return o-d face event ] ] do-events RT suggest to use the global chain of event-func at sceen level, just to not change the standard the window-feel, i argue. --- Ciao Romano