NSTextField selectors
NSTextField selectors
- Subject: NSTextField selectors
- From: Alex Reynolds <email@hidden>
- Date: Fri, 20 Oct 2006 08:08:05 -0400
To follow up on my previous question, I am trying to do a [textField
selectText:self] call inside my delegate object when the user presses
Command-A inside my subclassed NSTextField object. I'd also like to
restore other Command-keypresses: e.g., copy: on Command-C, paste: on
Command-V, etc.
Here's the code I'm trying to use to make that happen:
- (BOOL) control:(NSControl *)control textView:(NSTextView *)textView
doCommandBySelector:(SEL)command
{
if (command == @selector(selectAll:))
{
[textField selectText:self];
return YES;
}
return NO;
}
But this fails. In fact the only selectors I seem to be able to get
are the result of pressing the Escape key (cancelOperation: and
complete:).
Should I be using a different delegate method?
-Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden