• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWindow makeFirstResponder bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow makeFirstResponder bug?


  • Subject: Re: NSWindow makeFirstResponder bug?
  • From: John Woodward <email@hidden>
  • Date: Thu, 28 Mar 2002 22:26:41 -0500

I now have a little more insight about the problem, but still think there is a bug. I think that the makeFirstResponder call is actually working. The situation is that I am dismissing a dialog with a button that has the key equivalent of <return>. When this button or return is pressed, the dialog is reused, with the intent being that the makeFirstResponder call selects a particular NSComboBox. I have now discovered that everything works fine if I actually click on the button. The problem comes when I press the return key in a combobox. The dialog is dismissed and the rewritten, but the combobox that I was in when I hit return remains selected. I suspect the problem is that this combobox receives some event (keyUp??) after the other combobox is programatically selected. This would appear to be a bug in Cocoa. Has anybody seen similar strange behavior with pressing return to select the default button? - John

John Woodward wrote:

Date: Sun, 24 Mar 2002 13:18:38 -0500
To: email@hidden
From: John Woodward <email@hidden>
Subject: NSWindow makeFirstResponder bug?

I have a window for which I set different views as the main view. The code:

[mainWindow setViewAnimated: aView title:@"Whatever"];
[mainWindow makeFirstResponder:aComboBox];

aView is a view with multple NSComboBoxes and NSTextFields. The
above code causes aComboBox to be selected when aView is first
displayed. However, if the user tabs to another key view, and later
the above lines are executed again, aComboBox is not selected; the
makeFirstResponder has no effect when executed a second time. Am I
missing something is is this a bug?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSView subclass never gets dealloced?
  • Next by Date: Re: App dying under MallocDebug and ObjectAlloc
  • Previous by thread: NSWindow makeFirstResponder bug?
  • Next by thread: Overriding methods
  • Index(es):
    • Date
    • Thread