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

[REBOL] Re: Comparing faces.

From: greggirwin:mindspring at: 10-Feb-2004 10:24

Hi Bruno, BGA> So, I have this application that have 2 windows and I want to trap the BGA> 'close event on them. I am doing something like this: I hope a real VID guru will correct me where I err, but I think FACE is always going to be the screen-face in an event function. What you want to use for comparison is EVENT/FACE. Aside from that, and a couple typos in the code you posted, you're right on track. main-window: layout [bt: button [view/new other-window]] other-window: layout [button "x"] my-evt-func: func [face event] [ switch event/type [ close [ either event/face = main-window [ print "closing main window" ] [ print "closing other window" ] ] ] event ] insert-event-func :my-evt-func view main-window -- Gregg