• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Catching the delegate message in a subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Catching the delegate message in a subclass (From: "Sveinbjorn Thordarson" <email@hidden>)

  • Prev by Date: Re: [Moderator] List Guidelines - Must Read
  • Next by Date: Re: [Moderator] List Guidelines - Must Read
  • Previous by thread: Catching the delegate message in a subclass
  • Next by thread: Help getting custom cell layout in NSOutlineView column
  • Index(es):
    • Date
    • Thread