discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButtons and the Return key


From: Gregory Weston
Subject: Re: NSButtons and the Return key
Date: Wed, 29 Oct 2008 16:42:28 -0400
User-agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X)

In article <mailman.2398.1225303659.25473.discuss-gnustep@gnu.org>,
 Richard Frith-Macdonald <richard@tiptree.demon.co.uk> wrote:

> On 29 Oct 2008, at 17:24, Wolfgang Lux wrote:
> 
> > In response to my little rant about broken key view loops
> > in the NSAlert and NSSavePanel classes in one of my yesterday's
> > patches, Fred kindly pointed me to this message from the
> > gnustep-dev mailing list:
> > http://lists.gnu.org/archive/html/gnustep-dev/2007-02/msg00167.html
> > In summary, Sergii proposed calling setRefusesFirstResponder:NO for
> > the non-default buttons of an alert panel in order to prevent the
> > user from selecting the wrong action accidentally by using the
> > Tab button.
> >
> > I see the problem that Sergii wants solved here (and have indeed
> > been bitten by it myself). However, I think that the real problem
> > is that GNUstep's NSButtons fire their action upon pressing the
> > Return key. IMHO, NSButtons should handle only the Space key and
> > the Return key should always be sent to the default button (cell)
> > of a window (if there is any at all). Then one could include all
> > buttons in the key view loop with little risk of accidentally
> > invoking the wrong action, but at the same time all buttons
> > remain reachable via the keyboard for those that prefer it.
> >
> > Any opinions on that matter?
> 
> I don't know whether it's a good idea or not, because I don't know how  
> MacOS-X does it.
> 
> IMO the 'right' way to do things is the way MacOS-X does them, so that  
> we don't get caught by incompatibilities and porting problems later  
> on.   At the very least, if we do things differently from MacOS-X we  
> will get people raising the difference as a bug report later.

In Mac OS the default button is by definition the one that is invoked by 
pressing return. And vice versa. Part of the Mac UI guidelines for 
almost 25 years and retained in the move to OS X.

G

-- 
"Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
   - Harry Potter and the Odor of the Phoenix


reply via email to

[Prev in Thread] Current Thread [Next in Thread]