Re: Delegates
Re: Delegates
- Subject: Re: Delegates
- From: "I. Savant" <email@hidden>
- Date: Mon, 19 May 2008 14:25:28 -0400
On Mon, May 19, 2008 at 2:00 PM, Michael Vannorsdel <email@hidden> wrote:
> Even delegation is not a commonly known term in my experience (it's used for
> several differing ideas in the US).
Not sure what you mean there.
To 'delegate' is to "entrust (a task or responsibility) to another
person, typically one who is less senior than oneself".
In this respect, an object is entrusting a task or responsibility to
something else that has no direct control over the 'superior' object's
workings, but the 'superior' object is relying on the 'delegate' to
perform some task if necessary or to find something out and let it's
'superior' know if it's okay/safe/whatever to do something.
The other definition is that to delegate is to "send or authorize
(someone) to do something as a representative".
Same result, different aspect. The delegate represents the
'superior' object's interests.
It suggests doing something "on behalf of" someone (or in this case,
something) else. In this respect, Cocoa's use of the word is *exactly*
this. Examples:
- "I'm about to close this window, but will wait until you've had a
chance to do whatever you need to in order for me to continue. I'll
wait."
- "I've been asked to change my selected row from this row to this
row. Please find out whether this is permissible and let me know. I'll
wait."
This is FAR different from notifications or KVO. Example:
- "To Whom it May Concern: Per our client's request a few moments
ago, I changed selection from x to y. Just letting you know. I hope
you get this message in time to act on it properly and, more
importantly, I hope you're checking your mail. Signed, some object."
- "To Whom it May Concern: I've changed the value of object x's "foo"
key from value y to value z. Do as you will if and when you get this
message. Signed, some object."
--
I.S.
_______________________________________________
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