Re: Keyboard events in an NSTextEntry
Re: Keyboard events in an NSTextEntry
- Subject: Re: Keyboard events in an NSTextEntry
- From: Timothy Ritchey <email@hidden>
- Date: Fri, 29 Mar 2002 07:47:07 -0500
Oops, no - I mean an NSTextField. Would your function still work for
that?
um, hmm - ahh, you need to get a hold of the NSTextField's NSTextView
editor. Something like this SHOULD work. not tested:
NSTextField *field = [[NSTextField alloc] init]; // or however you get
it (probably through IB)
NSTextView *editor = (NSTextView*)[field currentEditor]; // need to
cast to the NSTextView subclass
[editor setDelegate:self];
Then implement the
- (BOOL)textView:(NSTextView *)aTextView
doCommandBySelector:(SEL)aSelector
method.
There might be an easier way, but I am not sure what it is.
tim
_______________________________________________
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.