trying to give some action on x button when it's being pressed
Just like asking whether to save or not when we close editor after giving
some changes
we are trying to use this similar function on a view. (when view asked to
be closed, pop up yes/no dialog
and if it's 'yes', close the view and if it's 'no', fail to close it.)