Re: Catching the delegate message in a subclass
Re: Catching the delegate message in a subclass
- Subject: Re: Catching the delegate message in a subclass
- From: Andy Lee <email@hidden>
- Date: Fri, 27 Jun 2008 11:18:57 -0400
On Jun 27, 2008, at 11:03 AM, Sveinbjorn Thordarson wrote:
Hello everyone,
I'm implementing a subclass of NSTextField and I need to intercept a
delegate message in the class before it is sent to the delegate. Is
this
possible, and if so, how?
See the docs for the methods -textDidBeginEditing:, -textDidChange:,
etc. in NSTextField. I'd suggest overriding whichever of those
corresponds to the delegate method(s) you care about. This way you
can intercept not only messages to the delegate but the corresponding
notifications. For example, the NSTextField might not have a delegate
but there might be some object out there listening for notifications.
--Andy
_______________________________________________
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