Re: Key event handling theory
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.