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

[REBOL] Comparing faces.

From: bga::bug-br::org::br at: 10-Feb-2004 15:27

So, I have this application that have 2 windows and I want to trap the 'close event on them. I am doing something like this: main-window: layout [ ... ] other-window: layout [ ... ] my-evt-func: func [ event face ] [ switch event/type [ close [ either face = WHATSHOULDIPUTHERE? [ ; Do stuff on main-window close ] [ ; Do stuff on other-window close ] ] event ] ] insert-event-function :my-evt-func view main-window The other-window is opened when the user clicks a button that is defind in the main-window layout (it is opned using view/new). So, my question is: What should I replace "WHATSHOULDIPUTHERE?" with so it will actually do what I want to do (as indicated bythe comments in the code)? I tried "face = main-window" and it did not work. -Bruno