• 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: Re: Respond to Click in TextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Respond to Click in TextView


  • Subject: Re: Re: Respond to Click in TextView
  • From: "Michael Ash" <email@hidden>
  • Date: Mon, 28 Aug 2006 18:26:55 -0400

On 8/28/06, Michael Terry <email@hidden> wrote:

> In the end it's possible that the notification approach would end up > being overcomplicated, but from where I see it now, it seems like the > better way.

Ok, good, that's what I'll do, if I do do it. Everything I read takes
such pains to warn me off of subclassing that I'm dreading ever
having to.

Don't dread it, it's not that bad. It's really not much harder than using a notification or a delegate, except that you usually already have a class sitting around that can serve as the delegate, whereas with a subclass you have to make a new one. But that's not much of a hardship.

The main disadvantage is that it's often less clear how to do what you
want, and the design can get uglier. With a delegate, you have a nice
list of the methods you can implement and what they do, and it's kept
in a separate class. If you subclass, you have a large list of
methods, some of which make be vague or confusing, and you kind of
have to make your own way. When given a choice, I almost always prefer
to use a delegate or notification, but if there's no choice then it's
nothing to worry about.

Mike
_______________________________________________
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


References: 
 >Respond to Click in TextView (From: Michael Terry <email@hidden>)
 >Re: Respond to Click in TextView (From: "Michael Ash" <email@hidden>)
 >Re: Respond to Click in TextView (From: Michael Terry <email@hidden>)
 >Re: Re: Respond to Click in TextView (From: "Michael Ash" <email@hidden>)
 >Re: Respond to Click in TextView (From: Michael Terry <email@hidden>)

  • Prev by Date: Shift-clicking NSButtonCells?
  • Next by Date: Re: I'm having trouble retaining a NSColor
  • Previous by thread: Re: Respond to Click in TextView
  • Next by thread: Artifacts during text selection
  • Index(es):
    • Date
    • Thread