The StandardKeyBinding plist binds named action methods to numerous
key combinations. Many of those action methods are declared in
NSResponder.h. Many others are not found in AppKit. For example,
moveToEndOfDocument: (command-down) is an NSResponder method, but
moveToEndOfDocumentAndModifySelection: (shift-command-down) is not
declared in any public header that I have found.
That means it’s easy to do this:
- (void) moveToEndOfDocument:(id)sender {
// do some necessary things
[super moveToEndOfDocument:sender];
// do other necessary things
}
But what is the prudent way to do the equivalent for
moveToEndOfDocumentAndModifySelection: ?
I am mighty tempted to use
performSelector:@selector(moveToEndOfDocumentAndModifySelection:);
after all, the action method is right there in
StandardKeyBinding.plist for all the world to see. On the other hand,
it is not in a public header and when the roll is called up yonder I
don’t want to confess that I have used private methods. I suppose it
will be no use arguing that it wasn’t fair for OS X to publicize those
methods, bind keystrokes to them, and then implement them in a private
API.
Thanks,
Ross_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]