[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView and key events, WAS: [ 101845 ] Pageup Pagedn do not work

From: Willem Rein Oudshoorn
Subject: NSTextView and key events, WAS: [ 101845 ] Pageup Pagedn do not work
Date: 30 Mar 2003 22:23:25 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Sorry to keep bothering you all, but perhaps someone can enlighten me
on some questions I have about the NSText system.

Consider the following diagram:


  NSTextView ---> delegate


Why is in -[NSTextView keyDown:]  the decission:

[non-editable] pass event to superclass, do NOT touch the 
               key down at all.
[editable]     pass to delegate or handle in NSTextView, but
               DO NOT PASS to superclass, even when the event
               can not be handled by the NSTextView + delegate.

Naive as I am, I would expect:

             *  Try to let the delegate handle the event
             *  Try to handle the event ourself,
             *  Send to superclass to continue traveling
                the NSResponder chain.

Reason I ask:

* In the NSTextView documentation provided by Apple I do not
  see any reference to special behaviour for non-editable 
  textviews with respect to the NSResponder chain.

* [the real reason]  If the situation is as I expect we can 
  quite easily implement pageup/pagedown for non-editable textviews.
  - Implement keyDown in NSScrollView (trivial and it works)
  - Applications that want to handle their own scrolling, 
    should register themself as delegate and handle the

Wim Oudshoorn.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]