Re: Tab and Enter in NSTextView
Re: Tab and Enter in NSTextView
- Subject: Re: Tab and Enter in NSTextView
- From: Spencer Salazar <email@hidden>
- Date: Sun, 3 Sep 2006 14:36:56 -0400
even easier (I think), you could also implement NSTextView's
textView:doCommandBySelector: delegate method, and check to see if
the selector is insertTab:.
See:
http://developer.apple.com/documentation/Cocoa/Conceptual/TextEditing/
Tasks/InterceptKeys.html
spencer
On Sep 3, 2006, at 2:29 PM, Adam R. Maxwell wrote:
On Sep 3, 2006, at 11:17, I. Savant wrote:
You could subclass NSTextView and override -keyDown: ... In this
method, if the key is "tab", call [self nextKeyView]; ...
otherwise, call [super keyDown:...];
Overriding keyDown: in NSTextView is generally a bad idea (Douglas
Davidson posts on this occasionally). In Mike's case, I think
overriding insertTab:(id)sender would be more appropriate.
hth,
Adam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
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