• 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: Key event handling theory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key event handling theory


  • Subject: Re: Key event handling theory
  • From: Thomas Lachand-Robert <email@hidden>
  • Date: Sat, 5 Jan 2002 13:32:34 +0100

Le vendredi 4 janvier 2002, ` 10:12 , Greg Titus a icrit :

The NSResponder machinery will:

1) In -keyDown: pass the event to -interpretKeyEvents:
2) In -interpretKeyEvents: it will do the binding to the deleteBackwards command and call -doCommandBySelector:
3) In -doCommandBySelector: the default implementation just sees if self responds to the selector and calls it so
4) Your -deleteBackwards: method is invoked.


This seems rational, but now I don't understand what happen to me. I have subclassed NSOutlineView to have the delete key working (because it doesn'
t by default!).

If I change keyDown, then it works (the method is called). Otherwise, if I subclass interpretKeyEvents, or doCommandBySelector, or deleteBackward (there is no final s BTW), nothing works. They are not called. I tried to put a breakpoint:
b [NSResponder interpretKeyEvents:]
it has no effect (on the other hand, a breakpoint on keydown is attained).

Do you think something is broken here?

Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.


References: 
 >Re: Key event handling theory (From: Greg Titus <email@hidden>)

  • Prev by Date: TaskDidTerminateNotification with AuthorizationExecuteWithPrivileges?
  • Next by Date: Re: Which Dock item chosen?
  • Previous by thread: Re: Key event handling theory
  • Next by thread: Newbie question on NSControl
  • Index(es):
    • Date
    • Thread