Re: NSScrollView implements scrollPageDown?
Re: NSScrollView implements scrollPageDown?
- Subject: Re: NSScrollView implements scrollPageDown?
- From: "Louis C. Sacha" <email@hidden>
- Date: Fri, 9 Apr 2004 23:24:28 -0700
Hello...
NSScrollview implements its own version of the pageUp: and pageDown:
methods, which you might be able to use instead to accomplish what
you are trying to do.
It's possible to find out exactly which methods are implemented in a
particular class using a really handy tool called class-dump by Steve
Nygard (if you search the archives for class-dump it should pull up
previous messages with the link to download). You could also use
otool, which should already be on your system, but the procedure is a
bit more arcane.
The reference to scrollPageDown: in the docs you linked to (as well
as the descriptions of the various scroll...: methods in NSResponder)
appear to be wishful thinking on the part of the technical writing
staff :)
Louis
Dear All,
I'm implementing keyboard navigation on my custom view, which if I
understand it correctly, the canonical way is to implement keyDown:
to send interpetKeyEvents:, which then sends doCommandBySelector:
with the appropriate selector back to my custom view. Then
doCommandBySelector: either handles it itself or passes it up the
responder chain --
-- see http://developer.apple.com/documentation/Cocoa/Conceptual/
BasicEventHandling/Concepts/KeyEvents.html.
Now my custom view sits inside of a NSScrollView. According to that
document, "the NSScrollView class provides a default implementation
[of scrollPageDown;] so this implementation is invoked." This
doesn't seem to work in my case; the doCommandBySelector call falls
down with a beep. Just to be sure, I checked it with:
[self respondsToSelector: sel]
[[self enclosingScrollView] respondsToSelector: sel]
when sel is the scrollPageDown selector, both of which return NO.
This means that contrary to docs, NSScrollView doesn't implement
scrollPageDown: ?!
Cheers, Glen Low
_______________________________________________
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.