On my iMac, on entering:
(?5) wdquery 'myapp' ; 'my message'
if you press Esc or click the GoAway button in the window's titlebar,
this is equivalent to clicking OK, viz 0 is returned in all cases of
left arg. The same thing happens when you try to quit J itself and see
the message: "Do you want to exit J?" -- J exits on Esc / GoAway.
One sad effect of that -- and I've seen it happen -- is that if a
trailing wire (stray elbow, cat's paw, etc) holds down the Esc button,
J promptly closes all its windows and terminates.
This seems counterintuitive to me. A user might expect that GoAway /
Esc equates to Cancel, not OK. Other Mac apps (eg TextEdit) disable
the GoAway within a confirmation dialog, eg on quitting with an
unsaved document... and Esc is equivalent to Cancel, not "Save..." or
"Don't Save".
I know it's an OAFWD ("Only A Fool Would Do it!"). But my users don't
possess our level of intelligence. How can I detect GoAway / Esc, to
override this behaviour?
Ian
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm