PDA

View Full Version : close window event


shai
09-13-2005, 01:10 PM
Hi,
I was wondering if it's possible to make my vizard program somehow call a function when a user clicks on the "X" (or close window button)?

For example, I'd like to close all the files that I used in my program, etc...

Thanks,
Shai

farshizzo
09-13-2005, 01:18 PM
Hi,

Vizard has an EXIT_EVENT that is triggered when the script ends. Here is some sample code:def onexit():
print 'exiting'
viz.callback(viz.EXIT_EVENT,onexit)