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                         

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to