Re: How To : Delegates
Re: How To : Delegates
- Subject: Re: How To : Delegates
- From: Art Isbell <email@hidden>
- Date: Wed, 26 Jan 2005 14:32:30 -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