View Full Version : Dialog with few buttons

Jun 8, 2009, 08:56 AM
I am using Cocoa with Obj C.
I am showing some dialogs using "NSRunAlertPanel". One button is made default (which is shown in blue color). When that dialog popsup, by clicking "tab", I am able to change the focus to different button (I am seeing buttons surrounded by "blue" color). But when I press enter, that particular button is not clicked. But the default button is only getting clicked.
Is it the default behavior on Mac or do I have to write any additional code for this?

Jun 8, 2009, 09:00 AM
Try testing your application with full keyboard access turned off and turned on, just to see how this particular dialog behaves under both settings. I suspect that you press a different key other than Enter/Return to select a tabbed-to non-default button (Space?) on the Mac OS.

Jun 9, 2009, 02:13 AM
It's happening not only with my application, but also with default dialogs/windows of other Applications too.

Jun 9, 2009, 04:09 AM
In Mac buttons that have focus respond to the click of space bar instead of Enter Key. A dialog can have only one default button which will respond to Enter Key press.