Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!eos!shelby!csli!dayglow From: dayglow@csli.Stanford.EDU (Eric T. Ly) Newsgroups: comp.sys.next Subject: Re: Owner of a delegate ... Message-ID: <13477@csli.Stanford.EDU> Date: 7 May 90 22:23:41 GMT References: <90127.154746CMH117@psuvm.psu.edu> Sender: dayglow@csli.Stanford.EDU (Eric T. Ly) Reply-To: dayglow@csli.stanford.edu (Eric T. Ly) Organization: Center for the Study of Language and Information, Stanford U. Lines: 21 In article <90127.154746CMH117@psuvm.psu.edu> CMH117@psuvm.psu.edu (Charles Hannum) writes: >A have a Window (actually a Panel, but that's irrelevant). I have a delegate >for the Window. I connected the delegate in the Interface Builder. Now, my >problem: > > When the delegate receives a message (like a call to windowDidBecomeKey), is > there a way to directly determine which Window the message is in reference to > without using an outlet in the delegate's class? Usually, a message that your delegate receives will include a "sender" argument. This is true for the windowDidBecomeKey: delegate method. The "sender" refers to the Window object that something has happened to, so for instance, when your delegate gets a windowDidBecomeKey: message, the sender refers to the Window which just became the key window. Hope this helps. Eric Ly