Re: Focus ring changed
Re: Focus ring changed
- Subject: Re: Focus ring changed
- From: Andreas Mayer <email@hidden>
- Date: Tue, 16 Nov 2004 00:43:02 +0100
Am 15.11.2004 um 21:29 Uhr schrieb Eric Long:
I expected to find some kind of delegate method like
"firstResponderChanged"
so I could know when a user changes the focus in my window from one
table to
another, but I don't see a callback anywhere for this.
FWIW I did subclass NSTableView and added my own delegate methods.
- (BOOL)becomeFirstResponder
{
BOOL result = [super becomeFirstResponder];
if (result) {
if ([[self delegate]
respondsToSelector:@selector(didBecomeFirstResponder:)]) {
[[self delegate] didBecomeFirstResponder:self];
}
}
return result;
}
- (BOOL)resignFirstResponder
{
BOOL result = [super resignFirstResponder];
if (result) {
if ([[self delegate]
respondsToSelector:@selector(didResignFirstResponder:)]) {
[(id)[self delegate] didResignFirstResponder:self];
}
}
return result;
}
Andreas
_______________________________________________
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