• 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: Responding from a delegate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Responding from a delegate? (From: Sam Thorne <email@hidden>)

  • Prev by Date: allow user to drag controls to make their own interface?
  • Next by Date: Re: New book on its way!!!
  • Previous by thread: Responding from a delegate?
  • Next by thread: Re: Responding from a delegate?
  • Index(es):
    • Date
    • Thread