Hi! I am using a gui in my application. There are 'Ok' and 'Cancel' buttons there which upon clicking close the figure and do some additional processing before returning control to the main matlab program.
My query is how do I perform error checking if the user instead of pressing either of the two buttons, chooses to close the gui window using the window close button (big red X in windows)?
I read the documentation about CloseRequestFcn but was unable to figure it out from there.