Brian's observations are always great too. And in this instance it brings an important discussion point: the patterns of using the Esc key.
The Esc key has meaning of Cancel, the same as the Cancel button on a dialog box. It is a way to *interrupt* a *transient* operation, such as to stop dragging an object or to *discard* a dialog box. It's use is finely exemplified in Mac's dialogs, where three buttons are shown, each with its own key--great accessibility implement: (Don't Save) Space -- selected button Cancel Esc [Save] Enter -- default button On the contrary, Esc key or Cancel button should not be used to terminate an application or close a content or multi-function window. For that purpose Close (X title button or Cmd+W/Alt+F4) or Quit (X on main window or Cmd+Q/Alt+F4 or menu) should be used. It is a horrendous antipattern that J session window as well as script windows respond to Esc to close themselves. In particular it bites you when Find dialog is shown and in an attempt to discard it, you unintentionally lose the content window. > From: Brian Schott <[email protected]> > > Oleg's script is great, as usual. > I would make one minor addition that enables the window to be closed > (on my Mac) by clicking the Esc key. > > f_cancel=: f_close NB. utility code > > > On Wed, Sep 16, 2009 at 2:31 AM, Oleg Kobchenko wrote: > > > > Here's an example that translates Kip Murray's flavors to UI. > > The layout is built using the friendly Form Editor. > > > > -- > (B=) > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
