Re: Possible to abort close stack?

Scott Raney (raney@metacard.com)
Tue, 18 Jul 1995 22:18:24 -0600 (MDT)

>
> Hi, Is it possible to abort the close stack process? I want to be able
> to allow users to close the window from the window manager, using
> whatever method the window manager uses, but I also want to be able to
> abort the close in certain situations.
>
> For example, the user have made some modifications in the app that can
> be saved, and if the user closes the app from the window manager, I'd
> like to be able to tell the user that some changes have been made that
> maybe the user would like to save. Now, I can easily do this in a
> closeStack handler, but if the user wishes to abort the close (opps,
> didn't mean to do that!), I can't seem to figure out how to do this in
> MetaCard.

You can't override the close message, since this message is only a
notification because it isn't initiated directly by user action. You
can remove the close box entirely by setting the "decorations"
property, however. Other than that, all you can do is reopen the
stack after it gets closed.

> It's trivially easy in Tcl/Tk (nudge, nudge, Scott)

Yeah, but that's because you get to (have to) deal with raw X events
in Tk, even to the point of using the X definitions for the message
names. This goes into the "more than enough rope" category IMHO.
It's also going to look mighty strange to people who don't know the
ICCCM documentation (or who are developing stacks for the Mac, OS/2 or
Windows, nudge, nudge ;-)

I'll a message for this on the feature request list. It would work
like the keyDown message: if you have a handler for it that doesn't
pass it, the default action (inserting a character or closing the
window) isn't taken.

> -Earle
>
> --
> Earle Lowe
> emlowe@fsa.ca
> FSA Corporation
> Performance and system software for UNIX networks.
>
>

-- 
***********************************************************************
* Scott Raney  303-447-3936            Remember: the better you look, *
* raney@metacard.com                   the more you'll see -- Lidia   *
***********************************************************************