Re: Overriding NSTextField keyDown?
Re: Overriding NSTextField keyDown?
- Subject: Re: Overriding NSTextField keyDown?
- From: "Mr. Gecko" <email@hidden>
- Date: Tue, 6 Jan 2009 15:27:26 -0600
oh yeah forgot about that.
Thanks
On Jan 6, 2009, at 3:10 PM, Douglas Davidson wrote:
On Jan 6, 2009, at 1:05 PM, Mr. Gecko wrote:
I didn't know this went up, I figured out how to do this like
saturday.
- (BOOL)control:(NSControl *)control textView:(NSTextView
*)textView doCommandBySelector:(SEL)commandSelector {
if ([NSStringFromSelector(commandSelector)
isEqualToString:@"insertNewline:"]) {
[self goToURL:self];
return YES;
}
return NO;
}
Something like that should do the trick. I should point out that
you can compare the selector you receive directly to
@selector(insertNewline:); you don't need to convert to strings.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden