Re: Responding from a delegate?
Re: Responding from a delegate?
- Subject: Re: Responding from a delegate?
- From: Ondra Cada <email@hidden>
- Date: Thu, 15 Apr 2004 19:10:50 +0200
Sam,
On 15.4.2004, at 16:55, Sam Thorne wrote:
>
What I can't get my head round is how to respond from the delegate
>
object back to the delegator, specifically one of the IBActions is
>
meant to open a drawer in the window of the window controller that is
>
the delegator.
>
Do I have to set an instance variable referring back to the delegator
>
in the delegate?
Generally, yes. Unless the sender identifies itself explicitly (like it
always is in action methods and often in delegate ones), it is just not
possible to find who sent the message.
>
This seems a bit messy.
In practice, it rarely is. Normally, the delegate is some kind of
controller anyway, so it has to have the outlet for the controlled
object. Besides, the delegate methods pretty often contain the
controlled object explicitly.
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.