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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to