• 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
keyUp falling through to window when sheet dismissed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

keyUp falling through to window when sheet dismissed


  • Subject: keyUp falling through to window when sheet dismissed
  • From: Ken Worley <email@hidden>
  • Date: Tue, 21 Oct 2008 11:43:01 -0600

Hi all,

Tried searching for answers to this and haven't come up with anything yet...

I'm displaying a sheet which has a default button. The default button dismisses the sheet. When the user presses Return to dismiss the sheet via the default button, the keyUp event for the Return key is sent to the window below. I happen to be looking at keyUp events in certain edit fields where the Return key triggers an action (much in the same way that the address field in a web browser does). When one of these edit fields is the first responder as the sheet is dismissed, the edit field gets the keyUp and triggers its action which is, obviously, not desirable.

It seems like the correct solution is to somehow avoid the keyUp being sent to the window/edit field after the sheet is dismissed, but I also wonder if I'm catching the right event in the edit field. keyDown doesn't work there because of the way edit fields work in Cocoa. I can try to look into the event queue for the keyUp in question, but I assume it isn't there yet at the point when I get the message that the default button's key equivalent was triggered...

Thanks in advance for any suggestions.

Ken

--
Ken Worley
Software Engineer, Tiberius, Inc.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: keyUp falling through to window when sheet dismissed
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Re: Core Data saving / Leopard / The temporary directory at ...
  • Next by Date: Re: Strange Tiger incompatability
  • Previous by thread: Re: Strange Tiger incompatability
  • Next by thread: Re: keyUp falling through to window when sheet dismissed
  • Index(es):
    • Date
    • Thread