Eric E. Dolecki wrote:
If I understand you, make a method which you can call directly and call this also from your delegate selector.

I was trying to say that if you implement a class that has the following method:

-(void) setDelegate: (id) delegate;

You are more or less obligated to call:

[delegate delegateMethod]

somewhere in your implementation. Otherwise, the delegate never does anything.

However, if you generalize the question, as Bill seems to have done, then normally, you never call

[delegate delegateMethod]

because that is up to the class that implements -setDelegate:.







Thanks,
E.

On May 16, 2009, at 4:27 PM, Jason Stephenson <ja...@sigio.com> wrote:

Uli Kusterer wrote:
On 16.05.2009, at 19:28, Bill Bumgarner wrote:
On May 16, 2009, at 10:21 AM, Sourabh Sahu wrote:
Can we call delegates explicitly, Please reply soon.

Yes.  But it is a bad idea.
What exactly was the question, and why is it a bad idea? I'm unable to follow the conversation, it seems ... ?

I am not entirely certain either, but I know that if you're writing the code for the object that accepts the delegate object, you kind of have to call the delegate methods explicitly at the appropriate times or they don't get called. There's no magic sauce that makes that happen without you providing it.

So, I suppose the answer really depends on what the question means.

Jason
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com

This email sent to edole...@gmail.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to