Dialog with few buttons

Discussion in 'Mac Programming' started by satyam90, Jun 8, 2009.

  1. macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #1
    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?
     
  2. macrumors G4

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    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.
     
  3. thread starter macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #3
    It's happening not only with my application, but also with default dialogs/windows of other Applications too.
     
  4. macrumors regular

    Joined:
    Apr 13, 2009
    #4
    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.
     

Share This Page