• 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: How To : Delegates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How To : Delegates


  • Subject: Re: How To : Delegates
  • From: Art Isbell <email@hidden>
  • Date: Wed, 26 Jan 2005 14:37:46 -1000

On Jan 26, 2005, at 2:20 PM, Ray Ackland wrote:

As far as I am aware, your delegate doesn't need to be a subclass of anything.

Correct

Just create a class that will do the delegate tasks, put methods in there that are the delegate methods you are interested in, then specify that your class is the delegate for your source class.

It's not even necessary to create a new class; you can implement delegate methods on an existing class. The choice of a class to act as a delegate should consider whether the delegate method depends on any state, whether the delegate object will always exist when needed, etc. An "esthetic" consideration might be whether the delegate object is somehow "related" to the object that needs a delegate.


Aloha,
Art

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >How To : Delegates (From: Owen McKerrow <email@hidden>)
 >Re: How To : Delegates (From: Ray Ackland <email@hidden>)

  • Prev by Date: Re: How To : Delegates
  • Next by Date: Re: How To : Delegates
  • Previous by thread: Re: How To : Delegates
  • Next by thread: RE: How To : Delegates
  • Index(es):
    • Date
    • Thread