Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
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?
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
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.
 

McBgnr

macrumors regular
Apr 13, 2009
144
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.